Skip to content

Commit 6a527fb

Browse files
committed
moved some docs of the BusABC to the development section
1 parent 51eae1c commit 6a527fb

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

can/bus.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ def __str__(self):
5151
def recv(self, timeout=None):
5252
"""Block waiting for a message from the Bus.
5353
54-
If the concrete bus does not override it, this method makes sure
55-
that all filters have been applied. That is the case for all
56-
internal interfaces.
57-
58-
To enable receiving for an interface, please override
59-
:meth:`~can.BusABC._recv_internal` instead of this one.
60-
Overriding this method is deprecated.
61-
6254
:param float timeout:
6355
seconds to wait for a message or None to wait indefinitely
6456

doc/development.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ About the ``BusABC`` class
4848
Concrete implementations *have to* implement the following:
4949
* :meth:`~can.BusABC.send` to send individual messages
5050
* :meth:`~can.BusABC._recv_internal` to receive individual messages
51-
(see note below)
51+
(see note below!)
5252
* set the :attr:`~can.BusABC.channel_info` attribute to a string describing
5353
the underlying bus and/or channel
5454

@@ -69,11 +69,15 @@ They *might* implement the following:
6969

7070
.. note::
7171

72+
*TL;DR*: Only override :meth:`~can.BusABC._recv_internal`,
73+
never :meth:`~can.BusABC.recv` directly.
74+
7275
Previously, concrete bus classes had to override :meth:`~can.BusABC.recv`
7376
directly instead of :meth:`~can.BusABC._recv_internal`, but that has
7477
changed to allow the abstract base class to handle in-software message
75-
filtering as a fallback. Older (custom) interfaces might still be
76-
implemented like that and thus might not provide message filtering.
78+
filtering as a fallback. All internal interfaces now implement that new
79+
behaviour. Older (custom) interfaces might still be implemented like that
80+
and thus might not provide message filtering:
7781

7882

7983
Creating a Release

0 commit comments

Comments
 (0)