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.
Python GetAvailableHardware() and can_available_hardware_t Objects
Re: Python GetAvailableHardware() and can_available_hardware_t Objects
Hello,
the device ID is something "not unique" that can be set as the user needs. If you set the same ID to all your devic, then you will get also this information using the getavailableHardware function. You can change the device ID using either the PEAK Settings applet or the PCAn-View. here a picture of this in PCAN-View:
the device ID is something "not unique" that can be set as the user needs. If you set the same ID to all your devic, then you will get also this information using the getavailableHardware function. You can change the device ID using either the PEAK Settings applet or the PCAn-View. here a picture of this in PCAN-View:
Best regards,
Keneth
Keneth
Re: Python GetAvailableHardware() and can_available_hardware_t Objects
Thanks for your response, K.Wagner, but I don't see the DeviceID property to be in the list of Available Hardware Devices.
I found my answer playing with C#, which has better type clarity.
I found the "device" property to be a PcanDevice enum value.
A device type of 3 corresponds to PcanDevice.Usb
I found my answer playing with C#, which has better type clarity.
I found the "device" property to be a PcanDevice enum value.
A device type of 3 corresponds to PcanDevice.Usb
Re: Python GetAvailableHardware() and can_available_hardware_t Objects
Hello,
glad to see you have found what you needed. All this information is in the documentation. It is easier looking at it first, before looking the code. Closed.
glad to see you have found what you needed. All this information is in the documentation. It is easier looking at it first, before looking the code. Closed.
Best regards,
Keneth
Keneth