Skip to content

Terminate with trigger event#25

Merged
berndpfrommer merged 2 commits intomasterfrom
terminate_with_trigger_event
Nov 7, 2025
Merged

Terminate with trigger event#25
berndpfrommer merged 2 commits intomasterfrom
terminate_with_trigger_event

Conversation

@berndpfrommer
Copy link
Collaborator

This PR changes the API of the EventProcessor class:
The eventExtTrigger() method now expects a return value. When returning false, a currently in-progress call to decode() or decodeUntil() is terminated, and must be resumed by calling decode() or decodeUntil() again on the same message buffer to evolve the state of the decoder correctly.
This change to the API was necessary to facilitate terminating the decoding process when a trigger event is received. Without this change to the API, there is no way to interrupt and resume the decoding process.
I also considered switching to an iterator-based design altogether, but that could cut into the performance, because in the case of vector events, the iterator has to remember not just which byte it is processing, but also which bit.

@berndpfrommer berndpfrommer mentioned this pull request Nov 7, 2025
@berndpfrommer berndpfrommer merged commit beff5ad into master Nov 7, 2025
3 checks passed
@berndpfrommer berndpfrommer deleted the terminate_with_trigger_event branch November 7, 2025 21:01
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