Hardware
busylight_core.hardware
¶
USB Hardware Description
Attributes¶
Classes¶
busylight_core.hardware.ConnectionType
¶
busylight_core.hardware.Hardware
dataclass
¶
Hardware(
device_type,
path,
vendor_id,
product_id,
serial_number,
manufacturer_string,
product_string=None,
release_number=None,
usage=None,
usage_page=None,
interface_number=None,
bus_type=None,
is_acquired=False,
)
USB Hardware description.
Attributes¶
busylight_core.hardware.Hardware.product_string
class-attribute
instance-attribute
¶
busylight_core.hardware.Hardware.release_number
class-attribute
instance-attribute
¶
busylight_core.hardware.Hardware.interface_number
class-attribute
instance-attribute
¶
busylight_core.hardware.Hardware.is_acquired
class-attribute
instance-attribute
¶
busylight_core.hardware.Hardware.device_id
cached
property
¶
A tuple of the vendor and product identifiers.
busylight_core.hardware.Hardware.handle
cached
property
¶
An I/O handle for this hardware device.
Functions¶
busylight_core.hardware.Hardware.enumerate
classmethod
¶
enumerate(by_type=ANY)
List of all connected hardware devices.
Source code in src/busylight_core/hardware.py
busylight_core.hardware.Hardware.from_portinfo
classmethod
¶
Create a Hardware object from a serial port info object.
Source code in src/busylight_core/hardware.py
busylight_core.hardware.Hardware.from_hid
classmethod
¶
busylight_core.hardware.Hardware.acquire
¶
Open the hardware device.
Source code in src/busylight_core/hardware.py
busylight_core.hardware.Hardware.release
¶
Close the hardware device.