Liking cljdoc? Tell your friends :D

clj-artnet.impl.protocol.sync

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
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
raw docstring

activate-art-syncclj

(activate-art-sync state timestamp)

Activate ArtSync mode (if configured). Returns updated state.

Activate ArtSync mode (if configured). Returns updated state.
sourceraw docstring

artsync-timeout-nsclj

ArtSync timeout per spec (4 seconds in nanoseconds).

ArtSync timeout per spec (4 seconds in nanoseconds).
sourceraw docstring

configured-art-sync?clj

(configured-art-sync? state)

Check if ArtSync mode is configured.

Check if ArtSync mode is configured.
sourceraw docstring

current-sync-modeclj

(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).
sourceraw docstring

default-sync-buffer-ttl-nsclj

Default TTL for sync-buffered frames (1 second in nanoseconds).

Default TTL for sync-buffered frames (1 second in nanoseconds).
sourceraw docstring

drain-sync-framesclj

(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.
sourceraw docstring

maybe-expire-art-syncclj

(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.
sourceraw docstring

release-sync-frames-implclj

(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.
sourceraw docstring

should-ignore-sync?clj

(should-ignore-sync? state sync-sender)

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
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
sourceraw docstring

stage-sync-frameclj

(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.
sourceraw docstring

sync-buffer-ttl-nsclj

(sync-buffer-ttl-ns state)

Get sync buffer TTL from state.

Get sync buffer TTL from state.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close