Python GetAvailableHardware() and can_available_hardware_t Objects
Posted: Mon 23. Jun 2025, 21:34
This function returns a list of can_available_hardware_t objects.
These objects contain the following properties:
- "device"
- "hw"
- "name"
- "type"
- "channel"
- "reserved"
I find that the "device" property is always 3 for every device connected.
The PCAN-API_4_Documentation.pdf says this is "The device on which this channel is available."
I had 2 PCAN-USB and 1 PCAN_FD-USB connected. I unplugged one, but the "device" property was still 3 for the two remaining can_available_hardware_t objects.
These objects contain the following properties:
- "device"
- "hw"
- "name"
- "type"
- "channel"
- "reserved"
I find that the "device" property is always 3 for every device connected.
The PCAN-API_4_Documentation.pdf says this is "The device on which this channel is available."
I had 2 PCAN-USB and 1 PCAN_FD-USB connected. I unplugged one, but the "device" property was still 3 for the two remaining can_available_hardware_t objects.