-
Notifications
You must be signed in to change notification settings - Fork 9
Device Object
Device objects represent attached USB devices and model the data about them.
Here's an example:
{
id: '0x0a-0x12-IDQFB0023AB', // VID-PID-(SERIAL|INCREMENTED_ID)
vendorCode: '0x0a',
productCode: '0x12',
manufacturer: 'Foo Bar Technologies',
product: 'Baz Sensing Quux',
serialNumber: 'IDQFB0023AB',
mount: '/Volumes/FOOBAR1'
}
Note that the property names are snakeCased.
REQUIRED, String | Integer
The id is a unique identifier for an attached device.
While it would be nice for the id to be stable across device insertions/removals (eg, that a specific sensor has the same ID every time that it's inserted), that's not required. As long as the id doesn't change for a device while it's attached -- that getAll()
and get()
and the attach
and detach
event all report the same ID consistently -- it should meet our needs.
REQUIRED, String
The hex for the USB vendor ID.
REQUIRED, String
The hex for the USB product ID.
OPTIONAL, String
The name of the manufacturer/vendor, if available as a USB descriptor.
OPTIONAL, String
The name of the product, if available as a USB descriptor.
OPTIONAL, String
The serial number of the device, if available as a USB descriptor.
OPTIONAL, String
The path to the volume mount point, if mounted.