FwupdPlugin.UdevDevice
Description: Reference for FwupdPlugin.UdevDevice

### Class

# FwupdPluginUdevDevice

#### Description [src]

    class FwupdPlugin.UdevDevice : FwupdPlugin.Device {
      parent_instance: FuDevice
    }

A UDev device, typically only available on Linux.

See also: `FuDevice`

#### Hierarchy

#### Ancestors

- FuDevice
- FwupdDevice
- GObject

#### Descendants

- FuI2cDevice
- FuMeiDevice

#### Constructors

###### fu_udev_device_new

Creates a new `FuUdevDevice`.

Available since: 1.8.2

#### Instance methods

###### fu_udev_device_emit_changed

Emits the ::changed signal for the object.

Available since: 1.1.2

###### fu_udev_device_get_bind_id

Gets the device ID used for binding the device, e.g. `pci:1:2:3`

Available since: 1.7.2

###### fu_udev_device_get_children_with_subsystem

Get a list of devices that are children of self and have the provided subsystem.

Available since: 1.6.2

###### fu_udev_device_get_dev

Gets the `GUdevDevice`.

Available since: 1.1.2

###### fu_udev_device_get_device_file

Gets the device node.

Available since: 1.3.1

###### fu_udev_device_get_devtype

Returns the Udev device type.

Available since: 1.4.5

###### fu_udev_device_get_driver

Gets the device driver, e.g. `psmouse`.

Available since: 1.5.3

###### fu_udev_device_get_fd

Gets the file descriptor if the device is open.

Available since: 1.3.3

###### fu_udev_device_get_model

Gets the device device code.

Available since: 1.1.2

###### fu_udev_device_get_number

Gets the device number, if any.

Available since: 1.5.0

###### fu_udev_device_get_parent_name

Returns the name of the direct ancestor of this device.

Available since: 1.4.5

###### fu_udev_device_get_parent_with_subsystem

Get the device that is a parent of self and has the provided subsystem.

Available since: 1.7.6

###### fu_udev_device_get_revision

Gets the device revision.

Available since: 1.1.2

###### fu_udev_device_get_siblings_with_subsystem

Get a list of devices that are siblings of self and have the provided subsystem.

Available since: 1.6.0

###### fu_udev_device_get_slot_depth

Determine how far up a chain a given device is.

Available since: 1.2.4

###### fu_udev_device_get_subsystem

Gets the device subsystem, e.g. `pci`

Available since: 1.1.2

###### fu_udev_device_get_subsystem_model

Gets the device subsystem model code.

Available since: 1.5.0

###### fu_udev_device_get_subsystem_vendor

Gets the device subsystem vendor code.

Available since: 1.5.0

###### fu_udev_device_get_sysfs_attr

Reads an arbitrary sysfs attribute ‘attr’ associated with UDEV device.

Available since: 1.4.5

###### fu_udev_device_get_sysfs_attr_uint64

Reads an arbitrary sysfs attribute ‘attr’ associated with UDEV device as a uint64.

Available since: 1.7.2

###### fu_udev_device_get_sysfs_path

Gets the device sysfs path, e.g. `/sys/devices/pci0000:00/0000:00:14.0`.

Available since: 1.1.2

###### fu_udev_device_get_vendor

Gets the device vendor code.

Available since: 1.1.2

###### fu_udev_device_ioctl

Control a device using a low-level request.

Available since: 1.8.2

###### fu_udev_device_pread

Read a buffer from a file descriptor at a given offset.

Available since: 1.8.2

###### fu_udev_device_pwrite

Write a buffer to a file descriptor at a given offset.

Available since: 1.8.2

###### fu_udev_device_seek

Seeks a file descriptor to a given offset.

Available since: 1.7.2

###### fu_udev_device_set_bind_id

Sets the device ID used for binding the device, e.g. `pci:1:2:3`

Available since: 1.7.2

###### fu_udev_device_set_dev

Sets the `GUdevDevice`. This may need to be used to replace the actual device used for reads and writes before the device is probed.

Available since: 1.6.2

###### fu_udev_device_set_fd

Replace the file descriptor to use when the device has already been opened. This object will automatically `close()` `fd` when `fu_device_close()` is called.

Available since: 1.3.3

###### fu_udev_device_set_flags

Sets the parameters to use when opening the device.

Available since: 1.3.6

###### fu_udev_device_set_logical_id

Sets the logical ID from the device subsystem. Plugins should choose the subsystem that most relevant in the udev tree, for instance choosing `hid` over `usb` for a mouse device.

Available since: 1.5.8

###### fu_udev_device_set_physical_id

Sets the physical ID from the device subsystem. Plugins should choose the subsystem that is “deepest” in the udev tree, for instance choosing `usb` over `pci` for a mouse device.

Available since: 1.1.2

###### fu_udev_device_write_sysfs

Writes data into a sysfs attribute.

Available since: 1.4.5

##### Methods inherited from FuDevice (150)

Please see FuDevice for a full list of methods.

##### Methods inherited from FwupdDevice (109)

Please see FwupdDevice for a full list of methods.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### FwupdPlugin.UdevDevice:bind-id

The bind ID to use when binding a new driver.

Available since: 1.7.2

###### FwupdPlugin.UdevDevice:device-file

The low level file to use for device access.

Available since: 1.3.1

###### FwupdPlugin.UdevDevice:driver

The driver being used for the device.

Available since: 1.5.3

###### FwupdPlugin.UdevDevice:subsystem

The device subsystem.

Available since: 1.1.2

###### FwupdPlugin.UdevDevice:udev-device

The low-level GUdevDevice.

Available since: 1.1.2

##### Properties inherited from FuDevice (7)

###### FwupdPlugin.Device:backend-id

The device backend ID.

Available since: 1.5.8

###### FwupdPlugin.Device:backend-tags

The device tags used for backend identification.

Available since: 1.5.8

###### FwupdPlugin.Device:context

The `FuContext` to use.

Available since: 1.6.0

###### FwupdPlugin.Device:logical-id

The device logical ID.

Available since: 1.1.2

###### FwupdPlugin.Device:parent

The device parent.

Available since: 1.0.8

###### FwupdPlugin.Device:physical-id

The device physical ID.

Available since: 1.1.2

###### FwupdPlugin.Device:proxy

The device proxy to use.

Available since: 1.4.1

##### Properties inherited from FwupdDevice (12)

###### Fwupd.Device:battery-level

The device battery level in percent.

Available since: 1.5.8

###### Fwupd.Device:battery-threshold

The device battery threshold in percent.

Available since: 1.5.8

###### Fwupd.Device:flags

The device flags.

Available since: 0.9.3

###### Fwupd.Device:parent

The device parent.

Available since: 1.0.8

###### Fwupd.Device:problems

The problems with the device that the user could fix, e.g. “lid open”.

Available since: 1.8.1

###### Fwupd.Device:protocol

The device protocol.

Available since: 1.3.6

Deprecated since: 1.5.8

###### Fwupd.Device:status

The current device status.

Available since: 1.4.0

###### Fwupd.Device:update-error

The device update error.

Available since: 0.9.8

###### Fwupd.Device:update-image

The update image for the device.

Available since: 1.4.5

###### Fwupd.Device:update-message

The device update message.

Available since: 1.2.4

###### Fwupd.Device:update-state

The device update state.

Available since: 0.9.8

###### Fwupd.Device:version-format

The version format of the device.

Available since: 1.2.9

#### Signals

###### FwupdPlugin.UdevDevice::changed

The ::changed signal is emitted when the low-level GUdevDevice has changed.

Available since: 1.1.2

##### Signals inherited from FuDevice (3)

###### FwupdPlugin.Device::child-added

The ::child-added signal is emitted when a device has been added as a child.

Available since: 1.0.8

###### FwupdPlugin.Device::child-removed

The ::child-removed signal is emitted when a device has been removed as a child.

Available since: 1.0.8

###### FwupdPlugin.Device::request

The ::request signal is emitted when the device needs interactive action from the user.

Available since: 1.6.2

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct FwupdPluginUdevDeviceClass {
      FuDeviceClass parent_class;
      None __reserved;

    }

###### Class members

`parent_class` |
    FuDeviceClass
| No description available.
`__reserved` |
    None
| No description available.