Skip to content

feat: generate per-sender Rust modules from DBC files#174

Open
ricardo119 wants to merge 1 commit into
oxibus:mainfrom
ricardo119:main
Open

feat: generate per-sender Rust modules from DBC files#174
ricardo119 wants to merge 1 commit into
oxibus:mainfrom
ricardo119:main

Conversation

@ricardo119

Copy link
Copy Markdown

Add write_split_by_sender to Config which parses a DBC file,
groups messages by their transmitter node, and writes one .rs file
per sender plus a mod.rs with inline include! macros into OUT_DIR.

Refactor render_dbc and render_root_enum to accept a &[&Message]
slice so both the single-file and split paths share the same rendering
logic.

Add testing/can-messages-split crate as a workspace member to exercise
the split codegen against multiple_devices.dbc in CI via cargo test --all.

There is also an README.md on testing/can-messasge-split with more details of
how the logic is working.

Add `write_split_by_sender` to `Config` which parses a DBC file,
groups messages by their transmitter node, and writes one `.rs` file
per sender plus a `mod.rs` with inline `include!` macros into `OUT_DIR`.

Refactor `render_dbc` and `render_root_enum` to accept a `&[&Message]`
slice so both the single-file and split paths share the same rendering
logic.

Add `testing/can-messages-split` crate as a workspace member to exercise
the split codegen against `multiple_devices.dbc` in CI via `cargo test --all`.

There is also an README.md on testing/can-messasge-split with more details of
how the logic is working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant