17 lines
436 B
Rust
17 lines
436 B
Rust
use std::{fs, path::Path};
|
|
|
|
use can_dbc::Dbc;
|
|
|
|
fn main() {
|
|
let args: Vec::<_> = std::env::args().collect();
|
|
|
|
let data =
|
|
fs::read_to_string(Path::new(&args[1])).expect("Unable to read input file");
|
|
let dbc = Dbc::try_from(data.as_str()).expect("Failed to parse dbc file");
|
|
|
|
let asc_path = Path::new(&args[2]);
|
|
let output_dir = Path::new(&args[3]);
|
|
|
|
libsvld::decode_to_motec(&dbc, asc_path, output_dir);
|
|
}
|