canparse
A CAN signal and definition parser, written in Rust.
The goal of canparse is to provide a means of converting CAN frames into
pre-defined signals, via CANdb definition input (DBC).
One common application is the J1939
spec, which defines a set of common parameters for heavy-duty trucks and other vehicles.
PgnLibrary
is also included as an application of DBC, to give first-class support for
the PGN/SPN schema.
Usage
Add canparse to your Cargo.toml
with:
[]
= "0.1.2"
Example
For a predefined DBC file, a simple program which utilizes PgnLibrary
can be
implemented as folows:
extern crate canparse;
use ;
Feature flags
use-socketcan
- Support for socketcan-rs has been included for Linux systems requiring a translation fromCANFrame
messages, usingSpnDefinition
values.
Alternatives
- canmatrix (Python)
- libcanardbc (C++)
- CANBabel (Java)
- pyvit (Python)
- Kayak (Java, OSS format
kcd
)
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.