Zigbee Protocol Controller 1.6.0
ZigPC Group Management Interface functions

This header contains the definitions and functionality associated with the Zigpc Group Management. This is the intended public interface for the entire component. All definitions and functions here are required for manipulating groups. More...

Modules

 ZigPC Group Map functions
 This header contains the definitions and functionality associated with the Zigpc Group Map. This is the internal mechanism for storing and manipulating groups data.
 
 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.
 

Classes

struct  zigpc_group_member_t
 zigpc_group_member_t A structure representing the member of a zigbee group More...
 

Functions

static zcl_cluster_id_t zigpc_group_get_cluster_id (void)
 zigpc_group_get_cluster_id Retrieve the cluster ID for groups. Useful for handling group clusters More...
 
static zcl_command_id_t zigpc_group_add_get_id (void)
 zigpc_group_get_add_id Retrieve the command ID for the add_group command More...
 
static zcl_command_id_t zigpc_group_remove_get_id (void)
 zigpc_group_get_remove_id Retrieve the command ID for the remove group command. More...
 
static zcl_command_id_t zigpc_group_removeall_get_id (void)
 zigpc_group_get_removeall_id Retrieve the command ID for the removeall groups command. More...
 
sl_status_t zigpc_group_init ()
 zigpc_groups_init Initialize the groups component. Sets up all the parts required for groups operation, including all callbacks More...
 
sl_status_t zigpc_group_add_desired (const zigbee_group_id_t group_id, const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id)
 zigpc_group_add_desired Add a new "desired" or expected group to a given node and endpoint More...
 
sl_status_t zigpc_group_add_desired_with_name (const zigbee_group_id_t group_id, const char *group_name, const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id)
 zigpc_group_add_desired_with_name Add a new group with a specified name More...
 
sl_status_t zigpc_group_add_reported (const zigbee_group_id_t group_id, const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id)
 zigpc_group_add_reported Add a new "reported" or actual group to a given node and endpoint More...
 
sl_status_t zigpc_group_remove (const zigbee_group_id_t group_id, const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id, bool is_reported)
 zigpc_group_remove Remove an eui64/endpoint from a given group More...
 
sl_status_t zigpc_group_remove_all (const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id)
 zigpc_group_remove_all Remove the eui64/endpoint from all associated groups More...
 
size_t zigpc_groupmgmt_get_member_count (zigbee_group_id_t group_id)
 Retrieve the count of EUI64/endpoint combinations as part of a Group ID. More...
 
sl_status_t zigpc_groupmgmt_get_member_list (zigbee_group_id_t group_id, zigpc_group_member_t *const member_list, size_t member_list_count)
 Retrieve the list of group members corresponding to a Group ID. More...
 

Detailed Description

This header contains the definitions and functionality associated with the Zigpc Group Management. This is the intended public interface for the entire component. All definitions and functions here are required for manipulating groups.

Function Documentation

◆ zigpc_group_add_desired()

sl_status_t zigpc_group_add_desired ( const zigbee_group_id_t  group_id,
const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id 
)

zigpc_group_add_desired Add a new "desired" or expected group to a given node and endpoint

Parameters
group_id- the id of the expected group
eui64- the eui64 of the node
endpoint_id- the endpoint id to add to the group
Returns
SL_STATUS_OK if able to successfully add the group

◆ zigpc_group_add_desired_with_name()

sl_status_t zigpc_group_add_desired_with_name ( const zigbee_group_id_t  group_id,
const char *  group_name,
const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id 
)

zigpc_group_add_desired_with_name Add a new group with a specified name

Parameters
group_id- the id of the expected group
group_name-the expected name of the group
eui64- the eui64 of the node
endpoint_id- the endpoint id to add to the group
Returns
SL_STATUS_OK if able to successfully add the group

◆ zigpc_group_add_get_id()

static zcl_command_id_t zigpc_group_add_get_id ( void  )
inlinestatic

zigpc_group_get_add_id Retrieve the command ID for the add_group command

@ return zcl_command_id_t - the zcl command id of the groups - add group command

◆ zigpc_group_add_reported()

sl_status_t zigpc_group_add_reported ( const zigbee_group_id_t  group_id,
const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id 
)

zigpc_group_add_reported Add a new "reported" or actual group to a given node and endpoint

Parameters
group_id- the id of the reported group
eui64- the eui64 of the node
endpoint_id- the endpoint id to add to the group
Returns
SL_STATUS_OK if able to successfully add the group

◆ zigpc_group_get_cluster_id()

static zcl_cluster_id_t zigpc_group_get_cluster_id ( void  )
inlinestatic

zigpc_group_get_cluster_id Retrieve the cluster ID for groups. Useful for handling group clusters

@ return zcl_cluster_id_t - the cluster ID of the ZCL Groups Cluster

◆ zigpc_group_init()

sl_status_t zigpc_group_init ( )

zigpc_groups_init Initialize the groups component. Sets up all the parts required for groups operation, including all callbacks

◆ zigpc_group_remove()

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

zigpc_group_remove Remove an eui64/endpoint from a given group

Parameters
group_id- the id of the group
eui64- the eui64 of the node
endpoint_id- the endpoint id remove from the group
direction- the direction (reported/desired)
Returns
SL_STATUS_OK if able to successfully remove the group

◆ zigpc_group_remove_all()

sl_status_t zigpc_group_remove_all ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id 
)

zigpc_group_remove_all Remove the eui64/endpoint from all associated groups

Parameters
eui64- the eui64 of the node
endpoint_id- the endpoint id to add to the group
Returns
SL_STATUS_OK if able to successfully remove all groups

◆ zigpc_group_remove_get_id()

static zcl_command_id_t zigpc_group_remove_get_id ( void  )
inlinestatic

zigpc_group_get_remove_id Retrieve the command ID for the remove group command.

@ return zcl_command_id_t - the zcl command id of the groups - remove group command

◆ zigpc_group_removeall_get_id()

static zcl_command_id_t zigpc_group_removeall_get_id ( void  )
inlinestatic

zigpc_group_get_removeall_id Retrieve the command ID for the removeall groups command.

@ return zcl_command_id_t - the zcl command ID of the groups - removeall command

◆ zigpc_groupmgmt_get_member_count()

size_t zigpc_groupmgmt_get_member_count ( zigbee_group_id_t  group_id)

Retrieve the count of EUI64/endpoint combinations as part of a Group ID.

Parameters
group_idGroup ID to lookup.
Returns
size_t Number of zigpc_group_member_t structures.

◆ zigpc_groupmgmt_get_member_list()

sl_status_t zigpc_groupmgmt_get_member_list ( zigbee_group_id_t  group_id,
zigpc_group_member_t *const  member_list,
size_t  member_list_count 
)

Retrieve the list of group members corresponding to a Group ID.

Parameters
group_idGroup ID to lookup.
member_listList of member structures to populate.
member_list_countCapacity of member list passed in.
Returns
sl_status_t SL_STATUS_OK if the list is copied, SL_STATUS_NOT_FOUND if the Group ID does not contain any members, or SL_STATUS_WOULD_OVERFLOW if the provided list is insufficient.