Expand description
§dbc-rs
A no_std compatible Rust library for parsing and working with DBC (CAN database) files.
§Features
no_stdcompatible: Works in embedded environments without the standard library- Minimal dependencies: Only
heaplesswhen usingheaplessfeature (zero dependencies withalloc/std) - Memory efficient: Uses
Vec(viaalloc) for dynamic collections - Type-safe: Strong typing for all DBC elements
§Usage
use dbc_rs::Dbc;
let dbc_content = r#"VERSION "1.0"
BU_: ECM TCM
BO_ 256 EngineData : 8 ECM
SG_ RPM : 0|16@0+ (0.25,0) [0|8000] "rpm" TCM
"#;
let dbc = Dbc::parse(dbc_content)?;Structs§
- Dbc
- Represents a complete DBC (CAN database) file.
- DbcBuilder
- Builders
Builder for constructing
Dbcinstances programmatically. - Extended
Multiplexing - Extended Multiplexing definition (SG_MUL_VAL_)
- Extended
Multiplexing Builder - Builder for creating
ExtendedMultiplexingprogrammatically. - Message
- Represents a CAN message in a DBC file.
- Message
Builder - Nodes
- Represents a collection of node (ECU) names from a DBC file.
- Nodes
Builder - Builder for creating
Nodesprogrammatically. - Receivers
Builder - Builder for creating
Receiversprogrammatically. - Signal
- Represents a CAN signal within a message.
- Signal
Builder - Signals
- Encapsulates the signals array for a message
- Value
Descriptions - Value descriptions for a signal.
- Value
Descriptions Builder - Builder for creating
ValueDescriptionsprogrammatically. - Version
- Represents a version string from a DBC file.
- Version
Builder - Builder for creating
Versionprogrammatically.
Enums§
- Byte
Order - Byte order (endianness) for signal encoding in CAN messages.
- Error
- Error type for DBC operations.
- Receivers
- Represents the receiver nodes for a signal in a DBC file.
Constants§
- MAX_
EXTENDED_ MULTIPLEXING - MAX_
MESSAGES - MAX_
NAME_ SIZE - MAX_
NODES - MAX_
SIGNALS_ PER_ MESSAGE - MAX_
VALUE_ DESCRIPTIONS - PKG_
VERSION - The version of this crate as specified in
Cargo.toml.
Type Aliases§
- Result
- Result type alias for operations that can return an
Error.