Nyx Node
Loading...
Searching...
No Matches
nyx_node_t Struct Reference

Opaque struct describing a Nyx node. More...

#include <nyx_node.h>

Public Member Functions

nyx_node_tnyx_node_initialize (STR_t node_id, nyx_dict_t *def_vectors[], __NULLABLE__ STR_t indi_url, __NULLABLE__ STR_t mqtt_url, __NULLABLE__ STR_t mqtt_username, __NULLABLE__ STR_t mqtt_password, __NULLABLE__ nyx_mqtt_handler_t mqtt_handler, __NULLABLE__ STR_t redis_url, __NULLABLE__ STR_t redis_username, __NULLABLE__ STR_t redis_password, int retry_ms, bool enable_xml, bool validate_xml)
 Initializes the Nyx node.
 
void nyx_node_finalize (nyx_node_t *node, bool free_vectors)
 Finalizes the Nyx node.
 
void nyx_node_poll (nyx_node_t *node, int timeout_ms)
 Performs a single poll iteration.
 
void nyx_node_enable (nyx_node_t *node, STR_t device, __NULLABLE__ STR_t name, __NULLABLE__ STR_t message)
 Enables a whole device or a definition vector.
 
void nyx_node_disable (nyx_node_t *node, STR_t device, __NULLABLE__ STR_t name, __NULLABLE__ STR_t message)
 Disables a whole device or a definition vector.
 
void nyx_node_send_message (nyx_node_t *node, STR_t device, STR_t message)
 Sends a message to the clients.
 
void nyx_mqtt_sub (nyx_node_t *node, STR_t topic)
 If MQTT is enabled, subscribes to a topic.
 
void nyx_mqtt_pub (nyx_node_t *node, STR_t topic, __ZEROABLE__ size_t message_size, __NULLABLE__ BUFF_t message_buff)
 If MQTT is enabled, publishes a message to a topic.
 
bool nyx_stream_pub (nyx_node_t *node, STR_t device, STR_t stream, bool check, size_t max_len, __ZEROABLE__ size_t n_fields, const str_t field_names[], const size_t field_sizes[], const buff_t field_buffs[])
 If Redis is enabled, publishes an entry to a stream, see https://redis.io/commands/xadd/.
 

Detailed Description

Opaque struct describing a Nyx node.


The documentation for this struct was generated from the following file: