clj-artnet.impl.protocol.codec.spec
Declarative packet specifications for Art-Net 4.
Each packet type is defined as a vector of field descriptors that mirror the Art-Net 4 protocol specification exactly. The compiler (impl.codec.compiler) consumes these specs to generate high-performance ByteBuffer operations.
Field descriptor keys: - :name -> keyword identifying the field - :type -> one of :u8, :u16le, :u16be, :fixed-string, :ipv4, :bytes, :uid - :length -> for :fixed-string and :bytes, the byte length - :value -> constant value (for headers/magic bytes) - :default -> default value when encoding if not provided - :doc -> optional documentation
art-command-spec
ArtCommand packet specification - 16 byte header and up to 512 bytes text
art-data-reply-spec
ArtDataReply packet specification - 20 byte header and up to 512 bytes
art-diag-data-spec
ArtDiagData packet specification - 18 byte header and up to 512 bytes text
art-directory-reply-spec
ArtDirectoryReply packet specification - replies to OpDirectory with a file list.
art-file-fn-master-spec
ArtFileFnMaster packet specification - downloads a user file from the node.
art-file-tn-master-spec
ArtFileTnMaster packet specification - uploads a user file to a node. Note: Uses the same reply mechanism as ArtFirmwareReply.
art-firmware-master-spec
ArtFirmwareMaster packet specification - 40 byte header and up to 1024 bytes
art-mac-master-spec
ArtMacMaster packet specification - DEPRECATED per Art-Net 4. Retained for backward compatibility with legacy devices.
art-mac-slave-spec
ArtMacSlave packet specification - DEPRECATED per Art-Net 4. Retained for backward compatibility with legacy devices.
art-media-control-reply-spec
ArtMediaControlReply packet specification - unicast by Media Server to Controller. Note: Art-Net 4 spec provides opcode but no detailed field layout.
art-media-control-spec
ArtMediaControl packet specification - unicast by Controller to Media Server. Note: Art-Net 4 spec provides opcode but no detailed field layout.
art-media-patch-spec
ArtMediaPatch packet specification - unicast by Controller to Media Server. Note: Art-Net 4 spec provides opcode but no detailed field layout.
art-media-spec
ArtMedia packet specification - unicast by Media Server to Controller. Note: Art-Net 4 spec provides opcode but no detailed field layout.
art-time-sync-spec
ArtTimeSync packet specification - used to synchronize real time date and clock. Note: Art-Net 4 spec provides opcode but no detailed field layout.
art-tod-request-spec
ArtTodRequest packet specification - 24 byte header and up to 32 addresses
art-trigger-spec
ArtTrigger packet specification - 18 byte header and up to 512 bytes payload
art-video-data-spec
ArtVideoData packet specification - display data. Note: Art-Net 4 spec provides opcode but no detailed field layout.
art-video-palette-spec
ArtVideoPalette packet specification - colour palette setup. Note: Art-Net 4 spec provides opcode but no detailed field layout.
art-video-setup-spec
ArtVideoSetup packet specification - video screen setup. Note: Art-Net 4 spec provides opcode but no detailed field layout.
field-offset
(field-offset spec field-name)Calculate the byte offset of a named field within a spec. Returns the offset as a long, or -1 if the field is not found.
spec-header-size
(spec-header-size spec)Calculate the total byte size of a packet spec (header only, excludes variable payload)