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.

public sealed class UsbDeviceConnectionEventArgs : EventArgs

Properties​

DeviceName​

public string DeviceName { get; }

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

Returns string

DeviceStatus​

public DeviceConnectionStatus DeviceStatus { get; }

Whether the device was just connected or just disconnected.

Returns DeviceConnectionStatus

Id​

public uint Id { get; }

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

Returns uint

Manufacturer​

public string Manufacturer { get; }

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

Returns string

Product​

public string Product { get; }

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

Returns string

ProductId​

public ushort ProductId { get; }

USB product id (PID) from the device descriptor.

Returns ushort

SerialNumber​

public string SerialNumber { get; }

Empty if the device has none

Returns string

Type​

public DeviceType Type { get; }

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

Returns DeviceType

VendorId​

public ushort VendorId { get; }

USB vendor id (VID) from the device descriptor.

Returns ushort