Repository navigation
Support the Force_Synchronization option - #83
Open
stewartadam wants to merge 3 commits into
Open
stewartadam wants to merge 3 commits into
stewartadam wants to merge 3 commits into
Conversation
E1.31-2016 Section 6.2.6 and 11.1.2: when synchronisation on an address is lost (no sync packet within E131_NETWORK_DATA_LOSS_TIMEOUT), a data packet with Force_Synchronization set may be processed without waiting for a sync packet, while one without it is held until synchronisation resumes. The receiver parsed the bit but never used it, so synchronised data was always held, and SacnSource always sent the bit as 0. The receiver now records when it last got a sync packet on each sync address. A data packet with Force_Synchronization set whose sync address has had no sync packet within the timeout (or none yet, as per 11.1.1) is passed up straight away. Without the option, behaviour is unchanged. SacnSource gains force_synchronization/set_force_synchronization to set the option on the data packets it sends. It defaults to off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVQThQpmqhvLapk99Vs
# Conflicts: # tests/src_tests.rs
The merge resolution dropped the closing brace of the test, which nested the source name tests from main inside it so they no longer ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVQThQpmqhvLapk99Vs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
E1.31-2016 §6.2.6 and §11.1 describe two synchronisation behaviours (summarised in
documentation/ANSI-E1.31-2018-Compliance-Check-List.pdf, where this was marked "Not implemented"):E131_NETWORK_DATA_LOSS_TIMEOUT(§11.1.2).Force_Synchronizationoption decides what happens. With 0, the receiver holds data until synchronisation resumes. With 1, the receiver may process data without waiting for a sync packet.The receiver parsed the bit but never used it, so synchronised data was always held.
SacnSourcealways sent the bit as 0.Changes
Receiver
Force_Synchronizationset, and arrives while that address isn't synchronised (no sync packet within the timeout, or none yet) is now passed up immediately. It also replaces any data held for that universe.Source
SacnSource::force_synchronization()andset_force_synchronization(bool)set the option on outgoing data packets. It defaults tofalse, so existing senders don't change.Tests
test_force_synchronization_before_sync_startstest_force_synchronization_while_synchronized(data is still held)test_force_synchronization_after_sync_lost(with the bit unset, data is held; with it set, data passes)test_set_force_synchronizationintests/src_tests.rs.test_send_sync_timeouttest, which said the option wasn't implemented.cargo testandcargo clippypass, and clippy reports no new warnings.