@@ -56,17 +56,35 @@ VCI documentation, section "Message filters" for more info.
56
56
57
57
List available devices
58
58
----------------------
59
- In case you have connected multiple IXXAT devices, you have to select them by using their unique hardware id.
60
- To get a list of all connected IXXAT you can use the function ``get_ixxat_hwids() `` as demonstrated below:
59
+
60
+ In case you have connected multiple IXXAT devices, you have to select them by using their unique hardware id.
61
+ The function :meth: `~can.detect_available_configs ` can be used to generate a list of :class: `~can.BusABC ` constructors
62
+ (including the channel number and unique hardware ID number for the connected devices).
61
63
62
64
.. testsetup :: ixxat
63
65
66
+ from unittest.mock import Mock
67
+ can.detect_available_configs = Mock(side_effect=lambda: [{'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW441489'}, {'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW107422'}, {'interface': 'ixxat', 'channel': 1, 'unique_hardware_id': 'HW107422'}])
68
+
69
+ .. doctest :: ixxat
70
+
71
+ >>> import can
72
+ >>> print (can.detect_available_configs(" ixxat" ))
73
+ [{'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW509182'},
74
+ {'interface': 'ixxat', 'channel': 0, 'unique_hardware_id': 'HW107422'},
75
+ {'interface': 'ixxat', 'channel': 1, 'unique_hardware_id': 'HW107422'}]
76
+
77
+
78
+ You may also get a list of all connected IXXAT devices using the function ``get_ixxat_hwids() `` as demonstrated below:
79
+
80
+ .. testsetup :: ixxat2
81
+
64
82
from unittest.mock import Mock
65
83
import can.interfaces.ixxat
66
84
assert hasattr(can.interfaces.ixxat, "get_ixxat_hwids")
67
85
can.interfaces.ixxat.get_ixxat_hwids = Mock(side_effect=lambda: ['HW441489', 'HW107422'])
68
86
69
- .. doctest :: ixxat
87
+ .. doctest :: ixxat2
70
88
71
89
>>> from can.interfaces.ixxat import get_ixxat_hwids
72
90
>>> for hwid in get_ixxat_hwids():
0 commit comments