33Bus
44---
55
6- The :class: `~ can.Bus ` class, as the name suggests, provides an abstraction of a CAN bus.
6+ The :class: `can.BusABC ` class, as the name suggests, provides an abstraction of a CAN bus.
77The bus provides an abstract wrapper around a physical or virtual CAN Bus.
88
99A thread safe bus wrapper is also available, see `Thread safe bus `_.
1010
1111
12- Filtering
13- '''''''''
14-
15- Message filtering can be set up for each bus. Where the interface supports it, this is carried
16- out in the hardware or kernel layer - not in Python.
17-
18-
1912API
2013''''
2114
2215.. autoclass :: can.BusABC
2316 :members:
2417 :special-members: __iter__
2518
26- .. autoclass :: can.interface.Bus
27- :members:
28- :special-members: __iter__
29-
3019
3120Transmitting
3221''''''''''''
3322
34- Writing to the bus is done by calling the :meth: `~can.BusABC.send() ` method and
35- passing a :class: `~can.Message ` object .
23+ Writing to the bus is done by calling the :meth: `~can.BusABC.send ` method and
24+ passing a :class: `~can.Message ` instance .
3625
3726
3827Receiving
@@ -48,14 +37,21 @@ Alternatively the :class:`~can.Listener` api can be used, which is a list of :cl
4837subclasses that receive notifications when new messages arrive.
4938
5039
40+ Filtering
41+ '''''''''
42+
43+ Message filtering can be set up for each bus. Where the interface supports it, this is carried
44+ out in the hardware or kernel layer - not in Python.
45+
46+
5147Thread safe bus
5248---------------
5349
54- This thread safe version of the :class: `~can.Bus ` class can be used by multiple threads at once.
55- Sending and receiving is locked seperatly to avoid unnessesary delays.
50+ This thread safe version of the :class: `~can.BusABC ` class can be used by multiple threads at once.
51+ Sending and receiving is locked separately to avoid unnecessary delays.
5652Conflicting calls are executed by blocking until the bus is accessible.
5753
58- It can be used exactly like the normal :class: `~can.Bus `:
54+ It can be used exactly like the normal :class: `~can.BusABC `:
5955
6056 # 'socketcan' is only an exemple interface, it works with all the others too
6157 my_bus = can.ThreadSafeBus(interface='socketcan', channel='vcan0')
@@ -64,3 +60,11 @@ It can be used exactly like the normal :class:`~can.Bus`:
6460
6561.. autoclass :: can.ThreadSafeBus
6662 :members:
63+
64+ Autoconfig Bus
65+ --------------
66+
67+ .. autoclass :: can.interface.Bus
68+ :members:
69+ :special-members: __iter__
70+
0 commit comments