cantools/lib.rs
1#![allow(dead_code)]
2
3//! [cantools](crate) provides types and traits useful if analyzing CAN-bus data.
4//! This includes read and write access to the CAN-bus data (see [data](crate::data)), decoding (see
5//! [decode](crate::decode)), encoding (see [encode](crate::encode)), and signals (see
6//! [signals](crate::signals)) that combine these aspects to extract or set data.
7//!
8//! If you are looking for CAN-bus analysis software written in another programming language, have
9//! a look at the following repositories:
10//! - [cantools](https://github.com/cantools/cantools) CAN-bus analysis and hardware interface
11//! software written in the Python programming language
12//! - [CANalyze.jl](https://github.com/tsabelmann/CANalyze.jl) CAN-bus analysis software written in
13//! the Julia programming language
14//!
15//! New features are planed. The following selection shows a non-exhaustive list of future features:
16//! - Signal overlap check: Checks whether two or more signals overlap. This is important because
17//! otherwise one signal encoding corrupts data set from another signal.
18//! - Messages: Grouping of multiple signals into one message such that mass decoding or encoding
19//! becomes possible. Messages do have an elaborate interface that I cannot explain here.
20//! - Database: Same idea as before. Grouping of messages into one database.
21//! - Logging: Implementation of popular logging formats, e.g., **candump** or **Peak**. The formats
22//! should work in both directions, either read or write.
23//! - Formats: Reading of popular file formats describing the decoding or encoding, e.g., **SYM**,
24//! **DBC** or a self conceived **JSON** format.
25
26pub mod data;
27pub use data::{CANRead, CANWrite};
28
29pub mod utils;
30pub use utils::{Endian, Mask};
31
32pub mod decode;
33pub use decode::{Decode, DefaultDecode, TryDecode};
34
35pub mod encode;
36pub use encode::{Encode, TryEncode};
37
38pub mod signals;
39pub use signals::{Bit, LengthError, Signed, Unsigned};
40
41pub mod logging;