Skip to content

About

PlotJuggler 4 plugin: stream live CAN from the CANsub CAN-USB/Ethernet interfaces, DBC-decoded

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CANsub plugin for PlotJuggler

Streams live CAN from a CSS Electronics CANsub into PlotJuggler 4 and decodes it to signals with a DBC (J1939 and NMEA 2000 by PGN). The plugin talks to the CANsub's WebSocket API directly, so it needs no driver and no bridge.

Install

  1. Install PlotJuggler 4.2 or newer (Windows installer, Linux AppImage or macOS).
  2. Open the Marketplace in PlotJuggler, search for CANsub and install it.
  3. Under Streaming, pick CANsub CAN interface, enter the CANsub host name ({device id}-eth.local or {device id}-usb.local), choose the channel and bit rate, optionally add a DBC, and start.

Features

  • Connect by host name; the CANsub's certificate is verified against its own root CA. A lost connection is re-established automatically.
  • DBC decoding (optional): each message becomes a topic with its signals, CAN/ch{N}/{message}. J1939 and NMEA 2000 are matched by PGN, incl. NMEA 2000 fast packets.
  • Raw frames: IDs the DBC does not decode can be plotted as bytes, CAN/ch{N}/0x{id}.
  • Timestamps: frames use the CANsub's own time when its clock is set (e.g. by PTP or webCAN), so several CANsubs share a time base; otherwise they are aligned to the PC clock.
  • Bit rate: bit rate, CAN FD data bit rate and sample point (webCAN's presets) and listen only. The dialog shows the channel's current setting and applies a change at once, as webCAN does.
  • Several channels: one stream per channel. Starting a stream on a channel another stream holds takes it over; the older stream ends and keeps its data.

How it is built

  • The CANsub stream format (HDLC frames, CRC-32, CAN frame layout) is decoded by the cansub_protocol module of our C SDK, pinned by commit and compiled unmodified (data_stream_cansub/cmake/cansub_protocol.cmake).
  • The WebSocket transport (common/websocket) and the DBC decoder (common/can_dbc, the same one as PlotJuggler's MF4, BLF and candump loaders) come from pj-official-plugins at a pinned commit (cmake/pj_official_plugins.cmake).
  • The plugin is Qt-free and builds against the PlotJuggler plugin SDK (plotjuggler_sdk, version in SDK_VERSION).

Building

Needs Conan 2, CMake, Ninja and a C++20 compiler (Windows: a VS 2022 x64 developer shell).

./build.sh            # Conan deps, configure, build, tests (build/Release)
python3 scripts/package.py build dist linux-x86_64

scripts/ensure_sdk.sh builds plotjuggler_sdk from its git tag when it is not in the Conan cache. To build against a local pj-official-plugins checkout: PJ_PLUGINS_DIR=/path/to/pj-official-plugins ./build.sh.

For a manual install, unzip a release ZIP into PlotJuggler's extensions folder (Windows: %APPDATA%\PlotJuggler\PlotJuggler4\extensions\) and restart PlotJuggler.

Releases

Push a tag v<version> matching data_stream_cansub/manifest.json. CI builds Linux (x86_64, arm64), macOS (arm64) and Windows (x86_64), publishes the ZIPs and their SHA-256 on the GitHub release, and prints the pj-plugin-registry record in the job summary (scripts/registry_entry.py). A PR with that record to the registry makes the release available in the Marketplace.

Licence

MIT (LICENSE). The C SDK's stream decoder is MIT; the two Zephyr sources it uses (net_buf, CRC-32) are Apache-2.0.

About

PlotJuggler 4 plugin: stream live CAN from the CANsub CAN-USB/Ethernet interfaces, DBC-decoded

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages