dbc-codegen icon indicating copy to clipboard operation
dbc-codegen copied to clipboard

Generate Rust structs for messages from a dbc (CAN bus definition) file.

Results 28 dbc-codegen issues
Sort by recently updated
recently updated
newest added

``` SG_ ByteWithNegativeMin : 32|8@1+ (1,-2) [-127|127] "" Vector__XXX ``` ^ In this signal, the min bound of `-127` is lower than the lowest representable value `-2`. If one were...

When I create a unsigned 64-bit signal in the DBC (full range, no offset/scaling) the generated code fails to compile because the MAX constant has a value that exceeds `u64`...

When compiling the generated `messages.rs` I get two warning: ``` warning: unused import: `core::ops::BitOr` --> src/messages.rs:11:5 | 11 | use core::ops::BitOr; | ^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default...

I have a DBC file which has non unique field names in an enumerated signal. Example: ``` /// Defined values for Command #[derive(Clone, Copy, PartialEq)] #[cfg_attr(feature = "debug", derive(Debug))] pub...

I noticed certain signals were getting decoded incorrectly from one of my DBC files. I tracked this down to signed values that have less bits than the corresponding rust type....

* Fix a build warning that snuck in with #67 (unused Result). * Configure CI to fail if the build step produces any warnings.

I suspect you folks have thought about this, so I'm curious what your take is on using a proc macro mechanism such as [quote](https://lib.rs/crates/quote) to generate the output code instead...

The current guidance of putting code generated by a `build.rs` script into `src/` is generally not a good idea (see [here](https://doc.rust-lang.org/cargo/reference/build-script-examples.html)). It leads to it being checked into source control...

The main issue I want to address is that the generated code currently contains the `CanError` enum. I have multiple DBC files for different can buses that I would like...