1. Scope
This wiki describes the implementation of the Exegin ZSDK (Zigbee software design kit) API (application programming interface) for the Zigbee Cluster Library available on the STM32WBA Series based on V1.5 STM32Cube Firmware release. It describes all APIs used to control the cluster library.
By default, the ZigbeeCluster is delivered as a library. Nevertheless, it is possible to have access to the source code on demand through an NDA.
2. Introduction
Clusters are related sets of commands and attributes dedicated to a specific type of device, service, or sector. Developers use clusters to build a collection of functions suited to their needs. For example, the OnOff cluster allows applications to turn devices on and off, and contains commands and attributes to support that functionality. A developer would use the OnOff cluster in conjunction with an application to allow a device to be activated or deactivated over a Zigbee network.
This document details the API for Zigbee 3.0 cluster primitives, or "stubs", which Exegin has implemented based on the Zigbee Cluster Library revision 8 Specification [1] and The Zigbee Smart Energy Standard [2]. These cluster stubs must be paired with and modified for an application before they can be considered functional clusters.
For more information about Zigbee PRO network protocol, see [3].
For more information about cluster architecture and operations, see [1].
3. Overview
This section of the document provides basic information about cluster architecture and operation, covering such topics as:
- Client-Server Relationship
- Cluster Attributes & Commands
- Cluster Pointers
- Cluster Allocation Functions
- APS Endpoints
3.1. Client-Server Relationship
Cluster operation follows a client server model with clusters having a client component and a server component.
The server, under direction from the client, is responsible for interacting with applications to influence the state of a device according to the value of its cluster attributes, and for reporting changes in the values of its attributes in response to external events to the client.
In the case of the OnOff cluster, the server side of the OnOff cluster is hosted by a light fixture and receives On or Off commands from the client side of the cluster hosted by a light switch.
The client is responsible for altering the state of a cluster’s attributes on the server by sending the server commands, or for reporting the state of the server’s attributes to its application. In the case of the OnOff cluster example the light switch when toggled would send an on or off command to the light or lights to which it is bound. In turn the lights might send notifications of the change of their state attributes back to the switch.
Clients and servers are linked through bindings when they are created. Clusters have globally unique identifiers used in addressing. For more information about the Client-Server relationship, please see Section 2.2.2 in [1].
3.2. ZCL Attributes and Commands
In general:
- Attributes are variables representing the current state of a device, and are commonly held by the server portion of a cluster.
- Commands are functions used by applications to alter or report the value of attributes, and are commonly generated by the Client portion and sent to the server.
As an example:
- The OnOff cluster defines the functionality for devices that can be turned on or off;
- The OnOff cluster contains the attribute 'OnOff', the state of which determines if a device is on or off;
- The OnOff cluster defines commands that can read or change the state of the attribute OnOff
Commands are divided into two types:
- Cluster Specific (unique to to a cluster)
- Profile Wide (available on every cluster)
While profile wide commands are intended to access a cluster’s attributes, each cluster has its own unique cluster specific commands. Attributes are primarily accessed through profile-wide commands such as:
- Read Attribute
- Write Attribute
Profile-wide commands also include other general functions such as default response, configure reporting, discover attributes, etc.
Profile-wide commands are the same for all clusters.
For more information about attributes and commands, see Section 2 of [1].
3.3. APS Endpoints
Endpoints are a central feature of cluster addressing and usually represent a discrete logical device such as a light switch. Only a single instance of a cluster is allowed on a given endpoint, but each endpoint typically supports multiple clusters, (e.g. Basic, Alarms, Levels, etc.).
An application creates endpoints using the ZbZclAddEndpoint()
function, which is declared in the Zigbee cluster library header file, zcl.h. When creating a new endpoint, the application should select a new unique endpoint between 1 and 239, and provide the ProfileId and DeviceID. Endpoints outside of the 1-239 range are reserved for internal Zigbee functions, such as the Zigbee Device object on endpoint 0.
After creating an endpoint, the application can create application clusters and add them to that endpoint. By default, every endpoint includes the basic cluster.
When an endpoint is created, the stack will internally create a simple descriptor for each endpoint created. The simple descriptor will have two cluster lists: “input” and “output”. Server clusters reside on the input list, and client clusters reside on the output list. These simple descriptors are discoverable by other devices in the networks and are used to steer clients to the correct servers, i.e. to allow light switches to find lights.
3.4. Cluster Pointer
All clusters are represented by the same ZbZclClusterT
datatype, which represents an instance of a specific cluster. In general, the internal structure of this datatype is of no use to the application; however, it is very important because it is used throughout the cluster APIs as the generic representation of any cluster, regardless of the type of cluster. Because of this many APIs are generic and will work with any cluster. For example ZbZclReadReq()
allows you to read the attribute in any cluster, whereas ZbZclDoorLockClientLockReq()
only works with a Door Lock client cluster handle, but both use the same ZbZclClusterT datatype. The distinction between different functions is made contextually.
3.5. Cluster Allocation Functions
All clusters include server and client allocation functions, taking the form of:
#include "zcl.x.h" app->x_client_cluster = ZbZclxClientAlloc(zb, endpoint, …)
or:
app->x_server_cluster = ZbZclxServerAlloc(zb, endpoint, …) if (app->x_server_cluster == NULL) {
The allocation functions return NULL on error, otherwise a cluster handle is returned. In general, the application never examines the contents of this struct. Instead this handle is used in most cluster library applications.
Like most ZSDK API functions the allocation functions take the structure ZigbeeT *
stack pointer as their first argument. This binds the new cluster instance to the stack instance. After which all ZCL API functions take the structure ZbZclClusterT *
returned by the allocation function, the reference to the newly created cluster instance.
The second argument for allocation functions is the endpoint ID. This binds the newly created cluster to the endpoint given as the argument. Multiple cluster instances can be bound to the same endpoint, provided there is only one instance of any given cluster. The remainder of the arguments in an allocation function are specific to the cluster.
Server clusters with multiple commands usually take a structure with multiple callbacks, one for each command that the application supports. The application provides a callback for each command that it supports. If the application provides NULL for the entire structure pointer or a specific command callback, the cluster will respond with a Default Response of ZCL_STATUS_UNSUPP_COMMAND for the specific command (or every command if the entire structure pointer is NULL
).
Here is an example of how an application would implement such a callback, providing function app_get_profile_info() which will be called whenever the ZCL_ELEC_MEAS_CLI_GET_PROFILE_INFO
command is received.
enum ZclStatusCodeT app_get_profile_info(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *src_info, void *arg) { return ZCL_STATUS_SUCCESS; } … struct ElecMeasSvrCallbacksT callbacks = { app_get_profile_info, NULL, }; … cluster = ZbZclElecMeasServerAlloc(zb, endpoint, callbacks, app);
Note that, in this example, the Get Measurement Profile callback is declared NULL. When this command is received, a Default Response of ZCL_STATUS_UNSUPP_COMMAND
will automatically be sent. The enum ZclStatusCodeT defines the available status codes.
3.6. Command Request Function
The following is the function used to send ZCL Commands.
Function
enum ZclStatusCodeT ZbZclCommandReq(struct ZigBeeT *zb, struct ZbZclCommandReqT *zclReq, void (*callback) (struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Parameters
Name | Description |
---|---|
zb | Zigbee stack instance |
zclReq | ZCL Command Request Structure, detailed in the next section |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
3.7. Command Request Structure
The following is the ZCL Command Request Structure:
typedef struct ZbZclCommandReqT { struct ZbApsAddrT dst; uint16_t profileId; enum ZbZclClusterIdT clusterId; uint16_t srcEndpt; uint16_t txOptions; bool discoverRoute; uint8_t radius; struct ZbZclHeaderT hdr; const void *payload; unsigned int length; unsigned int timeout; } ZbZclCommandReqT;
This structure is mapped to the structure as defined in ZCL :
Code | ZCL Spec | Description |
---|---|---|
dst | DstAddrMode, DstAddress, DstEndpoint | APS address information data structure |
profileId | ProfileId | |
clusterId | ClusterId | |
srcEndpt | SrcEndpoint | |
txOptions | TxOptions | e.g. ZB_APSDE_DATAREQ_TXOPTIONS_A CK |
discoverRoute | Used for discovery if the destination is unknown. If you perform route discovery separately using ZbNlmeRouteDiscWait(), then you can set discoverRoute to zero, decreasing the length of time an APS data request may take if there is a problem sending the packet to the target. | |
radius | Radius | |
hdr | Frame control, Manufacturer code, Transaction sequence number, Command identifier | payload |
Frame payload | if txOptions & ZB_APSDE_DATAREQ_TXOPTIONS_VE
CTO, payload is a pointer to list of struct ZbApsBufT, and length is the number of struct ZbApsBufTitems in the list |
length |
timeout | timeout in milliseconds to wait for response. If zero, then a suitable default timeout will be used. |
3.8. ZCL Callbacks
The following is the callback used by ZCL commands. The callback function is called when the associated ZCL response is received, or if there is an error.
Function
(*callback)(struct ZbZclCommandRspT *rsp, void *arg)
Parameters
Name | Description |
---|---|
rsp | ZCL Command Response Structure |
arg | Pointer to application data provided in initiating API call |
3.8.1. ZCL Command Response Structure
The following in the Command Response Structure used by ZCL Callbacks.
struct ZbZclCommandRspT { enum ZbStatusCodeT aps_status; enum ZclStatusCodeT status; struct ZbApsAddrT src; uint16_t profileId; enum ZbZclClusterIdT clusterId; uint8_t linkQuality; struct ZbZclHeaderT hdr; const uint8_t *payload; uint16_t length;
Code | ZCL Spec | Description |
---|---|---|
aps_status | APSDE-DATA.confirm status | |
status | Status | Status of the ZCL response. If a Default Response, it is the status code found within the response. If a cluster-specific response, it is set to ZB_STATUS_SUCCESS, and the application must parse the payload, if any, for any embedded status |
src | SrcEndpoint | |
profileId | ProfileId | |
clusterId | ClusterId | |
linkQuality | LinkQuality | |
hdr | Frame control, Manufacturer code, Transaction sequence number, Command identifier | |
payload | Frame payload | |
length | ASDULength |
4. Destination Addressing
The destination of ZCL messages is specified using the APS ZbApsAddrT
structure. This structure can provide the destination addressing, and either the short or extended address of the target node (the source addressing comes from the originating cluster instance). It is a burden for the application to keep track of the destination of each message.
To assist in this process the APS layer provides the binding mechanism.
Instead of tracking the clients and addressing them individually each and every time a message needs to be sent, the application can set up bindings. Bindings are addressing information stored in the binding table. When it is time to send a message the application specifies that the addressing is to binding, and the address information will automatically be added from the binding table. This is done by specifying ZB_APSDE_ADDRMODE_NOTPRESENT as the mode in ZbApsAddrT. If the application wants to configure the destination to use bindings, there is a special global structure ZbApsAddrBinding which can be used to copy this configuration from or use as a pointer reference.
Prior to use bindings must be configured in the binding table using the ZbApsmeBindReq(). The bind request specifies a single ClusterId for the binding; For this ClusterId the binding then associates a source address and endpoint with a destination address and endpoint. Normally the source address is the device itself. When a sender has multiple cluster instances, they reside on separate endpoints; in order to use bindings with that endpoint, there must be bindings for each source endpoint. Each binding specifies a destination address and endpoint. A single source endpoint may also have a binding to multiple destination endpoints and even multiple endpoints on multiple address; it all depends on the bindings that have been configured in the binding table.
One thing to note is that when using binding for the addressing it is assumed that at least one suitable binding exists. If no binding exists a status of ZB_APS_STATUS_INVALID_BINDING is returned. However, if this is acceptable for the application it may ignore this status.
The binding mechanism is a general purpose APS layer mechanism available for any APS layer purpose. So, a cluster needs to send ZCL report, bindings are used, i.e. reports are sent to the available binding. Additionally, the Poll Control server cluster relies on bindings to send check-in requests; it will send check in requests to every client for which there is a binding present in its local binding table.
Bindings may also be configured from a remote node using the ZbZdoMgmtBindReq(). This is useful in cases like reporting or the Poll Control clients which need to establish bindings on the remote node back to themselves.
In addition to manually establishing a binding, locally through ZbApsmeBindReq() or remotely through ZbZdoMgmtBindReq() there is the Finding and Binding mechanism. When initiated, Finding and Binding scans the local endpoints for client clusters, then locates remote server endpoints using zigbee service discovery mechanisms, and establishes bindings on the client to server(s) discovered. Finding and Binding is triggered automatically by setting the ZB_BDB_CommissioningMode to BDB_COMMISSION_MODE_FIND_BIND prior to startup. When triggered automatically the Finding and Binding procedure will start approximately 5 seconds after a node joins a network. Additionally, Finding and Binding can be started manually from the application on all endpoints by calling ZbStartupFindBindStart(), or calling ZbStartupFindBindStartEndpoint() to start only from a particular endpoint.
5. Special ZCL Clusters
Some clusters require the application developer to have a better understanding of both their function and their interactions with other clusters in order for the cluster to be properly implemented. Additional information concerning three such clusters is contained within this section.
Those Clusters are:
- Scenes
- Alarms
- CBKE
5.1. Scenes Cluster
A scene is a set of values for attributes from multiple clusters capable of being applied at the same time. The few clusters that support scenes are identified by a section with the title "Scene Table Extensions" in the ZCL 8 Specification [1] section for those cluster. There is only one scene table (list of attributes) for a cluster that supports scenes, and when a scene is invoked all scene table attributes are set to the values given in the scene table.
To use the scene table for a cluster, the cluster must reside on an endpoint which also hosts an instance of the Scenes cluster. There may be multiple scene table supporting clusters on a given endpoint. A scene is defined in the scenes cluster and contains scene tables for one or more clusters. Through the use of group addressing a scene may be applied to multiple endpoints on a node.
A scene may be created by the scene cluster using the Add Scene command, where the application manually defines the scene table for each cluster included in that scene. All attributes must have values in the scene table, but inclusion of individual clusters is optional. A scene may also be created using the Store Scene command where the current value of all the attributes in the cluster at the time the Store Scene command is issued are recorded in the scene table for later use.
The Scenes cluster Recall Scene command takes the scene table for each cluster in that scene and sets the values of every scene table attribute.
For example, a node could contain three endpoints:
0x01
with the OnOff and Window Covering clusters0x02
with the OnOff and Door Lock clusters0x03
with the OnOff and Level.
A scene is defined with a scene tables for the:
- OnOff cluster:
OnOff = On
- Level cluster:
CurrentLevel = 50%
- DoorLock cluster:
LockState = Locked
Additionally:
- Endpoints
0x01
and0x02
are in group0x0001
- Endpoint
0x03
is not in group0x0001
If the scenes cluster Recall Scenes command is issued with group address 0x0001
and the scene defined above, then on endpoint 0x01
and 0x02
the OnOff cluster OnOff attribute will be set on and the DoorLock on endpoint 0x02
will be locked.
The Window Covering cluster on endpoint 0x01 will not be affected because this scene does not include a scene table for this cluster and all of endpoint 0x03
will be unaffected because it is not in group 0x0001
.
For more information about the Scenes cluster, see Section 3.7 in [1].
5.2. Alarms Cluster
Zigbee defines an alarm as the occurrence of a specific condition. Individual clusters (such as Basic, Power Configuration, Door Lock, Ballast Configuration, etc.) define these conditions and a corresponding alarm code.
For the definition of the alarm condition its corresponding code for a specific cluster, see [1].
Alarm conditions are typically defined in terms of a cluster attribute. For example, the Power Configuration cluster defines alarm
code 0x00 for the alarm generated when the MainsVoltage attribute drops below the value specified in the MainsVoltageMinThreshold attribute for a time period greater than the MainsVoltageDwellTripPoint attribute in seconds.
Clusters typically have an additional AlarmMask attribute which is a bitmask that allows the client to enable or disable the generation of individual alarms when the corresponding alarm condition is met.
It is the responsibility of the cluster application implementation to detect the alarm condition, check the alarm mask, and when needed initiate generation of the alarm by calling ZbZclClusterSendAlarm()
(defined in zcl.h), resulting in the sending of an Alarm command. It is important to note that this Alarm command is not sent from the originating cluster. Instead, it is sent from an instance of the Alarm cluster that must reside on the same endpoint as the originating cluster.
The alarm cluster sends the alarm command to all clients with bindings to the alarm cluster on this endpoint. It also adds alarm details to an internal log. The alarm cluster provides commands that allow clients to query this alarm log. The alarm log is shared by all clusters on the same endpoint. In order to receive alarms, clients must bind to the alarms cluster on the same endpoint as the alarm generating cluster. For clusters that support an alarm mask, any client can enable/disable generation of alarm commands by setting/clearing the mask bit in the originating cluster. The mask controls sending of alarms to all bound clients.
Some alarm conditions do not automatically reset and must be manually reset by the client. The Alarm cluster provides the Reset Alarm and Reset all Alarms commands for this reason the application should register a callback for each endpoint with cluster(s) that require resetting using ZbZclClusterRegisterAlarmResetHandler()
. The callback handles the specific cluster(s) against which it was registered.
When the alarm cluster receives a Reset Alarm or Reset all Alarms command, the cluster application callback will be invoked and can then handle the whatever is necessary to internally reset to detect new occurrences of the alarm condition. The same callback is invoked for both commands. When the Reset all Alarms command is received the callback is invoked with an Alarm Code of 0xFF and Cluster ID of 0xFFFF. When a callback is provided the function return code is provided as the status in the Default Response. When no callbacks are provided the alarm cluster will send a Default Response with a status of SUCCESS.
As a summary:
- When an endpoint contains a cluster that can generate alarms, it is the application’s responsibility to also instantiate the alarms cluster on that endpoint.
- It is the responsibility of the cluster implementation to
- Detect alarm conditions
- Check the alarm mask (where supported)
- Generate an alarm by calling
ZbZclClusterSendAlarm()
- If the alarm conditions for any cluster(s) on an endpoint need to be manually reset, then the application should register a callback for each endpoint with cluster(s) that require resetting using
ZbZclClusterRegisterAlarmResetHandler()
.
For more information about the Alarms cluster, see Section 3.11 in [1].
5.3. CBKE Cluster
The Certificate-based Key Establishment (CBKE) cluster is handled internally by the stack. When CBKE is enabled, the stack creates an instance of the CBKE cluster. There is no exposed public API to the CBKE cluster itself. CBKE is configured in the security.cbke (struct ZbStartupCbkeT
) section of the ZbStartupT startup config. The basic setup procedure is to enable the supported suites in suite_mask
and load the corresponding suite configuration and certificates for the enabled suites into the startup config before starting the stack.
6. ZCL Clusters
6.1. Built-In Clusters
6.1.1. Keep Alive
#include "zcl/se/zcl.keepalive.h"
Description
The Keep Alive clusters are typically used in Smart Energy applications.
The Keep Alive server and client clusters are allocated by the stack if the application configures the Key Exchange information in the ZbStartup configuration (struct ZbStartupCbkeT). The Keep Alive server is allocated if the tc_keepalive_server_enable flag is set to true, otherwise the Keep Alive client is allocated. Typically, the Keep Alive server is allocated on the Trust Center, and the Keep Alive client is allocated on devices joining the SE network.
If the Keep Alive client determines there’s a problem communicating with the Trust Center, it will call the application callback 'tcso_callback' configured in the ZbStartup configuration. At which point, the stack will perform the necessary Trust Center Swap Out (TCSO) routines to attempt to find a newly swapped-out Trust Center, or if the current Trust Center has moved to a different channel or other configuration.
Functions
ZbZclKeepAliveClientAlloc
struct ZbZclClusterT * ZbZclKeepAliveClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, bool (*tcso_callback)(enum ZbTcsoStatusT status, void *arg), void *tcso_arg);
Create a new instance of the Keep Alive Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
tcso_callback | Callback function that will be invoked when the TCSO is ever started (ZB_TCSO_STATUS_DISCOVERY_UNDERWAY), and when it completes, with the resultant status. The return value for this callback determines whether the stack starts or continues with TCSO (true), or if the stack should not start or continue with TCSO (false). |
tcso_arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
ZbZclKeepAliveClientStart
void ZbZclKeepAliveClientStart(struct ZigBeeT *zb);
Start Keep Alive
Parameters
zb | Zigbee stack instance |
Return
- Void
ZbZclKeepAliveClientStop
void ZbZclKeepAliveClientStop(struct ZigBeeT *zb);
Stop Keep Alive and abort the TCSO
Parameters
zb | Zigbee stack instance |
Return
- Void
ZbZclKeepAliveServerAlloc
struct ZbZclClusterT * ZbZclKeepAliveServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Keep Alive Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclKeepAliveServerWriteDirect
enum ZclStatusCodeT ZbZclKeepAliveServerWriteDirect(struct ZigBeeT *zb, uint16_t attrId, uint16_t value);
Write a Keep Alive Server attribute
Parameters
zb | Zigbee instance |
attrId | The attribute Id to write |
value | Attribute data to be writen. |
Return
- ZCL Status Code
Enumerations
ZbZclKeepAliveSvrAttrT
Keep Alive Server Attribute IDs
ZCL_KEEPALIVE_SVR_ATTR_BASE | TC Keep-Alive Base - minutes (valid range is from 0x01 to 0xff, but not enforced by cluster, for testing) |
ZCL_KEEPALIVE_SVR_ATTR_JITTER | TC Keep-Alive Jitter - seconds (valid range is from 0x0000 to 0x0200) |
6.2. General Clusters
6.2.1. Alarms
#include "zcl/general/zcl.alarm.h"
Description
ZCL 8 section 3.11
Zigbee defines an alarm as the occurrence of a specific condition. Individual clusters (such as Basic, Power Configuration, Door Lock, Ballast Configuration, etc.) define these conditions and a corresponding alarm code.
For the definition of the alarm condition its corresponding code for a specific cluster, see the Zigbee Cluster Library Specification 8 (ZCL8).
Alarm conditions are typically defined in terms of a cluster attribute. For example, the Power Configuration cluster defines alarm code 0x00 for the alarm generated when the MainsVoltage attribute drops below the value specified in the MainsVoltageMinThreshold attribute for a time period greater than the MainsVoltageDwellTripPoint attribute in seconds.
Clusters typically have an additional AlarmMask attribute which is a bitmask that allows the client to enable or disable the generation of individual alarms when the corresponding alarm condition is met.
It is the responsibility of the cluster application implementation to detect the alarm condition, check the alarm mask, and when needed initiate generation of the alarm by calling ZbZclClusterSendAlarm()
(defined in zcl.h), resulting in the sending of an Alarm command. It is important to note that this Alarm command is not sent from the originating cluster. Instead, it is sent from an instance of the Alarm cluster that must reside on the same endpoint as the originating cluster.
The alarm cluster sends the alarm command to all clients with bindings to the alarm cluster on this endpoint. It also adds alarm details to an internal log. The alarm cluster provides commands that allow clients to query this alarm log. The alarm log is shared by all clusters on the same endpoint. In order to receive alarms, clients must bind to the alarms cluster on the same endpoint as the alarm generating cluster. For clusters that support an alarm mask, any client can enable/disable generation of alarm commands by setting/clearing the mask bit in the originating cluster. The mask controls sending of alarms to all bound clients.
Some alarm conditions do not automatically reset and must be manually reset by the client. The Alarm cluster provides the Reset Alarm and Reset all Alarms commands for this reason the application should register a callback for each endpoint with cluster(s) that require resetting using ZbZclClusterRegisterAlarmResetHandler()
. The callback handles the specific cluster(s) against which it was registered.
When the alarm cluster receives a Reset Alarm or Reset all Alarms command, the cluster application callback will be invoked and can then handle the whatever is necessary to internally reset to detect new occurrences of the alarm condition. The same callback is invoked for both commands. When the Reset all Alarms command is received the callback is invoked with an Alarm Code of 0xFF and Cluster ID of 0xFFFF. When a callback is provided the function return code is provided as the status in the Default Response. When no callbacks are provided the alarm cluster will send a Default Response with a status of SUCCESS.
As a summary:
- When an endpoint contains a cluster that can generate alarms, it is the application’s responsibility to also instantiate the alarms cluster on that endpoint.
- It is the responsibility of the cluster implementation to
- Detect alarm conditions
- Check the alarm mask (where supported)
- Generate an alarm by calling ZbZclClusterSendAlarm()
- If the alarm conditions for any cluster(s) on an endpoint need to be manually reset, then the application should register a callback for each endpoint with cluster(s) that require resetting using ZbZclClusterRegisterAlarmResetHandler().
For more information about the Alarms cluster, see Section 3.11 in ZCL8.
Functions
ZbZclAlarmClientAlloc
struct ZbZclClusterT * ZbZclAlarmClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, ZbZclAlarmClientCallbackT callback, void *arg);
Create a new instance of the Alarms Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
callback | Callback function that will be invoked when an alarm occurs |
arg | Pointer to application data that will later be provided back to the callback function when it is invoked |
Return
- Cluster pointer, or NULL if there is an error
ZbZclAlarmClientGetAlarmReq
enum ZclStatusCodeT ZbZclAlarmClientGetAlarmReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Alarm command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be invoked when response is received |
arg | Pointer to application data that will later be provided back to the callback function when it is invoked |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclAlarmClientResetAlarmLogReq
enum ZclStatusCodeT ZbZclAlarmClientResetAlarmLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Reset Alarm Log command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be invoked when response is received |
arg | Pointer to application data that will later be provided back to the callback function when it is invoked |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclAlarmClientResetAlarmReq
enum ZclStatusCodeT ZbZclAlarmClientResetAlarmReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, uint8_t alarm_code, uint16_t cluster_id, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Reset Alarm command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
alarm_code | Code of the detected alarm condition |
cluster_id | ID of cluster where alarm condition occurred |
callback | Callback function that will be invoked when response is received |
arg | Pointer to application data that will later be provided back to the callback function when it is invoked |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclAlarmClientResetAllAlarmsReq
enum ZclStatusCodeT ZbZclAlarmClientResetAllAlarmsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Reset All Alarms command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be invoked when response is received |
arg | Pointer to application data that will later be provided back to the callback function when it is invoked |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclAlarmServerAlloc
struct ZbZclClusterT * ZbZclAlarmServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t logSize, struct ZbZclClusterT *time_server);
Create a new instance of the Alarms Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
logSize | Alarm log size |
time_server | Time Server cluster instance |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclAlarmsAttrT
Alarms Attribute IDs
ZCL_ALARM_ATTR_COUNT | AlarmCount (Optional) |
6.2.2. Ballast Configuration
#include "zcl/general/zcl.ballast.config.h"
Functions
ZbZclBallastConfigClientAlloc
struct ZbZclClusterT * ZbZclBallastConfigClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Ballast Configuration Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclBallastConfigServerAlloc
struct ZbZclClusterT * ZbZclBallastConfigServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint8_t phyMin, uint8_t phyMax);
Create a new instance of the Ballast Configuration Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
phyMin | The default minimum light output |
phyMax | The default maximum light output |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclBallastConfigSvrAttrT
Ballast Configuration Server Attributes IDs
ZCL_BALLAST_CONFIG_ATTR_PHY_MIN_LEVEL | PhysicalMinLevel |
ZCL_BALLAST_CONFIG_ATTR_PHY_MAX_LEVEL | PhysicalMaxLevel |
ZCL_BALLAST_CONFIG_ATTR_BALLAST_STATUS | BallastStatus |
ZCL_BALLAST_CONFIG_ATTR_MIN_LEVEL | MinLevel |
ZCL_BALLAST_CONFIG_ATTR_MAX_LEVEL | MaxLevel |
ZCL_BALLAST_CONFIG_ATTR_POWER_ON_LEVEL | PowerOnLevel (Deprecated) |
ZCL_BALLAST_CONFIG_ATTR_POWER_ON_FADE_TIME | PowerOnFadeTime (Deprecated) |
ZCL_BALLAST_CONFIG_ATTR_INTRINSIC_BALLAST_FACT OR | IntrinsicBallastFactor (Optional) |
ZCL_BALLAST_CONFIG_ATTR_BALLAST_FACTOR_ADJUST MENT | BallastFactorAdjustment (Optional) |
ZCL_BALLAST_CONFIG_ATTR_LAMP_QUANTITY | LampQuantity (Optional) |
ZCL_BALLAST_CONFIG_ATTR_LAMP_TYPE | LampType (Optional) |
ZCL_BALLAST_CONFIG_ATTR_LAMP_MANUFACTURER | LampManufacturer (Optional) |
ZCL_BALLAST_CONFIG_ATTR_LAMP_RATED_HOURS | LampRatedHours (Optional) |
ZCL_BALLAST_CONFIG_ATTR_LAMP_BURN_HOURS | LampBurnHours (Optional) |
ZCL_BALLAST_CONFIG_ATTR_LAMP_ALARM_MODE | LampAlarmMode (Optional) |
ZCL_BALLAST_CONFIG_ATTR_LAMP_BURN_HOURS_TRIP
_POINT |
LampBurnHoursTripPoint (Optional) |
6.2.3. Basic
#include "zcl/general/zcl.basic.h"
Functions
ZbZclBasicClientAlloc
struct ZbZclClusterT * ZbZclBasicClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Basic Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclBasicClientResetReq
enum ZclStatusCodeT ZbZclBasicClientResetReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst);
Send a Reset to Factory Defaults command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclBasicSvrAttrT
Basic Server Attribute IDs
ZCL_BASIC_ATTR_ZCL_VERSION | ZCLVersion |
ZCL_BASIC_ATTR_APP_VERSION | ApplicationVersion (Optional) |
ZCL_BASIC_ATTR_STACK_VERSION | StackVersion (Optional) |
ZCL_BASIC_ATTR_HARDWARE_VERSION | HWVersion (Optional) |
ZCL_BASIC_ATTR_MFR_NAME | ManufacturerName (Optional) |
ZCL_BASIC_ATTR_MODEL_NAME | ModelIdentifier (Optional) |
ZCL_BASIC_ATTR_DATE_CODE | DateCode (Optional) |
ZCL_BASIC_ATTR_POWER_SOURCE | PowerSource |
ZCL_BASIC_ATTR_MFR_VERSION_DETAILS | ManufacturerVersionDetails (Optional) |
ZCL_BASIC_ATTR_SERIAL_NUMBER | SerialNumber (Optional) |
ZCL_BASIC_ATTR_PRODUCT_LABEL | ProductLabel (Optional) |
ZCL_BASIC_ATTR_LOCATION | LocationDescription (Optional) |
ZCL_BASIC_ATTR_ENVIRONMENT | PhysicalEnvironment (Optional) |
ZCL_BASIC_ATTR_ENABLED | DeviceEnabled (Optional) |
ZCL_BASIC_ATTR_ALARM_MASK | AlarmMask (Optional) |
ZCL_BASIC_ATTR_DISABLE_LOCAL_CONFIG | DisableLocalConfig (Optional) |
ZCL_BASIC_ATTR_SW_BUILD_ID | SWBuildID (Optional) |
6.2.4. Color Control
#include "zcl/general/zcl.color.h"
Functions
ZbZclColorClientAlloc
struct ZbZclClusterT * ZbZclColorClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Color Control client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclColorClientColorLoopSetReq
enum ZclStatusCodeT ZbZclColorClientColorLoopSetReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientColorLoopSetReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Color Loop Set command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Color Loop Set command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveColorTempReq
enum ZclStatusCodeT ZbZclColorClientMoveColorTempReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveColorTempReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move Color Temperature command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move Color Temperature command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveColorXYReq
enum ZclStatusCodeT ZbZclColorClientMoveColorXYReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveColorXYReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move Color command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move Color command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveHueEnhReq
enum ZclStatusCodeT ZbZclColorClientMoveHueEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveHueEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Enhanced Move Hue command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Enhanced Move Hue command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveHueReq
enum ZclStatusCodeT ZbZclColorClientMoveHueReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveHueReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move Hue command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move Hue command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveSatReq
enum ZclStatusCodeT ZbZclColorClientMoveSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move Saturation command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move Saturation command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveToColorTempReq
enum ZclStatusCodeT ZbZclColorClientMoveToColorTempReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveToColorTempReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move to Color Temperature command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move to Color Temperature command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveToColorXYReq
enum ZclStatusCodeT ZbZclColorClientMoveToColorXYReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveToColorXYReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move to Color command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move to Color command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveToHueEnhReq
enum ZclStatusCodeT ZbZclColorClientMoveToHueEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveToHueEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Enhanced Move to Hue command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Enhanced Move to Hue command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveToHueReq
enum ZclStatusCodeT ZbZclColorClientMoveToHueReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveToHueReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move to Hue command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move to Hue command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveToHueSatEnhReq
enum ZclStatusCodeT ZbZclColorClientMoveToHueSatEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveToHueSatEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Enhanced Move to Hue and Saturation command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Enhanced Move to Hue and Saturation command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveToHueSatReq
enum ZclStatusCodeT ZbZclColorClientMoveToHueSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveToHueSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move to Hue and Saturation command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move to Hue and Saturation command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientMoveToSatReq
enum ZclStatusCodeT ZbZclColorClientMoveToSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientMoveToSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move to Saturation command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move to Saturation command command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientStepColorTempReq
enum ZclStatusCodeT ZbZclColorClientStepColorTempReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientStepColorTempReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Step Color Temperature command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Step Color Temperature command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientStepColorXYReq
enum ZclStatusCodeT ZbZclColorClientStepColorXYReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientStepColorXYReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Step Color command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Step Color command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientStepHueEnhReq
enum ZclStatusCodeT ZbZclColorClientStepHueEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientStepHueEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Enhanced Step Hue command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Enhanced Step Hue command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientStepHueReq
enum ZclStatusCodeT ZbZclColorClientStepHueReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientStepHueReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Step Hue command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Step Hue command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientStepSatReq
enum ZclStatusCodeT ZbZclColorClientStepSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientStepSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Step Saturation command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst | Destination address for request |
req | Step Saturation command command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorClientStopMoveStepReq
enum ZclStatusCodeT ZbZclColorClientStopMoveStepReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst, struct ZbZclColorClientStopMoveStepReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Stop Move Step command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Stop Move Step command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclColorServerAlloc
struct ZbZclClusterT * ZbZclColorServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *onoff_server, const struct ZbZclAttrT *attribute_list, unsigned int num_attrs, struct ZbColorClusterConfig *config, void *arg);
Instantiate a new instance of the Color Control server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
onoff_server | OnOff Server cluster pointer for processing commands with the Options fields, may be NULL |
attribute_list | List of application defined attributes to be appended, may be NULL |
num_attrs | Number of application defined attributes to be added, may be 0 if attribute_list is NULL |
config | Configuration containing Color Control capabilities and callbacks for handling requests |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclColorSvrAttrT
Color Control Server Attribute IDs
ZCL_COLOR_ATTR_CURRENT_HUE | CurrentHue |
ZCL_COLOR_ATTR_CURRENT_SAT | CurrentSaturation |
ZCL_COLOR_ATTR_REMAINING_TIME | RemainingTime (Optional but is used in mandatory commands) |
ZCL_COLOR_ATTR_CURRENT_X | CurrentX |
ZCL_COLOR_ATTR_CURRENT_Y | CurrentY |
ZCL_COLOR_ATTR_DRIFT_COMP | DriftCompensation (Optional) |
ZCL_COLOR_ATTR_COMPENSATION_TEXT | CompensationText (Optional) |
ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS | ColorTemperatureMireds |
ZCL_COLOR_ATTR_COLOR_MODE | ColorMode |
ZCL_COLOR_ATTR_OPTIONS | Options |
ZCL_COLOR_ATTR_NUM_PRIMARIES | NumberOfPrimaries |
ZCL_COLOR_ATTR_PRIMARY_1X | Primary1X |
ZCL_COLOR_ATTR_PRIMARY_1Y | Primary1Y |
ZCL_COLOR_ATTR_PRIMARY_1_INTENS | Primary1Intensity |
ZCL_COLOR_ATTR_PRIMARY_2X | Primary2X |
ZCL_COLOR_ATTR_PRIMARY_2Y | Primary2Y |
ZCL_COLOR_ATTR_PRIMARY_2_INTENS | Primary2Intensity |
ZCL_COLOR_ATTR_PRIMARY_3X | Primary3X |
ZCL_COLOR_ATTR_PRIMARY_3Y | Primary3Y |
ZCL_COLOR_ATTR_PRIMARY_3_INTENS | Primary3Intensity |
ZCL_COLOR_ATTR_PRIMARY_4X | Primary4X |
ZCL_COLOR_ATTR_PRIMARY_4Y | Primary4Y |
ZCL_COLOR_ATTR_PRIMARY_4_INTENS | Primary4Intensity |
ZCL_COLOR_ATTR_PRIMARY_5X | Primary5X |
ZCL_COLOR_ATTR_PRIMARY_5Y | Primary5Y |
ZCL_COLOR_ATTR_PRIMARY_5_INTENS | Primary5Intensity |
ZCL_COLOR_ATTR_PRIMARY_6X | Primary6X |
ZCL_COLOR_ATTR_PRIMARY_6Y | Primary6Y |
ZCL_COLOR_ATTR_PRIMARY_6_INTENS | Primary6Intensity |
ZCL_COLOR_ATTR_WHITE_POINT_X | WhitePointX (Optional) |
ZCL_COLOR_ATTR_WHITE_POINT_Y | WhitePointY (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_RX | ColorPointRX (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_RY | ColorPointRY (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_R_INTENS | ColorPointRIntensity (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_GX | ColorPointGX (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_GY | ColorPointGY (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_G_INTENS | ColorPointGIntensity (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_BX | ColorPointBX (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_BY | ColorPointBY (Optional) |
ZCL_COLOR_ATTR_COLOR_POINT_B_INTENS | ColorPointBIntensity (Optional) |
ZCL_COLOR_ATTR_ENH_CURR_HUE | EnhancedCurrentHue |
ZCL_COLOR_ATTR_ENH_COLOR_MODE | EnhancedColorMode |
ZCL_COLOR_ATTR_COLOR_LOOP_ACTIVE | ColorLoopActive |
ZCL_COLOR_ATTR_COLOR_LOOP_DIR | ColorLoopDirection |
ZCL_COLOR_ATTR_COLOR_LOOP_TIME | ColorLoopTime |
ZCL_COLOR_ATTR_COLOR_LOOP_START_HUE | ColorLoopStartEnhancedHue |
ZCL_COLOR_ATTR_COLOR_LOOP_STORE_HUE | ColorLoopStoredEnhancedHue |
ZCL_COLOR_ATTR_COLOR_CAPABILITIES | ColorCapabilities |
ZCL_COLOR_ATTR_COLOR_TEMP_MIN | ColorTempPhysicalMinMireds |
ZCL_COLOR_ATTR_COLOR_TEMP_MAX | ColorTempPhysicalMaxMireds |
ZCL_COLOR_ATTR_COUPLE_COLOR_TL_MIN | ColorTempPhysicalMaxMireds |
ZCL_COLOR_ATTR_STARTUP_COLOR_TEMP | StartUpColorTemperatureMireds |
Structures
ZbZclColorClientColorLoopSetReqT
Color Loop Set command structure
Parameters
uint8_t update_flags | Update Flags |
uint8_t action | Action |
uint8_t direction | Direction |
uint16_t transition_time | Time |
uint16_t start_hue | Start Hue |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveColorTempReqT
Move Color Temperature command structure
Parameters
uint8_t move_mode | Move Mode |
uint16_t rate | Rate |
uint16_t color_temp_min | Color Temperature Minimum Mireds |
uint16_t color_temp_max | Color Temperature Maximum Mireds |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveColorXYReqT
Move Color command structure
Parameters
uint16_t rate_x | RateX |
uint16_t rate_y | RateY |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveHueEnhReqT
Enhanced Move Hue command structure
Parameters
uint8_t move_mode | Move Mode |
uint16_t rate | Rate |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveHueReqT
Move Hue command structure
Parameters
uint8_t move_mode | Move Mode |
uint8_t rate | Rate |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveSatReqT
Move Saturation command structure
Parameters
uint8_t move_mode | Move Mode |
uint8_t rate | Rate |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveToColorTempReqT
Move to Color Temperature command structure
Parameters
uint16_t color_temp | Color Temperature Mireds |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveToColorXYReqT
Move to Color command structure
Parameters
uint16_t color_x | ColorX |
uint16_t color_y | ColorY |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveToHueEnhReqT
Enhanced Move to Hue command structure
Parameters
uint16_t enh_hue | Enhanced Hue |
uint8_t direction | Direction |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveToHueReqT
Move to Hue command structure
Parameters
uint8_t hue | Hue |
uint8_t direction | Direction |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveToHueSatEnhReqT
Enhanced Move to Hue and Saturation command structure
Parameters
uint16_t enh_hue | Enhanced Hue |
uint8_t sat | Saturation |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveToHueSatReqT
Move to Hue and Saturation command structure
Parameters
uint8_t hue | Hue |
uint8_t sat | Saturation |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientMoveToSatReqT
Move to Saturation command structure
Parameters
uint8_t sat | Saturation |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientStepColorTempReqT
Step Color Temperature command structure
Parameters
uint8_t step_mode | Step Mode |
uint16_t step_size | Step Size |
uint16_t transition_time | Transition Time |
uint16_t color_temp_min | Color Temperature Minimum Mireds |
uint16_t color_temp_max | Color Temperature Maximum Mireds |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientStepColorXYReqT
Step Color command structure
Parameters
uint16_t step_x | StepX |
uint16_t step_y | StepY |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientStepHueEnhReqT
Enhanced Step Hue command structure
Parameters
uint8_t step_mode | Step Mode |
uint16_t step_size | Step Size |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientStepHueReqT
Step Hue command structure
Parameters
uint8_t step_mode | Step Mode |
uint8_t step_size | Step Size |
uint8_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override |
ZbZclColorClientStepSatReqT
Step Saturation command structure
Parameters
uint8_t step_mode | Step Mode |
uint8_t step_size | Step Size |
uint8_t transition_time | Transition Time |
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorClientStopMoveStepReqT
Stop Move Step command structure
Parameters
uint8_t mask | OptionsMask |
uint8_t override | OptionsOverride |
ZbZclColorServerCallbacksT
Color Control Server callbacks configuration
Parameters
move_to_hue
(callback function pointer) |
enum ZclStatusCodeT (*move_to_hue)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move to Hue command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_hue
(callback function pointer) |
enum ZclStatusCodeT (*move_hue)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveHueReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move Hue command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME |
step_hue
(callback function pointer) |
enum ZclStatusCodeT (*step_hue)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepHueReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Step Hue command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_to_sat
(callback function pointer) |
enum ZclStatusCodeT (*move_to_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move to Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_sat
(callback function pointer) |
enum ZclStatusCodeT (*move_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME
|
step_sat
(callback function pointer) |
enum ZclStatusCodeT (*step_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Step Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_to_hue_sat
(callback function pointer) |
enum ZclStatusCodeT (*move_to_hue_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move to Hue and Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_to_color_xy
(callback function pointer) |
enum ZclStatusCodeT (*move_to_color_xy)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToColorXYReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move to Color command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_X, ZCL_COLOR_ATTR_CURRENT_Y, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_color_xy
(callback function pointer) |
enum ZclStatusCodeT (*move_color_xy)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveColorXYReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move Color command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_X, ZCL_COLOR_ATTR_CURRENT_Y, and ZCL_COLOR_ATTR_REMAINING_TIME |
step_color_xy
(callback function pointer) |
enum ZclStatusCodeT (*step_color_xy)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepColorXYReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Step Color command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_X, ZCL_COLOR_ATTR_CURRENT_Y, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_to_color_temp
(callback function pointer) |
enum ZclStatusCodeT (*move_to_color_temp)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToColorTempReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move to Color Temperature command. The application is expected to update ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_to_hue_enh
(callback function pointer) |
enum ZclStatusCodeT (*move_to_hue_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Enhanced Move to Hue command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_hue_enh
(callback function pointer) |
enum ZclStatusCodeT (*move_hue_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveHueEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move Hue command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME |
step_hue_enh
(callback function pointer) |
enum ZclStatusCodeT (*step_hue_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepHueEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Enhanced Step Hue command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME |
move_to_hue_sat_enh
(callback function pointer) |
enum ZclStatusCodeT (*move_to_hue_sat_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueSatEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Enhanced Move to Hue and Saturation command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME |
color_loop_set
(callback function pointer) |
enum ZclStatusCodeT (*color_loop_set)(struct ZbZclClusterT *cluster, struct ZbZclColorClientColorLoopSetReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Color Loop Set command. The application is expected to update the following attributes according to the update flags and action fields: ZCL_COLOR_ATTR_COLOR_LOOP_ACTIVE, ZCL_COLOR_ATTR_COLOR_LOOP_DIR, ZCL_COLOR_ATTR_COLOR_LOOP_TIME, ZCL_COLOR_ATTR_COLOR_LOOP_START_HUE, ZCL_COLOR_ATTR_ENH_CURR_HUE, ZCL_COLOR_ATTR_COLOR_LOOP_STORE_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME |
stop_move_step
(callback function pointer) |
enum ZclStatusCodeT (*stop_move_step)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStopMoveStepReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Stop Move Step command. The application is expected to update ZCL_COLOR_ATTR_REMAINING_TIME |
move_color_temp
(callback function pointer) |
enum ZclStatusCodeT (*move_color_temp)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveColorTempReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Move Color Temperature command. The application is expected to update ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS, and ZCL_COLOR_ATTR_REMAINING_TIME |
step_color_temp
(callback function pointer) |
enum ZclStatusCodeT (*step_color_temp)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepColorTempReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Step Color Temperature command. The application is expected to update ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS, and ZCL_COLOR_ATTR_REMAINING_TIME |
6.2.5. Commissioning
#include "zcl/general/zcl.commission.h"
Functions
ZbZclCommissionClientAlloc
struct ZbZclClusterT * ZbZclCommissionClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t profile, bool aps_secured);
Create a new instance of the Commissioning Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Set to ZB_ENDPOINT_BCAST if using Inter-PAN for communicating ZCL messages. Otherwise, set a valid ZCL endpoint. |
profile | Profile ID for this cluster (e.g. ZCL_PROFILE_HOME_AUTOMATION) |
aps_secured | APS Security - true if APS Security enabled, else false |
Return
- Cluster pointer, or NULL if there is an error
ZbZclCommissionClientEnable
enum ZclStatusCodeT ZbZclCommissionClientEnable(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientEnableInfoT *info);
Enable Commissioning Client by configuring MAC layer to listen for packets.
Parameters
cluster | Cluster instance from which to send this command |
info | Commissioning Client Enable Information structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionClientSendResetStartup
enum ZclStatusCodeT ZbZclCommissionClientSendResetStartup(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep, struct ZbZclCommissionClientResetStartup *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Reset Startup Parameters command
Parameters
cluster | Cluster instance from which to send this command |
dst_ext | Extended address of the device to send this command |
dst_ep | If cluster is not using Inter-PAN, this is the destination endpoint to send the command to. |
req | Reset Startup Parameters command structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionClientSendRestart
enum ZclStatusCodeT ZbZclCommissionClientSendRestart(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep, struct ZbZclCommissionClientRestartDev *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Restart Device command
Parameters
cluster | Cluster instance from which to send this command |
dst_ext | Extended address of the device to send this command |
dst_ep | If cluster is not using Inter-PAN, this is the destination endpoint to send the command to. |
req | Restart Device command structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionClientSendRestoreStartup
enum ZclStatusCodeT ZbZclCommissionClientSendRestoreStartup(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep, struct ZbZclCommissionClientRestoreStartup *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Restore Startup Parameters command
Parameters
cluster | Cluster instance from which to send this command |
dst_ext | Extended address of the device to send this command |
dst_ep | If cluster is not using Inter-PAN, this is the destination endpoint to send the command to. |
req | Restore Startup Parameters command structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionClientSendSaveStartup
enum ZclStatusCodeT ZbZclCommissionClientSendSaveStartup(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep, struct ZbZclCommissionClientSaveStartup *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Save Startup Parameters command
Parameters
cluster | Cluster instance from which to send this command |
dst_ext | Extended address of the device to send this command |
dst_ep | If cluster is not using Inter-PAN, this is the destination endpoint to send the command to. |
req | Save Startup Parameters command structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionServerAlloc
struct ZbZclClusterT * ZbZclCommissionServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t profile, bool aps_secured, struct ZbZclCommissionServerCallbacksT *callbacks, void *arg);
Create a new instance of the Commissioning Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Set to ZB_ENDPOINT_BCAST if using Inter-PAN for communicating ZCL messages. Otherwise, set a valid ZCL endpoint. |
profile | Profile ID for this cluster (e.g. ZCL_PROFILE_HOME_AUTOMATION) |
aps_secured | APS Security - true if APS Security enabled, else false |
callbacks | Structure containing any callback function pointers for this cluster |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
ZbZclCommissionServerEnable
enum ZclStatusCodeT ZbZclCommissionServerEnable(struct ZbZclClusterT *cluster, bool enable, struct ZbZclCommissionServerEnableInfoT *info);
Enable the Commissioning Server by configuring the MAC layer to listen for packets. If enable is false, then Commissioning Server will stop processing any received Commissioning packets.
Parameters
cluster | Cluster instance from which to send this command |
enable | Enable or disable the ability to receive and process Commissioning commands. |
info | Commissioning Server Enable Information structure. Contains information needed to start listening for Commissioning commands on a given channel. Optional and only applicable if enable is true. This may be NULL if already configured and operational on a network. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionServerGetStartup
enum ZclStatusCodeT ZbZclCommissionServerGetStartup(struct ZbZclClusterT *cluster, struct ZbStartupT *config);
Load startup configuration from Cluster Server’s attributes to the stack’s ZbStartupT structure
Parameters
cluster | Cluster instance from which to send this command |
config | Zigbee Stack Startup Configuration structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionServerResetStartup
enum ZclStatusCodeT ZbZclCommissionServerResetStartup(struct ZbZclClusterT *cluster);
Reset startup configurations cluster attributes back to defaults
Parameters
cluster | Cluster instance from which to send this command |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionServerSendResetStartupRsp
enum ZclStatusCodeT ZbZclCommissionServerSendResetStartupRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclCommissionServerResetStartupRsp *rsp);
Send a Reset Startup Parameters Response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Reset Startup Parameters Response command structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionServerSendRestartRsp
enum ZclStatusCodeT ZbZclCommissionServerSendRestartRsp(struct ZbZclClusterT *cluster, struct
ZbZclAddrInfoT *dst, struct ZbZclCommissionServerRestartDevRsp *rsp);
Send a Restart Device Response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Restart Device Response command structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionServerSendRestoreStartupRsp
enum ZclStatusCodeT ZbZclCommissionServerSendRestoreStartupRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclCommissionServerRestoreStartupRsp *rsp);
Send a Restore Startup Parameters Response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Restore Startup Parameters Response command structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclCommissionServerSendSaveStartupRsp
enum ZclStatusCodeT ZbZclCommissionServerSendSaveStartupRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclCommissionServerSaveStartupRsp *rsp);
Send a Save Startup Parameters Response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Save Startup Parameters Response command structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclCommissionServerAttrT
Commissioning Server Attribute IDs
ZCL_COMMISSION_SVR_ATTR_SHORT_ADDR | ShortAddress. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured) or 0x02 (ZbStartTypeRejoin). |
ZCL_COMMISSION_SVR_ATTR_EPID | ExtendedPANId |
ZCL_COMMISSION_SVR_ATTR_PANID | PANId. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured) or 0x02 (ZbStartTypeRejoin). |
ZCL_COMMISSION_SVR_ATTR_CHANNELMASK | Channelmask |
ZCL_COMMISSION_SVR_ATTR_PROTOCOLVER | ProtocolVersion. Default value is 0x0002 (ZB_PROTOCOL_VERSION_2007) |
ZCL_COMMISSION_SVR_ATTR_STACKPROFILE | StackProfile. Default value is 0x02 (ZB_NWK_STACK_PROFILE_PRO) |
ZCL_COMMISSION_SVR_ATTR_STARTUPCONTROL | StartupControl. ZbStartTypePreconfigured = 0x00, ZbStartTypeForm = 0x01, ZbStartTypeRejoin = 0x02, ZbStartTypeJoin = 0x03 |
ZCL_COMMISSION_SVR_ATTR_TCADDR | TrustCenterAddress. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured). Otherwise it should be zero to allow the Transport Key to be decrypted and processed correctly during joining. |
ZCL_COMMISSION_SVR_ATTR_TCMASTER | TrustCenterMasterKey (Optional) |
ZCL_COMMISSION_SVR_ATTR_NWKKEY | NetworkKey. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured). |
ZCL_COMMISSION_SVR_ATTR_USEINSECJOIN | UseInsecureJoin |
ZCL_COMMISSION_SVR_ATTR_PRECONFLINKKEY | PreconfiguredLinkKey |
ZCL_COMMISSION_SVR_ATTR_NWKKEYSEQNUM | NetworkKeySeqNum. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured). |
ZCL_COMMISSION_SVR_ATTR_NWKKEYTYPE | NetworkKeyType. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured). |
ZCL_COMMISSION_SVR_ATTR_NWKMGRADDR | NetworkManagerAddress. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured) or 0x02 (ZbStartTypeRejoin). |
ZCL_COMMISSION_SVR_ATTR_SCANATTEMPTS | ScanAttempts (Optional) |
ZCL_COMMISSION_SVR_ATTR_TIMEBTWSCANS | TimeBetweenScans (Optional) |
ZCL_COMMISSION_SVR_ATTR_REJOININTERVAL | RejoinInterval (Optional) |
ZCL_COMMISSION_SVR_ATTR_MAXREJOININTERVAL | MaxRejoinInterval (Optional) |
ZCL_COMMISSION_SVR_ATTR_POLLRATE | IndirectPollRate (Optional) |
ZCL_COMMISSION_SVR_ATTR_PARENTRETRYTHRESH | ParentRetryThreshold (Optional) |
ZCL_COMMISSION_SVR_ATTR_CONCFLAG | ConcentratorFlag (Optional) |
ZCL_COMMISSION_SVR_ATTR_CONCRADIUS | ConcentratorRadius (Optional) |
ZCL_COMMISSION_SVR_ATTR_CONCDISCTIME | ConcentratorDiscoveryTime (Optional) |
Structures
ZbZclCommissionClientEnableInfoT
Commissioning Client Enable Information structure
Parameters
uint8_t page | Page |
uint8_t channel | Channel |
ZbZclCommissionClientResetStartup
Reset Startup Parameters command structure
Parameters
uint8_t options | Options - e.g. ZCL_COMMISS_RESET_OPTS_RESET_CURR |
uint8_t index | Index |
ZbZclCommissionClientRestartDev
Restart Device command structure
Parameters
uint8_t options | Options - e.g. ZCL_COMMISS_RESTART_OPTS_MODE_MASK |
uint8_t delay | Delay (seconds) |
uint8_t jitter | Jitter - RAND(jitter * 80) milliseconds |
ZbZclCommissionClientRestoreStartup
Restore Startup Parameters command structure
Parameters
uint8_t options | Options (Reserved) |
uint8_t index | Index |
ZbZclCommissionClientSaveStartup
Save Startup Parameters command structure
Parameters
uint8_t options | Options (Reserved) |
uint8_t index | Index |
ZbZclCommissionServerCallbacksT
Commissioning Server callbacks configuration
Parameters
restart_device
(callback function pointer) |
enum ZclStatusCodeT (*restart_device)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientRestartDev *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Restart Device command. Should call ZbZclCommissionServerSendRestartRsp to send response. Since the application will end up calling ZbStartup or similar, the application must wait and let the stack send the response before something like ZbStartup is called. 100 milliseconds should be sufficient (ZCL_COMMISSION_RESTART_DEVICE_DELAY_MS). |
save_startup
(callback function pointer) |
enum ZclStatusCodeT (*save_startup)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientSaveStartup *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Save Startup Parameters command. |
restore_startup
(callback function pointer) |
enum ZclStatusCodeT (*restore_startup)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientRestoreStartup *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Restore Startup Parameters command. |
reset_startup
(callback function pointer) |
enum ZclStatusCodeT (*reset_startup)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientResetStartup *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Reset Startup Parameters command. |
ZbZclCommissionServerEnableInfoT
Commissioning Server Enable Information structure
Parameters
uint8_t page | Page |
uint8_t channel | Channel |
ZbZclCommissionServerResetStartupRsp
Reset Startup Parameters Response command structure
Parameters
enum ZclStatusCodeT status | ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. |
ZbZclCommissionServerRestartDevRsp
Restart Device Response command structure
Parameters
enum ZclStatusCodeT status | ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. |
ZbZclCommissionServerRestoreStartupRsp
Restore Startup Parameters Response command structure
Parameters
enum ZclStatusCodeT status | ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. |
ZbZclCommissionServerSaveStartupRsp
Save Startup Parameters Response command structure
Parameters
enum ZclStatusCodeT status | ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. |
6.2.6. Dehumidification Control
#include "zcl/general/zcl.dehum.ctrl.h"
Functions
ZbZclDehumCtrlClientAlloc
struct ZbZclClusterT * ZbZclDehumCtrlClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Dehumidification Control client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclDehumCtrlServerAlloc
struct ZbZclClusterT * ZbZclDehumCtrlServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Dehumidification Control server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclDehumCtrlServerAttrT
Dehumidification Control Attribute Ids
ZCL_DEHUM_CTRL_SVR_ATTR_REL_HUM | RelativeHumidity |
ZCL_DEHUM_CTRL_SVR_ATTR_DEHUM_COOLING | DehumidificationCooling |
ZCL_DEHUM_CTRL_SVR_ATTR_RHDH_SETPT | RHDehumidificationSetpoint |
ZCL_DEHUM_CTRL_SVR_ATTR_RH_MODE | RelativeHumidityMode |
ZCL_DEHUM_CTRL_SVR_ATTR_DH_LOCKOUT | DehumidificationLockout |
ZCL_DEHUM_CTRL_SVR_ATTR_DH_HYS | DehumidificationHysteresis |
ZCL_DEHUM_CTRL_SVR_ATTR_DH_MAX_COOL | DehumidificationMaxCool |
ZCL_DEHUM_CTRL_SVR_ATTR_RH_DISPLAY | RelativeHumidityDisplay |
6.2.7. Device Temperature Configuration
#include "zcl/general/zcl.device.temp.h"
Functions
ZbZclDevTempClientAlloc
struct ZbZclClusterT * ZbZclDevTempClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Device Temperature Configuration Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclDevTempServerAlloc
struct ZbZclClusterT * ZbZclDevTempServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Device Temp client cluster.
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclDeviceTempAlarmCode
Device Temperature Configuration Alarm Code
ZCL_DEV_TEMP_ALARM_CODE_LOW | Device Temperature too low |
ZCL_DEV_TEMP_ALARM_CODE_HIGH | Device Temperature too high |
ZbZclDeviceTempAlarmMask
Device Temperature Configuration Alarm Mask
ZCL_DEV_TEMP_ALARM_MASK_CLEAR | Alarm mask clear |
ZCL_DEV_TEMP_ALARM_MASK_LOW | Alarm mask low |
ZCL_DEV_TEMP_ALARM_MASK_HIGH | Alarm mask high |
ZbZclDeviceTempSvrAttrT
Device Temperature Cluster Attribute Ids
ZCL_DEV_TEMP_CURRENT | CurrentTemperature |
ZCL_DEV_TEMP_MIN_TEMP | MinTempExperienced (Optional) |
ZCL_DEV_TEMP_MAX_TEMP | MaxTempExperienced (Optional) |
ZCL_DEV_TEMP_OVER_TEMP_DWELL | OverTempTotalDwell (Optional) |
ZCL_DEV_TEMP_ALARM_MASK | DeviceTempAlarmMask (Optional) |
ZCL_DEV_TEMP_LOW_THRESHOLD | LowTempThreshold (Optional) |
ZCL_DEV_TEMP_HIGH_THRESHOLD | HighTempThreshold (Optional) |
ZCL_DEV_TEMP_LOW_DWELL_TRIP | LowTempDwellTripPoint (Optional) |
ZCL_DEV_TEMP_HIGH_DWELL_TRIP | HighTempDwellTripPoint (Optional) |
6.2.8. Diagnostics
#include "zcl/general/zcl.diagnostics.h"
Functions
ZbZclDiagClientAlloc
struct ZbZclClusterT * ZbZclDiagClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Diagnostics Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclDiagServerAlloc
bool ZbZclDiagServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t profileId, enum ZbStatusCodeT minSecurity);
Create a new instance of the Diagnostics Server cluster. Only one Diagnostics Server can be allocated on the device
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
profileId | Profile ID setting, unless set to ZCL_PROFILE_WILDCARD |
minSecurity | Minimum security level can be either: ZB_APS_STATUS_UNSECURED, ZB_APS_STATUS_SECURED_NWK_KEY, or ZB_APS_STATUS_SECURED_LINK_KEY |
Return
- True on success, false otherwise
Enumerations
ZbZclDiagSvrAttrT
Diagnostics Server Attribute IDs
ZCL_DIAG_SVR_ATTR_RESETS | NumberOfResets (Optional) |
ZCL_DIAG_SVR_ATTR_PERSIST_WRITES | PersistentMemoryWrites (Optional) |
ZCL_DIAG_SVR_ATTR_MAC_RX_BCAST | MacRxBcast (Optional) |
ZCL_DIAG_SVR_ATTR_MAC_TX_BCAST | MacTxBcast (Optional) |
ZCL_DIAG_SVR_ATTR_MAC_RX_UCAST | MacRxUcast (Optional) |
ZCL_DIAG_SVR_ATTR_MAC_TX_UCAST | MacTxUcast (Optional) |
ZCL_DIAG_SVR_ATTR_MAC_TX_UCAST_RETRY | MacTxUcastRetry (Optional) |
ZCL_DIAG_SVR_ATTR_MAC_TX_UCAST_FAIL | MacTxUcastFail (Optional) |
ZCL_DIAG_SVR_ATTR_APS_RX_BCAST | APSRxBcast (Optional) |
ZCL_DIAG_SVR_ATTR_APS_TX_BCAST | APSTxBcast (Optional) |
ZCL_DIAG_SVR_ATTR_APS_RX_UCAST | APSRxUcast (Optional) |
ZCL_DIAG_SVR_ATTR_APS_TX_UCAST_SUCCESS | APSTxUcastSuccess (Optional) |
ZCL_DIAG_SVR_ATTR_APS_TX_UCAST_RETRY | APSTxUcastRetry (Optional) |
ZCL_DIAG_SVR_ATTR_APS_TX_UCAST_FAIL | APSTxUcastFail (Optional) |
ZCL_DIAG_SVR_ATTR_ROUTE_DISC_INIT | RouteDiscInitiated (Optional) |
ZCL_DIAG_SVR_ATTR_NEIGHBOR_ADDED | NeighborAdded (Optional) |
ZCL_DIAG_SVR_ATTR_NEIGHBOUR_REMOVED | NeighborRemoved (Optional) |
ZCL_DIAG_SVR_ATTR_NEIGHBOUR_STALE | NeighborStale (Optional) |
ZCL_DIAG_SVR_ATTR_JOIN_IND | JoinIndication (Optional) |
ZCL_DIAG_SVR_ATTR_CHILD_MOVED | ChildMoved (Optional) |
ZCL_DIAG_SVR_ATTR_NWK_FC_FAILURE | NWKFCFailure (Optional) |
ZCL_DIAG_SVR_ATTR_APS_FC_FAILURE | APSFCFailure (Optional) |
ZCL_DIAG_SVR_ATTR_APS_UNAUTH_KEY | APSUnauthorizedKey (Optional) |
ZCL_DIAG_SVR_ATTR_NWK_DECRYPT_FAILS | NWKDecryptFailures (Optional) |
ZCL_DIAG_SVR_ATTR_APS_DECRYPT_FAILS | APSDecryptFailures (Optional) |
ZCL_DIAG_SVR_ATTR_PACKET_BUF_ALLOC_FAILS | PacketBufferAllocateFailures (Optional) |
ZCL_DIAG_SVR_ATTR_RELAYED_UCAST | RelayedUcast (Optional) |
ZCL_DIAG_SVR_ATTR_PHY_MAC_QUEUE_LIM | PhytoMACqueuelimitreached (Optional) |
ZCL_DIAG_SVR_ATTR_PACKET_VAL_DROP_COUNT | PacketValidatedropcount (Optional) |
ZCL_DIAG_SVR_ATTR_AVG_MAC_RETRY_PER_APS_MSG | AverageMACRetryPerAPSMessageSent (Optional) |
ZCL_DIAG_SVR_ATTR_LAST_MSG_LQI | LastMessageLQI (Optional) |
ZCL_DIAG_SVR_ATTR_LAST_MSG_RSSI | LastMessageRSSI (Optional) |
6.2.9. Door Lock
#include "zcl/general/zcl.doorlock.h"
Functions
ZbZclDoorLockClientAlloc
struct ZbZclClusterT * ZbZclDoorLockClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Door Lock Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclDoorLockClientClrAllPinReq
enum ZclStatusCodeT ZbZclDoorLockClientClrAllPinReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear All PIN Codes request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientClrAllRfidReq
enum ZclStatusCodeT ZbZclDoorLockClientClrAllRfidReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear All RFID Codes request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientClrHDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientClrHDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockClrHDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear Holiday Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Clear Holiday Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientClrPinReq
enum ZclStatusCodeT ZbZclDoorLockClientClrPinReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockClrPinReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear PIN Code request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Clear PIN Code request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientClrRfidReq
enum ZclStatusCodeT ZbZclDoorLockClientClrRfidReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockClrRfidReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear RFID Code request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Clear RFID Code request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientClrWDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientClrWDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockClrWDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear Weekday Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Clear Weekday Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientClrYDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientClrYDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockClrYDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear Year Day Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Clear Year Day Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetHDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientGetHDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetHDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Holiday Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get Holiday Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetLogReq
enum ZclStatusCodeT ZbZclDoorLockClientGetLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetLogReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Log Record request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get Log Record request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetPinReq
enum ZclStatusCodeT ZbZclDoorLockClientGetPinReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetPinReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get PIN Code request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get PIN Code request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetRfidReq
enum ZclStatusCodeT ZbZclDoorLockClientGetRfidReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetRfidReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get RFID Code request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get RFID Code request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetUserStatusReq
enum ZclStatusCodeT ZbZclDoorLockClientGetUserStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetUserStatusReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get User Status request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get User Status request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetUserTypeReq
enum ZclStatusCodeT ZbZclDoorLockClientGetUserTypeReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetUserTypeReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get User Type request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get User Type request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetWDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientGetWDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetWDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Weekday Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get Weekday Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientGetYDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientGetYDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockGetYDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Year Day Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get Year Day Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientLockReq
enum ZclStatusCodeT ZbZclDoorLockClientLockReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockLockDoorReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Lock Door request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Lock Door request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientSetHDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientSetHDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockSetHDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set Holiday Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Set Holiday Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientSetPinReq
enum ZclStatusCodeT ZbZclDoorLockClientSetPinReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockSetPinReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set PIN Code request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Set PIN Code request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientSetRfidReq
enum ZclStatusCodeT ZbZclDoorLockClientSetRfidReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockSetRfidReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set RFID Code request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Set RFID Code request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientSetUserStatusReq
enum ZclStatusCodeT ZbZclDoorLockClientSetUserStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockSetUserStatusReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set User Status request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Set User Status request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientSetUserTypeReq
enum ZclStatusCodeT ZbZclDoorLockClientSetUserTypeReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockSetUserTypeReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set User Type request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Set User Type request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientSetWDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientSetWDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockSetWDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set Weekday Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Set Weekday Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientSetYDScheduleReq
enum ZclStatusCodeT ZbZclDoorLockClientSetYDScheduleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockSetYDScheduleReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set Year Day Schedule request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Set Year Day Schedule request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientToggleReq
enum ZclStatusCodeT ZbZclDoorLockClientToggleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockToggleReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send Toggle request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Toggle request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientUnlockReq
enum ZclStatusCodeT ZbZclDoorLockClientUnlockReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockUnlockDoorReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send an Unlock Door request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Unlock Door request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockClientUnlockTimeoutReq
enum ZclStatusCodeT ZbZclDoorLockClientUnlockTimeoutReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclDoorLockUnlockTimeoutReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send an Unlock with Timeout request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Unlock with Timeout request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerAlloc
struct ZbZclClusterT * ZbZclDoorLockServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDoorLockServerCallbacksT *callbacks, void *arg);
Create a new instance of the Door Lock Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
callbacks | Structure containing any callback function pointers for this cluster |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
ZbZclDoorLockServerSendClrAllPinRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendClrAllPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockClrAllPinRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Clear All PIN Codes response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Clear All PIN Codes response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendClrAllRfidRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendClrAllRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockClrAllRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Clear All RFID Codes response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Clear All RFID Codes response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendClrHDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendClrHDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockClrHDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Clear Holiday Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Clear Holiday Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendClrPinRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendClrPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockClrPinRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Clear PIN Code response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Clear PIN Code response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendClrRfidRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendClrRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockClrRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Clear RFID Code response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Clear RFID Code response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendClrWDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendClrWDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockClrWDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Clear Weekday Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Clear Weekday Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendClrYDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendClrYDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockClrYDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Clear Year Day Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Clear Year Day Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetHDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetHDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetHDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get Holiday Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get Holiday Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetLogRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetLogRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get Log Record response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get Log Record response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetPinRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetPinRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get PIN Code response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get PIN Code response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetRfidRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get RFID Code response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get RFID Code response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetUserStatusRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetUserStatusRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetUserStatusRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get User Status response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get User Status response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetUserTypeRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetUserTypeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetUserTypeRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get User Type response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get User Type response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetWDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetWDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetWDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get Weekday Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get Weekday Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendGetYDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendGetYDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetYDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Get Year Day Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Get Year Day Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendLockRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendLockRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockLockDoorRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Lock Door response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Lock Door response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendSetHDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendSetHDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockSetHDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Set Holiday Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Set Holiday Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendSetPinRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendSetPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockSetPinRspT *rsp,void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Set PIN Code response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Set PIN Code response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendSetRfidRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendSetRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockSetRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Set RFID Code response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Set RFID Code response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendSetUserStatusRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendSetUserStatusRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockSetUserStatusRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Set User Status response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Set User Status response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendSetUserTypeRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendSetUserTypeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockSetUserTypeRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Set User Type response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Set User Type response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendSetWDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendSetWDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockSetWDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Set Weekday Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Set Weekday Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendSetYDScheduleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendSetYDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockSetYDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Set Year Day Schedule response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Set Year Day Schedule response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendToggleRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendToggleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockToggleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a Toggle response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Toggle response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendUnlockRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendUnlockRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockUnlockDoorRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send an Unlock Door response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Unlock Door response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclDoorLockServerSendUnlockTimeoutRsp
enum ZclStatusCodeT ZbZclDoorLockServerSendUnlockTimeoutRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockUnlockTimeoutRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send an Unlock with Timeout response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | Unlock with Timeout response structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Structures
ZbZclDoorLockClrAllPinRspT
Clear All PIN Codes response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockClrAllRfidRspT
Clear All RFID Codes response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockClrHDScheduleReqT
Clear Holiday Schedule request structure
Parameters
uint8_t schedule_id | Holiday Schedule ID |
ZbZclDoorLockClrHDScheduleRspT
Clear Holiday Schedule response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockClrPinReqT
Clear PIN Code request structure
Parameters
uint16_t user_id | User ID |
ZbZclDoorLockClrPinRspT
Clear PIN Code response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockClrRfidReqT
Clear RFID Code request structure
Parameters
uint16_t user_id | User ID |
ZbZclDoorLockClrRfidRspT
Clear RFID Code response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockClrWDScheduleReqT
Clear Weekday Schedule request structure
Parameters
uint8_t schedule_id | Schedule ID |
uint16_t user_id | User ID |
ZbZclDoorLockClrWDScheduleRspT
Clear Weekday Schedule response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockClrYDScheduleReqT
Clear Year Day Schedule request structure
Parameters
uint8_t schedule_id | Schedule ID |
uint16_t user_id | User ID |
ZbZclDoorLockClrYDScheduleRspT
Clear Year Day Schedule response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockGetHDScheduleReqT
Get Holiday Schedule request structure
Parameters
uint8_t schedule_id | Holiday Schedule ID |
ZbZclDoorLockGetHDScheduleRspT
Get Holiday Schedule response structure
Parameters
uint8_t schedule_id | Holiday Schedule ID |
uint8_t status | Status |
uint32_t local_start_time | Local Start Time |
uint32_t local_end_time | Local End Time |
uint8_t operating_mode | Operating Mode During Holiday |
ZbZclDoorLockGetLogReqT
Get Log Record request structure
Parameters
uint16_t log_index | Log Index |
ZbZclDoorLockGetLogRspT
Get Log Record response structure
Parameters
uint16_t log_entry_id | Log Entry ID |
uint32_t time_stamp | Timestamp |
uint8_t event_type | Event Type |
uint8_t source | Source (see Operation Event Sources) |
uint8_t alarm_code | Event ID/Alarm Code (see Operation Event Codes) |
uint16_t user_id | User ID |
uint8_t pin | PIN |
uint8_t pin_len | Length of PIN |
ZbZclDoorLockGetPinReqT
Get PIN Code request structure
Parameters
uint16_t user_id | User ID |
ZbZclDoorLockGetPinRspT
Get PIN Code response structure
Parameters
uint16_t user_id | User ID |
uint8_t user_status | User Status |
uint8_t user_type | User Type |
uint8_t pin | Code |
uint8_t pin_len | Length of Code |
ZbZclDoorLockGetRfidReqT
Get RFID Code request structure
Parameters
uint16_t user_id | User ID |
ZbZclDoorLockGetRfidRspT
Get RFID Code response structure
Parameters
uint16_t user_id | User ID |
uint8_t user_status | User Status |
uint8_t user_type | User Type |
uint8_t rfid | RFID Code |
uint8_t rfid_len | Length of RFID Code |
ZbZclDoorLockGetUserStatusReqT
Get User Status request structure
Parameters
uint16_t user_id | User ID |
ZbZclDoorLockGetUserStatusRspT
Get User Status response structure
Parameters
uint16_t user_id | User ID |
uint8_t user_status | User Status |
ZbZclDoorLockGetUserTypeReqT
Get User Type request structure
Parameters
uint16_t user_id | User ID |
ZbZclDoorLockGetUserTypeRspT
Get User Type response structure
Parameters
uint16_t user_id | User ID |
uint8_t user_type | User Type |
ZbZclDoorLockGetWDScheduleReqT
Get Weekday Schedule request structure
Parameters
uint8_t schedule_id | Schedule ID |
uint16_t user_id | User ID |
ZbZclDoorLockGetWDScheduleRspT
Get Weekday Schedule response structure
Parameters
uint8_t schedule_id | Schedule ID |
uint16_t user_id | User ID |
uint8_t status | Status |
uint8_t days_mask | Days Mask |
uint8_t start_hour | Start Hour |
uint8_t start_minute | Start Minute |
uint8_t end_hour | End Hour |
uint8_t end_minute | End Minute |
ZbZclDoorLockGetYDScheduleReqT
Get Year Day Schedule request structure
Parameters
uint8_t schedule_id | Schedule ID |
uint16_t user_id | User ID |
ZbZclDoorLockGetYDScheduleRspT
Get Year Day Schedule response structure
Parameters
uint8_t schedule_id | Schedule ID |
uint16_t user_id | User ID |
uint8_t status | Status |
uint32_t local_start_time | Local Start Time |
uint32_t local_end_time | Local End Time |
ZbZclDoorLockLockDoorReqT
Lock Door request structure
Parameters
uint8_t pin | PIN/RFID Code |
uint8_t pin_len | Length of PIN/RFID Code |
ZbZclDoorLockLockDoorRspT
Lock Door response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockServerCallbacksT
Door Lock Server callbacks configuration
Parameters
lock
(callback function pointer) |
enum ZclStatusCodeT (*lock)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockLockDoorReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Lock Door command. |
unlock
(callback function pointer) |
enum ZclStatusCodeT (*unlock)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockUnlockDoorReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Unlock Door command. |
toggle
(callback function pointer) |
enum ZclStatusCodeT (*toggle)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockToggleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Toggle command. |
unlock_timeout
(callback function pointer) |
enum ZclStatusCodeT (*unlock_timeout)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockUnlockTimeoutReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Unlock with Timeout command. |
get_log
(callback function pointer) |
enum ZclStatusCodeT (*get_log)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetLogReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get Log Record command. |
set_pin
(callback function pointer) |
enum ZclStatusCodeT (*set_pin)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetPinReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Set PIN Code command. |
get_pin
(callback function pointer) |
enum ZclStatusCodeT (*get_pin)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetPinReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get PIN Code command. |
clr_pin
(callback function pointer) |
enum ZclStatusCodeT (*clr_pin)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrPinReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Clear PIN Code command. |
clr_all_pins
(callback function pointer) |
enum ZclStatusCodeT (*clr_all_pins)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Clear All PIN Codes command. |
set_user_status
(callback function pointer) |
enum ZclStatusCodeT (*set_user_status)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetUserStatusReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Set User Status command. |
get_user_status
(callback function pointer) |
enum ZclStatusCodeT (*get_user_status)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetUserStatusReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get User Status command. |
set_wd_sched
(callback function pointer) |
enum ZclStatusCodeT (*set_wd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetWDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Set Weekday Schedule command. |
get_wd_sched
(callback function pointer) |
enum ZclStatusCodeT (*get_wd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetWDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get Weekday Schedule command. |
clr_wd_sched
(callback function pointer) |
enum ZclStatusCodeT (*clr_wd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrWDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Clear Weekday Schedule command. |
set_yd_sched
(callback function pointer) |
enum ZclStatusCodeT (*set_yd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetYDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Set Year Day Schedule command. |
get_yd_sched
(callback function pointer) |
enum ZclStatusCodeT (*get_yd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetYDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get Year Day Schedule command. |
clr_yd_sched
(callback function pointer) |
enum ZclStatusCodeT (*clr_yd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrYDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
|
set_hd_sched
(callback function pointer) |
enum ZclStatusCodeT (*set_hd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetHDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Set Holiday Schedule command. |
get_hd_sched
(callback function pointer) |
enum ZclStatusCodeT (*get_hd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetHDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get Holiday Schedule command. |
clr_hd_sched
(callback function pointer) |
enum ZclStatusCodeT (*clr_hd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrHDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Clear Holiday Schedule command. |
set_user_type
(callback function pointer) |
enum ZclStatusCodeT (*set_user_type)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetUserTypeReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Set User Type command. |
get_user_type
(callback function pointer) |
enum ZclStatusCodeT (*get_user_type)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetUserTypeReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get User Type command. |
set_rfid
(callback function pointer) |
enum ZclStatusCodeT (*set_rfid)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetRfidReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Set RFID Code command. |
get_rfid
(callback function pointer) |
enum ZclStatusCodeT (*get_rfid)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetRfidReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Get RFID Code command. |
clr_rfid
(callback function pointer) |
enum ZclStatusCodeT (*clr_rfid)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrRfidReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Clear RFID Code command. |
clr_all_rfids
(callback function pointer) |
enum ZclStatusCodeT (*clr_all_rfids)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Clear All RFID Codes command. |
ZbZclDoorLockSetHDScheduleReqT
Set Holiday Schedule request structure
Parameters
uint8_t schedule_id | Holiday Schedule ID |
uint32_t local_start_time | Local Start Time |
uint32_t local_end_time | Local End Time |
uint8_t operating_mode | Operating Mode During Holiday |
ZbZclDoorLockSetHDScheduleRspT
Set Holiday Schedule response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockSetPinReqT
Set PIN Code request structure
Parameters
uint16_t user_id | User ID |
uint8_t user_status | User Status |
uint8_t user_type | User Type |
uint8_t pin | PIN |
uint8_t pin_len | Length of PIN |
ZbZclDoorLockSetPinRspT
Set PIN Code response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockSetRfidReqT
Set RFID Code request structure
Parameters
uint16_t user_id | User ID |
uint8_t user_status | User Status |
uint8_t user_type | User Type |
uint8_t rfid | RFID Code |
uint8_t rfid_len | Length of RFID Code |
ZbZclDoorLockSetRfidRspT
Set RFID Code response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockSetUserStatusReqT
Set User Status request structure
Parameters
uint16_t user_id | User ID |
uint8_t user_status | User Status |
ZbZclDoorLockSetUserStatusRspT
Set User Status response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockSetUserTypeReqT
Set User Type request structure
Parameters
uint16_t user_id | User ID |
uint8_t user_type | User Type |
ZbZclDoorLockSetUserTypeRspT
Set User Type response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockSetWDScheduleReqT
Set Weekday Schedule request structure
Parameters
uint8_t schedule_id | ScheduleID # |
uint16_t user_id | User ID |
uint8_t days_mask | Days Mask |
uint8_t start_hour | Start Hour |
uint8_t start_minute | Start Minute |
uint8_t end_hour | End Hour |
uint8_t end_minute | End Minute |
ZbZclDoorLockSetWDScheduleRspT
Set Weekday Schedule response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockSetYDScheduleReqT
Set Year Day Schedule request structure
Parameters
uint8_t schedule_id | Schedule ID |
uint16_t user_id | User ID |
uint32_t local_start_time | Local Start Time |
uint32_t local_end_time | Local End Time |
ZbZclDoorLockSetYDScheduleRspT
Set Year Day Schedule response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockToggleReqT
Toggle request structure
Parameters
uint8_t pin | PIN/RFID Code |
uint8_t pin_len | Length of PIN/RFID Code |
ZbZclDoorLockToggleRspT
Toggle response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockUnlockDoorReqT
Unlock Door request structure
Parameters
uint8_t pin | PIN/RFID Code |
uint8_t pin_len | Length of PIN/RFID Code |
ZbZclDoorLockUnlockDoorRspT
Unlock Door response structure
Parameters
uint8_t status | Status |
ZbZclDoorLockUnlockTimeoutReqT
Unlock with Timeout request structure
Parameters
uint16_t timeout | Timeout in seconds |
uint8_t pin | PIN/RFID Code |
uint8_t pin_len | Length of PIN/RFID Code |
ZbZclDoorLockUnlockTimeoutRspT
Unlock with Timeout response structure
Parameters
uint8_t status | Status |
6.2.10. Electrical Measurement
#include "zcl/general/zcl.elec.meas.h"
Functions
ZbZclElecMeasClientAlloc
struct ZbZclClusterT * ZbZclElecMeasClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Electrical Measurement Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclElecMeasClientGetMeasProfileReq
enum ZclStatusCodeT ZbZclElecMeasClientGetMeasProfileReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclElecMeasClientGetMeasProfileReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Measurement Profile command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Get Measurement Profile command structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclElecMeasClientGetProfileInfoReq
enum ZclStatusCodeT ZbZclElecMeasClientGetProfileInfoReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Profile Info command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclElecMeasServerAlloc
struct ZbZclClusterT * ZbZclElecMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclElecMeasSvrCallbacksT *callbacks, void *arg);
Create a new instance of the Electrical Measurement Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
callbacks | Structure containing any callback function pointers for this cluster |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
ZbZclElecMeasServerSendMeasProfileRsp
enum ZclStatusCodeT ZbZclElecMeasServerSendMeasProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclElecMeasSvrGetMeasProfileRspT *rsp);
Send a Get Measurement Profile response
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
rsp | Get Measurement Profile response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclElecMeasServerSendProfileInfoRsp
enum ZclStatusCodeT ZbZclElecMeasServerSendProfileInfoRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclElecMeasSvrGetProfileInfoRspT *rsp);
Send a Get Profile Info response
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
rsp | Get Profile Info response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclElecMeasSvrAttrT
Electrical Measurement Server Attribute IDs
ZCL_ELEC_MEAS_ATTR_MEAS_TYPE | MeasurementType |
ZCL_ELEC_MEAS_ATTR_DC_VOLT | DCVoltage (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_VOLT_MIN | DCVoltageMin (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_VOLT_MAX | DCVoltageMax (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_CURRENT | DCCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_CURRENT_MIN | DCCurrentMin (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_CURRENT_MAX | DCCurrentMax (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_POWER | DCPower (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_POWER_MIN | DCPowerMin (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_POWER_MAX | DCPowerMax (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_VOLT_MULTIPLIER | DCVoltageMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_VOLT_DIVISOR | DCVoltageDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_CURR_MULTIPLIER | DCCurrentMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_CURR_DIVISOR | DCCurrentDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_PWR_MULTIPLIER | DCPowerMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_PWR_DIVISOR | DCPowerDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_FREQ | ACFrequency (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_FREQ_MIN | ACFrequencyMin (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_FREQ_MAX | ACFrequencyMax (Optional) |
ZCL_ELEC_MEAS_ATTR_NEUTRAL_CURR | NeutralCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_TOTAL_ACTIVE_PWR | TotalActivePower (Optional) |
ZCL_ELEC_MEAS_ATTR_TOTAL_REACTIVE_PWR | TotalReactivePower (Optional) |
ZCL_ELEC_MEAS_ATTR_TOTAL_APPARENT_PWR | TotalApparentPower (Optional) |
ZCL_ELEC_MEAS_ATTR_1ST_HARM_CURR | Measured1stHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_3RD_HARM_CURR | Measured3rdHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_5TH_HARM_CURR | Measured5thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_7TH_HARM_CURR | Measured7thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_9TH_HARM_CURR | Measured9thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_11TH_HARM_CURR | Measured11thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_PHASE_1ST_HARM_CURR | MeasuredPhase1stHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_PHASE_3RD_HARM_CURR | MeasuredPhase3rdHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_PHASE_5TH_HARM_CURR | MeasuredPhase5thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_PHASE_7TH_HARM_CURR | MeasuredPhase7thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_PHASE_9TH_HARM_CURR | MeasuredPhase9thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_PHASE_11TH_HARM_CURR | MeasuredPhase11thHarmonicCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_FREQ_MULTIPLIER | ACFrequencyMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_FREQ_DIVISOR | ACFrequencyDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_PWR_MULTIPLIER | PowerMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_PWR_DIVISOR | PowerDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_HARM_CURR_MULTIPLIER | HarmonicCurrentMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_PHASE_CURR_MULTIPLIER | PhaseHarmonicCurrentMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_LINE_CURR | LineCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_CURR | ActiveCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_REACTIVE_CURR | ReactiveCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT | RMSVoltage (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MIN | RMSVoltageMin (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MAX | RMSVoltageMax (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR | RMSCurrent (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MIN | RMSCurrentMin (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MAX | RMSCurrentMax (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR | ActivePower (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MIN | ActivePowerMin (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MAX | ActivePowerMax (Optional) |
ZCL_ELEC_MEAS_ATTR_REACTIVE_PWR | ReactivePower (Optional) |
ZCL_ELEC_MEAS_ATTR_APPARENT_PWR | ApparentPower (Optional) |
ZCL_ELEC_MEAS_ATTR_PWR_FACTOR | PowerFactor (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_VOLT_PERIOD | AverageRMSVoltageMeasurementPeriod (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV_COUNT | AverageRMSOverVoltageCounter (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV_COUNT | AverageRMSUnderVoltageCounter (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OVER_PERIOD | RMSExtremeOverVoltagePeriod (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UNDER_PERIOD | RMSExtremeUnderVoltagePeriod (Optional) |
ZCL_ELEC_MEAS_ATTR_VOLT_SAG_PERIOD | RMSVoltageSagPeriod (Optional) |
ZCL_ELEC_MEAS_ATTR_VOLT_SWELL_PERIOD | RMSVoltageSwellPeriod (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_VOLT_MULTIPLIER | ACVoltageMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_VOLT_DIVISOR | ACVoltageDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_CURR_MULT | ACCurrentMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_CURR_DIVISOR | ACCurrentDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_PWR_MULTIPLIER | ACPowerMultiplier (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_PWR_DIVISOR | ACPowerDivisor (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_OL_ALARMS_MASK | DCOverloadAlarmsMask (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_VOLT_OL | DCVoltageOverload (Optional) |
ZCL_ELEC_MEAS_ATTR_DC_CURR_OL | DCCurrentOverload (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_ALARMS_MASK | ACAlarmsMask (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_VOLT_OL | ACVoltageOverload (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_CURR_OL | ACCurrentOverload (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_ACTIVE_PWR_OL | ACActivePowerOverload (Optional) |
ZCL_ELEC_MEAS_ATTR_AC_REACTIVE_PWR_OL | ACReactivePowerOverload (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV | AverageRMSOverVoltage (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV | AverageRMSUnderVoltage (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OV | RMSExtremeOverVoltage (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UV | RMSExtremeUnderVoltage (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_SAG | RMSVoltageSag (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_SWELL | RMSVoltageSwell (Optional) |
ZCL_ELEC_MEAS_ATTR_LINE_CURR_B | LineCurrentPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_CURR_B | ActiveCurrentPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_REACTIVE_CURR_B | ReactiveCurrentPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_B | RMSVoltagePhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MIN_B | RMSVoltageMinPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MAX_B | RMSVoltageMaxPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_B | RMSCurrentPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MIN_B | RMSCurrentMinPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MAX_B | RMSCurrentMaxPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_B | ActivePowerPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MIN_B | ActivePowerMinPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MAX_B | ActivePowerMaxPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_REACTIVE_PWR_B | ReactivePowerPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_APPARENT_PWR_B | ApparentPowerPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_PWR_FACTOR_B | PowerFactorPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_VOLT_PERIOD_B | AverageRMSVoltageMeasurementPeriodPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV_B | AverageRMSOverVoltageCounterPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV_B | AverageRMSUnderVoltageCounterPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OVER_B | RMSExtremeOverVoltagePeriodPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UNDER_B | RMSExtremeUnderVoltagePeriodPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_SAG_PERIOD_B | RMSVoltageSagPeriodPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_SWELL_PERIOD_B | RMSVoltageSwellPeriodPhB (Optional) |
ZCL_ELEC_MEAS_ATTR_LINE_CURR_C | LineCurrentPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_CURR_C | ActiveCurrentPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_REACTIVE_CURR_C | ReactiveCurrentPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_C | RMSVoltagePhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MIN_C | RMSVoltageMinPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MAX_C | RMSVoltageMaxPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_C | RMSCurrentPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MIN_C | RMSCurrentMinPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MAX_C | RMSCurrentMaxPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_C | ActivePowerPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MIN_C | ActivePowerMinPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MAX_C | ActivePowerMaxPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_REACTIVE_PWR_C | ReactivePowerPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_APPARENT_PWR_C | ApparentPowerPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_PWR_FACTOR_C | PowerFactorPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_VOLT_PERIOD_C | AverageRMSVoltageMeasurementPeriodPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV_C | AverageRMSOverVoltageCounterPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV_C | AverageRMSUnderVoltageCounterPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OVER_C | RMSExtremeOverVoltagePeriodPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UNDER_C | RMSExtremeUnderVoltagePeriodPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_SAG_PERIOD_C | RMSVoltageSagPeriodPhC (Optional) |
ZCL_ELEC_MEAS_ATTR_RMS_SWELL_PERIOD_C | RMSVoltageSwellPeriodPhC (Optional) |
Structures
ZbZclElecMeasClientGetMeasProfileReqT
Get Measurement Profile command structure
Parameters
uint16_t attr_id | Attribute ID |
uint32_t start_time | Start Time |
uint8_t num_intervals | NumberOfIntervals |
ZbZclElecMeasSvrCallbacksT
Electrical Measurement Server callbacks configuration
Parameters
get_profile_info
(callback function pointer) |
enum ZclStatusCodeT (*get_profile_info)(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Get Profile Info command. |
get_meas_profile
(callback function pointer) |
enum ZclStatusCodeT (*get_meas_profile)(struct ZbZclClusterT *clusterPtr, struct ZbZclElecMeasClientGetMeasProfileReqT *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Get Measurement Profile command. |
ZbZclElecMeasSvrGetMeasProfileRspT
Get Measurement Profile response structure
Parameters
uint32_t start_time | StartTime |
uint8_t status | Status |
uint8_t profile_interval_period | ProfileIntervalPeriod |
uint8_t num_intervals_delivered | NumberOfIntervalsDelivered |
uint16_t attr_id | Attribute ID |
uint8_t *interval_data | Intervals |
uint16_t interval_len | Number of Intervals |
ZbZclElecMeasSvrGetProfileInfoRspT
Get Profile Info response structure
Parameters
uint8_t profile_count | Profile Count |
uint8_t profile_interval_period | ProfileIntervalPeriod |
uint8_t max_num_intervals | MaxNumberOfIntervals |
uint16_t *attr_list | ListOfAttributes |
6.2.11. Fan Control
#include "zcl/general/zcl.fan.h"
Functions
ZbZclFanClientAlloc
struct ZbZclClusterT * ZbZclFanClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Fan Control Client cluster
Parameters'
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclFanServerAlloc
struct ZbZclClusterT * ZbZclFanServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Fan Control Server cluster
Parameters'
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclFanModeT
Fan Mode Attribute Values
ZCL_FAN_MODE_OFF | Off |
ZCL_FAN_MODE_LOW | Low |
ZCL_FAN_MODE_MED | Medium |
ZCL_FAN_MODE_HI | High |
ZCL_FAN_MODE_ON | On |
ZCL_FAN_MODE_AUTO | Auto (the fan speed is self-regulated) |
ZCL_FAN_MODE_SMART | Smart (when the heated/cooled space is occupied, the fan is always on) |
ZbZclFanSeqT
Fan Sequence Operation Attribute Values
ZCL_FAN_SEQ_LMH | Low/Med/High |
ZCL_FAN_SEQ_LH | Low/High |
ZCL_FAN_SEQ_LMHA | Low/Med/High/Auto |
ZCL_FAN_SEQ_LHA | Low/High/Auto |
ZCL_FAN_SEQ_OA | On/Auto |
ZbZclFanSvrAttrT
Fan Control Server Attribute IDs
ZCL_FAN_ATTR_MODE | FanMode |
ZCL_FAN_ATTR_SEQUENCE | FanModeSequence |
6.2.12. Groups
#include "zcl/general/zcl.groups.h"
Functions
ZbZclGroupsClientAddIdentifyingReq
enum ZclStatusCodeT ZbZclGroupsClientAddIdentifyingReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientAddIdentifyingReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Add Group If Identifying command
Parameters
cluster | Cluster instance from which to send this command |
req | Add Group If Identifying command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclGroupsClientAddReq
enum ZclStatusCodeT ZbZclGroupsClientAddReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientAddReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Add Group command
Parameters
cluster | Cluster instance from which to send this command |
req | Add Group command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclGroupsClientAlloc
struct ZbZclClusterT * ZbZclGroupsClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Groups Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclGroupsClientGetMembershipReq
enum ZclStatusCodeT ZbZclGroupsClientGetMembershipReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientGetMembershipReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Group Membership command
Parameters
cluster | Cluster instance from which to send this command |
req | Get Group Membership command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclGroupsClientRemoveAllReq
enum ZclStatusCodeT ZbZclGroupsClientRemoveAllReq(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Remove All Groups command
Parameters
cluster | Cluster instance from which to send this command |
req | Remove All Group command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclGroupsClientRemoveReq
enum ZclStatusCodeT ZbZclGroupsClientRemoveReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientRemoveReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Remove Group command
Parameters
cluster | Cluster instance from which to send this command |
req | Remove Group command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclGroupsClientViewReq
enum ZclStatusCodeT ZbZclGroupsClientViewReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientViewReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a View Group command
Parameters
cluster | Cluster instance from which to send this command |
req | View Group command request structure |
callback | Callback function that will be invoked when the response is received. |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclGroupsServerAlloc
struct ZbZclClusterT * ZbZclGroupsServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Groups Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclGroupsSvrAttrT
Groups Server Attribute IDs
ZCL_GROUPS_ATTR_NAME_SUPPORT | NameSupport |
Structures
ZbZclGroupsClientAddIdentifyingReqT
Add Group If Identifying command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
uint16_t group_id | Group ID |
ZbZclGroupsClientAddReqT
Add Group command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
uint16_t group_id | Group ID |
ZbZclGroupsClientGetMembershipReqT
Get Group Membership command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
uint8_t num_groups | Group count |
uint16_t group_list | Group list |
ZbZclGroupsClientRemoveReqT
Remove Group command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
uint16_t group_id | Group ID |
ZbZclGroupsClientViewReqT
View Group command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
uint16_t group_id | Group ID |