Low-level buffer read/write primitives for Art-Net codec. All functions operate on java.nio.ByteBuffer instances.
Low-level buffer read/write primitives for Art-Net codec. All functions operate on java.nio.ByteBuffer instances.
(as-buffer payload)Convert payload to ByteBuffer.
Convert payload to ByteBuffer.
(clamp-bytes data max-length)Clamp byte array to maximum length.
Clamp byte array to maximum length.
(ensure-header! buf)Validate Art-Net ID bytes at start of buffer. Throws if invalid.
Validate Art-Net ID bytes at start of buffer. Throws if invalid.
(ensure-null-terminated data max-length)Ensure a byte array is null-terminated, adding terminator if needed.
Ensure a byte array is null-terminated, adding terminator if needed.
(payload-bytes payload)Extract payload as a byte array.
Extract payload as a byte array.
(payload-length payload)Get the length of payload (ByteBuffer or byte array).
Get the length of payload (ByteBuffer or byte array).
(prepare-target buf size)Prepare a ByteBuffer for writing with a specified capacity.
Prepare a ByteBuffer for writing with a specified capacity.
(put-bytes! buf coll)Write a collection of bytes to buffer at current position.
Write a collection of bytes to buffer at current position.
(put-fixed-string! buf s width)Write null-terminated ASCII string padded to fixed width.
Write null-terminated ASCII string padded to fixed width.
(put-u16-be! buf v)Write big-endian uint16 to buffer at the current position.
Write big-endian uint16 to buffer at the current position.
(put-u16-le! buf v)Write little-endian uint16 to buffer at the current position.
Write little-endian uint16 to buffer at the current position.
(put-uids! buf uids)Write a sequence of RDM UIDs (6-byte sequences) to the buffer.
Write a sequence of RDM UIDs (6-byte sequences) to the buffer.
(read-ascii buf offset length)Read null-terminated ASCII string from buffer at offset with max length.
Read null-terminated ASCII string from buffer at offset with max length.
(read-octets buf offset length)Read byte slice as a vector of unsigned integers.
Read byte slice as a vector of unsigned integers.
(safe-ubyte buf idx)Read unsigned byte at index, returning 0 if out of bounds.
Read unsigned byte at index, returning 0 if out of bounds.
(safe-uint16-be buf idx)Read big-endian uint16 at index, returning 0 if out of bounds.
Read big-endian uint16 at index, returning 0 if out of bounds.
(sum-bytes-16 data)Sum byte values as 16-bit checksum.
Sum byte values as 16-bit checksum.
(ubyte v)Convert signed byte to unsigned int (0-255).
Convert signed byte to unsigned int (0-255).
(uint16-be buf idx)Read big-endian uint16 at index.
Read big-endian uint16 at index.
(uint16-le buf idx)Read little-endian uint16 at index.
Read little-endian uint16 at index.
(write-payload! buf payload)Write payload (ByteBuffer or byte array) to the target buffer.
Write payload (ByteBuffer or byte array) to the target buffer.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |