You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()?;letSome(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.
The text was updated successfully, but these errors were encountered:
Hey, thanks for the interest and good idea! I eventually wanted to get to #17 to speed up SPN lookups, but that would probably entail breaking the internal PGN/SPN model. That said, do you see needing any other functionality beyond iterating the SPN map? Otherwise, I like the idea of exposing an API to do this, maybe something like:
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
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.The text was updated successfully, but these errors were encountered: