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

Functions

nyx_dict_tnyx_stream_prop_new (STR_t name, __NYX_NULLABLE__ STR_t label)
 Allocates a new Nyx Stream.
 
nyx_dict_tnyx_stream_vector_new (STR_t device, STR_t name, nyx_state_t state, nyx_dict_t *props[], __NYX_NULLABLE__ const nyx_opts_t *opts)
 Allocates a new Nyx stream vector.
 
bool nyx_stream_pub (const nyx_dict_t *vector, __NYX_ZEROABLE__ size_t n_fields, const size_t field_sizes[], const buff_t field_buffs[])
 If Nyx-Stream is enabled, publishes an entry to a stream.
 

Detailed Description

Nyx Stream messages

Function Documentation

◆ nyx_stream_prop_new()

nyx_dict_t * nyx_stream_prop_new ( STR_t  name,
__NYX_NULLABLE__ STR_t  label 
)

Allocates a new Nyx Stream.

Parameters
nameProperty name.
labelProperty label.
Returns
The new property object.
Note
If the property name ends with .b, the payload is automatically base64-encoded.
If the property name ends with .z, the payload is automatically ZLib-compressed.

◆ nyx_stream_vector_new()

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

Allocates a new Nyx stream vector.

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

◆ nyx_stream_pub()

bool nyx_stream_pub ( const nyx_dict_t vector,
__NYX_ZEROABLE__ size_t  n_fields,
const size_t  field_sizes[],
const buff_t  field_buffs[] 
)

If Nyx-Stream is enabled, publishes an entry to a stream.

Parameters
vectorNyx stream vector.
n_fieldsNumber of field doublets (size, buffer), must be number of properties in the vector.
field_sizesArray of field sizes, on entry per property in the vector.
field_buffsArray of field buffers, on entry per property in the vector.
Returns
true if the provided fields match with the vector content.