Expand description

cantools provides types and traits useful if analyzing CAN-bus data. This includes read and write access to the CAN-bus data (see data), decoding (see decode), encoding (see encode), and signals (see signals) that combine these aspects to extract or set data.

If you are looking for CAN-bus analysis software written in another programming language, have a look at the following repositories:

  • cantools CAN-bus analysis and hardware interface software written in the Python programming language
  • CANalyze.jl CAN-bus analysis software written in the Julia programming language

New features are planed. The following selection shows a non-exhaustive list of future features:

  • Signal overlap check: Checks whether two or more signals overlap. This is important because otherwise one signal encoding corrupts data set from another signal.
  • Messages: Grouping of multiple signals into one message such that mass decoding or encoding becomes possible. Messages do have an elaborate interface that I cannot explain here.
  • Database: Same idea as before. Grouping of messages into one database.
  • Logging: Implementation of popular logging formats, e.g., candump or Peak. The formats should work in both directions, either read or write.
  • Formats: Reading of popular file formats describing the decoding or encoding, e.g., SYM, DBC or a self conceived JSON format.

Re-exports

pub use data::CANRead;
pub use data::CANWrite;
pub use utils::Endian;
pub use utils::Mask;
pub use decode::Decode;
pub use decode::DefaultDecode;
pub use decode::TryDecode;
pub use encode::Encode;
pub use encode::TryEncode;
pub use signals::Bit;
pub use signals::LengthError;
pub use signals::Signed;
pub use signals::Unsigned;

Modules

Module providing utility traits for accessing and mutating CAN-bus data.

Module providing utility traits for decoding CAN-bus data.

Module providing utility traits for encoding CAN-bus data.

Module contains logfile types used to access the underlying CAN-bus data.

Module provides convenient signal types used for decoding and encoding of CAN-bus data.

Module providing utility traits used for bit-masks (see Mask) and describing endianess (see Endian).