Sending Commands
The NXP implementation of the ZCL provides functions for sending commands between a Groups cluster client and server. A command is sent from the client to one or more endpoints on the server. Multiple endpoints can be targeted using binding or group addressing.
Adding Endpoints to Groups
Two functions are provided for adding one or more endpoints to a group on a remote device. Each function sends a command to the endpoints to be added to the group, where the required group is specified in the payload of the command. If the group does not exist in the Group table of the target device, it is added to the table.
eCLD_GroupsCommandAddGroupRequestSend() can be used to request the addition of the target endpoints to the specified group.
eCLD_GroupsCommandAddGroupIfIdentifyingRequestSend() can be used to request the addition of the target endpoints to the specified group if the target device is in identification mode of the Identity cluster (see Chapter 11).
An endpoint can also be added to a local group, as described in Section 12.3.
Parent topic:Sending Commands
Removing Endpoints from Groups
Two functions are provided for removing one or more endpoints from groups on a remote device. Each function sends a command to the endpoints to be removed from the groups. If a group is empty following the removal of the endpoint, it is deleted in the Group table.
eCLD_GroupsCommandRemoveGroupRequestSend() can be used to request the removal of the target endpoint from the group which is specified in the payload of the command.
eCLD_GroupsCommandRemoveAllGroupsRequestSend() can be used to request the removal of the target endpoint from all groups on the remote device.
If an endpoint is a member of a scene associated with a group to be removed, the above function calls also results in the removal of the endpoint from the scene.
Parent topic:Sending Commands
Obtaining Information about Groups
Two functions are provided for obtaining information about groups. Each function sends a command to the endpoints to which the inquiry relates.
eCLD_GroupsCommandViewGroupRequestSend() can be used to request the name of a group with the ID/address specified in the command payload.
eCLD_GroupsCommandGetGroupMembershipRequestSend() can be used to determine whether the target endpoint is a member of any of the groups specified in the command payload.
Parent topic:Sending Commands
Parent topic:Groups Cluster