I am working on a tool that parses a can stream based on a dbc file in real time. I don't really have specific messages of interests (like the example), but rather, I want to parse all can frames that match to DBC.
Something like:
let lib = PgnLibrary::from_dbc_file("./j1939.dbc");
loop {
let msg = s.recv()?;
let Some(pgnDef) = lib.get_pgn(msg.pgn) {
let d = pgnDef.spns.iter().map(|(s, def)| (s, def.parse_message(msg.data)?));
}
// Export `d` to database
}
Currently this does not compile because spns is a private member. Do you intend to support this? If so, I would be willing to offer a PR based on how you want to approach it.
I am working on a tool that parses a can stream based on a dbc file in real time. I don't really have specific messages of interests (like the example), but rather, I want to parse all can frames that match to DBC.
Something like:
Currently this does not compile because
spnsis a private member. Do you intend to support this? If so, I would be willing to offer a PR based on how you want to approach it.