clj-artnet.impl.shell.commands

Constructs and injects commands (DMX, RDM, State) into the node’s flow loop.

Provides a functional API for queuing side effects and protocol actions to be processed by the shell/logic graph.

apply-state-command

(apply-state-command state)

Builds an apply-state command map.

State map can contain :node, :network, :callbacks, :capabilities keys. Logic layer merges these updates into the live configuration.

enqueue-command!

(enqueue-command! node command)

Injects a command map into the logic layer commands channel. The node must be a map containing a :flow key with a running graph.

send-diagnostic!

(send-diagnostic! node opts)

Enqueues an ArtDiagData message for transmission.

Options: - :text -> ASCII text (max 512 chars) - :priority -> Priority keyword/byte - :logical-port -> Logical port ID

Diagnositics are sent to controllers subscribed via ArtPoll.

send-dmx!

(send-dmx! node opts)

Enqueues an ArtDmx frame for transmission.

Options: - :data -> Channel bytes (byte array/ByteBuffer) - :net -> Net switch (0-127) - :sub-net -> Sub-Net switch (0-15) - :universe -> Universe (0-15) - :target -> Unicast target {:host … :port …} (Required) - :sequence -> Sequence number override (optional)

Art-Net 4 spec: ArtDmx must strictly be unicast.

send-rdm!

(send-rdm! node opts)

Enqueues an ArtRdm frame for transmission.

Options: - :rdm-packet -> RDM PDU bytes (without start code) - :address -> Port address / Net / Sub-Net / Universe - :target -> Unicast target {:host … :port …} (Required)

Art-Net 4 spec: ArtRdm must strictly be unicast.

send-sync!

(send-sync! node)(send-sync! node opts)

Broadcasts an ArtSync frame to synchronize output buffers.

Options: - :target -> Broadcast target (optional, defaults to broadcast)

Used to prevent visual tearing on large arrays.