clj-artnet.impl.protocol.codec.domain.config

Encode/decode for Config family packets: ArtInput, ArtAddress, ArtIpProg, ArtIpProgReply.

artinput-packet

(artinput-packet {:keys [bind-index num-ports disabled disable-ports inputs], :or {bind-index 1, num-ports 0}})

Construct a stateless ArtInput map from higher-level options.

Options: * :bind-index -> node BindIndex (default 1) * :num-ports -> total active ports (default 0) * :disabled -> up to 4 booleans in port order * :disable-ports -> collection of port indexes to disable * :inputs -> raw Input4 bytes (overrides booleans)

Returns a packet map suitable for encode.

decode-artaddress

(decode-artaddress buf)

Decode ArtAddress packet from buffer.

decode-artinput

(decode-artinput buf)

Decode ArtInput packet from the buffer.

decode-artipprog

(decode-artipprog buf)

Decode ArtIpProg packet from buffer.

encode-artinput!

(encode-artinput! buf {:keys [bind-index num-ports inputs disabled]})

Encode ArtInput packet into a buffer.

encode-artipprogreply!

(encode-artipprogreply! buf {:keys [ip subnet-mask gateway port dhcp?], :or {subnet-mask [255 0 0 0], gateway [0 0 0 0], port 6454}})

Encode ArtIpProgReply packet into a buffer.