Skip to content

Commit f3136fb

Browse files
MattWoodheadhardbytezariiii9003
authored
Update documentation with plugins, related tools etc. (hardbyte#1457)
* Update interfaces.rst Add a note regarding the ability to use plugins or installing external modules to extend the functionality of python-can. * Update plugin-interface.rst Add examples of modules using the plugin api * Update index.rst * Create other-tools.rst * Update other-tools.rst * Add optional deps to setup.py * Format code with black * Update other-tools.rst * Update plugin-interface.rst * Update doc/other-tools.rst fix note block Co-authored-by: Brian Thorne <[email protected]> * Update doc/other-tools.rst Co-authored-by: Brian Thorne <[email protected]> * Address sphinx warnings * Update doc/interfaces.rst Co-authored-by: zariiii9003 <[email protected]> * Update doc/interfaces.rst Co-authored-by: zariiii9003 <[email protected]> * Update doc/other-tools.rst Co-authored-by: zariiii9003 <[email protected]> * Update doc/plugin-interface.rst Co-authored-by: zariiii9003 <[email protected]> * Update doc/interfaces.rst Co-authored-by: zariiii9003 <[email protected]> * Update doc/plugin-interface.rst Co-authored-by: zariiii9003 <[email protected]> * Remove extra installation tag out of scope of PR * Fix numbering & spelling Fix numbering of lists. Correct careless spelling errors. Co-authored-by: MattWoodhead <[email protected]> Co-authored-by: Brian Thorne <[email protected]> Co-authored-by: zariiii9003 <[email protected]>
1 parent 25d30b5 commit f3136fb

File tree

5 files changed

+109
-1
lines changed

5 files changed

+109
-1
lines changed

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Contents:
4545
interfaces
4646
virtual-interfaces
4747
plugin-interface
48+
other-tools
4849
scripts
4950
development
5051
history

doc/interfaces.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ documentation.
1212
The *Interface Names* are listed in :doc:`configuration`.
1313

1414

15-
The available hardware interfaces are:
15+
The following hardware interfaces are included in python-can:
1616

1717
.. toctree::
1818
:maxdepth: 1
@@ -39,3 +39,5 @@ The available hardware interfaces are:
3939
interfaces/usb2can
4040
interfaces/vector
4141

42+
43+
Additional interface types can be added via the :ref:`plugin interface`, or by installing a third party package that utilises the :ref:`plugin interface`.

doc/other-tools.rst

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Other CAN bus tools
2+
===================
3+
4+
In order to keep the project maintainable, the scope of the package is limited to providing common
5+
abstractions to different hardware devices, and a basic suite of utilities for sending and
6+
receiving messages on a CAN bus. Other tools are available that either extend the functionality
7+
of python-can, or provide complementary features that python-can users might find useful.
8+
9+
Some of these tools are listed below for convenience.
10+
11+
CAN Message protocols (implemented in Python)
12+
---------------------------------------------
13+
14+
#. SAE J1939 Message Protocol
15+
* The `can-j1939`_ module provides an implementation of the CAN SAE J1939 standard for Python,
16+
including J1939-22. `can-j1939`_ uses python-can to provide support for multiple hardware
17+
interfaces.
18+
#. CIA CANopen
19+
* The `canopen`_ module provides an implementation of the CIA CANopen protocol, aiming to be
20+
used for automation and testing purposes
21+
#. ISO 15765-2 (ISO TP)
22+
* The `can-isotp`_ module provides an implementation of the ISO TP CAN protocol for sending
23+
data packets via a CAN transport layer.
24+
25+
#. UDS
26+
* The `python-uds`_ module is a communication protocol agnostic implementation of the Unified
27+
Diagnostic Services (UDS) protocol defined in ISO 14229-1, although it does have extensions
28+
for performing UDS over CAN utilising the ISO TP protocol. This module has not been updated
29+
for some time.
30+
* The `uds`_ module is another tool that implements the UDS protocol, although it does have
31+
extensions for performing UDS over CAN utilising the ISO TP protocol. This module has not
32+
been updated for some time.
33+
#. XCP
34+
* The `pyxcp`_ module implements the Universal Measurement and Calibration Protocol (XCP).
35+
The purpose of XCP is to adjust parameters and acquire current values of internal
36+
variables in an ECU.
37+
38+
.. _can-j1939: https://github.com/juergenH87/python-can-j1939
39+
.. _canopen: https://canopen.readthedocs.io/en/latest/
40+
.. _can-isotp: https://can-isotp.readthedocs.io/en/latest/
41+
.. _python-uds: https://python-uds.readthedocs.io/en/latest/index.html
42+
.. _uds: https://uds.readthedocs.io/en/latest/
43+
.. _pyxcp: https://pyxcp.readthedocs.io/en/latest/
44+
45+
CAN Frame Parsing tools etc. (implemented in Python)
46+
----------------------------------------------------
47+
48+
#. CAN Message / Database scripting
49+
* The `cantools`_ package provides multiple methods for interacting with can message database
50+
files, and using these files to monitor live busses with a command line monitor tool.
51+
#. CAN Message / Log Decoding
52+
* The `canmatrix`_ module provides methods for converting between multiple popular message
53+
frame definition file formats (e.g. .DBC files, .KCD files, .ARXML files etc.).
54+
* The `pretty_j1939`_ module can be used to post-process CAN logs of J1939 traffic into human
55+
readable terminal prints or into a JSON file for consumption elsewhere in your scripts.
56+
57+
.. _cantools: https://cantools.readthedocs.io/en/latest/
58+
.. _canmatrix: https://canmatrix.readthedocs.io/en/latest/
59+
.. _pretty_j1939: https://github.com/nmfta-repo/pretty_j1939
60+
61+
Other CAN related tools, programs etc.
62+
--------------------------------------
63+
64+
#. Micropython CAN class
65+
* A `CAN class`_ is available for the original micropython pyboard, with much of the same
66+
functionality as is available with python-can (but with a different API!).
67+
#. ASAM MDF Files
68+
* The `asammdf`_ module provides many methods for processing ASAM (Association for
69+
Standardization of Automation and Measuring Systems) MDF (Measurement Data Format) files.
70+
71+
.. _`CAN class`: https://docs.micropython.org/en/latest/library/pyb.CAN.html
72+
.. _`asammdf`: https://asammdf.readthedocs.io/en/master/
73+
74+
|
75+
|
76+
77+
.. note::
78+
See also the available plugins for python-can in :ref:`plugin interface`.
79+

doc/plugin-interface.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,26 @@ create an instance of the bus in the **python-can** API:
5252
5353
bus = can.Bus(interface="interface_name", channel=0)
5454
55+
56+
57+
Example Interface Plugins
58+
-------------------------
59+
60+
The table below lists interface drivers that can be added by installing additional packages that utilise the plugin API. These modules are optional dependencies of python-can.
61+
62+
.. note::
63+
The packages listed below are maintained by other authors. Any issues should be reported in their corresponding repository and **not** in the python-can repository.
64+
65+
+----------------------------+-------------------------------------------------------+
66+
| Name | Description |
67+
+============================+=======================================================+
68+
| `python-can-cvector`_ | Cython based version of the 'VectorBus' |
69+
+----------------------------+-------------------------------------------------------+
70+
| `python-can-remote`_ | CAN over network bridge |
71+
+----------------------------+-------------------------------------------------------+
72+
| `python-can-sontheim`_ | CAN Driver for Sontheim CAN interfaces (e.g. CANfox) |
73+
+----------------------------+-------------------------------------------------------+
74+
75+
.. _python-can-cvector: https://github.com/zariiii9003/python-can-cvector
76+
.. _python-can-remote: https://github.com/christiansandberg/python-can-remote
77+
.. _python-can-sontheim: https://github.com/MattWoodhead/python-can-sontheim

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@
3030
"neovi": ["filelock", "python-ics>=2.12"],
3131
"canalystii": ["canalystii>=0.1.0"],
3232
"cantact": ["cantact>=0.0.7"],
33+
"cvector": ["python-can-cvector"],
3334
"gs_usb": ["gs_usb>=0.2.1"],
3435
"nixnet": ["nixnet>=0.3.1"],
3536
"pcan": ["uptime~=3.0.1"],
37+
"remote": ["python-can-remote"],
38+
"sontheim": ["python-can-sontheim>=0.1.2"],
3639
"viewer": [
3740
'windows-curses;platform_system=="Windows" and platform_python_implementation=="CPython"'
3841
],

0 commit comments

Comments
 (0)