### Class

# FwupdPlugin UdevDevice

#### Description [src]

    class FwupdPlugin.UdevDevice : FwupdPlugin.Device
      implements Fwupd.Codec {
      /* No available fields */
    }

A UDev device, typically only available on Linux.

See also: `FuDevice`.

#### Hierarchy

#### Ancestors

- FuDevice
- FwupdDevice
- GObject

#### Descendants

- FuBlockDevice
- FuDpauxDevice
- FuDrmDevice
- FuHidrawDevice
- FuI2cDevice
- FuMeiDevice
- FuPciDevice
- FuSerioDevice
- FuUsbDevice
- FuV4lDevice

#### Implements

- FwupdCodec

#### Constructors

###### fu_udev_device_new

Creates a new `FuUdevDevice`.

since: 2.0.0

#### Instance methods

###### fu_udev_device_add_open_flag

Sets the parameters to use when opening the device.

since: 2.0.0

###### fu_udev_device_add_property

No description available.

###### fu_udev_device_emit_changed

Emits the ::changed signal for the object.

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`.

since: 1.7.2

###### fu_udev_device_get_device_file

Gets the device node.

since: 1.3.1

###### fu_udev_device_get_device_file_from_subsystem

No description available.

###### fu_udev_device_get_devpath

Sets the physical ID from the sysfs path, with the `/sys` prefixed removed.

since: 2.0.1

###### fu_udev_device_get_devtype

Returns the Udev device type.

since: 1.4.5

###### fu_udev_device_get_driver

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

since: 1.5.3

###### fu_udev_device_get_io_channel

Gets the IO channel.

since: 1.9.8

###### fu_udev_device_get_number

Gets the device number, if any.

since: 1.5.0

###### fu_udev_device_get_subsystem

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

since: 1.1.2

###### fu_udev_device_get_subsystem_depth

Determine how far up a chain a given device is.

since: 2.0.0

###### fu_udev_device_get_subsystem_devtype

Returns the Udev subsystem and device type, as a string.

since: 2.0.2

###### fu_udev_device_get_sysfs_path

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

since: 1.1.2

###### fu_udev_device_ioctl

No description available.

###### fu_udev_device_ioctl_new

Build a helper to control a device using a low-level request.

since: 2.0.2

###### fu_udev_device_list_sysfs

Lists all the sysfs attributes.

since: 2.0.9

###### fu_udev_device_match_subsystem

No description available.

###### fu_udev_device_parse_number

No description available.

###### fu_udev_device_pread

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

since: 1.8.2

###### fu_udev_device_pwrite

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

since: 1.8.2

###### fu_udev_device_read

Read a buffer from a file descriptor.

since: 2.0.4

###### fu_udev_device_read_byte_array

Read a buffer from a file descriptor.

since: 2.0.18

###### fu_udev_device_read_bytes

Read a buffer from a file descriptor.

since: 2.0.7

###### fu_udev_device_read_property

Gets a value from the `uevent` file.

since: 2.0.0

###### fu_udev_device_read_sysfs

Reads data from a sysfs attribute, removing any newline trailing chars.

since: 2.0.0

###### fu_udev_device_read_sysfs_bytes

Reads raw data from a sysfs attribute.

since: 2.0.1

###### fu_udev_device_remove_open_flag

Removes a open flag.

since: 2.0.0

###### fu_udev_device_reopen

Closes and opens the device, typically used to `close()` and `open()` the device-file which is required by some ioctls.

since: 2.0.9

###### fu_udev_device_seek

Seeks a file descriptor to a given offset.

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`.

since: 1.7.2

###### fu_udev_device_set_device_file

Sets the device file to use for reading and writing.

since: 1.8.7

###### fu_udev_device_set_devtype

No description available.

###### fu_udev_device_set_io_channel

Replace the IO channel to use when the device has already been opened. This object will automatically unref `io_channel` when `fu_device_close()` is called.

since: 1.9.8

###### fu_udev_device_set_number

No description available.

###### 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.

since: 1.1.2

###### fu_udev_device_set_subsystem

No description available.

###### fu_udev_device_write

Write a buffer to a file descriptor.

since: 2.0.4

###### fu_udev_device_write_byte_array

Write a buffer to a file descriptor.

since: 2.0.18

###### fu_udev_device_write_bytes

Write a buffer to a file descriptor.

since: 2.0.7

###### fu_udev_device_write_sysfs

Writes data into a sysfs attribute.

since: 2.0.0

###### fu_udev_device_write_sysfs_byte_array

Writes raw data into a sysfs attribute.

since: 2.0.1

###### fu_udev_device_write_sysfs_bytes

Writes raw data into a sysfs attribute.

since: 2.0.1

##### Methods inherited from FuDevice (197)

Please see FuDevice for a full list of methods.

##### Methods inherited from FwupdDevice (103)

Please see FwupdDevice for a full list of methods.

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

Please see GObject for a full list of methods.

##### Methods inherited from FwupdCodec (8)

###### fwupd_codec_add_string

Converts an object that implements `FwupdCodec` to a debug string, appending it to `str`.

###### fwupd_codec_from_json

Converts an object that implements `FwupdCodec` from a JSON object.

###### fwupd_codec_from_json_string

Converts an object that implements `FwupdCodec` from a JSON string.

###### fwupd_codec_from_variant

Converts an object that implements `FwupdCodec` from a `GVariant` value.

###### fwupd_codec_to_json

Converts an object that implements `FwupdCodec` to a JSON builder object.

###### fwupd_codec_to_json_string

Converts an object that implements `FwupdCodec` to a JSON string.

###### fwupd_codec_to_string

Converts an object that implements `FwupdCodec` to a debug string.

###### fwupd_codec_to_variant

Converts an object that implements `FwupdCodec` to a `GVariant`.

#### Properties

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

The bind ID to use when binding a new driver.

since: 1.7.2

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

The low level file to use for device access.

since: 1.3.1

###### FwupdPlugin.UdevDevice:devtype

The device type.

since: 2.0.0

###### FwupdPlugin.UdevDevice:driver

The driver being used for the device.

since: 1.5.3

###### FwupdPlugin.UdevDevice:subsystem

The device subsystem.

since: 1.1.2

##### Properties inherited from FuDevice (14)

###### FwupdPlugin.Device:backend

The `FuBackend` that created the device.

since: 2.0.0

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

The device backend ID.

since: 1.5.8

###### FwupdPlugin.Device:context

The `FuContext` to use.

since: 1.6.0

###### FwupdPlugin.Device:equivalent-id

The device equivalent ID.

since: 2.0.0

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

The device logical ID.

since: 1.1.2

###### FwupdPlugin.Device:parent

The device parent.

since: 1.0.8

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

The device physical ID.

since: 1.1.2

###### FwupdPlugin.Device:pid

The device product ID.

since: 2.0.0

###### FwupdPlugin.Device:private-flags

The device private flags.

since: 1.9.1

###### FwupdPlugin.Device:proxy

The device proxy to use.

since: 1.4.1

###### FwupdPlugin.Device:required-free

The required amount of free firmware space.

since: 2.0.12

###### FwupdPlugin.Device:update-image

The update image for the device.

since: 2.0.0

###### FwupdPlugin.Device:update-message

The device update message.

since: 2.0.0

###### FwupdPlugin.Device:vid

The device vendor ID.

since: 2.0.0

##### Properties inherited from FwupdDevice (14)

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

The device battery level in percent.

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

The device battery threshold in percent.

###### Fwupd.Device:flags

The device flags.

###### Fwupd.Device:id

The device ID.

###### Fwupd.Device:parent

The device parent.

###### Fwupd.Device:percentage

The current device percentage.

###### Fwupd.Device:problems

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

###### Fwupd.Device:request-flags

The device request flags.

###### Fwupd.Device:status

The current device status.

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

The device update error.

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

The device update state.

###### Fwupd.Device:vendor

The device vendor.

###### Fwupd.Device:version

The device version.

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

The version format of the device.

#### Signals

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

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

since: 1.1.2

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

###### FuDevice::child-added

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

since: 1.0.8

###### FuDevice::child-removed

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

since: 1.0.8

###### FuDevice::request

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

since: 1.6.2

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

###### GObject::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;

    }

No description available.

###### Class members

`parent_class: FuDeviceClass`

  No description available.