dbc-gen 0.1.7

A simple CAN database compiler
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::fs;
use can_dbc::Dbc;
use dbc_gen::dbc_to_string;

fn main() {
    let data = fs::read_to_string("./examples/sample.dbc").expect("Unable to read input file");
    let dbc = Dbc::try_from(data.as_str()).expect("Failed to parse dbc file");

    println!("{:?}", dbc);

    println!("{}", dbc_to_string(&dbc));
}