Expand description
DBC files: what the frames of a CAN bus mean.
A DBC file names each message by its id (BO_) and the signals packed in its data
(SG_): start bit, length, byte order, sign, factor and offset, unit, and for a
multiplexed message which value of the multiplexer selects each signal. VAL_
names a signal’s values, SIG_VALTYPE_ marks a float signal, and CM_ comments
on messages and signals. Parsed by hand; every count and length is bounded.
DBC files are found on the format search path, as FIX dictionaries are: a .dbc
file applies to every interface, and a TOML file of kind = "dbc" names a DBC file
(file) and the interface it applies to ([match] interface = "can1"). --dict FILE
is read over them. A later file’s message of an id takes the place of an earlier’s.
Structs§
- Dbc
- One DBC file and what it applies to.
- Message
- One message.
- Signal
- A signal’s place in its message and what its value means.
Enums§
- Mux
- How a signal takes part in multiplexing.
Constants§
- MAX_
FILE - The largest DBC file read.
Functions§
- integer
signal’s value indataas an integer of its sign, before factor and offset.- is_
dbc_ toml - Whether a TOML file is a DBC reference (
kind = "dbc") rather than a format spec. - load
- Read the DBC file
path, or the DBC akind = "dbc"TOML file names.Ok(None)for a TOML file of another kind. - parse
- Parse the text of a DBC file named
name. - physical
signal’s physical value indata: factor and offset applied, a float signal read as one.- present
- Whether
signalis present in a frame whose multiplexer readsmux. - raw
- The raw bits of
signalindata, orNonewhen the data is too short to hold them.