Skip to content

Vector canlib: _detect_available_configs method includes non-CAN channels in its return value #908

@dhnc4u

Description

@dhnc4u

The _detect_available_configs method in canlib.py for Vector returns all channels enumerated by the driver.
This includes LIN, Digital/Analog I/O, ... channels, which are not in scope of a CAN library, but are supported by the connected hardware.
In addition, I could not find an (implemented) way to get the channel type of the returned channels.

Based on page 63 of the XL Driver Library Manual, I propose a minor change to _detect_available_configs, to only return channels supporting CAN:
if channel_config.channelBusCapabilities & vxlapi.XL_BUS_ACTIVE_CAP_CAN:
This requires the following to be added to vxlapi.py:
XL_BUS_ACTIVE_CAP_CAN = 65536

Any thoughts or things I missed ?
Thanks, David.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions