Skip to main content

A CLI tool providing rich monitoring of CAN data

Project description

Canviewer


Table of Contents

Installation

  • From source:
    Clone this repository and simply run pip install . at the root (preferrably in a virtual environment). This tool uses hatchling backend for building, you can consider using hatch as a frontend (hatch shell).
  • As a dependency of other packages:
    Add the following dependency to your requirements.txt or pyproject.toml:
  canviewer@git+ssh://git@github.com/Hedwyn/canviewer

Or install directly with pip:

pip install canviewer@git+ssh://git@github.com/Hedwyn/canviewer

Note that you need a valid git SSH access.

Usage

After installing, you can summon this utility with canviewer:

Usage: canviewer [OPTIONS]

  For every CAN ID found on the CAN bus, displays the data for the last
  message received. If the message is declared in one of the passed databases,
  shows the decoded data.

Options:
  -c, --channel TEXT             Name of the CAN channel to monitor
  -d, --driver TEXT              Specifies which CAN driver to use if multiple
                                 available
  -db, --databases TEXT          Path to .kcd files or to a folder containing
                                 kcd files
  -f, --filters TEXT             Either a name or a numeric ID, only passed
                                 messages will be displayed
  -s, --single-message TEXT      Tracks a single message, shows a custom table
                                 with one column per signal
  -i, --ignore-unknown-messages  Hides messages that are not declared in one
                                 of your databases
  --help                         Show this message and exit.

canviewer will show the latest data for every message received on your CAN bus.
You can pass dbc or kcd databases to the tool if you want it to decode your data as follows:

canviewer -db path/to/afolder path/to/a_database.kcd

When passing a folder, dbc or kcd files will be automatically discovered in the folder. You can pass many items after the -db flag.

If omitting the CAN channel the tool will use the default on your system: can0 on Linux and PCAN_USBBUS1 on Windows. You can specify the channel with -c flag. Same applies to the CAN driver, which can be passed with -d.

Filtering

You can filter out unknown messages by passsing -i.
You can only display some selected messages by passing their name or ID to -f flag (flag can be passed multiple times):

canviewer -db my_db.kcd -f My_Message_Name

Pagination

If the tables cannot fit on your screen, it will be splitted in multiple tables. You can press enter to navigate (enter goes forwards and b + enter goes backward).

License

canviewer is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

canviewer-1.0.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canviewer-1.0.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file canviewer-1.0.0.tar.gz.

File metadata

  • Download URL: canviewer-1.0.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for canviewer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1cafc289f8523f5b307c3e6d6d39d1f38c1c74945932af5dbadffdfd08d9f288
MD5 e0dd33086c4c51e1c5c9d6879848085f
BLAKE2b-256 e6547c980ff223553978dd67003e31ebd2477b31d67acf133ef536de7d6474d6

See more details on using hashes here.

File details

Details for the file canviewer-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: canviewer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for canviewer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a494e35f78b6dccb59ba869e60c315239bee5ddbea978ad271eedd9f6d5651a1
MD5 8d63649a099e742f67eca050d7fa148a
BLAKE2b-256 3d7486ab433c01eed1559c72f3db424d36f4c690ba22e976d490269299f3ce8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page