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 |
6.2.13. Identify
#include "zcl/general/zcl.identify.h"
Functions
ZbZclIdentifyClientAlloc
struct ZbZclClusterT * ZbZclIdentifyClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Identify Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclIdentifyServerAlloc
struct ZbZclClusterT * ZbZclIdentifyServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, const struct zcl_identify_server_callbacks_t *callbacks, void *arg);
Create a new instance of the Identify Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
ZbZclIdentifyServerGetTime
uint16_t ZbZclIdentifyServerGetTime(struct ZbZclClusterT *cluster);
Get the local Identify Server time
Parameters
cluster | Cluster instance with timer to get |
Return
- uint16_t Time remaining in zigbee timer
ZbZclIdentifyServerSetTime
void ZbZclIdentifyServerSetTime(struct ZbZclClusterT *cluster, uint16_t seconds);
Set the local Identify Server time
If BDB_COMMISSION_MODE_FIND_BIND is enabled and seconds > 0, seconds is adjusted to be >= ZB_BDBC_MinCommissioningTime
Parameters
cluster | Cluster instance with timer to set |
seconds | Seconds for updating the identify time counter |
Return
- Void
zcl_identify_cli_identify_req
enum ZclStatusCodeT zcl_identify_cli_identify_req(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, uint16_t identify_time, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Identify command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
identify_time | Time which will be used to set the IdentifyTime attribute |
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
zcl_identify_cli_query_req
enum ZclStatusCodeT zcl_identify_cli_query_req(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Identify Query 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
Enumerations
ZbZclIdentifySvrAttrT
Identify Server Attribute IDs
ZCL_IDENTIFY_ATTR_TIME | IdentifyTime |
6.2.14. Illuminance Level Sensing
#include "zcl/general/zcl.illum.level.h"
Functions
ZbZclIllumLevelClientAlloc
struct ZbZclClusterT * ZbZclIllumLevelClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Illuminance Level Sensing Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclIllumLevelServerAlloc
struct ZbZclClusterT * ZbZclIllumLevelServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Illuminance Level Sensing 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
ZbZclIllumLevelSvrAttrT
Attribute Identifiers
ZCL_ILLUM_LEVEL_ATTR_LEVEL_STATUS | LevelStatus |
ZCL_ILLUM_LEVEL_ATTR_LIGHT_SENSOR_TYPE | LightSensorType |
ZCL_ILLUM_LEVEL_ATTR_ILLUM_TARGET_LEVEL | IlluminanceTargetLevel |
6.2.15. Illuminance Measurement
#include "zcl/general/zcl.illum.meas.h"
Functions
ZbZclIllumMeasClientAlloc
struct ZbZclClusterT * ZbZclIllumMeasClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Illuminance 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
ZbZclIllumMeasServerAlloc
struct ZbZclClusterT * ZbZclIllumMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t min, uint16_t max);
Create a new instance of the Illuminance Measurement Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
min | Minimum value capable of being measured (MinMeasuredValue) |
max | Maximum value capable of being measured (MaxMeasuredValue) |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclIllumMeasSvrAttrT
Illuminance Measurement Server Attribute IDs
ZCL_ILLUM_MEAS_ATTR_MEAS_VAL | MeasuredValue |
ZCL_ILLUM_MEAS_ATTR_MIN_MEAS_VAL | MinMeasuredValue |
ZCL_ILLUM_MEAS_ATTR_MAX_MEAS_VAL | MaxMeasuredValue |
ZCL_ILLUM_MEAS_ATTR_TOLERANCE | Tolerance (Optional) |
ZCL_ILLUM_MEAS_ATTR_LIGHT_SENSOR_TYPE | LightSensorType (Optional) |
6.2.16. Level
#include "zcl/general/zcl.level.h"
Functions
ZbZclLevelClientAlloc
struct ZbZclClusterT * ZbZclLevelClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Level Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclLevelClientMoveReq
enum ZclStatusCodeT ZbZclLevelClientMoveReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclLevelClientMoveReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move 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
ZbZclLevelClientMoveToFreqReq
enum ZclStatusCodeT ZbZclLevelClientMoveToFreqReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclLevelClientMoveToFreqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move to Frequency command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Stop 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
ZbZclLevelClientMoveToLevelReq
enum ZclStatusCodeT ZbZclLevelClientMoveToLevelReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclLevelClientMoveToLevelReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Move to Level command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Move To Level 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
ZbZclLevelClientStepReq
enum ZclStatusCodeT ZbZclLevelClientStepReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclLevelClientStepReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Step command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | 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
ZbZclLevelClientStopReq
enum ZclStatusCodeT ZbZclLevelClientStopReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclLevelClientStopReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Stop command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Stop 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
ZbZclLevelServerAlloc
struct ZbZclClusterT * ZbZclLevelServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *onoff_server, struct ZbZclLevelServerCallbacksT *callbacks, void *arg);
Create a new instance of the Level 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 |
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
Enumerations
ZbZclLevelSvrAttrT
Level Server Attribute IDs
ZCL_LEVEL_ATTR_CURRLEVEL | CurrentLevel |
ZCL_LEVEL_ATTR_REMAINTIME | RemainingTime (Optional) |
ZCL_LEVEL_ATTR_MINLEVEL | MinLevel (Optional) |
ZCL_LEVEL_ATTR_MAXLEVEL | MaxLevel (Optional) |
ZCL_LEVEL_ATTR_CURRFREQ | CurrentFrequency (Optional) |
ZCL_LEVEL_ATTR_MINFREQ | MinFrequency (Optional) |
ZCL_LEVEL_ATTR_MAXFREQ | MaxFrequency (Optional) |
ZCL_LEVEL_ATTR_OPTIONS | OnOffTransitionTime (Optional) |
ZCL_LEVEL_ATTR_ONOFF_TRANS_TIME | OnLevel (Optional) |
ZCL_LEVEL_ATTR_ONLEVEL | OnTransitionTime (Optional) |
ZCL_LEVEL_ATTR_ON_TRANS_TIME | OffTransitionTime (Optional) |
ZCL_LEVEL_ATTR_OFF_TRANS_TIME | DefaultMoveRate (Optional) |
ZCL_LEVEL_ATTR_DEFAULT_MOVE_RATE | Options (Optional) |
ZCL_LEVEL_ATTR_STARTUP_CURRLEVEL | StartUpCurrentLevel (Optional) |
Structures
ZbZclLevelClientMoveReqT
Move command structure
Parameters
bool with_onoff | With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_MOVE_ONOFF, else ZCL_LEVEL_CLI_CMD_MOVE |
uint8_t mode | Mode |
uint8_t rate | Rate |
uint8_t mask | OptionsMask - Not included if with_onoff is true |
uint8_t override | OptionsOverride - Not included if with_onoff is true |
ZbZclLevelClientMoveToFreqT
Move to Closest Frequency command structure
Parameters
uint16_t freq | Frequency |
ZbZclLevelClientMoveToLevelReqT
Move To Level command structure
Parameters
bool with_onoff | With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_MOVE_LEVEL_ONOFF, else ZCL_LEVEL_CLI_CMD_MOVE_LEVEL |
uint8_t level | Level |
uint16_t transition_time | Transition time |
uint8_t mask | OptionsMask - Not included if with_onoff is true |
uint8_t override | OptionsOverride - Not included if with_onoff is true |
ZbZclLevelClientStepReqT
Step command structure
Parameters
bool with_onoff | With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_STEP_ONOFF, else ZCL_LEVEL_CLI_CMD_STEP |
uint8_t mode | Mode |
uint8_t size | Size |
uint16_t transition_time | Transition Time |
uint8_t mask | OptionsMask - Not included if with_onoff is true |
uint8_t override | OptionsOverride - Not included if with_onoff is true |
ZbZclLevelClientStopReqT
Stop command structure
Parameters
bool with_onoff | With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_STOP_ONOFF, else ZCL_LEVEL_CLI_CMD_STOP |
uint8_t mask | OptionsMask - Not included if with_onoff is true |
uint8_t override | OptionsOverride - Not included if with_onoff is true |
ZbZclLevelServerCallbacksT
Level Server callbacks configuration
Parameters
move_to_level
(callback function pointer) |
enum ZclStatusCodeT (*move_to_level)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientMoveToLevelReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of a Move To Level command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute. |
move
(callback function pointer) |
enum ZclStatusCodeT (*move)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientMoveReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of a Move command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute. |
step
(callback function pointer) |
enum ZclStatusCodeT (*step)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientStepReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of a Step command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute. |
stop
(callback function pointer) |
enum ZclStatusCodeT (*stop)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientStopReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of a Stop command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute. |
move_to_freq
(callback function pointer) |
enum ZclStatusCodeT (*move_to_freq)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientMoveToFreqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of a Move to Frequency command. The application is expected to update the ZCL_LEVEL_ATTR_CURRFREQ attribute. |
6.2.17. Meter Identification
#include "zcl/general/zcl.meter.id.h"
Functions
ZbZclMeterIdClientAlloc
struct ZbZclClusterT * ZbZclMeterIdClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Meter Identification Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclMeterIdServerAlloc
struct ZbZclClusterT * ZbZclMeterIdServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Meter Identification 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
ZbZclMeterIdSvrAttrT
Attribute Identifiers
ZCL_METER_ID_ATTR_COMPANY_NAME | CompanyName |
ZCL_METER_ID_ATTR_METER_TYPE_ID | MeterTypeID |
ZCL_METER_ID_ATTR_DATA_QUAL_ID | DataQualityID |
ZCL_METER_ID_ATTR_CUSTOMER_NAME | CustomerName (Optional) |
ZCL_METER_ID_ATTR_MODEL | Model (Optional) |
ZCL_METER_ID_ATTR_PART_NUMBER | PartNumber (Optional) |
ZCL_METER_ID_ATTR_PRODUCT_REV | ProductRevision (Optional) |
ZCL_METER_ID_ATTR_SOFTWARE_REV | SoftwareRevision (Optional) |
ZCL_METER_ID_ATTR_UTILITY_NAME | UtilityName (Optional) |
ZCL_METER_ID_ATTR_POD | POD |
ZCL_METER_ID_ATTR_AVAILABLE_POWER | AvailablePower |
ZCL_METER_ID_ATTR_POWER_THRESH | PowerThreshold |
6.2.18. Nearest Gateway
#include "zcl/general/zcl.nearest.gw.h"
Functions
ZbZclNearestGwClientAlloc
struct ZbZclClusterT * ZbZclNearestGwClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Nearest Gateway client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclNearestGwServerAlloc
struct ZbZclClusterT * ZbZclNearestGwServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Nearest Gateway 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
ZbZclNearestGwServerAttrT
Nearest Gateway Attribute Ids
ZCL_NEAREST_GW_SVR_ATTR_NEAREST_GW | Nearest Gateway |
ZCL_NEAREST_GW_SVR_ATTR_NEW_MOBILE_NODE | New Mobile Node |
6.2.19. Occupancy Sensing
#include "zcl/general/zcl.occupancy.h"
Functions
ZbZclOccupancyClientAlloc
struct ZbZclClusterT * ZbZclOccupancyClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Occupancy Sensing Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclOccupancyServerAlloc
struct ZbZclClusterT * ZbZclOccupancyServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Occupancy Sensing 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
ZbZclOccupancySvrAttrT
Occupancy Sensing Server Attribute IDs
ZCL_OCC_ATTR_OCCUPANCY | Occupancy |
ZCL_OCC_ATTR_SENSORTYPE | OccupancySensorType |
ZCL_OCC_ATTR_SENSORTYPE_BITMAP | OccupancySensorTypeBitmap |
ZCL_OCC_ATTR_PIR_OU_DELAY | PIROccupiedToUnoccupiedDelay (Optional) |
ZCL_OCC_ATTR_PIR_UO_DELAY | PIRUnoccupiedToOccupiedDelay (Optional) |
ZCL_OCC_ATTR_PIR_UO_THRESHOLD | PIRUnoccupiedToOccupiedThreshold (Optional) |
ZCL_OCC_ATTR_US_OU_DELAY | UltrasonicOccupiedToUnoccupiedDelay (Optional) |
ZCL_OCC_ATTR_US_UO_DELAY | UltrasonicUnoccupiedToOccupiedDelay (Optional) |
ZCL_OCC_ATTR_US_UO_THRESHOLD | UltrasonicUnoccupiedToOccupiedThreshold (Optional) |
ZCL_OCC_ATTR_PHY_OU_DELAY | PhysicalContactOccupiedToUnoccupiedDelay (Optional) |
ZCL_OCC_ATTR_PHY_UO_DELAY | PhysicalContactUnoccupiedToOccupiedDelay (Optional) |
ZCL_OCC_ATTR_PHY_UO_THRESHOLD | PhysicalContactUnoccupiedToOccupiedThreshold (Optional) |
6.2.20. On/Off Switch Configuration
#include "zcl/general/zcl.onoff.swconfig.h"
Functions
ZbZclOnOffSwConfigClientAlloc
struct ZbZclClusterT * ZbZclOnOffSwConfigClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the OnOff Switch 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
ZbZclOnOffSwConfigServerAlloc
struct ZbZclClusterT * ZbZclOnOffSwConfigServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint8_t switch_type);
Create a new instance of the OnOff Switch Configuration Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
switch_type | Type of switch associated with this cluster server |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclOnOffSwConfigSvrAttrId
Onoff Switch Configuration cluster attribute IDs
ZCL_ONOFF_SWCONFIG_ATTR_TYPE | SwitchType |
ZCL_ONOFF_SWCONFIG_ATTR_ACTIONS | SwitchActions |
6.2.21. On/Off
#include "zcl/general/zcl.onoff.h"
Functions
ZbZclOnOffClientAlloc
struct ZbZclClusterT * ZbZclOnOffClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the OnOff Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclOnOffClientOffReq
enum ZclStatusCodeT ZbZclOnOffClientOffReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Off 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 included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclOnOffClientOnReq
enum ZclStatusCodeT ZbZclOnOffClientOnReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an On 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 included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclOnOffClientToggleReq
enum ZclStatusCodeT ZbZclOnOffClientToggleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Toggle 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 included in the callback when invoked. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclOnOffServerAlloc
struct ZbZclClusterT * ZbZclOnOffServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclOnOffServerCallbacksT *callbacks, void *arg);
Create a new instance of the OnOff 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
ZbZclOnOffServerSetLevelControlCallback
void ZbZclOnOffServerSetLevelControlCallback(struct ZbZclClusterT *on_off_cluster, struct ZbZclClusterT *level_cluster, ZbZclLevelControlCallbackT levelControlCallback);
Set the Level control callback
Parameters
on_off_cluster | OnOff cluster instance |
level_cluster | Level cluster instance |
levelControlCallback | Level control callback function |
Return
- Void
Enumerations
ZbZclOnOffSvrAttrT
OnOff Server Attribute IDs
ZCL_ONOFF_ATTR_ONOFF | OnOff |
ZCL_ONOFF_ATTR_GLOBAL_SCENE_CONTROL | GlobalSceneControl (Optional) |
ZCL_ONOFF_ATTR_ON_TIME | OnTime (Optional) |
ZCL_ONOFF_ATTR_OFF_WAIT_TIME | OffWaitTime (Optional) |
Structures
ZbZclOnOffServerCallbacksT
OnOff Server callbacks configuration
Parameters
off
(callback function pointer) |
enum ZclStatusCodeT (*off)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of an Off command. The application is expected to update ZCL_ONOFF_ATTR_ONOFF. |
on
(callback function pointer) |
enum ZclStatusCodeT (*on)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of an On command. The application is expected to update ZCL_ONOFF_ATTR_ONOFF. |
toggle
(callback function pointer) |
enum ZclStatusCodeT (*toggle)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of a Toggle command. The application is expected to update ZCL_ONOFF_ATTR_ONOFF. |
6.2.22. Over-The-Air Upgrade
#include "zcl/general/zcl.ota.h"
Functions
ZbZclOtaClientAlloc
struct ZbZclClusterT * ZbZclOtaClientAlloc(struct ZigBeeT *zb, struct ZbZclOtaClientConfig *config, void *arg);
Create a new instance of the OTA Upgrade Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
config | Pointer to OTA client configuration structure |
arg | Pointer to application data provided in initiating API call |
Return
- Cluster pointer, or NULL if there is an error
ZbZclOtaClientDiscover
enum ZclStatusCodeT ZbZclOtaClientDiscover(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *addr);
Discover OTA Upgrade Server
Parameters
cluster | Cluster instance from which to send this command |
addr | Destination address for discovery |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclOtaClientDiscoverForced
void ZbZclOtaClientDiscoverForced(struct ZbZclClusterT *cluster, uint64_t ieee, uint8_t endpoint);
Set the OTA Upgrade Server directly (without discovery)
Parameters
cluster | Cluster instance from which to send this command |
ieee | OTA Upgrade server IEEE address |
endpoint | Endpoint on which to create cluster |
Return
- None
ZbZclOtaClientGetDefaultCallbacks
void ZbZclOtaClientGetDefaultCallbacks(struct ZbZclOtaClientCallbacksT *callbacks);
Load the default callbacks for ECDSA Suite 2 support
Parameters
callbacks | Structure containing any callback function pointers for this cluster |
Return
- None
ZbZclOtaClientImageTransferResume
enum ZclStatusCodeT ZbZclOtaClientImageTransferResume(struct ZbZclClusterT *cluster);
Resume an OTA Upgrade transfer. ZbZclOtaClientImageTransferResume is called if the NHLE (app) returned ZCL_STATUS_WAIT_FOR_DATA for the write_image callback. The OTA Client won’t request the next block of data in this case, until this function is called.
Parameters
cluster | Cluster instance from which to send this command |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclOtaClientImageTransferStart
enum ZclStatusCodeT ZbZclOtaClientImageTransferStart(struct ZbZclClusterT *cluster);
Initiate an OTA Upgrade transfer.
Parameters
cluster | Cluster instance from which to send this command |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclOtaClientQueryNextImageReq
enum ZclStatusCodeT ZbZclOtaClientQueryNextImageReq(struct ZbZclClusterT *cluster, struct ZbZclOtaImageDefinition *image_definition, uint8_t field_control, uint16_t hardware_version);
Send a Query Next Image Request command. If a response is received, or an error occurs, the 'query_next' callback is invoked to the application.
Parameters
cluster | Cluster instance from which to send this command |
image_definition | OTA Header Image Definition structure (See 'struct ZbZclOtaImageDefinition') |
field_control | Field Control |
hardware_version | Hardware Version to include in request, unless set to 0xff. |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.
ZbZclOtaHeaderParse
uint8_t ZbZclOtaHeaderParse(const uint8_t *payload, const uint8_t length, struct ZbZclOtaHeader *header);
Parse an OTA Upgrade payload buffer’s header information
Parameters
payload | OTA Upgrade Payload buffer |
length | Length of OTA Upgrade Payload |
header | OTA Upgrade Header Fields structure |
Return
- Number of bytes parsed
ZbZclOtaServerAlloc
struct ZbZclClusterT * ZbZclOtaServerAlloc(struct ZigBeeT *zb, struct ZbZclOtaServerConfig
- config, void *arg);
Create a new instance of the OTA Upgrade Server cluster
Parameters
zb | Zigbee stack instance |
config | OTA Upgrade Server Configuration structure |
arg | Pointer to application data that will later be provided back to the callback function when invoked |
Return
- Cluster pointer, or NULL if there is an error
ZbZclOtaServerImageNotifyReq
enum ZclStatusCodeT ZbZclOtaServerImageNotifyReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, uint8_t payload_type, uint8_t jitter, struct ZbZclOtaImageDefinition *image_definition);
Send an OTA Image Notify Server command Registering an image does not automatically send an Image Notify message, the OTA Server application can use ZbZclOtaServerImageNotifyReq after registering an image to notify clients of the availability of a new image
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
payload_type | Payload Type |
jitter | Jitter |
image_definition | OTA Header Image Definition structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclOtaServerUpgradeEndRespUnsolic
enum ZclStatusCodeT ZbZclOtaServerUpgradeEndRespUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclOtaImageDefinition *image_definition, struct ZbZclOtaEndResponseTimes *end_response_times);
Send an Unsolicited OTA Upgrade End Response. This command is sent at some point in time after receiving the Upgrade End Request, which was already responsed to by a Default Response. This should be the normal way to handle the Upgrade End commands, rather than the Solicated Upgrade End Response (ZbZclOtaServerUpgradeEndRespSolic).
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
image_definition | OTA Header Image Definition |
end_response_times | Upgrade End Response command |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclOtaActivationPolicy
OTA Upgrade UpgradeActivationPolicy enumerations
ZCL_OTA_ACTIVATION_POLICY_SERVER | OTA Server Activation Allowed |
ZCL_OTA_ACTIVATION_POLICY_OUT_OF_BAND | Out-of-band Activation Only |
ZbZclOtaHeaderFieldCtrlBitmask
OTA Upgrade Header Field Control Bitmask enumerations
ZCL_OTA_HEADER_FIELD_CONTROL_SECURITY_VERSION | Security Credential Version Present |
ZCL_OTA_HEADER_FIELD_CONTROL_DEVICE_SPECIFIC | Device Specific File |
ZCL_OTA_HEADER_FIELD_CONTROL_HARDWARE_VERSI ONS | Hardware Versions Present |
ZbZclOtaImageBlkReqFldCtrl
OTA Upgrade Image Block Request Field Control Bitmask enumerations
ZCL_OTA_IMAGE_BLOCK_FC_IEEE | Request node’s IEEE address Present |
ZCL_OTA_IMAGE_BLOCK_FC_MIN_PERIOD | MinimumBlockPeriod present |
ZbZclOtaImageNotifyCmd
OTA Upgrade Image Notify Command Payload enumerations
ZCL_OTA_NOTIFY_TYPE_JITTER | Query jitter |
ZCL_OTA_NOTIFY_TYPE_MFG_CODE | Query jitter and manufacturer code |
ZCL_OTA_NOTIFY_TYPE_IMAGE_TYPE | Query jitter, manufacturer code, and image type |
ZCL_OTA_NOTIFY_TYPE_FILE_VERSION | Query jitter, manufacturer code, image type, and new file version |
ZbZclOtaImageType
OTA Upgrade Image Types enumerations
ZCL_OTA_IMAGE_TYPE_MFG_MIN | Manufacturer Specific (start) |
ZCL_OTA_IMAGE_TYPE_MFG_MAX | Manufacturer Specific (end) |
ZCL_OTA_IMAGE_TYPE_CLI_SECURITY_CRED | Client Security credentials |
ZCL_OTA_IMAGE_TYPE_CLI_CONFIG | Client Configuration |
ZCL_OTA_IMAGE_TYPE_SERVER_LOG | Server Log |
ZCL_OTA_IMAGE_TYPE_PICTURE | Picture |
ZCL_OTA_IMAGE_TYPE_WILDCARD | Wild Card |
ZbZclOtaQueryFldCtrlHwVer
OTA Upgrade Field Control Hardware Version enumerations
ZCL_OTA_QUERY_FIELD_CONTROL_HW_VERSION | Hardware Version |
ZbZclOtaSecCredential
OTA Upgrade Security Credential Version enumerations
ZCL_OTA_SEC_CRED_SE_1_0 | SE 1.0 |
ZCL_OTA_SEC_CRED_SE_1_1 | SE 1.1 |
ZCL_OTA_SEC_CRED_SE_2_0 | SE 2.0 |
ZCL_OTA_SEC_CRED_SE_1_2 | SE 1.2 |
ZbZclOtaStackVersion
OTA Upgrade Zigbee Stack Version Values
ZCL_OTA_STACK_VERSION_2006 | ZigBee 2006 |
ZCL_OTA_STACK_VERSION_2007 | ZigBee 2007 |
ZCL_OTA_STACK_VERSION_PRO | ZigBee Pro |
ZCL_OTA_STACK_VERSION_IP | ZigBee IP |
ZbZclOtaStatus
OTA Upgrade Status Attribute Values (ImageUpgradeStatus)
ZCL_OTA_STATUS_NORMAL | Normal |
ZCL_OTA_STATUS_DOWNLOAD_IN_PROGRESS | Download in progress |
ZCL_OTA_STATUS_DOWNLOAD_COMPLETE | Download complete |
ZCL_OTA_STATUS_WAITING_TO_UPGRADE | Waiting to upgrade |
ZCL_OTA_STATUS_COUNT_DOWN | Count down |
ZCL_OTA_STATUS_WAIT_FOR_MORE | Wait for more |
ZCL_OTA_STATUS_WAIT_UPGRADE_EXT | Waiting to Upgrade via External Event |
ZbZclOtaSubElementTag
OTA Upgrade Tag Identifiers enumerations
ZCL_OTA_SUB_TAG_UPGRADE_IMAGE | Upgrade Image |
ZCL_OTA_SUB_TAG_ECDSA_SIG1 | ECDSA Signature (Crypto Suite 1) |
ZCL_OTA_SUB_TAG_ECDSA_CERT_1 | ECDSA Signing Certificate (Crypto Suite 1) |
ZCL_OTA_SUB_TAG_IMAGE_INTEGRITY_CODE | Image Integrity Code |
ZCL_OTA_SUB_TAG_PICTURE_DATA | Picture Data |
ZCL_OTA_SUB_TAG_ECDSA_SIG2 | ECDSA Signature (Crypto Suite 2) |
ZCL_OTA_SUB_TAG_ECDSA_CERT_2 | ECDSA Signing Certificate (Crypto Suite 2) |
ZbZclOtaSvrAttrId
OTA Upgrade Server Attribute IDs
ZCL_OTA_ATTR_UPGRADE_SERVER_ID | UpgradeServerID |
ZCL_OTA_ATTR_FILE_OFFSET | FileOffset (Optional).
When writing a non-zero value to ZCL_OTA_ATTR_FILE_OFFSET, the entire OTA Header must have already been received by this cluster. This can be used to resume a transfer that was interrupted by the local device being power cycled in the middle of an OTA download. The procedure in this case is to start the transfer over (ZbZclOtaClientImageTransferStart) and during the first write_image() callback to the application, you write a new value to the FileOffset attribute before returning from the callback. The OTA Client will then request the next block starting from the new FileOffset. During the write_image() callback, the application can also compare that the current OTA header matches the previous one, if saved before the reset. If relying on the Integrity Code (hash), the application must define it’s own image_validate() callback. This is because data that has already been saved to NVM will be skipped by the OTA Client after the reset, so the running hash is no longer valid. |
ZCL_OTA_ATTR_CURRENT_FILE_VERSION | CurrentFileVersion (Optional) |
ZCL_OTA_ATTR_CURRENT_STACK_VERSION | CurrentZigBeeStackVersion (Optional) |
ZCL_OTA_ATTR_DOWNLOAD_FILE_VERSION | DownloadedFileVersion (Optional) |
ZCL_OTA_ATTR_DOWNLOAD_STACK_VERSION | DownloadedZigBeeStackVersion (Optional) |
ZCL_OTA_ATTR_IMAGE_UPGRADE_STATUS | ImageUpgradeStatus (Optional).
Writing ZCL_OTA_STATUS_NORMAL (0) to this attribute will reset the cluster back to defaults. |
ZCL_OTA_ATTR_MANUFACTURER_ID | ManufacturerID (Optional) |
ZCL_OTA_ATTR_IMAGE_TYPE_ID | ImageTypeID (Optional) |
ZCL_OTA_ATTR_MIN_BLOCK_PERIOD | MinimumBlockPeriod (Optional) |
ZCL_OTA_ATTR_IMAGE_STAMP | ImageStamp (Optional) |
ZCL_OTA_ATTR_UPGRADE_ACTIVATION_POLICY | UpgradeActivationPolicy (Optional) |
ZCL_OTA_ATTR_UPGRADE_TIMEOUT_POLICY | UpgradeTimeoutPolicy (Optional) |
ZbZclOtaTimeoutPolicy
OTA Upgrade UpgradeTimeoutPolicy enumerations
ZCL_OTA_TIMEOUT_POLICY_APPLY_UPGRADE | Apply Upgrade After Timeout |
ZCL_OTA_TIMEOUT_POLICY_DO_NOT_APPLY | Do not Apply Upgrade After Timeout |
Structures
ZbZclOtaClientCallbacksT
OTA Upgrade callbacks configuration
Parameters
discover_complete
(callback function pointer) |
void (*discover_complete)(struct ZbZclClusterT *cluster, enum ZclStatusCodeT status, void *arg)
Callback to Server, invoked on discovery of OTA Upgrade Server. If NULL and ZbZclOtaClientDiscover is successful, the default handler will automatically call ZbZclOtaClientQueryNextImageReq. |
image_notify
(callback function pointer) |
enum ZclStatusCodeT (*image_notify)(struct ZbZclClusterT *cluster, uint8_t payload_type, uint8_t jitter, struct ZbZclOtaImageDefinition *image_definition, struct ZbApsdeDataIndT *data_ind, struct ZbZclHeaderT *zcl_header)
Callback to Server, invoked on receipt of Image Notify Server command If NULL, the OTA Client has default callback handlers to take care of a typical OTA firmware upgrade file. Callback Function Parameters:
The value of the payload type from the Image Notify command payload. The value indicates which parameters in the image_definition are valid.
The value of the query jitter from the Image Notify command payload. The jitter is used to decide if the client should drop the command or not. Refer to section 11.13.3.4 (Effect on Receipt) of the ZCL6 spec.
Pointer to the parsed image definition of the image from the Image notify payload.
The manufacturer code for this image.
The manufacturer specific image type, defined by the manufacturer.
The file version.
Pointer to the incoming APSDE-DATA.indication struct.
Pointer to the incoming ZCL Header struct. |
query_next
(callback function pointer) |
void (*query_next)(struct ZbZclClusterT *cluster, enum ZclStatusCodeT status, struct ZbZclOtaImageDefinition image_definition, uint32_t image_size, void *arg)
Callback to Server, invoked on receipt of Query Next Image Response command. If no image was found, the status will be set to ZCL_STATUS_NO_IMAGE_AVAILABLE. Otherwise the status should be set to ZCL_STATUS_SUCCESS from the OTA Server. |
update_raw
(callback function pointer) |
enum ZclStatusCodeT (*update_raw)(struct ZbZclClusterT *cluster, uint8_t length, uint8_t *data, void *arg)
Raw image data is sent through this callback, to update running hash of image for example. Normally, this callback should be left to use the cluster’s default internal handler, but if the application does define its own callback, it must also provide its own handler for the 'image_validate' callback. Return code is ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE). Callback Function Parameters:
The length of the data to be written in this invocation
The data to be written |
write_tag
(callback function pointer) |
enum ZclStatusCodeT (*write_tag)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint16_t tag_id, uint32_t tag_length, uint8_t data_length, uint8_t *data, void *arg)
Callback to write tag sub-element information. Normally this is left as-is after the cluster is allocated to use the default internal callback handler. The default handler will call the 'write_image' callback to process any image tag data (i.e. the actual firmware binary). Callback Function Parameters:
A pointer to the OTA header from the start of the transferred, see Table 11-2 OTA Header Fields in the OTA spec
The tag id for the data to be written, see Table 11-9 Tag Identifiers
The total length of data assocated with this tag. This value will remain constant for a given image for each tag id
The length of the data to be written in this invocation
The data to be written Return Code: ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE). |
write_image
(callback function pointer) |
enum ZclStatusCodeT (*write_image)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint8_t length, uint8_t *data, void *arg)
If not NULL, this is called by the cluster’s default 'write_tag' handler for ZCL_OTA_SUB_TAG_UPGRADE_IMAGE data. If the application has provided its own 'write_tag' handler, then this callback is not used. Callback Function Parameters:
A pointer to the OTA header.
The length of the data to be written in this invocation
The data to be written Return Code:
|
integrity_code
(callback function pointer) |
void (*integrity_code)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint8_t length, uint8_t *data, void *arg)
If not NULL, this is called upon reception of the IMAGE_INTEGRITY_CODE sub-tag field. The 'data' parameter will contain the 16-byte hash value. This is used in conjunction with the 'update_raw' callback, which is called for all data up to just before the IMAGE_INTEGRITY_CODE sub-tag. |
image_validate
(callback function pointer) |
enum ZclStatusCodeT (*image_validate)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, void *arg)
If not NULL, this is called to validate the image, such as the hash. If NULL, and the image is verified using a Security Certificate, the application must provide a valid ca_pub_key_array parameter in ZbZclOtaClientConfig at initialization. Return code is ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE). Callback Function Parameters: header A pointer to the OTA header from the start of the transferred, see Table 11-2 OTA Header Fields in the OTA specification. Return Code:
The the image has passed validation and the upgrade is ready to proceed.
Validation of the image has failed
This image has passed validation, but this device requires more images which are yet to be received before performing an upgrade. The application will need to use one of the CheckForUpdate API calls to locate then transfer the remaining images. When all images have been successfully transferred and validated a SUCCESS status should should be returned instead.
The client is aborting the upgrade. These status codes are used to notify the OTA server of the completion of the transfer via the UpgradeEnd message. |
upgrade_end
(callback function pointer) |
enum ZclStatusCodeT (*upgrade_end)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint32_t current_time, uint32_t upgrade_time, void *arg)
Callback to handle an Upgrade End Response command, which specifies the time to perform the reboot and start using the updated firmware. If using the default callback handler defined by ZbZclOtaClientGetDefaultCallbacks, the 'reboot' callback will be called when the transfer has completed succesfully and it’s time for the upgrade to take place. If the application has selected the "Out-of-band" Activation Policy, then it’s best for the application to define its own 'upgrade_end' callback to decide when to perform the upgrade. The callback should update the ZCL_OTA_ATTR_IMAGE_UPGRADE_STATUS attribute accordingly. Writing ZCL_OTA_STATUS_NORMAL to the ZCL_OTA_ATTR_IMAGE_UPGRADE_STATUS attribute will reset the cluster back to defaults. If the callback returns ZCL_STATUS_SUCCESS, the cluster data is not reset, since the OTA upgrade may be waiting to finish through an external event or timeout. Return code is ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE). If the callback returns an error, the cluster is reset back to defaults. Callback Function Parameters:
|
reboot
(callback function pointer) |
void (*reboot)(struct ZbZclClusterT *cluster, void *arg)
If using the default 'upgrade_end' handler, then a callback must be provided by the application. This is called by the 'upgrade_end' handler if the OTA download was successful, to indicate it is now time to reboot the system. |
abort_download
(callback function pointer) |
enum ZclStatusCodeT (*abort_download)(struct ZbZclClusterT *cluster, enum ZbZclOtaCommandId commandId, void *arg)
Callback to inform application of a problem with the download. It gives the application the option to perform network diagnostics or repairs (e.g. NWK Route Discovery) before attempting to restart the OTA transfer where it left off. The application can also tell the OTA Client to abort this transfer by returning ZCL_STATUS_SUCCESS. This callback cannot be set to NULL. The commandId is the OTA command responsible for aborting the transmission (e.g. ZCL_OTA_COMMAND_IMAGE_BLOCK_RESPONSE). If the application returns ZCL_STATUS_SUCCESS, the OTA transfer will be aborted and cluster reset to defaults, ready for a new transfer. If the application returns an error (i.e. ZCL_STATUS_FAILURE), the OTA transfer will be paused rather than aborted, and can be resumed by the application calling ZbZclOtaClientImageTransferResume. Callback Function Parameters:
The associated command responsible for this callback. E.g. Image Block Request (0x04) if there was a problem sending the command to retrieve more data, or Image Block Response (0x05) if the block response contained the ABORT status code. Return Code:
The OTA transfer will be aborted and cluster reset to defaults, ready for a new transfer.
The OTA transfer will be paused rather than aborted, and can be resumed by the application calling ZbZclOtaClientImageTransferResume. The application may use this opportunity to perform a Route Discovery of the OTA Server or try to poll the OTA Server until it comes back online and communication is able to resume. Refer to the Resume a Partial Download section for more information. |
ZbZclOtaClientConfig
OTA Upgrade Client Configuration structure
Parameters
uint16_t profile_id | Profile ID |
uint8_t endpoint | Endpoint on which the cluster is created on |
enum ZbZclOtaActivationPolicy
activation_policy |
Activation Policy |
enum ZbZclOtaTimeoutPolicy
timeout_policy |
Timeout Policy - Value written to ZCL_OTA_ATTR_UPGRADE_TIMEOUT_POLICY |
uint32_t image_block_delay | Image block delay - milliseconds |
struct ZbZclOtaHeader current_image | OTA Upgrade Header Fields structure. This is used to configure the client’s attributes that describe the firmware image currently running on the device. |
uint16_t hardware_version | Revision (0x00NN). Included in the Query Next Image command. |
const uint8_t *ca_pub_key_array | CA Public Key array |
unsigned int ca_pub_key_len | CA Public Key array length |
struct ZbZclOtaClientCallbacksT
callbacks |
Client callback functions |
ZbZclOtaEndResponseTimes
Upgrade End Response command structure
Parameters
uint32_t current_time | Current time |
uint32_t upgrade_time | Upgrade time |
ZbZclOtaHeader
OTA Upgrade Header Fields structure
Parameters
uint32_t file_identifier | OTA Upgrade file identifier |
uint16_t header_version | OTA Header version |
uint16_t header_length | OTA Header length |
uint16_t header_field_control | OTA Header Field control |
uint16_t manufacturer_code | Manufacturer code |
uint16_t image_type | Image type |
uint32_t file_version | File version |
uint16_t stack_version | Zigbee Stack version |
uint8_t header_string | OTA Header string |
uint32_t total_image_size | Total Image size (including header) |
uint8_t sec_credential_version | Security credential version (Optional) |
uint64_t file_destination | Upgrade file destination (Optional) |
uint16_t min_hardware_version | Minimum hardware version (Optional) |
uint16_t max_hardware_version | Maximum hardware version (Optional) |
ZbZclOtaImageData
OTA Upgrade Image Data structure
Parameters
uint32_t file_offset | File Offset |
uint8_t data_size | Data Size |
uint8_t data | Data |
ZbZclOtaImageDefinition
OTA Header Image Definition structure
Parameters
uint16_t manufacturer_code | Manufacturer code |
uint16_t image_type | Image type |
uint32_t file_version | File version |
ZbZclOtaImageWaitForData
Image Block Response Command Payload with WAIT_FOR_DATA status structure
Parameters
uint32_t current_time | Current time |
uint32_t request_time | Request time |
uint16_t minimum_block_period | MinimumBlock Period |
ZbZclOtaServerConfig
OTA Upgrade Server Configuration structure
Parameters
uint16_t profile_id | Profile ID |
uint8_t endpoint | Endpoint on which the cluster is created on |
uint16_t minimum_block_period | Minimum block period |
uint32_t upgrade_end_current_time | Upgrade End Current Time |
uint32_t upgrade_end_upgrade_time | Upgrade End Upgrade Time |
ZbZclOtaServerImageEvalT image_eval | Callback to determine if a suitable image exists |
ZbZclOtaServerImageReadT image_read | Callback read image data from the server |
ZbZclOtaServerUpgradeEndReqT
image_upgrade_end_req |
Callback to handle client Upgrade End request |
void *arg | Pointer to application data that will later be provided back to the callback function when invoked |
6.2.23. Poll Control
#include "zcl/general/zcl.poll.control.h"
Description
ZCL 8 section 3.16
A Sleepy End Device (SED) may instantiate the Poll Control server to allow external devices to control its polling behaviour, including a short interval of rapid polling in order to communicate with the SED in a timely fashion. SEDs are usually in their sleep state where they are not able to receive packets, and devices may not know when those SEDs are awake and polling for data. The Poll Control cluster is used to solve this dilemma.
Devices with Poll Control clients can use Finding & Binding to create the bindings necessary to communicate with the Poll Control servers. The Poll Control server will perform periodic check-ins with any bound Poll Control clients, where the check-in response may ask the SED to start fast polling to allow the server device to exchange messages with it.
Functions
zcl_poll_client_alloc
struct ZbZclClusterT * zcl_poll_client_alloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPollControlClientCallbackT *callbacks, void *arg);
Create a new instance of the Poll Control Client 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
zcl_poll_client_set_checkin_rsp
enum ZclStatusCodeT zcl_poll_client_set_checkin_rsp(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientCheckinInfo *info);
Set Check-in Response configuration
Parameters
cluster | Cluster instance from which to send this command |
info | Check-in configuration info |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_poll_client_set_long_intvl_req
enum ZclStatusCodeT zcl_poll_client_set_long_intvl_req(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientSetLongReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set Long Interval command
Parameters
cluster | Cluster instance from which to send this command |
req | Set Long Interval 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
zcl_poll_client_set_short_intvl_req
enum ZclStatusCodeT zcl_poll_client_set_short_intvl_req(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientSetShortReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set Short Interval command
Parameters
cluster | Cluster instance from which to send this command |
req | Set Short Interval 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
zcl_poll_client_stop_fastpoll_req
enum ZclStatusCodeT zcl_poll_client_stop_fastpoll_req(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientStopReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Fast Poll Stop command
Parameters
cluster | Cluster instance from which to send this command |
req | Fast Poll Stop 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
zcl_poll_server_alloc
struct ZbZclClusterT * zcl_poll_server_alloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPollControlServerCallbackT *callbacks, void *arg);
Create a new instance of the Poll Control 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
zcl_poll_server_send_checkin
enum ZclStatusCodeT zcl_poll_server_send_checkin(struct ZbZclClusterT *cluster);
Send a Check-in command to any bound Clients.
Parameters
cluster | Cluster instance from which to send this command |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclPollControlSvrAttrT
Poll Control Server Attribute IDs
ZCL_POLL_CHECK_IN_INTERVAL | Check-inInterval. Range is (0, 0x6E0000), where 0 means disabled. 0x6E0000 = 7208960 qs = ~500 hours. Other than 0, the Min value is also governed by ZCL_POLL_CHECK_IN_INTERVAL_MIN. |
ZCL_POLL_LONG_POLL_INTERVAL | LongPollInterval. Range is (0x04, 0x6E0000) = (1 sec, ~500 hours). Min value is also governed by the value of ZCL_POLL_LONG_POLL_INTERVAL_MIN. |
ZCL_POLL_SHORT_POLL_INTERVAL | ShortPollInterval. Range is (1, 4) = (250 ms, 1 sec) |
ZCL_POLL_FAST_POLL_TIMEOUT | FastPollTimeout. Range is (0x0001, 0xffff) = (250 ms, 4.55 hours). Max value is also governed by the value of ZCL_POLL_FAST_POLL_TIMEOUT_MAX. |
ZCL_POLL_CHECK_IN_INTERVAL_MIN | Check-inIntervalMin (Optional). Range is (0, 0x6E0000) |
ZCL_POLL_LONG_POLL_INTERVAL_MIN | LongPollIntervalMin (Optional). Range is (0x4, 0x6E0000) |
ZCL_POLL_FAST_POLL_TIMEOUT_MAX | FastPollTimeoutMax (Optional). Range is (0x2, 0xffff) |
ZCL_POLL_LONG_POLL_FROM_CLUSTER | If True, the Poll Server cluster will perform the NLME- SYNC.request (polling) at the interval given by the 'LongPollInterval' (ZCL_POLL_LONG_POLL_INTERVAL). If False, the Poll Server will only expose the 'LongPollInterval' via the attribute to devices that want to read it, but the application will be responsible for any long polling it wants to do. Default is False (disabled), meaning the cluster will not perform an NLME- SYNC.request at the long poll intervals. |
ZCL_POLL_CHECK_IN_RSP_WAIT_AFTER | If True, then wait for the full check-in response timeout before stopping fast-polling for responses. If False, then as soon as the number of received check-in responses matches the number of bound clients, then stop fast-polling immediately. Note that this is an Exegin custom attribute and not exposed to the network. |
Structures
ZbZclPollControlClientCallbackT
Poll Control Client callbacks configuration
Parameters
checkin_rsp_callback
(callback function pointer) |
enum ZclStatusCodeT (*checkin_rsp_callback)(struct ZbZclClusterT *clusterPtr, struct zcl_poll_checkin_rsp_t *rsp_info, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Check-in Response command |
ZbZclPollControlClientCheckinInfo
Check-in Info structure
Parameters
struct ZbApsAddrT dst | Destination Address |
bool start_fast_poll | Start Fast Poll |
uint16_t fast_poll_timeout | Fast Poll Timeout |
bool auto_refresh | If true, check-in response is automatically refreshed for the next check-in request. If false, this is a one-time event. |
ZbZclPollControlClientSetLongReq
Set Long Poll Interval command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
uint32_t interval | NewLongPollInterval |
ZbZclPollControlClientSetShortReq
Set Short Poll Interval command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
uint16_t interval | New Short Poll Interval |
ZbZclPollControlClientStopReq
Fast Poll Stop command structure
Parameters
struct ZbApsAddrT dst | Destination Address |
ZbZclPollControlServerCallbackT
Poll Control Server callbacks configuration
Parameters
checkin_rsp
(callback function pointer) |
bool (*checkin_rsp)(struct ZbZclClusterT *clusterPtr, struct zcl_poll_checkin_rsp_t *rsp_info, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Check-in Response command. If the callback returns true, then the Check-in Response is allowed to start fast polling. The ZCL8 Spec makes it optional whether these commands allow the device to start fast polling, even if "Start Fast Polling" payload parameter is set to true. If the callback return false, then this command shall not have an effect on fast polling. |
zcl_poll_checkin_rsp_t
Check-in Response command structure
Parameters
enum ZclStatusCodeT status | Status |
bool start_fast_poll | Start Fast Polling |
uint16_t fast_poll_timeout | Fast Poll Timeout |
6.2.24. Power Configuration
#include "zcl/general/zcl.power.config.h"
Functions
ZbZclPowerConfigClientAlloc
struct ZbZclClusterT * ZbZclPowerConfigClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Power 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
ZbZclPowerConfigServerAlloc
struct ZbZclClusterT * ZbZclPowerConfigServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Power Configuration 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
ZbZclPowerConfigSvrAttrT
Power Configuration Server Attributes IDs
ZCL_POWER_CONFIG_ATTR_MAINS_VOLTAGE | MainsVoltage (Optional) |
ZCL_POWER_CONFIG_ATTR_MAINS_FREQ | MainsFrequency (Optional) |
ZCL_POWER_CONFIG_ATTR_MAINS_ALARM_MASK | MainsAlarmMask (Optional) |
ZCL_POWER_CONFIG_ATTR_MAINS_VOLT_MIN | MainsVoltageMinThreshold (Optional) |
ZCL_POWER_CONFIG_ATTR_MAINS_VOLT_MAX | MainsVoltageMaxThreshold (Optional) |
ZCL_POWER_CONFIG_ATTR_MAINS_VOLT_DWELL | MainsVoltageDwellTripPoint (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_VOLTAGE | BatteryVoltage (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_PCT | BatteryPercentageRemaining (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_MFR_NAME | BatteryManufacturer (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_SIZE | BatterySize (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_AHRRATING | BatteryAHrRating (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_QUANTITY | BatteryQuantity (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_RATED_VOLT | BatteryRatedVoltage (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_ALARM_MASK | BatteryAlarmMask (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_VOLT_MIN | BatteryVoltageMinThreshold (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_VTHRESHOLD1 | BatteryVoltageThreshold1 (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_VTHRESHOLD2 | BatteryVoltageThreshold2 (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_VTHRESHOLD3 | BatteryVoltageThreshold3 (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_PCT_MIN | BatteryPercentageMinThreshold (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_PTHRESHOLD1 | BatteryPercentageThreshold1 (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_PTHRESHOLD2 | BatteryPercentageThreshold2 (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_PTHRESHOLD3 | BatteryPercentageThreshold3 (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY_ALARM_STATE | BatteryAlarmState (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_VOLTAGE | BatteryVoltage - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_PCT | BatteryPercentageRemaining - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_MFR_NAME | BatteryManufacturer - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_SIZE | BatterySize - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_AHRRATING | BatteryAHrRating - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_QUANTITY | BatteryQuantity - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_RATED_VOLT | BatteryRatedVoltage - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_ALARM_MASK | BatteryAlarmMask - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_VOLT_MIN | BatteryVoltageMinThreshold - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_VTHRESHOLD1 | BatteryVoltageThreshold1 - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_VTHRESHOLD2 | BatteryVoltageThreshold2 - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_VTHRESHOLD3 | BatteryVoltageThreshold3 - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_PCT_MIN | BatteryPercentageMinThreshold - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_PTHRESHOLD1 | BatteryPercentageThreshold1 - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_PTHRESHOLD2 | BatteryPercentageThreshold2 - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_PTHRESHOLD3 | BatteryPercentageThreshold3 - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY2_ALARM_STATE | BatteryAlarmState - Second battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_VOLTAGE | BatteryVoltage - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_PCT | BatteryPercentageRemaining - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_MFR_NAME | BatteryManufacturer - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_SIZE | BatterySize - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_AHRRATING | BatteryAHrRating - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_QUANTITY | BatteryQuantity - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_RATED_VOLT | BatteryRatedVoltage - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_ALARM_MASK | BatteryAlarmMask - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_VOLT_MIN | BatteryVoltageMinThreshold - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_VTHRESHOLD1 | BatteryVoltageThreshold1 - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_VTHRESHOLD2 | BatteryVoltageThreshold2 - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_VTHRESHOLD3 | BatteryVoltageThreshold3 - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_PCT_MIN | BatteryPercentageMinThreshold - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_PTHRESHOLD1 | BatteryPercentageThreshold1 - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_PTHRESHOLD2 | BatteryPercentageThreshold2 - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_PTHRESHOLD3 | BatteryPercentageThreshold3 - Third Battery (Optional) |
ZCL_POWER_CONFIG_ATTR_BATTERY3_ALARM_STATE | BatteryAlarmState - Third Battery (Optional) |
6.2.25. Power Profile
#include "zcl/general/zcl.power.profile.h"
Functions
ZbZclPowerProfClientAlloc
struct ZbZclClusterT * ZbZclPowerProfClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPowerProfClientCallbacks *callbacks, void *arg);
Create a new instance of the Power Profile Client 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
ZbZclPowerProfClientPhasesNotify
enum ZclStatusCodeT ZbZclPowerProfClientPhasesNotify(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfCliPhasesNotify *notify, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Energy Phases Schedule Notification command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
notify | Energy Phases Schedule Notification 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
ZbZclPowerProfClientPhasesResponse
enum ZclStatusCodeT ZbZclPowerProfClientPhasesResponse(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfCliPhasesNotify *notify, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a EnergyPhasesScheduleResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | EnergyPhasesScheduleResponse command 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
ZbZclPowerProfClientPhasesSchedStateReq
enum ZclStatusCodeT ZbZclPowerProfClientPhasesSchedStateReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfCliProfileReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a EnergyPhasesScheduleStateRequest command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | EnergyPhasesScheduleStateRequest 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
ZbZclPowerProfClientPriceExtRsp
enum ZclStatusCodeT ZbZclPowerProfClientPriceExtRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfCliPriceRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a GetPowerProfilePriceExtendedResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | GetPowerProfilePriceExtendedResponse command 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
ZbZclPowerProfClientPriceRsp
enum ZclStatusCodeT ZbZclPowerProfClientPriceRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfCliPriceRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a GetPowerProfilePriceResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | GetPowerProfilePriceResponse command 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
ZbZclPowerProfClientProfileReq
enum ZclStatusCodeT ZbZclPowerProfClientProfileReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfCliProfileReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a PowerProfileRequest command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | PowerProfileRequest 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
ZbZclPowerProfClientSchedConsReq
enum ZclStatusCodeT ZbZclPowerProfClientSchedConsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfCliProfileReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a PowerProfileScheduleConstraintsRequest command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | PowerProfileScheduleConstraintsRequest 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
ZbZclPowerProfClientSchedPriceRsp
enum ZclStatusCodeT ZbZclPowerProfClientSchedPriceRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfCliSchedPriceRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a GetOverallSchedulePriceResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | GetOverallSchedulePriceResponse command 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
ZbZclPowerProfClientStateReq
enum ZclStatusCodeT ZbZclPowerProfClientStateReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a PowerProfileStateRequest 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
ZbZclPowerProfServerAlloc
struct ZbZclClusterT * ZbZclPowerProfServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPowerProfServerCallbacks *callbacks, void *arg);
Create a new instance of the Power Profile 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
ZbZclPowerProfServerConstraintsNotify
enum ZclStatusCodeT ZbZclPowerProfServerConstraintsNotify(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfSvrConstraintsNotify *notify, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a PowerProfileScheduleConstraintsNotification Command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
notify | PowerProfileScheduleConstraintsNotification 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
ZbZclPowerProfServerConstraintsRsp
enum ZclStatusCodeT ZbZclPowerProfServerConstraintsRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfSvrConstraintsNotify *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a PowerProfileScheduleConstraintsResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | PowerProfileScheduleConstraintsResponse command 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
ZbZclPowerProfServerGetPriceReq
enum ZclStatusCodeT ZbZclPowerProfServerGetPriceReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfCliProfileReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a GetPowerProfilePrice command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | GetPowerProfilePrice 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
ZbZclPowerProfServerGetPriceReqExtReq
enum ZclStatusCodeT ZbZclPowerProfServerGetPriceReqExtReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfSvrGetPriceExtReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a GetPowerProfilePriceExtended command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | GetPowerProfilePriceExtended 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
ZbZclPowerProfServerGetSchedPriceReq
enum ZclStatusCodeT ZbZclPowerProfServerGetSchedPriceReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a GetOverallSchedulePrice command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | GetOverallSchedulePrice 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
ZbZclPowerProfServerPhasesNotify
enum ZclStatusCodeT ZbZclPowerProfServerPhasesNotify(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfSvrPhasesRsp *notify, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a EnergyPhasesScheduleStateNotification Command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
notify | EnergyPhasesScheduleStateNotification 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
ZbZclPowerProfServerPhasesReq
enum ZclStatusCodeT ZbZclPowerProfServerPhasesReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfCliProfileReq *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a EnergyPhasesScheduleRequest command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | EnergyPhasesScheduleRequest 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
ZbZclPowerProfServerPhasesRsp
enum ZclStatusCodeT ZbZclPowerProfServerPhasesRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfSvrPhasesRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a EnergyPhasesScheduleStateResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | EnergyPhasesScheduleStateResponse command 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
ZbZclPowerProfServerProfileNotify
enum ZclStatusCodeT ZbZclPowerProfServerProfileNotify(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfSvrProfileRsp *notify, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a PowerProfileNotification Command. It is sent as a ZCL request with a unique sequence number, and can receive a Default Response if applicable
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
notify | PowerProfileNotification 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
ZbZclPowerProfServerProfileRsp
enum ZclStatusCodeT ZbZclPowerProfServerProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfSvrProfileRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a PowerProfileResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | PowerProfileResponse command 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
ZbZclPowerProfServerStateNotify
enum ZclStatusCodeT ZbZclPowerProfServerStateNotify(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclPowerProfSvrStateRsp *notify, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a PowerProfileStateNotification Command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
notify | PowerProfileStateNotification 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
ZbZclPowerProfServerStateRsp
enum ZclStatusCodeT ZbZclPowerProfServerStateRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclPowerProfSvrStateRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);
Send a PowerProfileStateResponse command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for response, including sequence number and tx options |
rsp | PowerProfileStateResponse command 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
Enumerations
ZbZclPowerProfileSvrAttrT
Power Profile Server Attribute IDs
ZCL_POWER_PROF_SVR_ATTR_TOTAL_PROFILENUM | TotalProfileNum |
ZCL_POWER_PROF_SVR_ATTR_MULTIPLE_SCHED | MultipleScheduling |
ZCL_POWER_PROF_SVR_ATTR_ENERGY_FORMAT | EnergyFormatting |
ZCL_POWER_PROF_SVR_ATTR_ENERGY_REMOTE | EnergyRemote |
ZCL_POWER_PROF_SVR_ATTR_SCHEDULE_MODE | ScheduleMode |
Structures
ZbZclPowerProfCliPhasesNotify
Energy Phases Schedule Notification command structure
Parameters
uint8_t profile_id | Power ProfileID |
uint8_t num_phases | Num of Scheduled Phases |
struct ZbZclPowerProfSchedPhase
sched_list |
Schedule List |
ZbZclPowerProfCliPriceRsp
GetPowerProfilePriceResponse command structure
Parameters
uint8_t profile_id | Power Profile ID |
uint16_t currency | Currency |
uint32_t price | Price |
uint8_t trailing_digit | Price Trailing Digit |
ZbZclPowerProfCliProfileReq
PowerProfileRequest command structure
Parameters
uint8_t profile_id | PowerProfileID |
ZbZclPowerProfCliSchedPriceRsp
GetOverallSchedulePriceResponse command structure
Parameters
uint16_t currency | Currency |
uint32_t price | Price |
uint8_t trailing_digit | Price Trailing Digit |
ZbZclPowerProfClientCallbacks
Power Profile Client callbacks configuration
Parameters
profile_notify
(callback function pointer) |
enum ZclStatusCodeT (*profile_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrProfileRsp *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of PowerProfileNotification command |
get_price
(callback function pointer) |
enum ZclStatusCodeT (*get_price)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of GetPowerProfilePrice command |
state_notify
(callback function pointer) |
enum ZclStatusCodeT (*state_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrStateRsp *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of PowerProfileStateNotification command |
get_sched_price
(callback function pointer) |
enum ZclStatusCodeT (*get_sched_price)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of GetOverallSchedulePrice command |
phases_req
(callback function pointer) |
enum ZclStatusCodeT (*phases_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of EnergyPhasesScheduleRequest command |
phases_notify
(callback function pointer) |
enum ZclStatusCodeT (*phases_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrPhasesRsp *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of EnergyPhasesScheduleStateNotification command |
constraints_notify
(callback function pointer) |
enum ZclStatusCodeT (*constraints_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrConstraintsNotify *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of PowerProfileScheduleConstraintsNotification command |
get_price_ext
(callback function pointer) |
enum ZclStatusCodeT (*get_price_ext)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrGetPriceExtReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of GetPowerProfilePriceExtended command |
ZbZclPowerProfPhase
Phase structure
Parameters
uint8_t energy_phase_id | Energy PhaseID |
uint8_t macro_phase_id | Macro PhaseID |
uint16_t expect_duration | ExpectedDuration |
uint16_t peak_power | Peak Power |
uint16_t energy | Energy |
uint16_t max_activation_delay | MaxActivationDelay |
ZbZclPowerProfSchedPhase
Schedule Phase structure
Parameters
uint8_t energy_phase_id | Energy PhaseID |
uint16_t sched_time | Scheduled Time |
ZbZclPowerProfServerCallbacks
Power Profile Server callbacks configuration
Parameters
profile_req
(callback function pointer) |
enum ZclStatusCodeT (*profile_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of PowerProfileRequest command |
state_req
(callback function pointer) |
enum ZclStatusCodeT (*state_req)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of PowerProfileStateRequest command |
phases_notify
(callback function pointer) |
enum ZclStatusCodeT (*phases_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliPhasesNotify *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of Energy Phases Schedule Notification command |
sched_contraints_req
(callback function pointer) |
enum ZclStatusCodeT (*sched_contraints_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of PowerProfileScheduleConstraintsRequest command |
phases_sched_state_req
(callback function pointer) |
enum ZclStatusCodeT (*phases_sched_state_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)
Callback to application, invoked on receipt of EnergyPhasesScheduleStateRequest command |
ZbZclPowerProfSvrConstraintsNotify
PowerProfileScheduleConstraintsNotification command structure
Parameters
uint8_t profile_id | PowerProfileID |
uint16_t start_after | Start After |
uint16_t stop_before | Stop Before |
ZbZclPowerProfSvrGetPriceExtReq
GetPowerProfilePriceExtended command structure
Parameters
uint8_t options | Options - e.g. ZCL_PWR_PROF_PRICE_EXT_OPT_START_TIME_PRESENT |
uint8_t profile_id | PowerProfileID |
uint16_t start_time | PowerProfileStartTime - optional (ZCL_PWR_PROF_PRICE_EXT_OPT_START_TIME_PRESENT) |
ZbZclPowerProfSvrPhasesRsp
Energy Phases Schedule Notification and EnergyPhasesScheduleResponse command structure
Parameters
uint8_t profile_id | Power ProfileID |
uint8_t num_sched_energy_phases | Num of Scheduled Phases |
ZbZclPowerProfSvrProfileRsp
PowerProfileNotification and PowerProfileResponse command structure
Parameters
uint8_t total_profile_num | Total Profile Num |
uint8_t profile_id | Power ProfileID |
uint8_t num_transferred_phases | Num of Transferred Phases |
struct ZbZclPowerProfPhase phase_list | Phase List |
ZbZclPowerProfSvrStateRsp
PowerProfileStateResponse command structure
Parameters
uint8_t profile_count | Power Profile Count |
struct ZbZclPowerProfileRecord record_list | Record List |
ZbZclPowerProfileRecord
Record structure
Parameters
uint8_t profile_id | Power Profile ID |
uint8_t energy_phase_id | Energy Phase ID |
uint8_t remote_control | PowerProfileRemoteControl |
enum ZbZclPowerProfState state | PowerProfile State |
6.2.26. Pressure Measurement
#include "zcl/general/zcl.press.meas.h"
Functions
ZbZclPressMeasClientAlloc
struct ZbZclClusterT * ZbZclPressMeasClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Pressure 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
ZbZclPressMeasServerAlloc
struct ZbZclClusterT * ZbZclPressMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, int16_t min, int16_t max);
Create a new instance of the Pressure Measurement Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
min | Default minimum measured value written to ZCL_PRESS_MEAS_ATTR_MIN_MEAS_VAL attribute during allocation |
max | Default maximum measured value written to ZCL_PRESS_MEAS_ATTR_MAX_MEAS_VAL attribute during allocation |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclPressMeasSvrAttrT
Pressure Measurement Attribute IDs
ZCL_PRESS_MEAS_ATTR_MEAS_VAL | MeasuredValue |
ZCL_PRESS_MEAS_ATTR_MIN_MEAS_VAL | MinMeasuredValue |
ZCL_PRESS_MEAS_ATTR_MAX_MEAS_VAL | MaxMeasuredValue |
ZCL_PRESS_MEAS_ATTR_TOLERANCE | Tolerance (Optional) |
ZCL_PRESS_MEAS_ATTR_SCALED_VAL | ScaledValue (Optional) |
ZCL_PRESS_MEAS_ATTR_MIN_SCALED_VAL | MinScaledValue (Optional) |
ZCL_PRESS_MEAS_ATTR_MAX_SCALED_VAL | MaxScaledValue (Optional) |
ZCL_PRESS_MEAS_ATTR_SCALED_TOL | ScaledTolerance (Optional) |
ZCL_PRESS_MEAS_ATTR_SCALE | Scale (Optional) |
6.2.27. Pump Configuration and Control
#include "zcl/general/zcl.pump.h"
Functions
ZbZclPumpClientAlloc
struct ZbZclClusterT * ZbZclPumpClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Pump Configuration and 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
ZbZclPumpServerAlloc
struct ZbZclClusterT * ZbZclPumpServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Instantiate a new instance of the Pump Configuration and 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
ZbZclPumpServerAttrT
Pump Configuration and Control Attribute Ids
ZCL_PUMP_SVR_ATTR_MAX_PRESSURE | MaxPressure |
ZCL_PUMP_SVR_ATTR_MAX_SPEED | MaxSpeed |
ZCL_PUMP_SVR_ATTR_MAX_FLOW | MaxFlow |
ZCL_PUMP_SVR_ATTR_MIN_CONST_PRESSURE | MinConstPressure |
ZCL_PUMP_SVR_ATTR_MAX_CONST_PRESSURE | MaxConstPressure |
ZCL_PUMP_SVR_ATTR_MIN_COMP_PRESSURE | MinCompPressure |
ZCL_PUMP_SVR_ATTR_MAX_COMP_PRESSURE | MaxCompPressure |
ZCL_PUMP_SVR_ATTR_MIN_CONST_SPEED | MinConstSpeed |
ZCL_PUMP_SVR_ATTR_MAX_CONST_SPEED | MaxConstSpeed |
ZCL_PUMP_SVR_ATTR_MIN_CONST_FLOW | MinConstFlow |
ZCL_PUMP_SVR_ATTR_MAX_CONST_FLOW | MaxConstFlow |
ZCL_PUMP_SVR_ATTR_MIN_CONST_TEMP | MinConstTemp |
ZCL_PUMP_SVR_ATTR_MAX_CONST_TEMP | MaxConstTemp |
ZCL_PUMP_SVR_ATTR_PUMP_STATUS | PumpStatus |
ZCL_PUMP_SVR_ATTR_EFF_OP_MODE | EffectiveOperationMode |
ZCL_PUMP_SVR_ATTR_EFF_CTRL_MODE | EffectiveControlMode |
ZCL_PUMP_SVR_ATTR_CAPACITY | Capacity |
ZCL_PUMP_SVR_ATTR_SPEED | Speed |
ZCL_PUMP_SVR_ATTR_RUNNING_HOURS | LifetimeRunningHours |
ZCL_PUMP_SVR_ATTR_POWER | Power |
ZCL_PUMP_SVR_ATTR_ENERGY_CONSUMED | LifetimeEnergyConsumed |
ZCL_PUMP_SVR_ATTR_OP_MODE | OperationMode |
ZCL_PUMP_SVR_ATTR_CTRL_MODE | ControlMode |
ZCL_PUMP_SVR_ATTR_ALARM_MASK | AlarmMask |
6.2.28. RSSI Location
#include "zcl/general/zcl.rssi.loc.h"
Functions
ZbZclRssiLocClientAlloc
struct ZbZclClusterT * ZbZclRssiLocClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_rssi_loc_client_callbacks_t *callbacks, void *arg);
Create a new instance of the RSSI Location Client 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
ZbZclRssiLocClientAnchorNodeAnnc
enum ZclStatusCodeT ZbZclRssiLocClientAnchorNodeAnnc(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_anchor_node_annc *anchor_node_annc, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Anchor Node Announce command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
anchor_node_annc | Anchor Node Announce 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
ZbZclRssiLocClientGetDevConfig
enum ZclStatusCodeT ZbZclRssiLocClientGetDevConfig(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_get_dev_config *get_dev_config, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Device Configuration command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
get_dev_config | Get Device Configuration 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
ZbZclRssiLocClientGetLocData
enum ZclStatusCodeT ZbZclRssiLocClientGetLocData(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_get_loc_data *get_loc_data, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Location Data command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
get_loc_data | Get Location Data 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
ZbZclRssiLocClientSendPings
enum ZclStatusCodeT ZbZclRssiLocClientSendPings(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_send_pings *send_pings, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Send Pings command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
send_pings | Send Pings 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
ZbZclRssiLocClientSendRssiRsp
enum ZclStatusCodeT ZbZclRssiLocClientSendRssiRsp(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *dst_info, struct rssi_loc_rssi_rsp *rsp);
Send a RSSI Response command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst_info | Destination address for request |
rsp | Rssi Response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclRssiLocClientSetAbsLocation
enum ZclStatusCodeT ZbZclRssiLocClientSetAbsLocation(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_set_abs_loc *set_abs_loc, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set Absolute Location command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
set_abs_loc | Set Absolute Location 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
ZbZclRssiLocClientSetDevConfig
enum ZclStatusCodeT ZbZclRssiLocClientSetDevConfig(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_set_dev_config *set_dev_config, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Set Device Configuration command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
set_dev_config | Set Device Config 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
ZbZclRssiLocServerAlloc
struct ZbZclClusterT * ZbZclRssiLocServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_rssi_loc_server_callbacks_t *callbacks, void *arg);
Create a new instance of the RSSI Location 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
ZbZclRssiLocServerCompDataNotif
enum ZclStatusCodeT ZbZclRssiLocServerCompDataNotif(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Compact Data Notification 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
ZbZclRssiLocServerLocDataNotif
enum ZclStatusCodeT ZbZclRssiLocServerLocDataNotif(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Location Data Notification 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
ZbZclRssiLocServerReportRssi
enum ZclStatusCodeT ZbZclRssiLocServerReportRssi(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_report_rssi *report_rssi, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Report RSSI command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
report_rssi | Report Rssi 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
ZbZclRssiLocServerReqOwnLoc
enum ZclStatusCodeT ZbZclRssiLocServerReqOwnLoc(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct rssi_loc_req_own_loc *req_own_loc, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Request Own Location command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req_own_loc | Request Own Location 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
ZbZclRssiLocServerRssiPing
enum ZclStatusCodeT ZbZclRssiLocServerRssiPing(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a RSSI Ping 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
ZbZclRssiLocServerRssiReq
enum ZclStatusCodeT ZbZclRssiLocServerRssiReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a RSSI 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
ZbZclRssiLocServerSendDevConfigRsp
enum ZclStatusCodeT ZbZclRssiLocServerSendDevConfigRsp(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *dst_info, struct rssi_loc_dev_config_rsp *rsp);
Send a Device Configuration Response command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst_info | Destination address for request |
rsp | Send Device Configuration response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclRssiLocServerSendLocDataRsp
enum ZclStatusCodeT ZbZclRssiLocServerSendLocDataRsp(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *dst_info, struct rssi_loc_loc_data_rsp *rsp);
Send a Location Data Response command
Parameters
clusterPtr | Cluster instance from which to send this command |
dst_info | Destination address for request |
rsp | Send Location Data response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclRssiLocSvrAttrT
Rssi Location Attribute IDs
ZCL_RSSI_LOC_SVR_ATTR_LOCATION_TYPE | LocationType |
ZCL_RSSI_LOC_SVR_ATTR_LOCATION_METHOD | LocationMethod |
ZCL_RSSI_LOC_SVR_ATTR_LOCATION_AGE | LocationAge (Optional) |
ZCL_RSSI_LOC_SVR_ATTR_QUALITY_MEAS | QualityMeasure (Optional) |
ZCL_RSSI_LOC_SVR_ATTR_NUM_DEVICES | NumberOfDevices (Optional) |
ZCL_RSSI_LOC_SVR_ATTR_COORD1 | Coordinate1 |
ZCL_RSSI_LOC_SVR_ATTR_COORD2 | Coordinate2 |
ZCL_RSSI_LOC_SVR_ATTR_COORD3 | Coordinate3 (Optional) |
ZCL_RSSI_LOC_SVR_ATTR_POWER | Power |
ZCL_RSSI_LOC_SVR_ATTR_PATH_LOSS_EXP | PathLossExponent |
ZCL_RSSI_LOC_SVR_ATTR_REPORT_PERIOD | ReportingPeriod (Optional) |
ZCL_RSSI_LOC_SVR_ATTR_CALC_PERIOD | CalculationPeriod (Optional) |
ZCL_RSSI_LOC_SVR_ATTR_NUM_RSSI_MEAS | NumberRSSIMeasurements |
Structures
rssi_loc_anchor_node_annc
Anchor Node Announce command structure
Parameters
uint64_t addr | Anchor Node IEEE Address |
int16_t x | X |
int16_t y | Y |
int16_t z | Z |
rssi_loc_comp_data_notif
Compact Data Notification command structure
Parameters
uint8_t loc_type | Location Type |
int16_t coord1 | Coordinate 1 |
int16_t coord2 | Coordinate 2 |
int16_t coord3 | Coordinate 3 |
uint8_t quality_meas | Quality Measure |
uint16_t loc_age | Location Age |
rssi_loc_dev_config_rsp
Device Configuration response structure
Parameters
enum ZclStatusCodeT status | Status |
int16_t power | Power |
uint16_t path_loss_exp | Path Loss Exponent |
uint16_t calc_period | Calculation Period |
uint8_t num_rssi_meas | Number RSSI Measurements |
uint16_t report_period | Reporting Period |
rssi_loc_get_dev_config
Get Device Configuration command structure
Parameters
uint64_t target_addr | Target Address |
rssi_loc_get_loc_data
Get Location Data command structure
Parameters
uint8_t bitmap | Bitmap |
uint8_t num_responses | Number Responses |
uint64_t target_addr | Target Address |
rssi_loc_loc_data_notif
Location Data Notification command structure
Parameters
uint8_t loc_type | Location Type |
int16_t coord1 | Coordinate 1 |
int16_t coord2 | Coordinate 2 |
int16_t coord3 | Coordinate 3 |
int16_t power | Power |
uint16_t path_loss_exp | Path Loss Exponent |
uint8_t loc_method | Location Method |
uint8_t quality_meas | Quality Measure |
uint16_t loc_age | Location Age |
rssi_loc_loc_data_rsp
Location Data response structure
Parameters
enum ZclStatusCodeT status | Status |
uint8_t loc_type | Location Type |
int16_t coord1 | Coordinate 1 |
int16_t coord2 | Coordinate 2 |
int16_t coord3 | Coordinate 3 |
int16_t power | Power |
uint16_t path_loss_exp | Path Loss Exponent |
uint8_t loc_method | Location Method |
uint8_t quality_meas | Quality Measure |
uint16_t loc_age | Location Age |
rssi_loc_neighbour_info
Neighbour Info structure
Parameters
uint64_t neighbour | Neighbour |
int16_t x | X |
int16_t y | Y |
int16_t z | Z |
int8_t rssi | RSSI |
uint8_t num_rssi_meas | NumberRSSIMeasurements |
rssi_loc_report_rssi
Report Rssi command structure
Parameters
uint64_t measuring_dev | Measuring Device |
uint8_t n_neighbours | N Neighbours |
struct rssi_loc_neighbour_info neighbours_info | NeighboursInfo |
rssi_loc_req_own_loc
Request Own Location command structure
Parameters
uint64_t addr | IEEE Address of the Blind Node |
rssi_loc_rssi_ping
Rssi Ping command structure
Parameters
uint8_t loc_type | Location Type |
rssi_loc_rssi_req
Rssi Request structure
Parameters
uint8_t rssi | Rssi |
rssi_loc_rssi_rsp
Rssi response structure
Parameters
uint64_t replying_dev | Replying Device |
int16_t x | X |
int16_t y | Y |
int16_t z | Z |
int8_t rssi | RSSI |
uint8_t num_rssi_meas | NumberRSSIMeasurements |
rssi_loc_send_pings
Send Pings command structure
Parameters
uint64_t target_addr | Target Address |
uint8_t num_rssi_meas | NumberRSSIMeasurements |
uint16_t calc_period | CalculationPeriod |
rssi_loc_set_abs_loc
Set Absolute Location command structure
Parameters
int16_t coord1 | Coordinate 1 |
int16_t coord2 | Coordinate 2 |
int16_t coord3 | Coordinate 3 |
int16_t power | Power |
uint16_t path_loss_exp | Path Loss Exponent |
rssi_loc_set_dev_config
Set Device Configuration command structure
Parameters
int16_t power | Power |
uint16_t path_loss_exp | Path Loss Exponent |
uint16_t calc_period | Calculation Period |
uint8_t num_rssi_meas | Number Rssi Measurements |
uint16_t report_period | Reporting Period |
zcl_rssi_loc_client_callbacks_t
Rssi Location Client callbacks configuration
Parameters
loc_data_notif
(callback function pointer) |
enum ZclStatusCodeT (*loc_data_notif)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_loc_data_notif *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Location Data Notification command |
comp_data_notif
(callback function pointer) |
enum ZclStatusCodeT (*comp_data_notif)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_comp_data_notif *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Compact Data Notification command |
rssi_ping
(callback function pointer) |
enum ZclStatusCodeT (*rssi_ping)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_rssi_ping *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of RSSI Ping command |
rssi_req
(callback function pointer) |
enum ZclStatusCodeT (*rssi_req)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_rssi_req *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of RSSI request. |
report_rssi
(callback function pointer) |
enum ZclStatusCodeT (*report_rssi)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_report_rssi *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Report Rssi command |
req_own_loc
(callback function pointer) |
enum ZclStatusCodeT (*req_own_loc)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_req_own_loc *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Request Own Location command |
zcl_rssi_loc_server_callbacks_t
Rssi Location Server callbacks configuration
Parameters
get_dev_config
(callback function pointer) |
enum ZclStatusCodeT (*get_dev_config)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_get_dev_config *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Get Device Configuration command |
get_loc_data
(callback function pointer) |
enum ZclStatusCodeT (*get_loc_data)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_get_loc_data *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Get Location Data command |
send_pings
(callback function pointer) |
enum ZclStatusCodeT (*send_pings)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_send_pings *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Send Pings command |
anchor_node_annc
(callback function pointer) |
enum ZclStatusCodeT (*anchor_node_annc)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_anchor_node_annc *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Anchor Node Announce command |
6.2.29. Scenes
#include "zcl/general/zcl.scenes.h"
Description
ZCL 8 section 3.7
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 (ZCL8) 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 clusters
- 0x02 with the OnOff and Door Lock clusters
- 0x03 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 and 0x02 are in group 0x0001
- Endpoint 0x03 is not in group 0x0001
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 ZCL8.
Functions
ZbZclScenesClientAlloc
struct ZbZclClusterT * ZbZclScenesClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Scenes Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclScenesServerAlloc
struct ZbZclClusterT * ZbZclScenesServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint8_t maxScenes);
Create a new instance of the Scenes Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
maxScenes | Maximum number of scenes supported by this cluster |
Return
- Cluster pointer, or NULL if there is an error
zcl_scenes_client_add_req
enum ZclStatusCodeT zcl_scenes_client_add_req(struct ZbZclClusterT *cluster, struct zcl_scenes_add_request_t *add_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send an Add Scene or Enhanced Add Scene command, depending on isEnhanced flag in Add Scene command structure
Parameters
cluster | Cluster instance from which to send this command |
add_req | Add Scene command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_add_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_add_rsp_parse(struct zcl_scenes_add_response_t *add_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse an Add Scene Response command payload into a structure
Parameters
add_rsp | Add Scene Response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_copy_req
enum ZclStatusCodeT zcl_scenes_client_copy_req(struct ZbZclClusterT *cluster, struct zcl_scenes_copy_request_t *copy_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Copy Scene command
Parameters
cluster | Cluster instance from which to send this command |
copy_req | Copy Scene command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_copy_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_copy_rsp_parse(struct zcl_scenes_copy_response_t *copy_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse a Copy Scene Response command payload into a structure
Parameters
copy_rsp | Copy Scene response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_get_membership_req
enum ZclStatusCodeT zcl_scenes_client_get_membership_req(struct ZbZclClusterT *cluster, struct zcl_scenes_membership_request_t *get_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Get Scene Membership command
Parameters
cluster | Cluster instance from which to send this command |
get_req | Get Scene Membership command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_get_membership_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_get_membership_rsp_parse(struct zcl_scenes_membership_response_t *get_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse a Get Scene Membership Response command payload into a structure
Parameters
get_rsp | Get Scene Membership Response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_recall_req
enum ZclStatusCodeT zcl_scenes_client_recall_req(struct ZbZclClusterT *cluster, struct zcl_scenes_recall_request_t *recall_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Recall Scene command
Parameters
cluster | Cluster instance from which to send this command |
recall_req | Recall Scene command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_recall_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_recall_rsp_parse(struct zcl_scenes_recall_response_t *recall_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse a Recall Scene Response command payload into a structure
Parameters
recall_rsp | Recall Scene response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_remove_all_req
enum ZclStatusCodeT zcl_scenes_client_remove_all_req(struct ZbZclClusterT *cluster, struct zcl_scenes_remove_all_request_t *remove_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Remove All Scenes command
Parameters
cluster | Cluster instance from which to send this command |
remove_req | Remove All Scenes command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_remove_all_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_remove_all_rsp_parse(struct zcl_scenes_remove_all_response_t *remove_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse a Remove All Scenes Response command payload into a structure
Parameters
remove_rsp | Remove All Scenes Response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_remove_req
enum ZclStatusCodeT zcl_scenes_client_remove_req(struct ZbZclClusterT *cluster, struct zcl_scenes_remove_request_t *remove_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Remove Scene command
Parameters
cluster | Cluster instance from which to send this command |
remove_req | Remove Scene command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_remove_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_remove_rsp_parse(struct zcl_scenes_remove_response_t *remove_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse a Remove Scene Response command payload into a structure
Parameters
remove_rsp | Remove Scene Response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_store_req
enum ZclStatusCodeT zcl_scenes_client_store_req(struct ZbZclClusterT *cluster, struct zcl_scenes_store_request_t *store_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Store Scene command
Parameters
cluster | Cluster instance from which to send this command |
store_req | Store Scene command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_store_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_store_rsp_parse(struct zcl_scenes_store_response_t *store_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse a Store Scene Response command payload into a structure
Parameters
store_rsp | Store Scene Response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_view_req
enum ZclStatusCodeT zcl_scenes_client_view_req(struct ZbZclClusterT *cluster, struct zcl_scenes_view_request_t *view_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send an View Scene or Enhanced View Scene command, depending on isEnhanced flag in View Scene command structure
Parameters
cluster | Cluster instance from which to send this command |
view_req | View Scene command structure |
callback | Callback function that will be called when the response for this request is received |
arg | Pointer to application data provided in initiating API call |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
zcl_scenes_client_view_rsp_parse
enum ZclStatusCodeT zcl_scenes_client_view_rsp_parse(struct zcl_scenes_view_response_t *view_rsp, struct ZbZclCommandRspT *zcl_rsp);
Parse a View Scene Response command payload into a structure
Parameters
view_rsp | View Scene Response command structure |
zcl_rsp | Cluster response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclScenesAttrT
Scenes Attribute IDs
ZCL_SCENES_ATTR_SCENE_COUNT | SceneCount |
ZCL_SCENES_ATTR_CURRENT_SCENE | CurrentScene |
ZCL_SCENES_ATTR_CURRENT_GROUP | CurrentGroup |
ZCL_SCENES_ATTR_SCENE_VALID | SceneValid |
ZCL_SCENES_ATTR_NAME_SUPPORT | NameSupport |
ZCL_SCENES_ATTR_LAST_CONFIGURED_BY | LastConfiguredBy (Optional) |
Structures
zcl_scenes_add_request_t
Add Scene command structure
Parameters
bool isEnhanced | If true, send an Enhanced Add Scene request |
struct ZbApsAddrT dst | Destination address for request |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
uint16_t transition | Transition time |
const char *sceneName | Scene Name (string length must be <= ZCL_SCENES_NAME_MAX_LENGTH) |
const char *extStrPtr | Extension field sets as an ASCII hex string in the format as sent in the command payload. As per the ZCL Spec, each set has the format: {clusterId, length, {extension field set}} E.g. For the OnOff cluster: "06000101" |
zcl_scenes_add_response_t
Add Scene Response command structure
Parameters
uint8_t status | Status |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
zcl_scenes_copy_request_t
Copy Scene command structure
Parameters
struct ZbApsAddrT dst | Destination address for request |
bool allScenes | Copy All Scenes - sets bit within Mode parameter to enable Copy All Scenes |
uint16_t groupFrom | Group identifier from |
uint8_t sceneFrom | Scene identifier from - only used if allScenes is FALSE |
uint16_t groupTo | Group identifier to |
uint8_t sceneTo | Scene identifier to - only used if allScenes is FALSE |
zcl_scenes_copy_response_t
Copy Scene Response command structure
Parameters
uint8_t status | Status |
uint16_t groupFrom | Group identifier from |
uint8_t sceneFrom | Scene identifier from |
zcl_scenes_membership_request_t
Get Scene Membership command structure
Parameters
struct ZbApsAddrT dst | Destination address for request |
uint16_t groupId | Group ID |
zcl_scenes_membership_response_t
Get Scene Membership Response command structure
Parameters
uint8_t status | Status |
uint8_t capacity | Capacity |
uint16_t groupId | Group ID |
uint8_t sceneCount | Scent count |
uint8_t sceneList | Scene list |
zcl_scenes_recall_request_t
Recall Scene command structure
Parameters
struct ZbApsAddrT dst | Destination address for request |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
uint16_t transition | Transition time - time in 1/10ths of second. ZCL_SCENES_RECALL_TRANSITION_INVALID (0xffff) means invalid, and won’t be included. (Optional) |
zcl_scenes_recall_response_t
Recall Scene Response command structure
Parameters
uint8_t status | Status |
zcl_scenes_remove_all_request_t
Remove All Scenes command structure
Parameters
struct ZbApsAddrT dst | Destination address for request |
uint16_t groupId | Group ID |
zcl_scenes_remove_all_response_t
Remove All Scenes Response command structure
Parameters
uint8_t status | Status |
uint16_t groupId | Group ID |
zcl_scenes_remove_request_t
Remove Scene command structure
Parameters
struct ZbApsAddrT dst | Destination address for request |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
zcl_scenes_remove_response_t
Remove Scene Response command structure
Parameters
uint8_t status | Status |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
zcl_scenes_store_request_t
Store Scene command structure
Parameters
struct ZbApsAddrT dst | Destination address for request |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
zcl_scenes_store_response_t
Store Scene Response command structure
Parameters
uint8_t status | Status |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
zcl_scenes_view_request_t
View Scene command structure
Parameters
bool isEnhanced | If true, send an Enhanced View Scene request |
struct ZbApsAddrT dst | Destination address for request |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
zcl_scenes_view_response_t
View Scene Response command structure
Parameters
uint8_t status | Status |
uint16_t groupId | Group ID |
uint8_t sceneId | Scene ID |
uint16_t transition | Transition time |
char nameStr | Scene Name |
uint8_t extNum | Number of Extension field sets |
struct { uint16_t clusterId | Cluster ID |
uint8_t length | Length |
uint8_t field | Field - ZCL_SCENES_VIEW_EXT_FIELD_MAX_LEN |
6.2.30. Temperature Measurement
#include "zcl/general/zcl.temp.meas.h"
Functions
ZbZclTempMeasClientAlloc
struct ZbZclClusterT * ZbZclTempMeasClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Temperature 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
ZbZclTempMeasServerAlloc
struct ZbZclClusterT * ZbZclTempMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, int16_t min, int16_t max, uint16_t tolerance);
Create a new instance of the Temperature Measurement Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
min | Minimum value capable of being measured (MinMeasuredValue) |
max | Maximum value capable of being measured (MaxMeasuredValue) |
tolerance | Tolerance |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclTempMeasSvrAttrT
Temperature Measurement Server Attribute IDs
ZCL_TEMP_MEAS_ATTR_MEAS_VAL | MeasuredValue |
ZCL_TEMP_MEAS_ATTR_MIN_MEAS_VAL | MinMeasuredValue |
ZCL_TEMP_MEAS_ATTR_MAX_MEAS_VAL | MaxMeasuredValue |
ZCL_TEMP_MEAS_ATTR_TOLERANCE | Tolerance (Optional) |
6.2.31. Thermostat
#include "zcl/general/zcl.therm.h"
Functions
ZbZclThermClientAlloc
struct ZbZclClusterT * ZbZclThermClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Scenes Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclThermClientClearWeeklySched
enum ZclStatusCodeT ZbZclThermClientClearWeeklySched(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Clear Weekly Schedule command (Optional)
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be called when the response for this request 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
ZbZclThermClientGetRelayStatusLog
enum ZclStatusCodeT ZbZclThermClientGetRelayStatusLog(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Relay Status Log command (Optional)
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
callback | Callback function that will be called when the response for this request 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
ZbZclThermClientGetWeeklySched
enum ZclStatusCodeT ZbZclThermClientGetWeeklySched(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclThermCliGetWeeklyT *req, void (*callback)(struct ZbZclCommandRspT
- rsp, void *arg), void *arg);
Send a Get Weekly Schedule command (Optional)
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Thermostat Get Weekly Schedule info |
callback | Callback function that will be called when the response for this request 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
ZbZclThermClientSetWeeklySched
enum ZclStatusCodeT ZbZclThermClientSetWeeklySched(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclThermWeeklySchedT *req, void (*callback)(struct ZbZclCommandRspT
- rsp, void *arg), void *arg);
Send a Set Weekly Schedule command (Optional)
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Thermostat Weekly Schedule structure |
callback | Callback function that will be called when the response for this request 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
ZbZclThermClientSetpointRaiseLower
enum ZclStatusCodeT ZbZclThermClientSetpointRaiseLower(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclThermCliSetpointT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Setpoint Raise/Lower command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Thermostat Setpoint structure |
callback | Callback function that will be called when the response for this request 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
ZbZclThermServerAlloc
struct ZbZclClusterT * ZbZclThermServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclThermServerCallbacksT *callbacks, void *arg);
Create a new instance of the Thermostat Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
callbacks | Structure containing 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
ZbZclThermServerGetRelayStatusLogRsp
enum ZclStatusCodeT ZbZclThermServerGetRelayStatusLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclThermSvrGetRelayStatusLogRspT *rsp);
Send a Get Relay Status Log Response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
rsp | Get Relay Status Log Response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclThermServerGetWeeklySchedRsp
enum ZclStatusCodeT ZbZclThermServerGetWeeklySchedRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclThermWeeklySchedT *rsp);
Send a Get Weekly Schedule Response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
rsp | Server Clear Get Weekly Schedule response |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
Enumerations
ZbZclThermAttrT
Thermostat Attribute IDs
ZCL_THERM_SVR_ATTR_LOCAL_TEMP | LocalTemperature |
ZCL_THERM_SVR_ATTR_OUTDOOR_TEMP | OutdoorTemperature (Optional) |
ZCL_THERM_SVR_ATTR_OCCUPANCY | Occupancy (Optional) |
ZCL_THERM_SVR_ATTR_ABS_MIN_HEAT_SETPOINT_LIMIT | AbsMinHeatSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_ABS_MAX_HEAT_SETPOINT_LIMI T | AbsMaxHeatSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_ABS_MIN_COOL_SETPOINT_LIMI T | AbsMinCoolSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_ABS_MAX_COOL_SETPOINT_LIMI T | AbsMaxCoolSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_PI_COOLING_DEMAND | PICoolingDemand (Optional) |
ZCL_THERM_SVR_ATTR_PI_HEATING_DEMAND | PIHeatingDemand (Optional) |
ZCL_THERM_SVR_ATTR_HVAC_SYSTYPE_CONFIG | HVACSystemTypeConfiguration (Optional) |
ZCL_THERM_SVR_ATTR_LOCAL_TEMP_CALIB | LocalTemperatureCalibration (Optional) |
ZCL_THERM_SVR_ATTR_OCCUP_COOL_SETPOINT | OccupiedCoolingSetpoint |
ZCL_THERM_SVR_ATTR_OCCUP_HEAT_SETPOINT | OccupiedHeatingSetpoint |
ZCL_THERM_SVR_ATTR_UNOCCUP_COOL_SETPOINT | UnoccupiedCoolingSetpoint (Optional) |
ZCL_THERM_SVR_ATTR_UNOCCUP_HEAT_SETPOINT | UnoccupiedHeatingSetpoint (Optional) |
ZCL_THERM_SVR_ATTR_MIN_HEAT_SETPOINT | MinHeatSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_MAX_HEAT_SETPOINT | MaxHeatSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_MIN_COOL_SETPOINT | MinCoolSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_MAX_COOL_SETPOINT | MaxCoolSetpointLimit (Optional) |
ZCL_THERM_SVR_ATTR_MIN_SETPOINT_DEADBAND | MinSetpointDeadBand (Optional) |
ZCL_THERM_SVR_ATTR_RMT_SENSE | RemoteSensing (Optional) |
ZCL_THERM_SVR_ATTR_CONTROL_SEQ_OPER | ControlSequenceOfOperation |
ZCL_THERM_SVR_ATTR_SYSTEM_MODE | SystemMode |
ZCL_THERM_SVR_ATTR_ALARM_MASK | AlarmMask (Optional) |
ZCL_THERM_SVR_ATTR_RUNNING_MODE | ThermostatRunningMode (Optional) |
ZCL_THERM_SVR_ATTR_START_OF_WEEK | StartOfWeek (Optional) |
ZCL_THERM_SVR_ATTR_NUM_WEEKLY_TRANSITIONS | NumberOfWeeklyTransitions (Optional) |
ZCL_THERM_SVR_ATTR_NUM_DAILY_TRANSITIONS | NumberOfDailyTransitions (Optional) |
ZCL_THERM_SVR_ATTR_TEMP_SETPOINT_HOLD | TemperatureSetpointHold (Optional) |
ZCL_THERM_SVR_ATTR_TEMP_SETPOINT_HOLD_DUR | TemperatureSetpointHoldDuration (Optional) |
ZCL_THERM_SVR_ATTR_PROG_OPER_MODE | ThermostatProgrammingOperationMode (Optional) |
ZCL_THERM_SVR_ATTR_RUNNING_STATE | ThermostatRunningState (Optional) |
ZCL_THERM_SVR_ATTR_SETPOINT_CHANGE_SRC | SetpointChangeSource |
ZCL_THERM_SVR_ATTR_SETPOINT_CHANGE_AMT | SetpointChangeAmount |
ZCL_THERM_SVR_ATTR_SETPOINT_CHANGE_TIMESTAMP | SetpointChangeSourceTimestamp |
ZCL_THERM_SVR_ATTR_OCCUP_SETBACK | OccupiedSetback (Optional) |
ZCL_THERM_SVR_ATTR_OCCUP_SETBACK_MIN | OccupiedSetbackMin (Optional) |
ZCL_THERM_SVR_ATTR_OCCUP_SETBACK_MAX | OccupiedSetbackMax (Optional) |
ZCL_THERM_SVR_ATTR_UNOCCUP_SETBACK | UnoccupiedSetback (Optional) |
ZCL_THERM_SVR_ATTR_UNOCCUP_SETBACK_MIN | UnoccupiedSetbackMin (Optional) |
ZCL_THERM_SVR_ATTR_UNOCCUP_SETBACK_MAX | UnoccupiedSetbackMax (Optional) |
ZCL_THERM_SVR_ATTR_EMERGENCY_HEAT_DELTA | EmergencyHeatDelta (Optional) |
ZCL_THERM_SVR_ATTR_AC_TYPE | ACType |
ZCL_THERM_SVR_ATTR_AC_CAPACITY | ACCapacity |
ZCL_THERM_SVR_ATTR_AC_REFIGERANT_TYPE | ACRefrigerantType |
ZCL_THERM_SVR_ATTR_AC_COMPRESSOR_TYPE | ACCompressorType |
ZCL_THERM_SVR_ATTR_AC_ERROR_CODE | ACErrorCode |
ZCL_THERM_SVR_ATTR_AC_LOUVER_POSITION | ACLouverPosition |
ZCL_THERM_SVR_ATTR_AC_COIL_TEMP | ACCoilTemperature |
ZCL_THERM_SVR_ATTR_AC_CAPACITY_FORMAT | ACCapacityFormat |
Structures
ZbZclThermCliGetWeeklyT
Thermostat Get Weekly Schedule structure
Parameters
uint8_t days_to_return | Days to Return |
uint8_t mode_to_return | Mode to Return |
ZbZclThermCliSetpointT
Thermostat Setpoint structure
Parameters
uint8_t mode | Mode |
int8_t amount | Amount |
ZbZclThermServerCallbacksT
Thermostat Server callbacks configuration
Parameters
setpoint_raise_lower
(callback function pointer) |
enum ZclStatusCodeT (*setpoint_raise_lower)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclThermCliSetpointT *req, struct ZbZclAddrInfoT *srcInfo)
Callback to handle Setpoint Raise/Lower command response |
set_weekly
(callback function pointer) |
enum ZclStatusCodeT (*set_weekly)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclThermWeeklySchedT *req, struct ZbZclAddrInfoT *srcInfo)
Callback to handle Set Weekly Schedule command response |
get_weekly
(callback function pointer) |
enum ZclStatusCodeT (*get_weekly)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclThermCliGetWeeklyT *req, struct ZbZclAddrInfoT *srcInfo)
Callback to handle Get Weekly Schedule command response |
clear_weekly
(callback function pointer) |
enum ZclStatusCodeT (*clear_weekly)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)
Callback to handle Clear Weekly Schedule command response |
get_relay_status_log
(callback function pointer) |
enum ZclStatusCodeT (*get_relay_status_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)
Callback to handle Get Relay Status Log command response |
ZbZclThermSvrGetRelayStatusLogRspT
Get Relay Status Log Response structure
Parameters
uint16_t time_of_day | Time of Day |
uint16_t relay_status | Relay Status |
int16_t local_temp | Local Temperature |
uint8_t humidity_percent | Humidity in Percentage |
int16_t set_point | Unread Entries |
ZbZclThermTransitionsT
Thermostat Transition structure
Parameters
uint16_t transition_time | Transition Time |
int16_t heat_set_point | Heat Set Point (optional) |
int16_t cool_set_point | Cool Set Point (optional) |
ZbZclThermWeeklySchedT
Thermostat Weekly Schedule structure
Parameters
uint8_t num_transitions | Number of Transitions for Sequence |
uint8_t day_of_week_seq | Day of the Week for Sequence - e.g. ZCL_THERM_DAY_OF_WEEK_SUNDAY |
uint8_t mode_for_seq | Mode for Sequence - e.g. ZCL_THERM_MODE_HEAT_SETPOINT_PRESENT |
struct ZbZclThermTransitionsT
transitions |
List of transitions |
6.2.32. Thermostat User Interface
#include "zcl/general/zcl.therm.ui.h"
Functions
ZbZclThermUiClientAlloc
struct ZbZclClusterT * ZbZclThermUiClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Thermostat User Interface Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclThermUiServerAlloc
struct ZbZclClusterT * ZbZclThermUiServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Thermostat User Interface 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
ZbZclThermUiServerAttrT
Thermostat User Interface Attribute IDs
ZCL_THERM_UI_SVR_ATTR_DISPLAY_MODE | TemperatureDisplayMode |
ZCL_THERM_UI_SVR_ATTR_KEYPAD_LOCKOUT | KeypadLockout |
ZCL_THERM_UI_SVR_ATTR_SCHEDULE_PROG_VIS | ScheduleProgrammingVisibility (Optional) |
6.2.33. Time
#include "zcl/general/zcl.time.h"
Functions
ZbZclTimeClientAlloc
struct ZbZclClusterT * ZbZclTimeClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Time Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
Return
- Cluster pointer, or NULL if there is an error
ZbZclTimeServerAlloc
struct ZbZclClusterT * ZbZclTimeServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclTimeServerCallbacks *callbacks, void *arg);
Create a new instance of the Time 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
ZbZclTimeServerCurrentTime
uint32_t ZbZclTimeServerCurrentTime(struct ZbZclClusterT *cluster);
Call the get_time callback defined as part of the Time Server callbacks configuration
Parameters
cluster | Cluster instance from which to send this command |
Return
- Current time in seconds since Zigbee Epoch: Jan 1st 2000
ZbZclTimeServerSetTime
void ZbZclTimeServerSetTime(struct ZbZclClusterT *cluster, uint32_t current_time);
Call the set_time callback defined as part of the Time Server callbacks configuration
Parameters
cluster | Cluster instance from which to send this command |
current_time | New current time value to set |
Return
- Void
Enumerations
ZbZclTimeSvrAttrT
Time Server Attribute IDs
ZCL_TIME_ATTR_TIME | Time |
ZCL_TIME_ATTR_STATUS | TimeStatus |
ZCL_TIME_ATTR_TIME_ZONE | TimeZone (Optional) |
ZCL_TIME_ATTR_DST_START | DstStart (Optional) |
ZCL_TIME_ATTR_DST_END | DstEnd (Optional) |
ZCL_TIME_ATTR_DST_SHIFT | DstShift (Optional) |
ZCL_TIME_ATTR_STANDARD_TIME | StandardTime (Optional) |
ZCL_TIME_ATTR_LOCAL_TIME | LocalTime (Optional) |
ZCL_TIME_ATTR_LAST_SET_TIME | LastSetTime (Optional) |
ZCL_TIME_ATTR_VALID_UNTIL_TIME | ValidUntilTime (Optional) |
Structures
ZbZclTimeServerCallbacks
Time Server callbacks configuration
Parameters
get_time
(callback function pointer) |
uint32_t (*get_time)(struct ZbZclClusterT *clusterPtr, void *arg)
Callback to application, invoked on receipt of Read Attribute request. Returns current time in seconds since Zigbee Epoch: Jan 1st 2000. |
set_time
(callback function pointer) |
void (*set_time)(struct ZbZclClusterT *clusterPtr, uint32_t time_val, void *arg)
Callback to application, invoked on receipt of Write Attribute request for the ZCL_TIME_ATTR_TIME attribute. The set_time app callback should also set the ZCL_TIME_ATTR_LAST_SET_TIME attribute if successful. The time_val parameter is the current time in seconds since Zigbee Epoch: Jan 1st 2000. |
6.2.34. Voice Over Zigbee
#include "zcl/general/zcl.voice.h"
Functions
ZbZclVoiceClientAlloc
struct ZbZclClusterT * ZbZclVoiceClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_voice_client_callbacks_t *callbacks, void *arg);
Create a new instance of the Voice Over Zigbee Client 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
ZbZclVoiceClientEstabReq
enum ZclStatusCodeT ZbZclVoiceClientEstabReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct voice_estab_req_t *estab_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Establishment Request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
estab_req | Establishment Request 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
ZbZclVoiceClientSendControlRsp
enum ZclStatusCodeT ZbZclVoiceClientSendControlRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst_info, struct voice_control_rsp_t *rsp);
Send an Control command
Parameters
cluster | Cluster instance from which to send this command |
dst_info | Destination address for response, including sequence number and tx options |
rsp | Control command response structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclVoiceServerAlloc
struct ZbZclClusterT * ZbZclVoiceServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_voice_server_callbacks_t *callbacks, void *arg);
Create a new instance of the Voice Over Zigbee 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
ZbZclVoiceServerControlReq
enum ZclStatusCodeT ZbZclVoiceServerControlReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct voice_control_t *control_cmd, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Control command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
control_cmd | Control 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
ZbZclVoiceServerSendEstabRsp
enum ZclStatusCodeT ZbZclVoiceServerSendEstabRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst_info, struct voice_estab_rsp_t *rsp);
Send an Establishment Response command
Parameters
cluster | Cluster instance from which to send this command |
dst_info | Destination address for response, including sequence number and tx options |
rsp | Establishment Response command structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclVoiceServerSendVoiceTxRsp
enum ZclStatusCodeT ZbZclVoiceServerSendVoiceTxRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct voice_voice_tx_rsp_t *rsp);
Send a Voice Transmission Response command. The application calls this if it ever encounters an error processing a Voice Transmission packet
Parameters
cluster | Cluster instance from which to send this command |
dst_info | Destination address for response, including sequence number and tx options |
rsp | Voice Transmission Response command structure |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclVoiceTxCompletedReq
enum ZclStatusCodeT ZbZclVoiceTxCompletedReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback) (struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Voice Transmission Complete 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
ZbZclVoiceVoiceTxReq
enum ZclStatusCodeT ZbZclVoiceVoiceTxReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct voice_voice_tx_t *voice_tx, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Voice Transmission command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
voice_tx | Voice Transmission 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
Enumerations
ZbZclVoiceSvrAttrT
Voice Over Zigbee Server Attribute IDs
ZCL_VOICE_ATTR_CODEC_TYPE | CodecType |
ZCL_VOICE_ATTR_SAMP_FREQ | SamplingFrequency |
ZCL_VOICE_ATTR_CODECRATE | Codecrate |
ZCL_VOICE_ATTR_ESTAB_TIMEOUT | EstablishmentTimeout |
ZCL_VOICE_ATTR_CODEC_TYPE_SUB_1 | CodecTypeSub1 (Optional) |
ZCL_VOICE_ATTR_CODEC_TYPE_SUB_2 | CodecTypeSub2 (Optional) |
ZCL_VOICE_ATTR_CODEC_TYPE_SUB_3 | CodecTypeSub3 (Optional) |
ZCL_VOICE_ATTR_COMPRESSION_TYPE | CompressionType (Optional) |
ZCL_VOICE_ATTR_COMPRESSION_RATE | CompressionRate (Optional) |
ZCL_VOICE_ATTR_OPTION_FLAGS | OptionFlags (Optional) |
ZCL_VOICE_ATTR_THRESHOLD | Threshold (Optional) |
Structures
voice_control_rsp_t
Control Response command structure
Parameters
uint8_t ack_nak | ACK=0x01 NAK=0x00 |
voice_control_t
Control command structure
Parameters
uint8_t control_type | Control Type |
voice_estab_req_t
Establishment Request command structure
Parameters
uint8_t flag | Flag |
uint8_t codec_type | Codec Type |
uint8_t samp_freq | Samp. Freq. |
uint8_t codec_rate | Codec Rate |
uint8_t service_type | Service Type |
uint8_t codec_type_s1 | Codec TypeS1 |
uint8_t codec_type_s2 | Codec TypeS2 |
uint8_t codec_type_s3 | Codec TypeS3 |
uint8_t comp_type | Comp. Type |
uint8_t comp_rate | Comp. Rate |
voice_estab_rsp_t
Establishment Response command structure
Parameters
uint8_t ack_nak | ACK=0x01 NAK=0x00 |
uint8_t codec_type | CodecType |
voice_voice_tx_rsp_t
Voice Transmission Response command structure
Parameters
uint8_t error_flag | Error Flag - e.g. ZCL_VOICE_TX_RSP_ERROR_DECODE |
voice_voice_tx_t
Voice Transmission command structure
Parameters
uint8_t *voice_data | Voice Data |
uint16_t voice_data_len | Voice Data Length |
zcl_voice_client_callbacks_t
Voice Over Zigbee Client callbacks configuration
Parameters
control
(callback function pointer) |
enum ZclStatusCodeT (*control)(struct ZbZclClusterT *clusterPtr, struct voice_control_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Control command |
zcl_voice_server_callbacks_t
Voice Over Zigbee Server callbacks configuration
Parameters
estab_req
(callback function pointer) |
enum ZclStatusCodeT (*estab_req)(struct ZbZclClusterT *clusterPtr, struct voice_estab_req_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Establishment Request command |
voice_tx
(callback function pointer) |
enum ZclStatusCodeT (*voice_tx)(struct ZbZclClusterT *clusterPtr, struct voice_voice_tx_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Voice Transmission command. The application should return ZCL_STATUS_SUCCESS or call ZbZclVoiceServerSendVoiceTxRsp to send an error response and return ZCL_STATUS_SUCCESS_NO_DEFAULT_RESPONSE |
tx_complete
(callback function pointer) |
enum ZclStatusCodeT (*tx_complete)(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *src_info, void *arg)
Callback to application, invoked on receipt of Voice Transmission Completion command |
6.2.35. Water Content Measurement
#include "zcl/general/zcl.wcm.h"
Functions
ZbZclWaterContentMeasClientAlloc
struct ZbZclClusterT * ZbZclWaterContentMeasClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, enum ZbZclClusterIdT clusterID);
Create a new instance of the Water Content Measurement Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
clusterID | Cluster identifier (Relative Humidity 0x0405, Leaf Wetness 0x0407 or Soil Moisture 0x0408) |
- Cluster pointer, or NULL if there is an error
ZbZclWaterContentMeasServerAlloc
struct ZbZclClusterT * ZbZclWaterContentMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, enum ZbZclClusterIdT clusterID, uint16_t min, uint16_t max);
Create a new instance of the Water Content Measurement Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
clusterID | Cluster identifier (Relative Humidity 0x0405, Leaf Wetness 0x0407 or Soil Moisture 0x0408) |
min | Default minimum value |
max | Default maximum value |
Return
- Cluster pointer, or NULL if there is an error
Enumerations
ZbZclWcmSvrAttrT
Water Content Measurement Server Attribute IDs
ZCL_WC_MEAS_ATTR_MEAS_VAL | MeasuredValue |
ZCL_WC_MEAS_ATTR_MIN_MEAS_VAL | MinMeasuredValue |
ZCL_WC_MEAS_ATTR_MAX_MEAS_VAL | MaxMeasuredValue |
ZCL_WC_MEAS_ATTR_TOLERANCE | Tolerance (Optional) |
6.2.36. Window Covering
#include "zcl/general/zcl.window.h"
Functions
ZbZclWindowClientAlloc
struct ZbZclClusterT * ZbZclWindowClientAlloc(struct ZigBeeT *zb, uint8_t endpoint);
Create a new instance of the Window Covering Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
- Cluster pointer, or NULL if there is an error
ZbZclWindowClientCommandDown
enum ZclStatusCodeT ZbZclWindowClientCommandDown(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Down/Close command
Parameters
cluster | Cluster instance from which to send this command |
dst | The destination address information |
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
ZbZclWindowClientCommandStop
enum ZclStatusCodeT ZbZclWindowClientCommandStop(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Stop command
Parameters
cluster | Cluster instance from which to send this command |
dst | The destination address information |
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
ZbZclWindowClientCommandUp
enum ZclStatusCodeT ZbZclWindowClientCommandUp(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send an Up/Open command
Parameters
cluster | Cluster instance from which to send this command |
dst | The destination address information |
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
ZbZclWindowClosureServerMode
enum ZclStatusCodeT ZbZclWindowClosureServerMode(struct ZbZclClusterT *cluster, uint8_t mode);
Configure the Window Covering mode
Parameters
cluster | Cluster instance from which to send this command |
mode | Window Covering mode bit mask |
Return
- ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error
ZbZclWindowServerAlloc
struct ZbZclClusterT * ZbZclWindowServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclWindowServerCallbacksT *callbacks, void *arg);
Create a new instance of the Window Covering 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
Enumerations
ZbZclWncvServerAttrT
Window Covering Server Attribute Ids
ZCL_WNCV_SVR_ATTR_COVERING_TYPE | WindowCoveringType |
ZCL_WNCV_SVR_ATTR_PHY_CLOSE_LIMIT_LIFT | PhysicalClosedLimitLift (Optional) |
ZCL_WNCV_SVR_ATTR_PHY_CLOSE_LIMIT_TILT | PhysicalClosedLimitTilt (Optional) |
ZCL_WNCV_SVR_ATTR_CURR_POSITION_LIFT | CurrentPositionLift (Optional) |
ZCL_WNCV_SVR_ATTR_CURR_POSITION_TILT | CurrentPositionTilt (Optional) |
ZCL_WNCV_SVR_ATTR_ACTUATION_NUMBER_LIFT | NumberOfActuationsLift (Optional) |
ZCL_WNCV_SVR_ATTR_ACCUATION_NUMBER_TILT | NumberOfActuationsTilt (Optional) |
ZCL_WNCV_SVR_ATTR_CONFIG_STATUS | ConfigStatus |
ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT | CurrentPositionLiftPercentage |
ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT | CurrentPositionTiltPercentage |
ZCL_WNCV_SVR_ATTR_INSTALLED_OPENED_LIMIT_LIFT | InstalledOpenLimitLift |
ZCL_WNCV_SVR_ATTR_INSTALLED_CLOSED_LIMIT_LIFT | InstalledClosedLimitLift |
ZCL_WNCV_SVR_ATTR_INSTALLED_OPENED_LIMIT_TILT | InstalledOpenLimitTilt |
ZCL_WNCV_SVR_ATTR_INSTALLED_CLOSED_LIMIT_TILT | InstalledClosedLimitTilt |
ZCL_WNCV_SVR_ATTR_VELOCITY_LIFT | VelocityLift (Optional) |
ZCL_WNCV_SVR_ATTR_ACCELERATION_TIME_LIFT | AccelerationTimeLift (Optional) |
ZCL_WNCV_SVR_ATTR_DECELERATION_TIME_LIFT | DecelerationTimeLift (Optional) |
ZCL_WNCV_SVR_ATTR_MODE | Mode |
ZCL_WNCV_SVR_ATTR_INTERMEDIATE_SETPOINTS_LIFT | Intermediate Setpoints - Lift (Optional) |
ZCL_WNCV_SVR_ATTR_INTERMEDIATE_SETPOINTS_TILT | Intermediate Setpoints - Tilt (Optional) |
ZbZclWncvTypes
Window Covering Type enumerations
ZCL_WNCV_TYPE_ROLLERSHADE | Rollershade |
ZCL_WNCV_TYPE_ROLLERSHADE_2_MOTOR | Rollershade - 2 Motor |
ZCL_WNCV_TYPE_ROLLERSHADE_EXTERIOR | Rollershade – Exterior |
ZCL_WNCV_TYPE_ROLLERSHADE_EXTERIOR_2_MOTOR | Rollershade - Exterior - 2 Motor |
ZCL_WNCV_TYPE_DRAPERY | Drapery |
ZCL_WNCV_TYPE_AWNING | Awning |
ZCL_WNCV_TYPE_SHUTTER | Shutter |
ZCL_WNCV_TYPE_TILT_BLIND_TILT_ONLY | Tilt Blind - Tilt Only |
ZCL_WNCV_TYPE_TILT_BLIND_LIFT_TILT | Tilt Blind - Lift and Tilt |
ZCL_WNCV_TYPE_PROJECTOR_SCREEN | Projector Screen |
Structures
ZbZclWindowServerCallbacksT
Window Covering Server callbacks configuration
Parameters
up_command
(callback function pointer) |
enum ZclStatusCodeT (*up_command)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr, void *arg)
Callback to application, invoked on receipt of Up/Open command. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT. |
down_command
(callback function pointer) |
enum ZclStatusCodeT (*down_command)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr, void *arg)
Callback to application, invoked on receipt of Down/Close command. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT. |
stop_command
(callback function pointer) |
enum ZclStatusCodeT (*stop_command)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr, void *arg)
Callback to application, invoked on receipt of Stop command. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT. |
set_lift_and_tilt_command
(callback function pointer) |
enum ZclStatusCodeT (*set_lift_and_tilt_command)(struct ZbZclClusterT *cluster, void *arg, uint8_t liftPercentage, uint8_t tiltPercentage)
Callback to application, invoked to handle setting a Scene, which includes Lift and Tilt values. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT. |
6.3. IAS Security Clusters
6.3.1. IAS ACE
#include "zcl/security/zcl.ias_ace.h"
Functions
ZbZclIasAceClientAlloc
struct ZbZclClusterT * ZbZclIasAceClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, void *arg);
Allocate the IAS ACE Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
ZbZclIasAceClientCommandArmReq
enum ZclStatusCodeT ZbZclIasAceClientCommandArmReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclIasAceClientCommandArmT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Arm command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
cmd_req | Arm 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
ZbZclIasAceClientCommandBypassReq
enum ZclStatusCodeT ZbZclIasAceClientCommandBypassReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclIasAceClientCommandBypassT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Bypass command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
cmd_req | Bypass 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
ZbZclIasAceClientCommandEmergencyReq
enum ZclStatusCodeT ZbZclIasAceClientCommandEmergencyReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send an Emergency 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
ZbZclIasAceClientCommandFireReq
enum ZclStatusCodeT ZbZclIasAceClientCommandFireReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Fire 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
ZbZclIasAceClientCommandGetBypassedZoneListReq
enum ZclStatusCodeT ZbZclIasAceClientCommandGetBypassedZoneListReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Bypassed Zone List 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
ZbZclIasAceClientCommandGetPanelStatusReq
enum ZclStatusCodeT ZbZclIasAceClientCommandGetPanelStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Panel Status changed request
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
ZbZclIasAceClientCommandGetZoneIdMapReq
enum ZclStatusCodeT ZbZclIasAceClientCommandGetZoneIdMapReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Zone ID Map 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
ZbZclIasAceClientCommandGetZoneInfoReq
enum ZclStatusCodeT ZbZclIasAceClientCommandGetZoneInfoReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclIasAceClientCommandGetZoneInfoT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Zone Info command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
cmd_req | Get Zone Info 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
ZbZclIasAceClientCommandGetZoneStatusReq
enum ZclStatusCodeT ZbZclIasAceClientCommandGetZoneStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclIasAceClientCommandGetZoneStatusT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Get Zone Status command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
cmd_req | Get Zone Status 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
ZbZclIasAceClientCommandPanicReq
enum ZclStatusCodeT ZbZclIasAceClientCommandPanicReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);
Send a Panic 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
ZbZclIasAceClientParseArmRsp
bool ZbZclIasAceClientParseArmRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandArmRspT *rsp);
Parse an Arm Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Arm response structure |
Return
- True on success, false otherwise
ZbZclIasAceClientParseBypassRsp
bool ZbZclIasAceClientParseBypassRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandBypassRspT *rsp);
Parse a Bypass Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Bypass Response structure |
Return
- True on success, false otherwise
ZbZclIasAceClientParseGetPanelStatusRsp
bool ZbZclIasAceClientParseGetPanelStatusRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetPanelStatusRspT *rsp);
Parse a Get Panel Status Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Zone Status Changed Response structure |
Return
- True on success, false otherwise
ZbZclIasAceClientParseGetZoneIdMapRsp
bool ZbZclIasAceClientParseGetZoneIdMapRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetZoneIdMapRspT *rsp);
Parse a Get Zone ID Map Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Get Zone ID Map Response structure |
Return
- True on success, false otherwise
ZbZclIasAceClientParseGetZoneInfoRsp
bool ZbZclIasAceClientParseGetZoneInfoRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetZoneInfoRspT *rsp);
Parse a Get Zone Info Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Get Zone Info Response structure |
Return
- True on success, false otherwise
ZbZclIasAceClientParseGetZoneStatusRsp
bool ZbZclIasAceClientParseGetZoneStatusRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetZoneStatusRspT *rsp);
Parse a Get Zone Status Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Get Zone Status Response structure |
Return
- True on success, false otherwise
ZbZclIasAceClientParseSetBypassedZoneList
bool ZbZclIasAceClientParseSetBypassedZoneList(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandSetBypassedZoneListT *rsp);
Parse a Set Bypassed Zone List Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Set Bypassed Zone List Response structure |
Return
- True on success, false otherwise
ZbZclIasAceClientParseZoneStatusChanged
bool ZbZclIasAceClientParseZoneStatusChanged(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandZoneStatusChangedT *rsp);
Parse a Zone Status Changed Response command payload into a data structure
Parameters
buf | Response buffer |
len | Length of response buffer |
rsp | Zone Status Changed Response structure |
Return
- True on success, false otherwise
ZbZclIasAceServerAlloc
struct ZbZclClusterT * ZbZclIasAceServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclIasAceServerCallbacksT *callbacks, void *arg);
Create a new instance of the IAS ACE Server cluster
If 'use_trip_pair' is true, application must call ZbZclIasAceServerEnrollRequest to perform the 'trip-to-pair' process, unless the IAS CIE has sent us an unsolicited Auto-Enroll-Response
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
ZbZclIasAceServerGetFreeZoneId
bool ZbZclIasAceServerGetFreeZoneId(struct ZbZclClusterT *cluster, uint8_t *zone_id_ptr);
Returns the first free Zone ID not already in the Zone Table
Parameters
cluster | Cluster instance from which to send this command |
zone_id_ptr | Zone ID value |
Return
- True on success, false otherwise
ZbZclIasAceServerPanelCodeConfig
bool ZbZclIasAceServerPanelCodeConfig(struct ZbZclClusterT *cluster, const char *arm_code);
Change the Panel Arm/Disarm Code
Parameters
cluster | Cluster instance from which to send this command |
arm_code | Arm code |
Return
- True on success, false otherwise
ZbZclIasAceServerPanelStatusConfig
bool ZbZclIasAceServerPanelStatusConfig(struct ZbZclClusterT *cluster, enum ZbZclIasAcePanelStatusT panel_status, uint8_t seconds_remain, enum ZbZclIasAceAudibleNotifyT audible_notify);
Update the Panel Status
Parameters
cluster | Cluster instance from which to send this command |
panel_status | Panel Status enumeration |
seconds_remain | Seconds remaining |
Return
- True on success, false otherwise
ZbZclIasAceServerZoneBypassConfig
enum ZbZclIasAceBypassResultT ZbZclIasAceServerZoneBypassConfig(struct ZbZclClusterT *cluster, uint8_t zone_id, bool bypass);
Bypass zone if allowed
Parameters
cluster | Cluster instance from which to send this command |
zone_id | Zone ID of zone in question |
bypass | True if zone will be bypassed, false if not |
Return
- Result of bypass config command
ZbZclIasAceServerZoneBypassPerms
bool ZbZclIasAceServerZoneBypassPerms(struct ZbZclClusterT *cluster, uint8_t zone_id, enum ZbZclIasAceBypassPermsT bypass_perms);
Configure Bypass Permissions
Parameters
cluster | Cluster instance from which to send this command |
zone_id | Zone ID of zone in question |
bypass_perms | Desired bypass permissions |
Return
- True on success, false otherwise
ZbZclIasAceServerZoneStatusConfig
bool ZbZclIasAceServerZoneStatusConfig(struct ZbZclClusterT *cluster, uint8_t zone_id, enum ZbZclIasZoneServerZoneStatusT zone_status, enum ZbZclIasAceAudibleNotifyT audible_notify);
Configure Zone Status
Parameters
cluster | Cluster instance from which to send this command |
zone_id | Zone ID of zone in question |
zone_status | Desired zone status |
audible_notify | Determines if zone notification is audible or not |
Return
- True on success, false otherwise
ZbZclIasAceServerZoneTableAdd
bool ZbZclIasAceServerZoneTableAdd(struct ZbZclClusterT *cluster, struct ZbZclIasAceServerZoneTableAddT *req);
Add new zone entry
Parameters
cluster | Cluster instance from which to send this command |
req | Zone Table Add request structure |
Return
- True on success, false otherwise
ZbZclIasAceServerZoneTableAddrLookup
uint64_t ZbZclIasAceServerZoneTableAddrLookup(struct ZbZclClusterT *cluster, uint8_t zone_id);
Returns address of paired zone, or 0 if not found
Parameters
cluster | Cluster instance from which to send this command |
zone_id | ID of zone to be returned |
Return
- Address of zone if successful, 0 on error
ZbZclIasAceServerZoneTableDeleteByAddr
bool ZbZclIasAceServerZoneTableDeleteByAddr(struct ZbZclClusterT *cluster, uint64_t addr);
Delete a zone by address
Parameters
cluster | Cluster instance from which to send this command |
addr | Address of zone to be deleted |
Return
- True on success, false otherwise
ZbZclIasAceServerZoneTableDeleteById
bool ZbZclIasAceServerZoneTableDeleteById(struct ZbZclClusterT *cluster, uint8_t zone_id);
Delete a zone by zone ID
Parameters
cluster | Cluster instance from which to send this command |
zone_id | ID of zone to be deleted |
Return
- True on success, false otherwise
ZbZclIasAceServerZoneTableIdLookup
bool ZbZclIasAceServerZoneTableIdLookup(struct ZbZclClusterT *cluster, uint64_t zone_addr, uint8_t *zone_id_ptr);
Attempts to find a zone based on extended address, and returns the zone Id if found
Parameters
cluster | Cluster instance from which to send this command |
zone_addr | Address of Zone being looked up |
zone_id_ptr | If successful, points to zone ID that was looked up |
Return
- True on success, false otherwise
Structures
ZbZclIasAceClientCommandArmT
Arm command structure
Parameters
enum ZbZclIasAceArmModeT arm_mode | Arm Mode |
char arm_code | Arm/Disarm Code |
uint8_t zone_id | Zone ID |
ZbZclIasAceClientCommandBypassT
Bypass command structure
Parameters
uint8_t num_zones | Number of Zones |
uint8_t zone_id_list | Zone ID List |
char arm_code | Arm/Disarm Code |
ZbZclIasAceClientCommandGetZoneInfoT
Get Zone Info command structure
Parameters
uint8_t zone_id | Zone ID |
ZbZclIasAceClientCommandGetZoneStatusT
Get Zone Status command structure
Parameters
uint8_t starting_zone_id | Starting Zone ID |
uint8_t max_zone_ids | Max Number of Zone IDs |
uint8_t zone_status_mask_flag | Zone Status Mask Flag |
uint16_t zone_status_mask | Zone Status Mask |
ZbZclIasAceServerCallbacksT
IAS ACE Server callbacks configuration
Parameters
arm_req
(callback function pointer) |
bool (*arm_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclIasAceClientCommandArmT *arm_req, struct ZbZclIasAceServerCommandArmRspT *arm_rsp)
Callback to application, invoked on receipt of Arm command |
bypass_req
(callback function pointer) |
void (*bypass_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclIasAceClientCommandBypassT *bypass_req, struct ZbZclIasAceServerCommandBypassRspT *bypass_rsp)
Callback to application, invoked on receipt of Bypass command |
emerg_req
(callback function pointer) |
enum ZclStatusCodeT (*emerg_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclAddrInfoT *srcInfo)
Callback to application, invoked on receipt of Emergency command |
fire_req
(callback function pointer) |
enum ZclStatusCodeT (*fire_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclAddrInfoT *srcInfo)
Callback to application, invoked on receipt of Fire command |
panic_req
(callback function pointer) |
enum ZclStatusCodeT (*panic_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclAddrInfoT *srcInfo)
Callback to application, invoked on receipt of Panic command |
ZbZclIasAceServerCommandArmRspT
Arm response structure
Parameters
enum ZbZclIasAceArmNotifyT arm_notify | Arm Notification |
ZbZclIasAceServerCommandBypassRspT
Bypass Response response structure
Parameters
uint8_t num_zones | Number of Zones |
enum ZbZclIasAceBypassResultT
bypass_result_list |
Bypass Result for Zone ID List |
ZbZclIasAceServerCommandGetPanelStatusRspT
Get Panel Status response structure
Parameters
enum ZbZclIasAcePanelStatusT
panel_status |
Panel Status |
uint8_t seconds_remain | Seconds Remaining |
enum ZbZclIasAceAudibleNotifyT
audible_notify |
Audible Notification |
enum ZbZclIasAceAlarmStatusT
alarm_status |
Alarm Status |
ZbZclIasAceServerCommandGetZoneIdMapRspT
Get Zone ID Map response structure
Parameters
uint16_t zond_id_map_list | Zone ID Map List |
ZbZclIasAceServerCommandGetZoneInfoRspT
Get Zone Info response structure
Parameters
uint8_t zone_id | Zone ID |
enum ZbZclIasZoneServerZoneTypeT
zone_type |
Zone Type |
uint64_t zone_addr | IEEE Address |
char zone_label | Zone Label |
ZbZclIasAceServerCommandGetZoneStatusRspT
Get Zone Status response structure
Parameters
uint8_t zone_status_complete | Zone Status Complete |
uint8_t num_zones | Number of Zones |
struct { uint8_t zone_id | Zone ID |
enum ZbZclIasZoneServerZoneStatusT
zone_status |
Zone Status |
ZbZclIasAceServerCommandSetBypassedZoneListT
Set Bypassed Zone List command structure
Parameters
uint8_t num_zones | Number of Zones |
uint8_t zone_id_list | Zone ID List |
ZbZclIasAceServerCommandZoneStatusChangedT
Zone Status Changed command structure
Parameters
uint8_t zone_id | Zone ID |
enum ZbZclIasZoneServerZoneStatusT
zone_status |
Zone Status |
enum ZbZclIasAceAudibleNotifyT
audible_notify |
Audible Notification |
char zone_label | Zone Label |
ZbZclIasAceServerZoneTableAddT
Zone Table Add request structure
Parameters
enum ZbZclIasZoneServerZoneTypeT
zone_type |
Zone Type |
uint64_t zone_addr | Zone Address |
const char *zone_label | Zone Label - May be NULL, Max length = ZCL_IAS_ACE_ZONE_LABEL_STRING_MAX_LEN |
uint8_t zone_id | Zone ID - can use ZbZclIasAceServerGetFreeZoneId |
6.3.2. IAS WD
#include "zcl/security/zcl.ias_wd.h"
Functions
ZbZclIasWdClientAlloc
struct ZbZclClusterT * ZbZclIasWdClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, void *arg);
Create a new instance of the IAS Warning Device Client cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
arg | Pointer to application data that will included in the callback when invoked. |
Return
- Cluster pointer, or NULL if there is an error
ZbZclIasWdServerAlloc
struct ZbZclClusterT * ZbZclIasWdServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclIasWdServerCallbacksT *callbacks, void *arg);
Create a new instance of the IAS Warning Device 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
Enumerations
ZbZclIasWdLevelT
IAS Warning Device Siren Level Field Values
ZCL_IAS_WD_LEVEL_LOW | Low level sound |
ZCL_IAS_WD_LEVEL_MEDIUM | Medium level sound |
ZCL_IAS_WD_LEVEL_HIGH | High level sound |
ZCL_IAS_WD_LEVEL_VERY_HIGH | Very high level sound |
ZbZclIasWdSquawkModeT
IAS Warning Device Squawk Mode Field
ZCL_IAS_WD_SQUAWK_MODE_ARMED | Notification sound for “System is armed” |
ZCL_IAS_WD_SQUAWK_MODE_DISARMED | Notification sound for "System is disarmed" |
ZbZclIasWdStrobeT
IAS Warning Device Strobe Field
ZCL_IAS_WD_STROBE_OFF | No strobe |
ZCL_IAS_WD_STROBE_ON | Use strobe in parallel to warning |
ZbZclIasWdSvrAttrT
IAS Warning Device Server Attribute IDs
ZCL_IAS_WD_SVR_ATTR_MAX_DURATION | MaxDuration |
ZbZclIasWdWarningModeT
IAS Warning Device Warning Modes
ZCL_IAS_WD_WARNING_MODE_STOP | Stop (no warning) |
ZCL_IAS_WD_WARNING_MODE_BURGLAR | Burglar |
ZCL_IAS_WD_WARNING_MODE_FIRE | Fire |
ZCL_IAS_WD_WARNING_MODE_EMERGENCY | Emergency |
ZCL_IAS_WD_WARNING_MODE_POLICE_PANIC | Police panic |
ZCL_IAS_WD_WARNING_MODE_FIRE_PANIC | Fire panic |
ZCL_IAS_WD_WARNING_MODE_EMERGENCY_PANIC | Emergency Panic (i.e., medical issue) |
Structures
ZbZclIasWdClientSquawkReqT
IAS Warning Device Client Squawk command structure
Parameters
enum ZbZclIasWdSquawkModeT
squawk_mode |
Squawk mode |
enum ZbZclIasWdStrobeT strobe | Strobe |
enum ZbZclIasWdLevelT squawk_level | Squawk level |
ZbZclIasWdClientStartWarningReqT
IAS Warning Device Client Start Warning command structure
Parameters
enum ZbZclIasWdWarningModeT
warning_mode |
Warning Mode |
enum ZbZclIasWdStrobeT strobe | Strobe |
enum ZbZclIasWdLevelT siren_level | Siren Level |
uint16_t warning_duration | Warning Duration |
uint8_t strobe_dutycycle | Strobe Duty Cycle |
enum ZbZclIasWdLevelT strobe_level | Strobe Level |
ZbZclIasWdServerCallbacksT
IAS Warning Server callbacks configuration
Parameters
start_warning
(callback function pointer) |
enum ZclStatusCodeT (*start_warning)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclIasWdClientStartWarningReqT *warn_req)
Callback to handle Start Warning command. ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. |
squawk
(callback function pointer) |
enum ZclStatusCodeT (*squawk)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclIasWdClientSquawkReqT *squawk_req)
Callback to handle Squawk command. ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. |
6.3.3. IAS Zone
#include "zcl/security/zcl.ias_zone.h"
Functions
ZbZclIasZoneClientAlloc
struct ZbZclClusterT * ZbZclIasZoneClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclIasZoneClientCallbacksT *callbacks, void *arg);
Create a new instance of the IAS Zone Client 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
ZbZclIasZoneClientInitiateAutoEnroll
enum ZclStatusCodeT ZbZclIasZoneClientInitiateAutoEnroll(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(const struct ZbZclWriteRspT *, void *), void *arg);
Send a Zone Auto-Enroll 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
ZbZclIasZoneClientInitiateNormalMode
enum ZclStatusCodeT ZbZclIasZoneClientInitiateNormalMode(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Initiate Normal Operation Mode 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
ZbZclIasZoneClientInitiateTestMode
enum ZclStatusCodeT ZbZclIasZoneClientInitiateTestMode(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclIasZoneClientTestModeReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Initiate Test Mode request command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
req | Initiate Test Mode 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
ZbZclIasZoneClientSendAutoEnrollResponse
enum ZclStatusCodeT ZbZclIasZoneClientSendAutoEnrollResponse(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, uint8_t zone_id, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);
Send a Zone Auto-Enroll response command
Parameters
cluster | Cluster instance from which to send this command |
dst | Destination address for request |
zone_id | Zone ID |
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
ZbZclIasZoneServerAlloc
struct ZbZclClusterT * ZbZclIasZoneServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t zone_type, uint16_t manuf_code, bool use_trip_pair, struct ZbZclIasZoneServerCallbacksT *callbacks, void *arg);
Create a new instance of the IAS Zone Server cluster
Parameters
zb | Zigbee stack instance |
endpoint | Endpoint on which to create cluster |
zone_type | Zone Type |
manuf_code | Manufacturer Code |
use_trip_pair | If true, use 'trip-to-pair' application must call ZbZclIasZoneServerEnrollRequest to perform the 'trip-to-pair' process, unless the IAS CIE has sent us an unsolicited Auto-Enroll-Response |
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
ZbZclIasZoneServerEnrollRequest
enum ZclStatusCodeT ZbZclIasZoneServerEnrollRequest(struct ZbZclClusterT *cluster, void (*callback)(struct ZbZclIasZoneClientEnrollResponseT *enrl_rsp, void *arg), void *arg);
Send a Zone Enroll request command Used with 'trip-to-pair'. Before sending a Zone Enroll Request, the IAS CIE must write to the IAS_CIE_Address attribute with its IEEE address.
Parameters
cluster | Cluster instance from which to send this command |
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
Enumerations
ZbZclIasZoneClientResponseCodeT
IAS Zone Enroll Response Code
ZCL_IAS_ZONE_CLI_RESP_SUCCESS | Success |
ZCL_IAS_ZONE_CLI_RESP_NOT_SUPPORTED | Not supported |
ZCL_IAS_ZONE_CLI_RESP_NO_ENROLL_PERMIT | No enroll permit |
ZCL_IAS_ZONE_CLI_RESP_TOO_MANY_ZONES | Too many zones |
ZbZclIasZoneServerAttrT
IAS Zone Server Attribute IDs
ZCL_IAS_ZONE_SVR_ATTR_ZONE_STATE | ZoneState |
ZCL_IAS_ZONE_SVR_ATTR_ZONE_TYPE | ZoneType |
ZCL_IAS_ZONE_SVR_ATTR_ZONE_STATUS | ZoneStatus |
ZCL_IAS_ZONE_SVR_ATTR_CIE_ADDR | IAS_CIE_Address |
ZCL_IAS_ZONE_SVR_ATTR_ZONE_ID | ZoneID |
ZCL_IAS_ZONE_SVR_ATTR_NUM_ZONE_SENSITIVITY_SUP PORTED | NumberOfZoneSensitivityLevelsSupported (Optional) |
ZCL_IAS_ZONE_SVR_ATTR_CURRENT_ZONE_SENSITIVITY_LEVEL | CurrentZoneSensitivityLevel (Optional) |
ZCL_IAS_ZONE_SVR_ATTR_CIE_ENDPOINT | Exegin internal (Optional) |
ZbZclIasZoneServerModeT
IAS Zone ZoneStatus Attribute Bit Test Value
ZCL_IAS_ZONE_SVR_MODE_NORMAL | Normal |
ZCL_IAS_ZONE_SVR_MODE_TEST | Set |
ZbZclIasZoneServerZoneStateT
IAS Zone ZoneState Attribute
ZCL_IAS_ZONE_SVR_STATE_NOT_ENROLLED | Not enrolled |
ZCL_IAS_ZONE_SVR_STATE_ENROLLED | Enrolled (the client will react to Zone State Change Notification commands from the server) |
ZbZclIasZoneServerZoneStatusT
IAS Zone ZoneStatus Attribute
ZCL_IAS_ZONE_SVR_ZONE_STATUS_NONE | Alarm1 |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_ALARM2 | Alarm2 |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_TAMPER | Tamper |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_BATTERY | Battery |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_SUPERVISION_REPO RTS | Supervision Notify |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_RESTORE_REPORTS | Restore Notify |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_TROUBLE | Trouble |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_AC_MAINS | AC (mains) |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_TEST | Test |
ZCL_IAS_ZONE_SVR_ZONE_STATUS_BATTERY_DEFECT | Battery Defect |
ZbZclIasZoneServerZoneTypeT