Expand description
§can_tools
Rust utilities for parsing and modeling automotive CAN data.
§Highlights
- DBC parser: load CAN databases from
.dbc
into a SlotMap-backedDatabase
. - ASC parser: read Vector ASCII traces (
.asc
) into a decoupledCanLog
. - Stable keys: Nodes/Messages/Signals use SlotMap keys that remain valid across reordering.
- Ordered iteration:
Database::iter_*()
respects order vectors; usesort_*_by_name()
to present alphabetically. - Fast lookups: normalized helpers (
get_message_by_id/_hex/_name
,get_node_by_name
,get_signal_by_name
). - Signal decoding:
SignalDB::compile_inline
,extract_raw_*
, andto_sigframe
.
Crate docs refreshed: 2025-08-22.
Modules§
Structs§
- Absolute
Time - Represents an absolute, timezone-unaware timestamp.
- CanFrame
- A single row from the log with timing/channel and a pointer to its
MessageLog
. - CanLog
- In-memory representation of a parsed CAN trace.
- Database
- In-memory representation of a CAN database (DBC/ARXML).
- MessageDB
- CAN message defined in the database (DBC/ARXML).
- Message
Key - Message
Log - Metadata and payload carried by a
CanFrame
. - NodeDB
- Node/ECU defined in the database.
- NodeKey
- SignalDB
- Definition of a signal within a CAN message (DBC).
- Signal
Key - Signal
Log - Aggregated time-series for a decoded signal.
Enums§
Functions§
- resolve_
message_ signals - Yields the
SignalLog
s referenced by theMessageLog
atmsg_idx
.