Skip to content

Conversation

@Finwood
Copy link
Contributor

@Finwood Finwood commented Aug 28, 2025

This PR bundles three changes:

  • the python-can virtual interface can now be used with multiple distinct channels at once, instead of only the default channel
  • type hints in the different _construct_*() functions have been fixed
  • the stub function PythonCANMedia.list_available_interface_names() has been implemented, utilizing can.detect_available_configs()

The python-can virtual bus supports multiple distinct channels, which
are identified by an arbitrary channel name. This commit adds support
for these different channels to the PythonCANMedia class, using the
existing "virtual:<channel_name>" syntax.

The previous behavior of using an empty channel name is preserved.
The functionality comes from python-can's detect_available_configs().
Each interface is tried on its own to catch errors in case the
respective driver library is not available.
@coveralls
Copy link

Coverage Status

coverage: 93.906% (+0.005%) from 93.901%
when pulling 67f5567 on Finwood:feat/pythoncan-media
into d0f68e6 on OpenCyphal:master.

@pavel-kirienko pavel-kirienko merged commit 811e2eb into OpenCyphal:master Aug 28, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants