clj-artnet.impl.protocol.rdm.discovery
Art-Net RDM/TOD helpers for the impl architecture. Maintains a lightweight Table-of-Devices snapshot and subscriber registry so the logic coordinator can focus on orchestration.
background-disabled?
(background-disabled? state)Return true when background RDM polling is unsupported or disabled.
background-queue-supported?
(background-queue-supported? state)Return true when the RDM background queue workflow is enabled.
discovery-running?
(discovery-running? state)Return true when any discovery work is queued.
handle-tod-control
(handle-tod-control state packet sender)Handle ArtTodControl by applying discovery commands and replying with ArtTodData snapshots for the targeted port.
handle-tod-request
(handle-tod-request state packet sender)Return [rdm-state actions] for an ArtTodRequest packet.
initial-state
(initial-state node {:keys [rdm-version ports devices port-addresses subscriber-ttl-ns subscriber-ttl-ms background discovery], :as _config})Build the initial RDM state from node defaults and runtime config. Config keys: * :rdm-version -> advertised RDM revision (default 1) * :ports -> {port-address {:uids … :port :devices -> fallback UID vector applied when :ports entry missing * :port-addresses -> preferred order (defaults to provided ports) * :subscriber-ttl-ns/ms -> override subscriber lifetime
run-background-queue
(run-background-queue state now)Advance the background queue scheduler. Returns [state event] where the event is a map describing the requested severity/poll if a poll should be dispatched.
run-discovery
(run-discovery state now)Advance the discovery scheduler. Returns [state event] when work should be dispatched to the host controller.