Skip to content

Latest commit

 

History

History
84 lines (56 loc) · 2.44 KB

File metadata and controls

84 lines (56 loc) · 2.44 KB

Internal API

Here we document the odds and ends that are more helpful for creating your own interfaces or listeners but generally shouldn't be required to interact with python-can.

Extending the BusABC class

Concrete implementations must implement the following:
They might implement the following:

Note

TL;DR: Only override :meth:`~can.BusABC._recv_internal`, never :meth:`~can.BusABC.recv` directly.

Previously, concrete bus classes had to override :meth:`~can.BusABC.recv` directly instead of :meth:`~can.BusABC._recv_internal`, but that has changed to allow the abstract base class to handle in-software message filtering as a fallback. All internal interfaces now implement that new behaviour. Older (custom) interfaces might still be implemented like that and thus might not provide message filtering:

Concrete instances are usually created by :class:`can.Bus` which takes the users configuration into account.

Bus Internals

Several methods are not documented in the main :class:`can.BusABC` as they are primarily useful for library developers as opposed to library users. This is the entire ABC bus class with all internal methods:

.. autoclass:: can.BusABC
    :private-members:
    :special-members:
    :noindex:



IO Utilities

.. automodule:: can.io.generic
    :members:



Other Util

.. automodule:: can.util
    :members: