1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
Command Line Tools
==================
The following modules are callable from ``python-can``.
They can be called for example by ``python3 -m can.logger`` or ``can_logger`` (if installed using pip).
can.logger
----------
Command line help, called with ``--help``:
.. command-output:: python3 -m can.logger -h
:shell:
can.player
----------
.. command-output:: python3 -m can.player -h
:shell:
can.viewer
----------
A screenshot of the application can be seen below:
.. image:: images/viewer.png
:width: 100%
The first column is the number of times a frame with the particular ID that has been received, next is the timestamp of the frame relative to the first received message. The third column is the time between the current frame relative to the previous one. Next is the length of the frame, the data and then the decoded data converted according to the ``-d`` argument. The top red row indicates an error frame.
There are several keyboard shortcuts that can be used with the viewer script, they function as follows:
* ESCAPE - Quit the viewer script
* q - as ESCAPE
* c - Clear the stored frames
* s - Sort the stored frames
* h - Toggle highlighting of changed bytes in the data field - see the below image
* SPACE - Pause the viewer
* UP/DOWN - Scroll the viewer
.. image:: images/viewer_changed_bytes_highlighting.png
:width: 50%
A byte in the data field is highlighted blue if the value is different from the last time the message was received.
Command line arguments
^^^^^^^^^^^^^^^^^^^^^^
By default the ``can.viewer`` uses the :doc:`/interfaces/socketcan` interface. All interfaces are supported and can be specified using the ``-i`` argument or configured following :doc:`/configuration`.
The full usage page can be seen below:
.. command-output:: python3 -m can.viewer -h
:shell:
can.logconvert
--------------
.. command-output:: python3 -m can.logconvert -h
:shell:
|