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

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_managed (nyx_dict_t *prop, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff)
 Sets the new value of the provided property object.
 
bool nyx_blob_prop_set_unmanaged (nyx_dict_t *prop, __NYX_ZEROABLE__ size_t size, __NYX_NULLABLE__ BUFF_t buff)
 Sets the new value 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 current value 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 messages

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.
sizeSize of the initial payload content.
buffPointer to the initial payload content.
managedIf true, the provided buffer is freed with this 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_managed()

bool nyx_blob_prop_set_managed ( nyx_dict_t prop,
__NYX_ZEROABLE__ size_t  size,
__NYX_NULLABLE__ BUFF_t  buff 
)

Sets the new value of the provided property object.

Parameters
propProperty object.
sizeSize of the new payload content.
buffPointer to the new payload content.
Returns
true if the value was modified, false otherwise.
Note
The provided buffer is freed with this object.

◆ nyx_blob_prop_set_unmanaged()

bool nyx_blob_prop_set_unmanaged ( nyx_dict_t prop,
__NYX_ZEROABLE__ size_t  size,
__NYX_NULLABLE__ BUFF_t  buff 
)

Sets the new value of the provided property object.

Parameters
propProperty object.
sizeSize of the new payload content.
buffPointer to the new payload content.
Returns
true if the value was modified, false otherwise.
Note
The provided buffer is not freed with this object.

◆ 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 current value of the provided property object.

Parameters
propProperty object.
sizeSize of the current payload content.
buffPointer to current new payload content.

◆ 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.