eCLD_GroupsCreateGroups
teZCL_Status eCLD_GroupsCreateGroups(
tsZCL_ClusterInstance *psClusterInstance,
bool_t bIsServer,
tsZCL_ClusterDefinition *psClusterDefinition,
void *pvEndPointSharedStructPtr,
tsCLD_GroupsCustomDataStructure
*psCustomDataStructure,
tsZCL_EndPointDefinition *psEndPointDefinition);
Description
This function creates an instance of the Groups cluster on an endpoint. The cluster instance is created on the endpoint which is associated with the supplied tsZCL_ClusterInstance
structure and can act as a server or a client, as specified.
The function must be called when setting up a custom endpoint containing one or more selected clusters (rather than the whole set of clusters supported by a standard ZigBee device). This function creates a Groups cluster instance on the endpoint, but instances of other clusters may also be created on the same endpoint by calling their corresponding creation functions.
Note: Do not call this function for an endpoint on which a standard ZigBee device is used. In this case, the device and its supported clusters must be registered on the endpoint using the relevant device registration function.
When used, this function must be the first Groups cluster function called in the application, and must be called after the stack has been started and after the ZCL has been initialized.
The function retrieves any group IDs already stored in the Application Information Base (AIB) of the ZigBee PRO stack. However, the AIB does not store group names. If name support is required, the application should store the group names using the NVM module, so that they can be retrieved following a power outage.
Parameters
psClusterInstance: Pointer to structure containing information about the cluster instance to be created (see Section 6.1.16). This structure is updated by the function by initializing individual structure fields.
bIsServer: Type of cluster instance (server or client) to be created:
TRUE - server
FALSE - client
psClusterDefinition: Pointer to structure indicating the type of cluster to be created (see Section 6.1.2). In this case, this structure must contain the details of the Groups cluster. This parameter can refer to a pre-filled structure called
sCLD_Groups
which is provided in the Groups.h file.pvEndPointSharedStructPtr: Pointer to the shared structure used for attribute storage. This parameter should be the address of the structure of type
tsCLD_Groups
which defines the attributes of Groups cluster. The function initializes the attributes with default values.psCustomDataStructure: Pointer to a structure containing the storage for internal functions of the cluster (see [Section 12.6.1](custom_data_structure.md #id_1d50fd17-874c-48c4-b748-e26925fd08d3)).
psEndPointDefinition: Pointer to the ZCL endpoint definition structure for the application (see Section 6.1.1).
Returns
E_ZCL_SUCCESS
E_ZCL_ERR_PARAMETER_NULL
Parent topic:Functions