diff --git a/can/interfaces/vector/__init__.py b/can/interfaces/vector/__init__.py index 813608a86..7fc567017 100644 --- a/can/interfaces/vector/__init__.py +++ b/can/interfaces/vector/__init__.py @@ -1,5 +1,5 @@ """ """ -from .canlib import VectorBus +from .canlib import VectorBus, VectorChannelConfig from .exceptions import VectorError diff --git a/test/test_vector.py b/test/test_vector.py index 152d04024..76983dec4 100644 --- a/test/test_vector.py +++ b/test/test_vector.py @@ -14,7 +14,13 @@ import pytest import can -from can.interfaces.vector import canlib, xldefine, xlclass, VectorError +from can.interfaces.vector import ( + canlib, + xldefine, + xlclass, + VectorError, + VectorChannelConfig, +) class TestVectorBus(unittest.TestCase): @@ -296,6 +302,23 @@ def test_vector_error_pickle(self) -> None: raise exc_unpickled +class TestVectorChannelConfig: + def test_attributes(self): + assert hasattr(VectorChannelConfig, "name") + assert hasattr(VectorChannelConfig, "hwType") + assert hasattr(VectorChannelConfig, "hwIndex") + assert hasattr(VectorChannelConfig, "hwChannel") + assert hasattr(VectorChannelConfig, "channelIndex") + assert hasattr(VectorChannelConfig, "channelMask") + assert hasattr(VectorChannelConfig, "channelCapabilities") + assert hasattr(VectorChannelConfig, "channelBusCapabilities") + assert hasattr(VectorChannelConfig, "isOnBus") + assert hasattr(VectorChannelConfig, "connectedBusType") + assert hasattr(VectorChannelConfig, "serialNumber") + assert hasattr(VectorChannelConfig, "articleNumber") + assert hasattr(VectorChannelConfig, "transceiverName") + + def xlGetApplConfig( app_name_p: ctypes.c_char_p, app_channel: ctypes.c_uint,