Skip to main content

UsbDeviceConnectionEventArgs Class

Package: GHIElectronics.Endpoint.Devices.UsbHost
Namespace: GHIElectronics.Endpoint.Devices.UsbHost

Event data for UsbHostController.ConnectionChanged: one USB device attached or detached.

class UsbDeviceConnectionEventArgs(EventArgs): ...

Properties​

DeviceName​

DeviceName: str # @property

What to open: "/dev/ttyUSB0", "eth1"... (see DeviceType)

Returns string

DeviceStatus​

DeviceStatus: DeviceConnectionStatus # @property

Whether the device was just connected or just disconnected.

Returns DeviceConnectionStatus

Id​

Id: int # @property

The device's number: the same for all its events, a new one when it is plugged in again

Returns uint

Manufacturer​

Manufacturer: str # @property

The device's own name for its maker ("Logitech"), empty if it has none

Returns string

Product​

Product: str # @property

The device's own name ("USB Receiver"), empty if it has none

Returns string

ProductId​

ProductId: int # @property

USB product id (PID) from the device descriptor.

Returns ushort

SerialNumber​

SerialNumber: str # @property

Empty if the device has none

Returns string

Type​

Type: DeviceType # @property

What the device gives (see UsbHost.DeviceType); hints what to open UsbDeviceConnectionEventArgs.DeviceName with.

Returns DeviceType

VendorId​

VendorId: int # @property

USB vendor id (VID) from the device descriptor.

Returns ushort