clj-artnet 0.2.0-SNAPSHOT
Released under the MIT License
A high-performance Art-Net 4 protocol implementation for Clojure.
Installation
To install, add the following dependency to your project or build file:
[com.github.robinlahtinen/clj-artnet "0.2.0-SNAPSHOT"]
Topics
Namespaces
clj-artnet.impl.protocol.addressing
Port-Address logic (Art-Net 4).
clj-artnet.impl.protocol.codec.compiler
Spec-driven codec compiler for Art-Net 4.
Public variables and functions:
- compile-decoder
- compile-encoder
- compiled-decoders
- compiled-encoders
- decode-by-spec
- decode-packet
- encode-by-spec!
- encode-packet!
- opcode->keyword
- packet-size
- read-bytes
- read-field
- read-fixed-string
- read-ipv4
- read-opcode
- read-u16-be
- read-u16-le
- read-u8
- read-uid
- slice-payload
- valid-artnet-header?
- write-bytes!
- write-field!
- write-fixed-string!
- write-ipv4!
- write-u16-be!
- write-u16-le!
- write-u8!
- write-uid!
clj-artnet.impl.protocol.codec.constants
Art-Net 4 protocol constants, opcodes, and lookup tables. Single source of truth for all protocol-level values derived from the Art-Net 4 specification.
Public variables and functions:
- artaddress-length
- artcommand-header-size
- artcommand-max-bytes
- artcommand-max-length
- artdatareply-header-size
- artdatareply-max-bytes
- artdatarequest-length
- artdiagdata-header-size
- artdmx-header-size
- artfirmwaremaster-header-size
- artfirmwaremaster-max-bytes
- artfirmwarereply-length
- artinput-disable-bit
- artinput-length
- artipprog-min-length
- artipprogreply-length
- artnet-base-header-size
- artnet-id-bytes
- artnet-id-length
- artnzs-header-size
- artpoll-length
- artpollreply-length
- artrdm-header-size
- artrdmsub-header-size
- artrdmsub-max-bytes
- arttimecode-length
- arttodcontrol-length
- arttoddata-header-size
- arttodrequest-base-length
- arttodrequest-max-addresses
- arttrigger-header-size
- arttrigger-key->keyword
- arttrigger-keyword->key
- arttrigger-length
- arttrigger-max-data
- artvlc-flag-beacon
- artvlc-flag-ieee
- artvlc-flag-reply
- artvlc-flags-mask
- artvlc-header-size
- artvlc-magic
- artvlc-max-payload
- artvlc-start-code
- datarequest-code->keyword
- datarequest-keyword->code
- esta-man-prototype-id
- firmware-master-type->info
- firmware-reply-code->status
- firmware-reply-status->code
- generic-payload-ops
- keyword->opcode
- max-dmx-channels
- max-tod-uids-per-packet
- opcode->keyword
- protocol-version
- rdm-command-class->keyword
- rdm-command-keyword->class
clj-artnet.impl.protocol.codec.dispatch
Central opcode dispatch for Art-Net packet encoding and decoding. Routes to domain-specific handlers while maintaining the original public API contract.
clj-artnet.impl.protocol.codec.domain.common
Common utilities shared across domain encode/decode modules.
clj-artnet.impl.protocol.codec.domain.config
Encode/decode for Config family packets: ArtInput, ArtAddress, ArtIpProg, ArtIpProgReply.
Public variables and functions:
clj-artnet.impl.protocol.codec.domain.data
Encode/decode for Data family packets: ArtDataRequest, ArtDataReply.
Public variables and functions:
clj-artnet.impl.protocol.codec.domain.diag
Encode/decode for Diagnostic family packets: ArtDiagData, ArtCommand, ArtTrigger, ArtTimeCode.
Public variables and functions:
clj-artnet.impl.protocol.codec.domain.dmx
Encode/decode for DMX family packets: ArtDmx, ArtNzs, ArtVlc, ArtSync. These are the hot-path packets that use flyweight types for zero allocation.
Public variables and functions:
clj-artnet.impl.protocol.codec.domain.firmware
Encode/decode for Firmware family packets: ArtFirmwareMaster, ArtFirmwareReply.
Public variables and functions:
clj-artnet.impl.protocol.codec.domain.poll
Encode/decode for Poll family packets: ArtPoll, ArtPollReply.
Public variables and functions:
clj-artnet.impl.protocol.codec.domain.rdm
Encode/decode for RDM family packets: ArtRdm, ArtRdmSub, ArtTodRequest, ArtTodData, ArtTodControl.
Public variables and functions:
clj-artnet.impl.protocol.codec.primitives
Low-level buffer read/write primitives for Art-Net codec. All functions operate on java.nio.ByteBuffer instances.
Public variables and functions:
- as-buffer
- byte-array-class
- clamp-bytes
- coerce-to-bytes
- ensure-header!
- ensure-null-terminated
- payload-bytes
- payload-length
- prepare-target
- put-bytes!
- put-fixed-string!
- put-u16-be!
- put-u16-le!
- put-uids!
- read-ascii
- read-octets
- safe-ubyte
- safe-uint16-be
- sum-bytes-16
- ubyte
- uint16-be
- uint16-le
- write-payload!
clj-artnet.impl.protocol.codec.spec
Declarative packet specifications for Art-Net 4.
Public variables and functions:
- art-address-spec
- art-command-spec
- art-data-reply-spec
- art-data-request-spec
- art-diag-data-spec
- art-directory-reply-spec
- art-directory-spec
- art-dmx-spec
- art-file-fn-master-spec
- art-file-fn-reply-spec
- art-file-tn-master-spec
- art-firmware-master-spec
- art-firmware-reply-spec
- art-input-spec
- art-ip-prog-reply-spec
- art-ip-prog-spec
- art-mac-master-spec
- art-mac-slave-spec
- art-media-control-reply-spec
- art-media-control-spec
- art-media-patch-spec
- art-media-spec
- art-nzs-spec
- art-poll-reply-spec
- art-poll-spec
- art-rdm-spec
- art-rdm-sub-spec
- art-sync-spec
- art-time-sync-spec
- art-timecode-spec
- art-tod-control-spec
- art-tod-data-spec
- art-tod-request-spec
- art-trigger-spec
- art-video-data-spec
- art-video-palette-spec
- art-video-setup-spec
- artnet-id
- default-port
- field-by-name
- field-offset
- field-size
- header-fields
- op-address
- op-command
- op-data-reply
- op-data-request
- op-diag-data
- op-directory
- op-directory-reply
- op-dmx
- op-file-fn-master
- op-file-fn-reply
- op-file-tn-master
- op-firmware-master
- op-firmware-reply
- op-input
- op-ip-prog
- op-ip-prog-reply
- op-mac-master
- op-mac-slave
- op-media
- op-media-control
- op-media-control-reply
- op-media-patch
- op-nzs
- op-poll
- op-poll-reply
- op-rdm
- op-rdm-sub
- op-sync
- op-time-sync
- op-timecode
- op-tod-control
- op-tod-data
- op-tod-request
- op-trigger
- op-video-data
- op-video-palette
- op-video-setup
- packet-specs
- protocol-version
- spec-header-size
clj-artnet.impl.protocol.codec.types
Flyweight packet types for zero-allocation hot paths. ArtDmx and ArtNzs packets use these types to provide map-like access without allocating intermediate data structures.
Public variables and functions:
clj-artnet.impl.protocol.data
Helpers for ArtDataRequest/Reply configuration.
Public variables and functions:
clj-artnet.impl.protocol.discovery
ArtPoll/ArtPollReply handling (Art-Net 4).
Public variables and functions:
- artpoll-broadcast-timeout-ms
- artpoll-reply-delay-max-ms
- disable-reply-on-change
- enforce-reply-on-change-limit
- filter-pages-by-target
- oldest-reply-on-change-peer
- page-in-target-range?
- page-port-addresses
- page-reply-data
- parse-artpoll-flags
- parse-artpoll-packet
- reply-on-change-max-peers
- reply-on-change-peer-count
clj-artnet.impl.protocol.dmx
Pure DMX merge and processing logic (Art-Net 4).
Public variables and functions:
- any-port-merging?
- artsync-timeout-ns
- at-source-limit?
- default-sync-buffer-ttl-ns
- dmx-source-key
- extract-dmx-bytes
- max-merge-sources
- merge-htp
- merge-ltp
- merge-source-timeout-ns
- merge-sources
- merge-sources-htp
- merge-sources-ltp
- port-merge-mode
- process-artdmx-merge
- prune-by-age
- prune-merge-sources
- sync-sender-matches?
clj-artnet.impl.protocol.dmx-helpers
DMX logic helpers: sync, failsafe, merge (Art-Net 4).
Public variables and functions:
- apply-node-merge-modes
- apply-runtime-config
- artsync-timeout-ns
- build-failsafe-data
- check-port-failsafe
- clear-failsafe-port
- clear-sync-buffer
- default-failsafe-config
- default-refresh-rate-hz
- ensure-merge-state
- failsafe-globally-enabled?
- failsafe-min-tick-interval-ns
- failsafe-mode
- failsafe-supported?
- get-failsafe-config
- good-output-ltp-bit
- good-output-merge-bit
- good-output-sacn-bit
- initial-state
- keepalive-default-interval-ns
- keepalive-max-interval-ns
- keepalive-min-interval-ns
- keepalive-packets
- merge-source-timeout-ns
- nanos-per-second
- node-merge-modes
- normalize-failsafe-config
- normalize-sync-config
- ports-needing-keepalive
- record-failsafe-scene
- run-failsafe
- snapshot
- update-failsafe-config
- update-sync-config
clj-artnet.impl.protocol.effects
Pure data constructors for Art-Net protocol effects.
Public variables and functions:
clj-artnet.impl.protocol.firmware
Art-Net firmware upload coordination.
Public variables and functions:
clj-artnet.impl.protocol.lifecycle
State lifecycle management: initialization and cap sync.
Public variables and functions:
clj-artnet.impl.protocol.machine
Pure Art-Net protocol state machine.
Public variables and functions:
clj-artnet.impl.protocol.node-state
Manages Art-Net node state, including normalization, paging, and status bits.
Public variables and functions:
- *system-nano-time*
- default-good-output-b-byte
- default-network-state
- ensure-command-labels
- find-page-by-bind-index
- good-outputb-background-disabled-bit
- good-outputb-continuous-bit
- good-outputb-discovery-clear-mask
- good-outputb-discovery-idle-bit
- good-outputb-rdm-disabled-bit
- nano-time
- node-bind-index
- node-port-addresses
- node-port-pages
- normalize-capabilities-config
- normalize-node
- page-bind-index
- page-port-addresses
- ports->pages
- state-bind-index
- status2-derived-mask
- status2-dhcp-active-bit
- status2-dhcp-capable-bit
- status2-extended-port-bit
- status2-output-style-bit
- status2-rdm-artaddress-bit
- status3-background-queue-bit
- status3-derived-mask
- status3-llrp-bit
- status3-port-direction-bit
- status3-programmable-failsafe-bit
- status3-rdmnet-bit
clj-artnet.impl.protocol.poll
Helpers for ArtPoll discovery configuration and reply-on-change logic.
clj-artnet.impl.protocol.programming
Implements Art-Net remote programming semantics for ArtAddress, ArtInput, and ArtIpProg.
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.
clj-artnet.impl.protocol.rdm.transport
ArtRdm and ArtRdmSub transport validation and helpers per Art-Net 4 spec.
Public variables and functions:
- build-artrdm-packet
- expected-data-length
- max-rdm-payload-length
- min-rdm-payload-length
- normalize-payload-buffer
- normalize-payload-bytes
- normalize-target
- payload-command-class
- request-command-classes
- request?
- response-command-classes
- response?
- sub-device-entries
- sub-device-range
- sub-devices
- valid-command-class?
- valid-command-classes
- valid-rdmsub-packet?
- validate-payload-length
clj-artnet.impl.protocol.state
State schema and initialization (Art-Net 4).
clj-artnet.impl.protocol.sync
ArtSync handling for Art-Net 4 protocol.
clj-artnet.impl.protocol.timing
Timing utilities for deterministic testing.
Public variables and functions:
clj-artnet.impl.protocol.triggers
ArtTrigger and ArtCommand processing per Art-Net 4 specification.
Public variables and functions:
clj-artnet.impl.shell.buffers
Pools direct ByteBuffers for zero-allocation UDP I/O.
Public variables and functions:
clj-artnet.impl.shell.commands
Constructs and injects commands (DMX, RDM, State) into the node’s flow loop.
Public variables and functions:
clj-artnet.impl.shell.effects
Translates pure Art-Net protocol effects into actionable IO descriptors.
Public variables and functions:
clj-artnet.impl.shell.graph
Flow graph construction for the Art-Net node runtime.
Public variables and functions:
clj-artnet.impl.shell.lifecycle
Node lifecycle management (Shell Layer).
Public variables and functions:
clj-artnet.impl.shell.net
Utilities for Art-Net network I/O, including address coercion and channel configuration.
Public variables and functions:
clj-artnet.impl.shell.receiver
Process handling UDP reception and packet decoding.
Public variables and functions:
clj-artnet.impl.shell.sender
Process handling UDP transmission and action dispatch.
Public variables and functions:
clj-artnet.impl.shell.state
State snapshot/application utilities for running Art-Net nodes.
Public variables and functions:
clj-artnet.impl.shell.system
System lifecycle and runtime management/integration.
Public variables and functions: