Closed andresv closed 3 years ago
Now these could actually be raw identifiers! Want to keep the x prefix for consistency?
Yes. From user perspective something::r#type
looks cumbersome.
I also documented this behavior in readme so it should not surprise users.
No it is not yet quite right. I try to add proper tests under can-messages.lib
.
Is it intended that One
starts from offset 15?
BO_ 512 Bar: 8 Ipsum
SG_ One : 15|2@0+ (1,0) [0|3] "" Dolor
SG_ Two : 7|8@0+ (0.39,0) [0.00|100] "%" Dolor
SG_ Three : 13|3@0+ (1,0) [0|7] "" Dolor
SG_ Four : 10|2@0+ (1,0) [0|3] "" Dolor
SG_ Type : 30|1@0+ (1,0) [0|1] "boolean" Dolor
It seems overlapping bits are allowed in dbc and this message is meant for testing https://github.com/technocreatives/dbc-codegen/blob/main/testing/rust-integration/tests/compare_to_socketcan.rs#L23
Yeah that;s supposed to test an edge case :)
This look good -- I'll merge it. Feel free to submit more PRs with fixes if you want to cover other cases or improve our weird test messages!
There are cases where some fields in in
dbc
can be Rust keywords. This PR prependsx
to such fields. Sotype
would becomextype
etc.