Skip to content

Block Upload and Transmit Queue Refactoring#39

Merged
mcbridejc merged 11 commits intomainfrom
transmit-queue
Dec 29, 2025
Merged

Block Upload and Transmit Queue Refactoring#39
mcbridejc merged 11 commits intomainfrom
transmit-queue

Conversation

@mcbridejc
Copy link
Copy Markdown
Owner

@mcbridejc mcbridejc commented Dec 29, 2025

  • Implements SDO block upload in zencan-client and zencan-node.
  • Refactor message transmission in order to support the flood of block segments sent by the node.
    • The NodeMbox struct now handles message transmission in addition to reception, and the application pulls messages from the mailbox. This allows re-using the SDO server buffer for block upload, and for prioritizing the order of messages sent so that the block upload segments are sent only after PDOs and other outgoing messages. It also allows zencan to implement better behavior when messages aren't sent fast enough, e.g. if a TPDO is still pending when it is sent again, only the newest is sent.
  • Remove some code samples from zencan-node/README.md so there's less docs to keep up to date.

Instead, let NodeMbox handle outgoing messages as well. This allows
re-using the buffer used for SDO block receive for block transmission,
allows zencan to determine how large of a buffer is required (this is
fairly estimatable based on number of PDOs, SDO servers, etc), and allows
for a more flexible "pull" option, where a CAN controller interrupt can
grab messages as slots available while I think not restricting use cases --
an application can always poll the NodeMbox after every process call.
@mcbridejc mcbridejc merged commit d6c0237 into main Dec 29, 2025
1 check passed
@mcbridejc mcbridejc deleted the transmit-queue branch January 4, 2026 21:58
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