UsbInfo¶
Bases: object
UsbInfo class contains all USB devices information connected to the device controller.
This class stores detailed information about a USB device, including its identification (VID/PID), description (Manufacturer/Product), and location (Hub/Port).
__init__()
¶
Default constructor.
Initializes a new instance of the UsbInfo class.
getVid()
¶
Get the current VID.
Retrieves the Vendor ID of the USB device.
Returns:
| Type | Description |
|---|---|
int
|
The current VID |
setVid(vid)
¶
Set the current VID.
Sets the Vendor ID of the USB device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vid
|
int
|
The current VID |
required |
getPid()
¶
Get the current PID.
Retrieves the Product ID of the USB device.
Returns:
| Type | Description |
|---|---|
int
|
The current PID |
setPid(pid)
¶
Set the current PID.
Sets the Product ID of the USB device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pid
|
int
|
The current PID |
required |
getManufacturer()
¶
Get the current manufacturer.
Retrieves the manufacturer string of the USB device.
Returns:
| Type | Description |
|---|---|
str
|
The current manufacturer |
setManufacturer(manufacturer)
¶
Set the current manufacturer.
Sets the manufacturer string of the USB device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manufacturer
|
string
|
The current manufacturer |
required |
getProduct()
¶
Get the current product.
Retrieves the product string of the USB device.
Returns:
| Type | Description |
|---|---|
str
|
The current product |
setProduct(product)
¶
Set the current product.
Sets the product string of the USB device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
product
|
string
|
The current product |
required |
getSerialNumber()
¶
Get the current serial number.
Retrieves the serial number of the USB device.
Returns:
| Type | Description |
|---|---|
str
|
The current serial number |
setSerialNumber(serialNumber)
¶
Set the current serial number.
Sets the serial number of the USB device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
serialNumber
|
string
|
The current serial number |
required |
getNumInterface()
¶
Get the current interface number.
Retrieves the interface number of the USB device.
Returns:
| Type | Description |
|---|---|
int
|
The current interface number |
setNumInterface(numInterface)
¶
Set the current interface number.
Sets the interface number of the USB device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
numInterface
|
int
|
The current interface number |
required |
getAssociateDriver()
¶
Get the current associated driver.
Retrieves the name of the driver associated with this USB device.
Returns:
| Type | Description |
|---|---|
str
|
The current associated driver |
setAssociateDriver(associateDriver)
¶
Set the current associated driver.
Sets the name of the driver associated with this USB device.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
associateDriver
|
string
|
The current associated driver |
required |
getHub()
¶
Get the current hub number.
Retrieves the USB hub number where the device is connected.
Returns:
| Type | Description |
|---|---|
int
|
The current hub number |
setHub(hub)
¶
Set the current hub number.
Sets the USB hub number where the device is connected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hub
|
int
|
The current hub number |
required |
getPort()
¶
Get the current port number.
Retrieves the port number on the hub where the device is connected.
Returns:
| Type | Description |
|---|---|
int
|
The current port number |
setPort(port)
¶
Set the current port number.
Sets the port number on the hub where the device is connected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
int
|
The current port number |
required |