Zigbee Protocol Controller 1.6.0
ZigPC Group Management MQTT functions

This header contains the definitions and functionality associated with handling groups MQTT functionality. Functions for publishing to MQTT and helpers are in this module. More...

Functions

sl_status_t zigpc_group_mqttpub_republish ()
 zigpc_group_mqttpub_republish More...
 
sl_status_t zigpc_group_mqttpub_grouplist (const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id, bool is_reported)
 zigpc_group_mqttpub_grouplist Publish on the MQTT groups list topic for either REPORTED or DESIRED More...
 
sl_status_t zigpc_group_mqttpub_member_groupname (const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id, const zigbee_group_id_t group_id, bool is_reported)
 zigpc_group_mqttpub_member_groupname Publish the name of a group for a given member More...
 
sl_status_t zigpc_group_mqtt_assemble_topic (const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id, const char *base_cstr, unsigned int base_cstr_size, bool is_reported, char *topic_string, unsigned int topic_size)
 zigpc_group_mqtt_assemble_topic More...
 
sl_status_t zigpc_group_mqtt_assemble_group_payload (const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id, bool is_reported, char *payload_string, size_t *payload_size)
 Assemble the JSON payload for GroupList attribute. If there are no groupIDs part of a EUI64/endpoint identifer, the payload will be an empty string with payload_size set to 0U; else the payload will be in an array format and the payload_size variable will be set to the resulting payload string size. More...
 
sl_status_t zigpc_group_mqtt_assemble_name_payload (const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id, const zigbee_group_id_t group_id, bool is_reported, char *const payload_string, size_t *const payload_size)
 zigpc_group_mqtt_assemble_name_payload Assemble the payload for publishing a group name. For empty group names, the payload with the value formatting is still populated. For group names not found, an empty string is returned More...
 

Detailed Description

This header contains the definitions and functionality associated with handling groups MQTT functionality. Functions for publishing to MQTT and helpers are in this module.

Function Documentation

◆ zigpc_group_mqtt_assemble_group_payload()

sl_status_t zigpc_group_mqtt_assemble_group_payload ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id,
bool  is_reported,
char *  payload_string,
size_t *  payload_size 
)

Assemble the JSON payload for GroupList attribute. If there are no groupIDs part of a EUI64/endpoint identifer, the payload will be an empty string with payload_size set to 0U; else the payload will be in an array format and the payload_size variable will be set to the resulting payload string size.

Parameters
eui64- the eui64 of the node
endpoint_id- the endpoint on the group
is_reported- the direction (REPORTED/DESIRED)
payload_string-the destination where to put the payload
payload_size- input: the capacity of the payload_string, output: size of the resulting payload assembled.
Returns
SL_STATUS_OK if the payload is assembled, SL_STATUS_WOULD_OVERFLOW if the passed in payload character buffer is insufficient.

◆ zigpc_group_mqtt_assemble_name_payload()

sl_status_t zigpc_group_mqtt_assemble_name_payload ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id,
const zigbee_group_id_t  group_id,
bool  is_reported,
char *const  payload_string,
size_t *const  payload_size 
)

zigpc_group_mqtt_assemble_name_payload Assemble the payload for publishing a group name. For empty group names, the payload with the value formatting is still populated. For group names not found, an empty string is returned

Parameters
eui64- the eui64 of the endpoint
endpoint_id- the endpoint with a groups cluster
group_id- the group id with a name
payload_string- the destination where to copy the payload
payload_size- the size of payload_string IN: Capacity, OUT: number of characters populated.
Returns
SL_STATUS_OK on valid payload population for group names in either non-empty, empty, or not-found states, SL_STATUS_NULL_POINTER on invalid args passed in, or SL_STATUS_WOULD_OVERFLOW if passed in payload buffer is insufficient.

◆ zigpc_group_mqtt_assemble_topic()

sl_status_t zigpc_group_mqtt_assemble_topic ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id,
const char *  base_cstr,
unsigned int  base_cstr_size,
bool  is_reported,
char *  topic_string,
unsigned int  topic_size 
)

zigpc_group_mqtt_assemble_topic

Parameters
eui64- the eui64 of the node
endpoint_id- the endpoint on the group
base_cstr- the base topic string
base_cstr_size-the size of the base topic string
is_reported- the direction (REPORTED/DESIRED)
topic_string- the destination where to put the topic string
topic_size- the size of topic_string
Returns
SL_STATUS_OK if the payload is assembled, SL_STATUS_WOULD_OVERFLOW if the passed in payload character buffer is insufficient.

◆ zigpc_group_mqttpub_grouplist()

sl_status_t zigpc_group_mqttpub_grouplist ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id,
bool  is_reported 
)

zigpc_group_mqttpub_grouplist Publish on the MQTT groups list topic for either REPORTED or DESIRED

Parameters
eui64- the eui64 of the node
endpoint_id- the endpoint on the group
is_reported- the direction (REPORTED/DESIRED)
Returns
SL_STATUS_OK if the grouplist could be published successfully

◆ zigpc_group_mqttpub_member_groupname()

sl_status_t zigpc_group_mqttpub_member_groupname ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id,
const zigbee_group_id_t  group_id,
bool  is_reported 
)

zigpc_group_mqttpub_member_groupname Publish the name of a group for a given member

Parameters
eui64- the eui64 of the node
endpoint_id- the endpoint on the group
group_id- the group_id
is_reported- the direction (REPORTED/DESIRED)
Returns
SL_STATUS_OK if the grouplist could be published successfully

◆ zigpc_group_mqttpub_republish()

sl_status_t zigpc_group_mqttpub_republish ( )

zigpc_group_mqttpub_republish

Republishes the grouplist for every available node

Returns
SL_STATUS_OK if able to properly republish the grouplist