Skip to content

Generate message length and cycle time consts from DBC attributes#176

Open
felixvanoost wants to merge 4 commits into
oxibus:mainfrom
felixvanoost:parse-message-cycle-time-attribute
Open

Generate message length and cycle time consts from DBC attributes#176
felixvanoost wants to merge 4 commits into
oxibus:mainfrom
felixvanoost:parse-message-cycle-time-attribute

Conversation

@felixvanoost

@felixvanoost felixvanoost commented Jul 10, 2026

Copy link
Copy Markdown

Generates the following new constants per message:

  • MESSAGE_LENGTH containing the length in bytes. This avoids the overhead of using raw().len() or embedded_can::Frame::dlc() and makes the length known at compile-time.
  • MESSAGE_CYCLE_TIME containing the value from the corresponding GenMsgCycleTime DBC attribute when it is present.

This PR should be stacked on top of #175 as it reuses the message_attr helper method.

@felixvanoost felixvanoost requested a review from nyurik July 10, 2026 20:34
@felixvanoost felixvanoost self-assigned this Jul 10, 2026
@felixvanoost felixvanoost added the enhancement New feature or request label Jul 10, 2026
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.75758% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lib.rs 75.75% 4 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@felixvanoost felixvanoost force-pushed the parse-message-cycle-time-attribute branch from 829730a to cee3a5c Compare July 10, 2026 20:40
@felixvanoost felixvanoost changed the title Emit MESSAGE_CYCLE_TIME const from GenMsgCycleTime DBC attribute Generate MESSAGE_CYCLE_TIME const from GenMsgCycleTime DBC attribute Jul 10, 2026
@felixvanoost felixvanoost changed the title Generate MESSAGE_CYCLE_TIME const from GenMsgCycleTime DBC attribute Generate message length and cycle time consts from DBC attributes Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant