Nyx Node
Loading...
Searching...
No Matches
Nyx BLOB Message
Collaboration diagram for Nyx BLOB Message:

Functions

nyx_dict_tnyx_blob_prop_new (STR_t name, __NYX_NULLABLE__ STR_t label, __NYX_NULLABLE__ STR_t format, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff, bool managed)
 Allocates a new INDI / Nyx BLOB property.
bool nyx_blob_prop_set (const nyx_dict_t *prop, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff, bool managed)
 Sets the payload of the provided property object.
void nyx_blob_prop_get (const nyx_dict_t *prop, __NYX_NULLABLE__ size_t *size, __NYX_NULLABLE__ buff_t *buff)
 Gets the payload of the provided property object.
nyx_dict_tnyx_blob_vector_new (STR_t device, STR_t name, nyx_state_t state, nyx_perm_t perm, nyx_dict_t *props[], __NYX_NULLABLE__ const nyx_opts_t *opts)
 Allocates a new INDI / Nyx BLOB vector.

Detailed Description

Nyx BLOB Message

Function Documentation

◆ nyx_blob_prop_new()

nyx_dict_t * nyx_blob_prop_new ( STR_t name,
__NYX_NULLABLE__ STR_t label,
__NYX_NULLABLE__ STR_t format,
__NYX_ZEROABLE__ size_t size,
__NYX_NULLABLE__ BUFF_t buff,
bool managed )

Allocates a new INDI / Nyx BLOB property.

Parameters
nameProperty name.
labelProperty label.
formatPayload format.
sizeNumber of initial payload bytes.
buffInitial payload buffer.
managedIf true, ownership of the provided buffer is transferred to the property object.
Returns
The new property object.
Note
If a format ends with .z, the payload is automatically ZLib+Base64-compressed, otherwise, the payload is automatically Base64-encoded.

◆ nyx_blob_prop_set()

bool nyx_blob_prop_set ( const nyx_dict_t * prop,
__NYX_ZEROABLE__ size_t size,
__NYX_NULLABLE__ BUFF_t buff,
bool managed )

Sets the payload of the provided property object.

Parameters
propProperty object.
sizeNumber of payload bytes.
buffPayload buffer.
managedIf true, ownership of the provided buffer is transferred to the object.
Returns
true if the value was modified, false otherwise.

◆ nyx_blob_prop_get()

void nyx_blob_prop_get ( const nyx_dict_t * prop,
__NYX_NULLABLE__ size_t * size,
__NYX_NULLABLE__ buff_t * buff )

Gets the payload of the provided property object.

Parameters
propProperty object.
sizeOptional pointer receiving the number of payload bytes.
buffOptional pointer receiving the payload buffer.
Note
The returned buffer remains valid until the property object is modified or released.

◆ nyx_blob_vector_new()

nyx_dict_t * nyx_blob_vector_new ( STR_t device,
STR_t name,
nyx_state_t state,
nyx_perm_t perm,
nyx_dict_t * props[],
__NYX_NULLABLE__ const nyx_opts_t * opts )

Allocates a new INDI / Nyx BLOB vector.

Parameters
deviceDevice name.
nameVector name.
stateVector state.
permVector permissions.
propsArray of properties with NULL sentinel.
optsOptions (group, label, hints, timeout, message).
Returns
The new vector object.