Skip to content

Commit 66d2d05

Browse files
committed
Filtering docs.
1 parent 61efce7 commit 66d2d05

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

can/bus.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def __init__(self, channel=None, can_filters=None, **config):
3333
3434
>>> [{"can_id": 0x11, "can_mask": 0x21}]
3535
36+
A filter matches, when ``<received_can_id> & can_mask == can_id & can_mask``
37+
3638
:param dict config:
3739
Any backend dependent configurations are passed in this dictionary
3840
"""
@@ -80,6 +82,10 @@ def flush_tx_buffer(self):
8082
pass
8183

8284
def shutdown(self):
85+
"""
86+
Called to carry out any interface specific cleanup required
87+
in shutting down a bus.
88+
"""
8389
self.flush_tx_buffer()
8490

8591
__metaclass__ = abc.ABCMeta

doc/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Library API
22
===========
33

4-
The main objects are the :class:`~can.Bus` and the :class:`~can.Message`.
4+
The main objects are the :class:`~can.BusABC` and the :class:`~can.Message`.
55
A form of CAN interface is also required.
66

7-
.. warning::
7+
.. hint::
88

99
Check the backend specific documentation for any implementation specific details.
1010

doc/bus.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ Bus
44
---
55

66
The :class:`~can.Bus` class, as the name suggests, provides an abstraction of a CAN bus.
7-
The bus provides a wrapper around a physical or virtual CAN Bus. Where the interface
8-
supports it, message filtering is carried out for each bus.
7+
The bus provides a wrapper around a physical or virtual CAN Bus.
8+
9+
10+
Filtering
11+
'''''''''
12+
13+
Message filtering can be set up for each bus. Where the interface supports it, this is carried
14+
out in the hardware or kernel layer - not in Python.
15+
916

1017

1118
API
1219
''''
1320

1421
.. autoclass:: can.BusABC
1522
:members:
23+
:special-members: __iter__
1624

1725

1826
Transmitting

0 commit comments

Comments
 (0)