Zigbee Cluster Library Overview 1

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 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 [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

Return

  • Cluster pointer, or NULL if there is an error

ZbZclKeepAliveClientStart

void ZbZclKeepAliveClientStart(struct ZigBeeT *zb);

Start Keep Alive

Parameters

Return

  • Void

ZbZclKeepAliveClientStop

void ZbZclKeepAliveClientStop(struct ZigBeeT *zb);

Stop Keep Alive and abort the TCSO

Parameters

Return

  • Void

ZbZclKeepAliveServerAlloc

struct ZbZclClusterT * ZbZclKeepAliveServerAlloc(struct ZigBeeT *zb, uint8_t endpoint);

Create a new instance of the Keep Alive Server cluster

Parameters

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

Return

  • ZCL Status Code

Enumerations

ZbZclKeepAliveSvrAttrT

Keep Alive Server Attribute IDs

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

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

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

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

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclAlarmsAttrT

Alarms Attribute IDs

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclBallastConfigSvrAttrT

Ballast Configuration Server Attributes IDs

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclBasicSvrAttrT

Basic Server Attribute IDs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclColorSvrAttrT

Color Control Server Attribute IDs

Structures

ZbZclColorClientColorLoopSetReqT

Color Loop Set command structure

Parameters

ZbZclColorClientMoveColorTempReqT

Move Color Temperature command structure

Parameters

ZbZclColorClientMoveColorXYReqT

Move Color command structure

Parameters

ZbZclColorClientMoveHueEnhReqT

Enhanced Move Hue command structure

Parameters

ZbZclColorClientMoveHueReqT

Move Hue command structure

Parameters

ZbZclColorClientMoveSatReqT

Move Saturation command structure

Parameters

ZbZclColorClientMoveToColorTempReqT

Move to Color Temperature command structure

Parameters

ZbZclColorClientMoveToColorXYReqT

Move to Color command structure

Parameters

ZbZclColorClientMoveToHueEnhReqT

Enhanced Move to Hue command structure

Parameters

ZbZclColorClientMoveToHueReqT

Move to Hue command structure

Parameters

ZbZclColorClientMoveToHueSatEnhReqT

Enhanced Move to Hue and Saturation command structure

Parameters

ZbZclColorClientMoveToHueSatReqT

Move to Hue and Saturation command structure

Parameters

ZbZclColorClientMoveToSatReqT

Move to Saturation command structure

Parameters

ZbZclColorClientStepColorTempReqT

Step Color Temperature command structure

Parameters

ZbZclColorClientStepColorXYReqT

Step Color command structure

Parameters

ZbZclColorClientStepHueEnhReqT

Enhanced Step Hue command structure

Parameters

ZbZclColorClientStepHueReqT

Step Hue command structure

Parameters

ZbZclColorClientStepSatReqT

Step Saturation command structure

Parameters

ZbZclColorClientStopMoveStepReqT

Stop Move Step command structure

Parameters

ZbZclColorServerCallbacksT

Color Control Server callbacks configuration

Parameters

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclCommissionServerAttrT

Commissioning Server Attribute IDs

Structures

ZbZclCommissionClientEnableInfoT

Commissioning Client Enable Information structure

Parameters

ZbZclCommissionClientResetStartup

Reset Startup Parameters command structure

Parameters

ZbZclCommissionClientRestartDev

Restart Device command structure

Parameters

ZbZclCommissionClientRestoreStartup

Restore Startup Parameters command structure

Parameters

ZbZclCommissionClientSaveStartup

Save Startup Parameters command structure

Parameters

ZbZclCommissionServerCallbacksT

Commissioning Server callbacks configuration

Parameters

ZbZclCommissionServerEnableInfoT

Commissioning Server Enable Information structure

Parameters

ZbZclCommissionServerResetStartupRsp

Reset Startup Parameters Response command structure

Parameters

ZbZclCommissionServerRestartDevRsp

Restart Device Response command structure

Parameters

ZbZclCommissionServerRestoreStartupRsp

Restore Startup Parameters Response command structure

Parameters

ZbZclCommissionServerSaveStartupRsp

Save Startup Parameters Response command structure

Parameters

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclDehumCtrlServerAttrT

Dehumidification Control Attribute Ids

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclDeviceTempAlarmCode

Device Temperature Configuration Alarm Code

ZbZclDeviceTempAlarmMask

Device Temperature Configuration Alarm Mask

ZbZclDeviceTempSvrAttrT

Device Temperature Cluster Attribute Ids

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

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

Return

  • True on success, false otherwise

Enumerations

ZbZclDiagSvrAttrT

Diagnostics Server Attribute IDs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclDoorLockClrAllPinRspT

Clear All PIN Codes response structure

Parameters

ZbZclDoorLockClrAllRfidRspT

Clear All RFID Codes response structure

Parameters

ZbZclDoorLockClrHDScheduleReqT

Clear Holiday Schedule request structure

Parameters

ZbZclDoorLockClrHDScheduleRspT

Clear Holiday Schedule response structure

Parameters

ZbZclDoorLockClrPinReqT

Clear PIN Code request structure

Parameters

ZbZclDoorLockClrPinRspT

Clear PIN Code response structure

Parameters

ZbZclDoorLockClrRfidReqT

Clear RFID Code request structure

Parameters

ZbZclDoorLockClrRfidRspT

Clear RFID Code response structure

Parameters

ZbZclDoorLockClrWDScheduleReqT

Clear Weekday Schedule request structure

Parameters

ZbZclDoorLockClrWDScheduleRspT

Clear Weekday Schedule response structure

Parameters

ZbZclDoorLockClrYDScheduleReqT

Clear Year Day Schedule request structure

Parameters

ZbZclDoorLockClrYDScheduleRspT

Clear Year Day Schedule response structure

Parameters

ZbZclDoorLockGetHDScheduleReqT

Get Holiday Schedule request structure

Parameters

ZbZclDoorLockGetHDScheduleRspT

Get Holiday Schedule response structure

Parameters

ZbZclDoorLockGetLogReqT

Get Log Record request structure

Parameters

ZbZclDoorLockGetLogRspT

Get Log Record response structure

Parameters

ZbZclDoorLockGetPinReqT

Get PIN Code request structure

Parameters

ZbZclDoorLockGetPinRspT

Get PIN Code response structure

Parameters

ZbZclDoorLockGetRfidReqT

Get RFID Code request structure

Parameters

ZbZclDoorLockGetRfidRspT

Get RFID Code response structure

Parameters

ZbZclDoorLockGetUserStatusReqT

Get User Status request structure

Parameters

ZbZclDoorLockGetUserStatusRspT

Get User Status response structure

Parameters

ZbZclDoorLockGetUserTypeReqT

Get User Type request structure

Parameters

ZbZclDoorLockGetUserTypeRspT

Get User Type response structure

Parameters

ZbZclDoorLockGetWDScheduleReqT

Get Weekday Schedule request structure

Parameters

ZbZclDoorLockGetWDScheduleRspT

Get Weekday Schedule response structure

Parameters

ZbZclDoorLockGetYDScheduleReqT

Get Year Day Schedule request structure

Parameters

ZbZclDoorLockGetYDScheduleRspT

Get Year Day Schedule response structure

Parameters

ZbZclDoorLockLockDoorReqT

Lock Door request structure

Parameters

ZbZclDoorLockLockDoorRspT

Lock Door response structure

Parameters

ZbZclDoorLockServerCallbacksT

Door Lock Server callbacks configuration

Parameters

ZbZclDoorLockSetHDScheduleReqT

Set Holiday Schedule request structure

Parameters

ZbZclDoorLockSetHDScheduleRspT

Set Holiday Schedule response structure

Parameters

ZbZclDoorLockSetPinReqT

Set PIN Code request structure

Parameters

ZbZclDoorLockSetPinRspT

Set PIN Code response structure

Parameters

ZbZclDoorLockSetRfidReqT

Set RFID Code request structure

Parameters

ZbZclDoorLockSetRfidRspT

Set RFID Code response structure

Parameters

ZbZclDoorLockSetUserStatusReqT

Set User Status request structure

Parameters

ZbZclDoorLockSetUserStatusRspT

Set User Status response structure

Parameters

ZbZclDoorLockSetUserTypeReqT

Set User Type request structure

Parameters

ZbZclDoorLockSetUserTypeRspT

Set User Type response structure

Parameters

ZbZclDoorLockSetWDScheduleReqT

Set Weekday Schedule request structure

Parameters

ZbZclDoorLockSetWDScheduleRspT

Set Weekday Schedule response structure

Parameters

ZbZclDoorLockSetYDScheduleReqT

Set Year Day Schedule request structure

Parameters

ZbZclDoorLockSetYDScheduleRspT

Set Year Day Schedule response structure

Parameters

ZbZclDoorLockToggleReqT

Toggle request structure

Parameters

ZbZclDoorLockToggleRspT

Toggle response structure

Parameters

ZbZclDoorLockUnlockDoorReqT

Unlock Door request structure

Parameters

ZbZclDoorLockUnlockDoorRspT

Unlock Door response structure

Parameters

ZbZclDoorLockUnlockTimeoutReqT

Unlock with Timeout request structure

Parameters

ZbZclDoorLockUnlockTimeoutRspT

Unlock with Timeout response structure

Parameters

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclElecMeasSvrAttrT

Electrical Measurement Server Attribute IDs

Structures

ZbZclElecMeasClientGetMeasProfileReqT

Get Measurement Profile command structure

Parameters

ZbZclElecMeasSvrCallbacksT

Electrical Measurement Server callbacks configuration

Parameters

ZbZclElecMeasSvrGetMeasProfileRspT

Get Measurement Profile response structure

Parameters

ZbZclElecMeasSvrGetProfileInfoRspT

Get Profile Info response structure

Parameters

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'

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'

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclFanModeT

Fan Mode Attribute Values

ZbZclFanSeqT

Fan Sequence Operation Attribute Values

ZbZclFanSvrAttrT

Fan Control Server Attribute IDs

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

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

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

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

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

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

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclGroupsSvrAttrT

Groups Server Attribute IDs

Structures

ZbZclGroupsClientAddIdentifyingReqT

Add Group If Identifying command structure

Parameters

ZbZclGroupsClientAddReqT

Add Group command structure

Parameters

ZbZclGroupsClientGetMembershipReqT

Get Group Membership command structure

Parameters

ZbZclGroupsClientRemoveReqT

Remove Group command structure

Parameters

ZbZclGroupsClientViewReqT

View Group command structure

Parameters

7. References