ArtSync handling for Art-Net 4 protocol.
Per Art-Net 4 spec:
Modes:
ArtSync handling for Art-Net 4 protocol. Per Art-Net 4 spec: - ArtSync is used to synchronize DMX output across multiple universes - ArtSync timeout is 4 seconds (nodes revert to immediate mode) - ArtSync shall be ignored when merging multiple streams - ArtSync shall be ignored if the sender doesn't match the most recent ArtDmx sender Modes: - :immediate - Output DMX frames as they arrive (default) - :art-sync - Buffer DMX frames until ArtSync is received
(activate-art-sync state timestamp)Activate ArtSync mode (if configured). Returns updated state.
Activate ArtSync mode (if configured). Returns updated state.
ArtSync timeout per spec (4 seconds in nanoseconds).
ArtSync timeout per spec (4 seconds in nanoseconds).
(configured-art-sync? state)Check if ArtSync mode is configured.
Check if ArtSync mode is configured.
(current-sync-mode state)Get the current effective sync mode (may differ from configured if expired).
Get the current effective sync mode (may differ from configured if expired).
Default TTL for sync-buffered frames (1 second in nanoseconds).
Default TTL for sync-buffered frames (1 second in nanoseconds).
(drain-sync-frames state timestamp)Remove all buffered frames from the sync buffer. Returns [state' frames] where frames are sorted by received-at.
Remove all buffered frames from the sync buffer. Returns [state' frames] where frames are sorted by received-at.
(maybe-expire-art-sync state timestamp)Check if ArtSync mode should expire due to timeout (4s per spec). Returns updated state with mode reset to :immediate if expired.
Check if ArtSync mode should expire due to timeout (4s per spec). Returns updated state with mode reset to :immediate if expired.
(release-sync-frames-impl state timestamp)Process buffered frames after ArtSync trigger.
Returns {:state state' :frames-processed N :frames-data [...]} where frames-data contains {:packet :sender :output-data :output-length} for each frame that should be emitted.
Process buffered frames after ArtSync trigger.
Returns {:state state' :frames-processed N :frames-data [...]}
where frames-data contains {:packet :sender :output-data :output-length}
for each frame that should be emitted.(should-ignore-sync? state sync-sender)Check if ArtSync should be ignored per Art-Net 4 spec.
ArtSync is ignored when:
Check if ArtSync should be ignored per Art-Net 4 spec. ArtSync is ignored when: - Merging multiple streams (any port has >1 source) - Sender doesn't match the most recent ArtDmx sender
(stage-sync-frame state packet sender timestamp)Buffer a DMX frame for a later release when ArtSync arrives. Prunes expired entries and tracks when waiting started.
Buffer a DMX frame for a later release when ArtSync arrives. Prunes expired entries and tracks when waiting started.
(sync-buffer-ttl-ns state)Get sync buffer TTL from state.
Get sync buffer TTL from state.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |