Liking cljdoc? Tell your friends :D

clj-artnet.impl.protocol.codec.primitives

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.
raw docstring

as-bufferclj

(as-buffer payload)

Convert payload to ByteBuffer.

Convert payload to ByteBuffer.
sourceraw docstring

byte-array-classclj

Class object for byte arrays.

Class object for byte arrays.
sourceraw docstring

clamp-bytesclj

(clamp-bytes data max-length)

Clamp byte array to maximum length.

Clamp byte array to maximum length.
sourceraw docstring

ensure-header!clj

(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.
sourceraw docstring

ensure-null-terminatedclj

(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.
sourceraw docstring

payload-bytesclj

(payload-bytes payload)

Extract payload as a byte array.

Extract payload as a byte array.
sourceraw docstring

payload-lengthclj

(payload-length payload)

Get the length of payload (ByteBuffer or byte array).

Get the length of payload (ByteBuffer or byte array).
sourceraw docstring

prepare-targetclj

(prepare-target buf size)

Prepare a ByteBuffer for writing with a specified capacity.

Prepare a ByteBuffer for writing with a specified capacity.
sourceraw docstring

put-bytes!clj

(put-bytes! buf coll)

Write a collection of bytes to buffer at current position.

Write a collection of bytes to buffer at current position.
sourceraw docstring

put-fixed-string!clj

(put-fixed-string! buf s width)

Write null-terminated ASCII string padded to fixed width.

Write null-terminated ASCII string padded to fixed width.
sourceraw docstring

put-u16-be!clj

(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.
sourceraw docstring

put-u16-le!clj

(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.
sourceraw docstring

put-uids!clj

(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.
sourceraw docstring

read-asciiclj

(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.
sourceraw docstring

read-octetsclj

(read-octets buf offset length)

Read byte slice as a vector of unsigned integers.

Read byte slice as a vector of unsigned integers.
sourceraw docstring

safe-ubyteclj

(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.
sourceraw docstring

safe-uint16-beclj

(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.
sourceraw docstring

sum-bytes-16clj

(sum-bytes-16 data)

Sum byte values as 16-bit checksum.

Sum byte values as 16-bit checksum.
sourceraw docstring

ubyteclj

(ubyte v)

Convert signed byte to unsigned int (0-255).

Convert signed byte to unsigned int (0-255).
sourceraw docstring

uint16-beclj

(uint16-be buf idx)

Read big-endian uint16 at index.

Read big-endian uint16 at index.
sourceraw docstring

uint16-leclj

(uint16-le buf idx)

Read little-endian uint16 at index.

Read little-endian uint16 at index.
sourceraw docstring

write-payload!clj

(write-payload! buf payload)

Write payload (ByteBuffer or byte array) to the target buffer.

Write payload (ByteBuffer or byte array) to the target buffer.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close