Zigbee Cluster Library API


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

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

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

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIdentifyServerGetTime

uint16_t ZbZclIdentifyServerGetTime(struct ZbZclClusterT *cluster);

Get the local Identify Server time

Parameters

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclIdentifySvrAttrT

Identify Server Attribute IDs

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclIllumLevelSvrAttrT

Attribute Identifiers

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclIllumMeasSvrAttrT

Illuminance Measurement Server Attribute IDs

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

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

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

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

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

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclLevelSvrAttrT

Level Server Attribute IDs

Structures

ZbZclLevelClientMoveReqT

Move command structure

Parameters

ZbZclLevelClientMoveToFreqT

Move to Closest Frequency command structure

Parameters

ZbZclLevelClientMoveToLevelReqT

Move To Level command structure

Parameters

ZbZclLevelClientStepReqT

Step command structure

Parameters

ZbZclLevelClientStopReqT

Stop command structure

Parameters

ZbZclLevelServerCallbacksT

Level Server callbacks configuration

Parameters

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclMeterIdSvrAttrT

Attribute Identifiers

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclNearestGwServerAttrT

Nearest Gateway Attribute Ids

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclOccupancySvrAttrT

Occupancy Sensing Server Attribute IDs

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclOnOffSwConfigSvrAttrId

Onoff Switch Configuration cluster attribute IDs

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

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

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

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

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

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

Return

  • Void

Enumerations

ZbZclOnOffSvrAttrT

OnOff Server Attribute IDs

Structures

ZbZclOnOffServerCallbacksT

OnOff Server callbacks configuration

Parameters

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

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

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

Return

  • None

ZbZclOtaClientGetDefaultCallbacks

void ZbZclOtaClientGetDefaultCallbacks(struct ZbZclOtaClientCallbacksT *callbacks);

Load the default callbacks for ECDSA Suite 2 support

Parameters

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclOtaActivationPolicy

OTA Upgrade UpgradeActivationPolicy enumerations

ZbZclOtaHeaderFieldCtrlBitmask

OTA Upgrade Header Field Control Bitmask enumerations

ZbZclOtaImageBlkReqFldCtrl

OTA Upgrade Image Block Request Field Control Bitmask enumerations

ZbZclOtaImageNotifyCmd

OTA Upgrade Image Notify Command Payload enumerations

ZbZclOtaImageType

OTA Upgrade Image Types enumerations

ZbZclOtaQueryFldCtrlHwVer

OTA Upgrade Field Control Hardware Version enumerations

ZbZclOtaSecCredential

OTA Upgrade Security Credential Version enumerations

ZbZclOtaStackVersion

OTA Upgrade Zigbee Stack Version Values

ZbZclOtaStatus

OTA Upgrade Status Attribute Values (ImageUpgradeStatus)

ZbZclOtaSubElementTag

OTA Upgrade Tag Identifiers enumerations

ZbZclOtaSvrAttrId

OTA Upgrade Server Attribute IDs

ZbZclOtaTimeoutPolicy

OTA Upgrade UpgradeTimeoutPolicy enumerations

Structures

ZbZclOtaClientCallbacksT

OTA Upgrade callbacks configuration

Parameters

ZbZclOtaClientConfig

OTA Upgrade Client Configuration structure

Parameters

ZbZclOtaEndResponseTimes

Upgrade End Response command structure

Parameters

ZbZclOtaHeader

OTA Upgrade Header Fields structure

Parameters

ZbZclOtaImageData

OTA Upgrade Image Data structure

Parameters

ZbZclOtaImageDefinition

OTA Header Image Definition structure

Parameters

ZbZclOtaImageWaitForData

Image Block Response Command Payload with WAIT_FOR_DATA status structure

Parameters

ZbZclOtaServerConfig

OTA Upgrade Server Configuration structure

Parameters

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclPollControlSvrAttrT

Poll Control Server Attribute IDs

Structures

ZbZclPollControlClientCallbackT

Poll Control Client callbacks configuration

Parameters

ZbZclPollControlClientCheckinInfo

Check-in Info structure

Parameters

ZbZclPollControlClientSetLongReq

Set Long Poll Interval command structure

Parameters

ZbZclPollControlClientSetShortReq

Set Short Poll Interval command structure

Parameters

ZbZclPollControlClientStopReq

Fast Poll Stop command structure

Parameters

ZbZclPollControlServerCallbackT

Poll Control Server callbacks configuration

Parameters

zcl_poll_checkin_rsp_t

Check-in Response command structure

Parameters

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclPowerConfigSvrAttrT

Power Configuration Server Attributes IDs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclPowerProfileSvrAttrT

Power Profile Server Attribute IDs

Structures

ZbZclPowerProfCliPhasesNotify

Energy Phases Schedule Notification command structure

Parameters

ZbZclPowerProfCliPriceRsp

GetPowerProfilePriceResponse command structure

Parameters

ZbZclPowerProfCliProfileReq

PowerProfileRequest command structure

Parameters

ZbZclPowerProfCliSchedPriceRsp

GetOverallSchedulePriceResponse command structure

Parameters

ZbZclPowerProfClientCallbacks

Power Profile Client callbacks configuration

Parameters

ZbZclPowerProfPhase

Phase structure

Parameters

ZbZclPowerProfSchedPhase

Schedule Phase structure

Parameters

ZbZclPowerProfServerCallbacks

Power Profile Server callbacks configuration

Parameters

ZbZclPowerProfSvrConstraintsNotify

PowerProfileScheduleConstraintsNotification command structure

Parameters

ZbZclPowerProfSvrGetPriceExtReq

GetPowerProfilePriceExtended command structure

Parameters

ZbZclPowerProfSvrPhasesRsp

Energy Phases Schedule Notification and EnergyPhasesScheduleResponse command structure

Parameters

ZbZclPowerProfSvrProfileRsp

PowerProfileNotification and PowerProfileResponse command structure

Parameters

ZbZclPowerProfSvrStateRsp

PowerProfileStateResponse command structure

Parameters

ZbZclPowerProfileRecord

Record structure

Parameters

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclPressMeasSvrAttrT

Pressure Measurement Attribute IDs

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclPumpServerAttrT

Pump Configuration and Control Attribute Ids

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclRssiLocSvrAttrT

Rssi Location Attribute IDs

Structures

rssi_loc_anchor_node_annc

Anchor Node Announce command structure

Parameters

rssi_loc_comp_data_notif

Compact Data Notification command structure

Parameters

rssi_loc_dev_config_rsp

Device Configuration response structure

Parameters

rssi_loc_get_dev_config

Get Device Configuration command structure

Parameters

rssi_loc_get_loc_data

Get Location Data command structure

Parameters

rssi_loc_loc_data_notif

Location Data Notification command structure

Parameters

rssi_loc_loc_data_rsp

Location Data response structure

Parameters

rssi_loc_neighbour_info

Neighbour Info structure

Parameters

rssi_loc_report_rssi

Report Rssi command structure

Parameters

rssi_loc_req_own_loc

Request Own Location command structure

Parameters

rssi_loc_rssi_ping

Rssi Ping command structure

Parameters

rssi_loc_rssi_req

Rssi Request structure

Parameters

rssi_loc_rssi_rsp

Rssi response structure

Parameters

rssi_loc_send_pings

Send Pings command structure

Parameters

rssi_loc_set_abs_loc

Set Absolute Location command structure

Parameters

rssi_loc_set_dev_config

Set Device Configuration command structure

Parameters

zcl_rssi_loc_client_callbacks_t

Rssi Location Client callbacks configuration

Parameters

zcl_rssi_loc_server_callbacks_t

Rssi Location Server callbacks configuration

Parameters

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclScenesAttrT

Scenes Attribute IDs

Structures

zcl_scenes_add_request_t

Add Scene command structure

Parameters

zcl_scenes_add_response_t

Add Scene Response command structure

Parameters

zcl_scenes_copy_request_t

Copy Scene command structure

Parameters

zcl_scenes_copy_response_t

Copy Scene Response command structure

Parameters

zcl_scenes_membership_request_t

Get Scene Membership command structure

Parameters

zcl_scenes_membership_response_t

Get Scene Membership Response command structure

Parameters

zcl_scenes_recall_request_t

Recall Scene command structure

Parameters

zcl_scenes_recall_response_t

Recall Scene Response command structure

Parameters

zcl_scenes_remove_all_request_t

Remove All Scenes command structure

Parameters

zcl_scenes_remove_all_response_t

Remove All Scenes Response command structure

Parameters

zcl_scenes_remove_request_t

Remove Scene command structure

Parameters

zcl_scenes_remove_response_t

Remove Scene Response command structure

Parameters

zcl_scenes_store_request_t

Store Scene command structure

Parameters

zcl_scenes_store_response_t

Store Scene Response command structure

Parameters

zcl_scenes_view_request_t

View Scene command structure

Parameters

zcl_scenes_view_response_t

View Scene Response command structure

Parameters

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclTempMeasSvrAttrT

Temperature Measurement Server Attribute IDs

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

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

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclThermAttrT

Thermostat Attribute IDs

Structures

ZbZclThermCliGetWeeklyT

Thermostat Get Weekly Schedule structure

Parameters

ZbZclThermCliSetpointT

Thermostat Setpoint structure

Parameters

ZbZclThermServerCallbacksT

Thermostat Server callbacks configuration

Parameters

ZbZclThermSvrGetRelayStatusLogRspT

Get Relay Status Log Response structure

Parameters

ZbZclThermTransitionsT

Thermostat Transition structure

Parameters

ZbZclThermWeeklySchedT

Thermostat Weekly Schedule structure

Parameters

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclThermUiServerAttrT

Thermostat User Interface Attribute IDs

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

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

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

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

Return

  • Void

Enumerations

ZbZclTimeSvrAttrT

Time Server Attribute IDs

Structures

ZbZclTimeServerCallbacks

Time Server callbacks configuration

Parameters

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

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

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclVoiceSvrAttrT

Voice Over Zigbee Server Attribute IDs

Structures

voice_control_rsp_t

Control Response command structure

Parameters

voice_control_t

Control command structure

Parameters

voice_estab_req_t

Establishment Request command structure

Parameters

voice_estab_rsp_t

Establishment Response command structure

Parameters

voice_voice_tx_rsp_t

Voice Transmission Response command structure

Parameters

voice_voice_tx_t

Voice Transmission command structure

Parameters

zcl_voice_client_callbacks_t

Voice Over Zigbee Client callbacks configuration

Parameters

zcl_voice_server_callbacks_t

Voice Over Zigbee Server callbacks configuration

Parameters

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

  • 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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclWcmSvrAttrT

Water Content Measurement Server Attribute IDs

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

  • 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

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

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

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclWncvServerAttrT

Window Covering Server Attribute Ids

ZbZclWncvTypes

Window Covering Type enumerations

Structures

ZbZclWindowServerCallbacksT

Window Covering Server callbacks configuration

Parameters

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Return

  • True on success, false otherwise

ZbZclIasAceServerPanelCodeConfig

bool ZbZclIasAceServerPanelCodeConfig(struct ZbZclClusterT *cluster, const char *arm_code);

Change the Panel Arm/Disarm Code

Parameters

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

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneBypassConfig

enum ZbZclIasAceBypassResultT ZbZclIasAceServerZoneBypassConfig(struct ZbZclClusterT *cluster, uint8_t zone_id, bool bypass);

Bypass zone if allowed

Parameters

Return

  • Result of bypass config command

ZbZclIasAceServerZoneBypassPerms

bool ZbZclIasAceServerZoneBypassPerms(struct ZbZclClusterT *cluster, uint8_t zone_id, enum ZbZclIasAceBypassPermsT bypass_perms);

Configure Bypass Permissions

Parameters

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

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneTableAdd

bool ZbZclIasAceServerZoneTableAdd(struct ZbZclClusterT *cluster, struct ZbZclIasAceServerZoneTableAddT *req);

Add new zone entry

Parameters

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

Return

  • Address of zone if successful, 0 on error

ZbZclIasAceServerZoneTableDeleteByAddr

bool ZbZclIasAceServerZoneTableDeleteByAddr(struct ZbZclClusterT *cluster, uint64_t addr);

Delete a zone by address

Parameters

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneTableDeleteById

bool ZbZclIasAceServerZoneTableDeleteById(struct ZbZclClusterT *cluster, uint8_t zone_id);

Delete a zone by zone ID

Parameters

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

Return

  • True on success, false otherwise

Structures

ZbZclIasAceClientCommandArmT

Arm command structure

Parameters

ZbZclIasAceClientCommandBypassT

Bypass command structure

Parameters

ZbZclIasAceClientCommandGetZoneInfoT

Get Zone Info command structure

Parameters

ZbZclIasAceClientCommandGetZoneStatusT

Get Zone Status command structure

Parameters

ZbZclIasAceServerCallbacksT

IAS ACE Server callbacks configuration

Parameters

ZbZclIasAceServerCommandArmRspT

Arm response structure

Parameters

ZbZclIasAceServerCommandBypassRspT

Bypass Response response structure

Parameters

ZbZclIasAceServerCommandGetPanelStatusRspT

Get Panel Status response structure

Parameters

ZbZclIasAceServerCommandGetZoneIdMapRspT

Get Zone ID Map response structure

Parameters

ZbZclIasAceServerCommandGetZoneInfoRspT

Get Zone Info response structure

Parameters

ZbZclIasAceServerCommandGetZoneStatusRspT

Get Zone Status response structure

Parameters

ZbZclIasAceServerCommandSetBypassedZoneListT

Set Bypassed Zone List command structure

Parameters

ZbZclIasAceServerCommandZoneStatusChangedT

Zone Status Changed command structure

Parameters

ZbZclIasAceServerZoneTableAddT

Zone Table Add request structure

Parameters

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

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

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclIasWdLevelT

IAS Warning Device Siren Level Field Values

ZbZclIasWdSquawkModeT

IAS Warning Device Squawk Mode Field

ZbZclIasWdStrobeT

IAS Warning Device Strobe Field

ZbZclIasWdSvrAttrT

IAS Warning Device Server Attribute IDs

ZbZclIasWdWarningModeT

IAS Warning Device Warning Modes

Structures

ZbZclIasWdClientSquawkReqT

IAS Warning Device Client Squawk command structure

Parameters

ZbZclIasWdClientStartWarningReqT

IAS Warning Device Client Start Warning command structure

Parameters

ZbZclIasWdServerCallbacksT

IAS Warning Server callbacks configuration

Parameters

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

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

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

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

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

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

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

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclIasZoneClientResponseCodeT

IAS Zone Enroll Response Code

ZbZclIasZoneServerAttrT

IAS Zone Server Attribute IDs

ZbZclIasZoneServerModeT

IAS Zone ZoneStatus Attribute Bit Test Value

ZbZclIasZoneServerZoneStateT

IAS Zone ZoneState Attribute

ZbZclIasZoneServerZoneStatusT

IAS Zone ZoneStatus Attribute

ZbZclIasZoneServerZoneTypeT

IAS Zone ZoneType Attribute

Structures

ZbZclIasZoneClientCallbacksT

IAS Zone Client callbacks configuration

Parameters

ZbZclIasZoneClientEnrollResponseT

Zone Enroll response structure

Parameters

ZbZclIasZoneClientTestModeReqT

Initiate Test Mode request structure

Parameters

ZbZclIasZoneServerCallbacksT

IAS Zone Server callbacks configuration

Parameters

ZbZclIasZoneServerEnrollRequestT

Zone Enroll request structure

Parameters

ZbZclIasZoneServerStatusChangeNotifyT

Zone State Change Notification request structure

Parameters

6.4. Smart Energy Clusters

6.4.1. Calendar

#include "zcl/se/zcl.calendar.h"

Functions

ZbZclCalClientAlloc

struct ZbZclClusterT * ZbZclCalClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclCalClientCallbacksT *callbacks, void *arg);

Create a new instance of the Calendar client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclCalClientCommandGetCalCancelReq

enum ZclStatusCodeT ZbZclCalClientCommandGetCalCancelReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Calendar Cancellation command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalClientCommandGetCalReq

enum ZclStatusCodeT ZbZclCalClientCommandGetCalReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalGetCalendarT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Calendar command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalClientCommandGetDayProfilesReq

enum ZclStatusCodeT ZbZclCalClientCommandGetDayProfilesReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalGetDayProfilesT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Day Profiles command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalClientCommandGetSeasonsReq

enum ZclStatusCodeT ZbZclCalClientCommandGetSeasonsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalGetSeasonsT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Seasons command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalClientCommandGetSpecialDaysReq

enum ZclStatusCodeT ZbZclCalClientCommandGetSpecialDaysReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalGetSpecialDaysT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Special Days command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalClientCommandGetWeekProfilesReq

enum ZclStatusCodeT ZbZclCalClientCommandGetWeekProfilesReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalGetWeekProfilesT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Week Profile command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalParseCancelCalendar

bool ZbZclCalParseCancelCalendar(const uint8_t *buf, unsigned int len, struct ZbZclCalCancelCalendarT *rsp);

Parse a Cancel Calendar command

Parameters

Return

  • True on success, false otherwise

ZbZclCalParsePublishCalendar

bool ZbZclCalParsePublishCalendar(const uint8_t *buf, unsigned int len, struct ZbZclCalServerPublishCalendarT *rsp);

Parse a Publish Calendar command

Parameters

Return

  • True on success, false otherwise

ZbZclCalParsePublishDayProfile

bool ZbZclCalParsePublishDayProfile(const uint8_t *buf, unsigned int len, struct ZbZclCalServerPublishDayProfileT *rsp);

Parse a Publish Day Profile command

Parameters

Return

  • True on success, false otherwise

ZbZclCalParsePublishSeasons

bool ZbZclCalParsePublishSeasons(const uint8_t *buf, unsigned int len, struct ZbZclCalPublishSeasonsT *rsp);

Parse a Publish Seasons command

Parameters

Return

  • True on success, false otherwise

ZbZclCalParsePublishSpecialDays

bool ZbZclCalParsePublishSpecialDays(const uint8_t *buf, unsigned int len, struct ZbZclCalPublishSpecialDaysT *rsp);

Parse a Publish Special Days command

Parameters

Return

  • True on success, false otherwise

ZbZclCalParsePublishWeekProfile

bool ZbZclCalParsePublishWeekProfile(const uint8_t *buf, unsigned int len, struct ZbZclCalServerPublishWeekProfileT *rsp);

Parse a Publish Week Profile command

Parameters

Return

  • True on success, false otherwise

ZbZclCalServerAlloc

struct ZbZclClusterT * ZbZclCalServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclCalServerCallbacksT *callbacks, void *arg);

Create a new instance of the Calendar server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclCalServerPublishCalendarRsp

enum ZclStatusCodeT ZbZclCalServerPublishCalendarRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclCalServerPublishCalendarT *info);

Send a Publish Calendar as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishCalendarUnsolic

enum ZclStatusCodeT ZbZclCalServerPublishCalendarUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalServerPublishCalendarT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Calendar as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishDayProfileRsp

enum ZclStatusCodeT ZbZclCalServerPublishDayProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclCalServerPublishDayProfileT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Day Profile as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishDayProfileUnsolic

enum ZclStatusCodeT ZbZclCalServerPublishDayProfileUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalServerPublishDayProfileT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Day Profile as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishSeasonsRsp

enum ZclStatusCodeT ZbZclCalServerPublishSeasonsRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo, struct ZbZclCalPublishSeasonsT *info);

Send a Publish Seasons as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishSeasonsUnsolic

enum ZclStatusCodeT ZbZclCalServerPublishSeasonsUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalPublishSeasonsT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Seasons as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishSpecialDaysRsp

enum ZclStatusCodeT ZbZclCalServerPublishSpecialDaysRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclCalPublishSpecialDaysT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Special Days as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishSpecialDaysUnsolic

enum ZclStatusCodeT ZbZclCalServerPublishSpecialDaysUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalPublishSpecialDaysT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Special Days as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishWeekProfileRsp

enum ZclStatusCodeT ZbZclCalServerPublishWeekProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclCalServerPublishWeekProfileT *info);

Send a Publish Week Profile as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerPublishWeekProfileUnsolic

enum ZclStatusCodeT ZbZclCalServerPublishWeekProfileUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalServerPublishWeekProfileT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Week Profile as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerSendCancelCalendarRsp

enum ZclStatusCodeT ZbZclCalServerSendCancelCalendarRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclCalCancelCalendarT *info);

Send a Cancel Calendar as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalServerSendCancelCalendarUnsolic

enum ZclStatusCodeT ZbZclCalServerSendCancelCalendarUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclCalCancelCalendarT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Cancel Calendar as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalendarMirrorAlloc

struct ZbZclClusterT * ZbZclCalendarMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *calendar_server,
struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *meter_client);

Allocates a Calendar Client Mirror cluster.

Parameters

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclCalSvrAttrT

Calendar Server Attribute IDs

Structures

ZbZclCalCancelCalendarT

Cancel Calendar command structure

Parameters

ZbZclCalClientCallbacksT

Calendar Client callbacks configuration

Parameters

ZbZclCalGetCalendarT

Get Calendar command structure

Parameters

ZbZclCalGetDayProfilesT

Get Day Profiles command structure

Parameters

ZbZclCalGetSeasonsT

Get Seasons command structure

Parameters

ZbZclCalGetSpecialDaysT

Get Special Days command structure

Parameters

ZbZclCalGetWeekProfilesT

Get Week Profiles command structure

Parameters

ZbZclCalPublishSeasonsT

Publish Seasons command structure

Parameters

ZbZclCalPublishSpecialDaysT

Publish Special Days command structure

Parameters

ZbZclCalServerCallbacksT

Calendar Server callbacks configuration

Parameters

ZbZclCalServerPublishCalendarT

Publish Calendar command structure

Parameters

ZbZclCalServerPublishDayProfileT

Publish Day Profile command structure

Parameters

ZbZclCalServerPublishWeekProfileT

Publish Week Profile command structure

Parameters

ZbZclCalendarDayScheduleT

Day Schedule Entries structure

Parameters

ZbZclCalendarSeasonT

Season Entry structure

Parameters

ZbZclCalendarSpecialDayT

Season Entry structure

Parameters

6.4.2. Device Management

#include "zcl/se/zcl.device_mgmt.h"

Functions

ZbZclDeviceMgmtClientAlloc

struct ZbZclClusterT * ZbZclDeviceMgmtClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDeviceMgmtClientCallbacksT *callbacks, void *arg);

Create a new instance of the Device Management Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDeviceMgmtClientGetChangeSupplier

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetChangeSupplier(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Change of Supplier command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientGetChangeTenancy

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetChangeTenancy(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Change of Tenancy command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientGetCin

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetCin(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get CIN command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientGetSiteId

enum ZclStatusCodeT ZbZclDeviceMgmtClientGetSiteId(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Site ID command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientReportEventConfig

enum ZclStatusCodeT ZbZclDeviceMgmtClientReportEventConfig(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtReportEvtConfigT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Report Event Configuration command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtClientReqNewPassword

enum ZclStatusCodeT ZbZclDeviceMgmtClientReqNewPassword(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtReqNewPassT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request New Password command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtMirrorAlloc

struct ZbZclClusterT * ZbZclDeviceMgmtMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *device_mgmt_server,
struct ZbZclClusterT *meter_mirror);

Allocates a Device Management Client Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror.

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDeviceMgmtParseReportEvtConfig

enum ZclStatusCodeT ZbZclDeviceMgmtParseReportEvtConfig(struct ZbZclClusterT *cluster, struct ZbApsdeDataIndT *dataIndPtr,
struct ZbZclDeviceMgmtReportEvtConfigT *info);

Parse a Report Event Configuration command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtParseReqNewPassRsp

bool ZbZclDeviceMgmtParseReqNewPassRsp(const uint8_t *buf, unsigned int len, struct ZbZclDeviceMgmtReqNewPassRspT *rsp);

Parse a Request New Password Response command

Parameters

Return

  • True on success, false otherwise

ZbZclDeviceMgmtParseUpdateCin

bool ZbZclDeviceMgmtParseUpdateCin(const uint8_t *buf, unsigned int len, struct ZbZclDeviceMgmtUpdateCinT *rsp);

Parse an Update CIN command

Parameters

Return

  • True on success, false otherwise

ZbZclDeviceMgmtParseUpdateSiteId

bool ZbZclDeviceMgmtParseUpdateSiteId(const uint8_t *buf, unsigned int len, struct ZbZclDeviceMgmtUpdateSiteIdT *rsp);

Parse an Update Site ID command

Parameters

Return

  • True on success, false otherwise

ZbZclDeviceMgmtServerAlloc

struct ZbZclClusterT * ZbZclDeviceMgmtServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDeviceMgmtServerCallbacksT *callbacks, void *arg);

Create a new instance of the Device Management Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDeviceMgmtServerGetEventConfigReq

enum ZclStatusCodeT ZbZclDeviceMgmtServerGetEventConfigReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtGetEventConfigT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Event Configuration command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeSupplierRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeSupplierRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtPublishChangeSupplierT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Change of Supplier as a response to the Get Change of Supplier command.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeSupplierUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeSupplierUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtPublishChangeSupplierT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Change of Supplier as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeTenancyRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeTenancyRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtPublishChangeTenancyT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Change of Tenancy as a response to the Get Change of Tenancy command.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerPublishChangeTenancyUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerPublishChangeTenancyUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtPublishChangeTenancyT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Change of Tenancy as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerReqNewPassRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerReqNewPassRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtReqNewPassRspT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Request New Password Response as a response to the Request New Password command.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerReqNewPassRspUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerReqNewPassRspUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtReqNewPassRspT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request New Password Response as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerSetEventConfigReq

enum ZclStatusCodeT ZbZclDeviceMgmtServerSetEventConfigReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtSetEventConfigT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Event Configuration command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateCinRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateCinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtUpdateCinT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send an Update CIN as a response to the Get CIN command.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateCinUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateCinUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtUpdateCinT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Update CIN as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateSiteIdRsp

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateSiteIdRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDeviceMgmtUpdateSiteIdT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send an Update SiteID as a response to the Get SiteID command.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDeviceMgmtServerUpdateSiteIdUnsolic

enum ZclStatusCodeT ZbZclDeviceMgmtServerUpdateSiteIdUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDeviceMgmtUpdateSiteIdT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Update SiteID as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclDeviceMgmtCliAttrT

Device Management Client Attribute IDs

ZbZclDeviceMgmtSvrAttrT

Device Management Server Attribute IDs

Structures

ZbZclDeviceMgmtClientCallbacksT

Device Management Client callbacks configuration

Parameters

ZbZclDeviceMgmtEventConfigPayloadT

Event Configuration Payload structure

Parameters

ZbZclDeviceMgmtGetEventConfigT

Get Event Configuration command structure

Parameters

ZbZclDeviceMgmtPublishChangeSupplierT

Publish Change of Supplier command structure

Parameters

ZbZclDeviceMgmtPublishChangeTenancyT

Publish Change of Tenancy command structure

Parameters

ZbZclDeviceMgmtReportEvtConfigT

Report Event Configuration command structure

Parameters

ZbZclDeviceMgmtReqNewPassRspT

Request New Password Response command structure

Parameters

ZbZclDeviceMgmtReqNewPassT

Request New Password command structure

Parameters

ZbZclDeviceMgmtServerCallbacksT

Device Management Server callbacks configuration

Parameters

ZbZclDeviceMgmtSetEventConfigT

Set Event command structure

Parameters

ZbZclDeviceMgmtUpdateCinT

Update CIN Configuration command structure

Parameters

ZbZclDeviceMgmtUpdateSiteIdT

Update SiteID command structure

Parameters

6.4.3. Demand Response and Load Control

#include "zcl/se/zcl.drlc.h"

Functions

ZbZclDrlcClientAlloc

struct ZbZclClusterT * ZbZclDrlcClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *time_server,
struct ZbZclDrlcClientCallbacksT *callbacks, void *cb_arg);

Create a new instance of the DRLC Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDrlcClientCommandGetEventsReq

enum ZclStatusCodeT ZbZclDrlcClientCommandGetEventsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDrlcGetEventsReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Get Scheduled Events

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientCommandReportStatusReq

enum ZclStatusCodeT ZbZclDrlcClientCommandReportStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDrlcStatusT *statusPtr, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Report Event Status Command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientGetEventList

unsigned int ZbZclDrlcClientGetEventList(struct ZbZclClusterT *cluster, struct ZbZclDrlcEventT *eventList, unsigned int maxEntries);

Send a Get Event List command

Parameters

Return

  • Event list size if successful, or 0 on error

ZbZclDrlcClientOptOutAdd

enum ZclStatusCodeT ZbZclDrlcClientOptOutAdd(struct ZbZclClusterT *cluster, uint32_t issuer_id);

Append an Issuer Event ID to "opt-out" of

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientOptOutClear

enum ZclStatusCodeT ZbZclDrlcClientOptOutClear(struct ZbZclClusterT *cluster);

Clear all Issuer Event IDs in list to "opt-out" of

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientOptOutDel

enum ZclStatusCodeT ZbZclDrlcClientOptOutDel(struct ZbZclClusterT *cluster, uint32_t issuer_id);

Invalidate an Issuer Event ID to "opt-out" of

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcServerAlloc

struct ZbZclClusterT * ZbZclDrlcServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDrlcServerCallbacksT *callbacks, void *arg);

Create a new instance of the DRLC Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDrlcServerCommandCancelAllReq

enum ZclStatusCodeT ZbZclDrlcServerCommandCancelAllReq(struct ZbZclClusterT *cluster, uint8_t ctrl, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Cancel All Load Control Event command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcServerCommandCancelReq

enum ZclStatusCodeT ZbZclDrlcServerCommandCancelReq(struct ZbZclClusterT *cluster, struct ZbZclDrlcCancelT *cancelInfoPtr,
const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Cancel Load Control Event command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcServerCommandEventReq

enum ZclStatusCodeT ZbZclDrlcServerCommandEventReq(struct ZbZclClusterT *cluster, struct ZbZclDrlcEventT *eventPtr,
const struct ZbApsAddrT *dst, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Load Control Event command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclDrlcCliAttrT

DRLC Client Attribute IDs

Structures

ZbZclDrlcCancelT

Cancel Load Control Event command structure

Parameters

ZbZclDrlcClientCallbacksT

DRLC Client callbacks configuration

Parameters

ZbZclDrlcEventT

Load Control Event command structure

Parameters

ZbZclDrlcGetEventsReqT

Get Scheduled Events command structure

Parameters

ZbZclDrlcServerCallbacksT

DRLC Server callbacks configuration

Parameters

ZbZclDrlcStatusT

Report Event Status command structure

Parameters

6.4.4. Energy Management

#include "zcl/se/zcl.energy_mgmt.h"

Functions

ZbZclEnergyMgmtClientAlloc

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

Create a new instance of the Energy Management Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEnergyMgmtClientManageEventReq

enum ZclStatusCodeT ZbZclEnergyMgmtClientManageEventReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEnergyMgmtManageEventT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Manage Event command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEnergyMgmtServerAlloc

struct ZbZclClusterT * ZbZclEnergyMgmtServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclEnergyMgmtServerCallbacksT *callbacks, void *arg);

Create a new instance of the Energy Management Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEnergyMgmtServerReportEvtStatus

enum ZclStatusCodeT ZbZclEnergyMgmtServerReportEvtStatus(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDrlcStatusT *info,
void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Create a new instance of the Energy Management Server cluster

Parameters

Return

  • Undocumented

Enumerations

ZbZclEnergyMgmtSvrAttrT

Energy Management Server Attribute IDs

Structures

ZbZclEnergyMgmtManageEventT

Manage Event (ZCL_ENERGY_MGMT_CLI_CMD_MANAGE_EVENT) command structure

Parameters

ZbZclEnergyMgmtServerCallbacksT

Energy Management Server callbacks configuration

Parameters

6.4.5. Events

#include "zcl/se/zcl.events.h"

Functions

ZbZclEventsClientAlloc

struct ZbZclClusterT * ZbZclEventsClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclEventsClientCallbacksT *callbacks, void *arg);

Create a new instance of the Events Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEventsClientCommandClearEventLogReq

enum ZclStatusCodeT ZbZclEventsClientCommandClearEventLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEventsClientClearEventLogT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Clear Event Log command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEventsClientCommandGetEventLogReq

enum ZclStatusCodeT ZbZclEventsClientCommandGetEventLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEventsClientGetEventLogT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Event Log command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEventsMirrorAlloc

struct ZbZclClusterT * ZbZclEventsMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *events_client,
struct ZbZclClusterT *meter_mirror);

Allocates a Events Server Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror.

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEventsServerAlloc

struct ZbZclClusterT * ZbZclEventsServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclEventsServerCallbacksT *callbacks, void *arg);

Create a new instance of the Events Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEventsServerClearEventLogRsp

enum ZclStatusCodeT ZbZclEventsServerClearEventLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclEventsServerClearEventLogResponseT *rsp);

Send a Clear Event Log Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclEventsServerPublishEventUnsolic

enum ZclStatusCodeT ZbZclEventsServerPublishEventUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclEventsServerPublishEventT *event, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Publish Event command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclEventsClientCallbacksT

Events Client callbacks configuration

Parameters

ZbZclEventsClientClearEventLogT

Clear Event Log command structure

Parameters

ZbZclEventsClientGetEventLogT

Get Event Log command structure

Parameters

ZbZclEventsServerCallbacksT

Events Server callbacks configuration

Parameters

ZbZclEventsServerClearEventLogResponseT

Clear Event Log Response command structure

Parameters

ZbZclEventsServerEventLogPayloadT

Publish Event Log Payload structure

Parameters

ZbZclEventsServerPublishEventLogT

Publish Event Log command structure

Parameters

ZbZclEventsServerPublishEventT

Publish Event command structure

Parameters

6.4.6. Messaging

#include "zcl/se/zcl.message.h"

Functions

ZbZclMessageClientParseDisplayMsg

enum ZclStatusCodeT ZbZclMessageClientParseDisplayMsg(struct ZbZclMsgMessageT *msg, uint8_t *payload, unsigned int len);

Parses a ZCL_MESSAGE_SVR_CMD_DISPLAY_MESSAGE paylaod into a 'struct ZbZclMsgMessageT'.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientAlloc

struct ZbZclClusterT * ZbZclMsgClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMsgClientCallbacksT *callbacks, void *arg);

Create a new instance of the Messaging Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMsgClientConfEnhReq

enum ZclStatusCodeT ZbZclMsgClientConfEnhReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclMsgConfirmEnhT *msg_conf_enh,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Enhanced Message Confirmation command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientConfReq

enum ZclStatusCodeT ZbZclMsgClientConfReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclMsgConfirmT *msg_conf,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Message Confirmation command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientGetLastReq

enum ZclStatusCodeT ZbZclMsgClientGetLastReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Last Message command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgClientGetMsgCancelReq

enum ZclStatusCodeT ZbZclMsgClientGetMsgCancelReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, uint32_t earliestTime,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Message Cancellation command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgMirrorAlloc

struct ZbZclClusterT * ZbZclMsgMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *msg_server,
struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *meter_client);

Allocates a Messaging Client Mirror cluster.

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMsgServerAlloc

struct ZbZclClusterT * ZbZclMsgServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMsgServerCallbacksT *callbacks, void *arg);

Create a new instance of the Messaging Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMsgServerCancelAllRsp

enum ZclStatusCodeT ZbZclMsgServerCancelAllRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMsgMessageCancelAllT *cancel_all);

Send a Cancel All Messages command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerCancelAllUnsolic

enum ZclStatusCodeT ZbZclMsgServerCancelAllUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMsgMessageCancelAllT *cancel_all, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Unsolicited Cancel All Messages command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerCancelMessageReq

enum ZclStatusCodeT ZbZclMsgServerCancelMessageReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclMsgMessageCancelT *cancel,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Cancel Message command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerDisplayMessageRsp

enum ZclStatusCodeT ZbZclMsgServerDisplayMessageRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo, struct ZbZclMsgMessageT *msg);

Send a Display or Display Protected Message as response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerDisplayMessageUnsolic

enum ZclStatusCodeT ZbZclMsgServerDisplayMessageUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMsgMessageT *msg, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Display or Display Protected Message command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclMsgClientCallbacksT

Messaging Client callbacks configuration

Parameters

ZbZclMsgConfirmEnhT

Enhanced Message Confirmation command structure

Parameters

ZbZclMsgConfirmT

Message Confirmation command structure

Parameters

ZbZclMsgGetMsgCancellationT

Get Messsage Cancellation command structure

Parameters

ZbZclMsgMessageCancelAllT

Cancel All Messages command structure

Parameters

ZbZclMsgMessageCancelT

Cancel Message command structure

Parameters

ZbZclMsgMessageConfT

Message Confirmation callback structure

Parameters

ZbZclMsgMessageT

Display Message/Display Protected Message command structure

Parameters

ZbZclMsgServerCallbacksT

Messaging Server callbacks configuration

Parameters

6.4.7. Metering

#include "zcl/se/zcl.meter.h"

Functions

ZbZclMeterClientAlloc

struct ZbZclClusterT * ZbZclMeterClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMeterClientCallbacksT *callbacks, void *arg);

Create a new instance of the Metering Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMeterClientAttachMirror

bool ZbZclMeterClientAttachMirror(struct ZbZclClusterT *cluster, struct ZbZclClusterT mirror_server, uint64_t rmt_addr, uint8_t rmt_endpoint);

Attach the Meter Mirror Server to the Meter Client. Configures the Client to manage the Mirror Server, and handle reports from the remote Meter and update the Mirror Server attributes.

Parameters

Return

  • True if the Mirror Server could be attached, false otherwise.

ZbZclMeterClientClearNotifFlag

bool ZbZclMeterClientClearNotifFlag(struct ZbZclClusterT *cluster, uint16_t attr_id, uint32_t notif_flag);

Clear the Metering Client notification flag(s).

Parameters

Return

  • True if notification flag is cleared successfully, false otherwise.

ZbZclMeterClientCommandChangeSupplyReq

enum ZclStatusCodeT ZbZclMeterClientCommandChangeSupplyReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientChangeSupplyReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Change Supply Command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandFastPollReq

enum ZclStatusCodeT ZbZclMeterClientCommandFastPollReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientFastPollModeReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request Fast Poll Mode command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandGetProfileReq

enum ZclStatusCodeT ZbZclMeterClientCommandGetProfileReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientGetProfileReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Profile command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandGetSampledDataReq

enum ZclStatusCodeT ZbZclMeterClientCommandGetSampledDataReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientGetSampledDataReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Sampled Data command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandGetSnapshotReq

enum ZclStatusCodeT ZbZclMeterClientCommandGetSnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientGetSnapshotReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Snapshot command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandLocalChangeSupplyReq

enum ZclStatusCodeT ZbZclMeterClientCommandLocalChangeSupplyReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientLocalChangeSupplyReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Local Change Supply command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandResetLoadLimitCounterReq

enum ZclStatusCodeT ZbZclMeterClientCommandResetLoadLimitCounterReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientResetLoadLimitCounterReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send Reset Load Limit Counter command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandScheduleSnapshotReq

enum ZclStatusCodeT ZbZclMeterClientCommandScheduleSnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientScheduleSnapshotReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Schedule Snapshot Request command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandSetSupplyStatusReq

enum ZclStatusCodeT ZbZclMeterClientCommandSetSupplyStatusReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientSetSupplyStatusReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Supply Status command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandSetUnctrlFlowThreshReq

enum ZclStatusCodeT ZbZclMeterClientCommandSetUnctrlFlowThreshReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientSetUnctrlFlowThreshReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Uncontrolled Flow Threshold command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandStartSamplingReq

enum ZclStatusCodeT ZbZclMeterClientCommandStartSamplingReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientStartSamplingReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Start Sampling command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientCommandTakeSnapshotReq

enum ZclStatusCodeT ZbZclMeterClientCommandTakeSnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterClientTakeSnapshotReqT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Take Snapshot command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterClientSetNotifFlag

bool ZbZclMeterClientSetNotifFlag(struct ZbZclClusterT *cluster, uint16_t attr_id, uint32_t notif_flag);

Set the Metering Client notification flag(s).

Parameters

Return

  • True if notification flag is set successfully, false otherwise.

ZbZclMeterFormSampledData

int ZbZclMeterFormSampledData(uint8_t *sample_data, unsigned int max_len, uint32_t *samples, uint16_t num_samples);

Convert an array of 24-bit integers to the Zigbee frame format

Parameters

Return

  • Returns the number of octets written to sample_data or -1 on error

ZbZclMeterGetProfileIntervalPeriod

int ZbZclMeterGetProfileIntervalPeriod(uint8_t profile_interval_id);

Convert the profile interval period enumerated value to a time in seconds

Parameters

Return

  • Converted time in seconds or -1 on error

ZbZclMeterMirrorAlloc

struct ZbZclClusterT * ZbZclMeterMirrorAlloc(struct ZigBeeT *zb, struct ZbZclClusterT *client, uint8_t endpoint, uint64_t meter_extaddr,
uint8_t meter_endpoint);

Allocate a Meter Server used for Mirroring.

Parameters

Return

  • Undocumented

ZbZclMeterMirrorBomdReadReq

enum ZclStatusCodeT ZbZclMeterMirrorBomdReadReq(struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *client,
struct ZbZclReadReqT *req, void (*callback)(const struct ZbZclReadRspT *readRsp, void *cb_arg), void *arg);

Sends a One-Way Mirror ZCL Read Request to the BOMD. The request is queued until the BOMD wakes up. The ZCL_METER_FUNC_NOTIF_FLAG_STAY_AWAKE_HAN notification flag is set so the BOMD knows to keep polling for data after waking up. The Metering Mirror Cluster must already be allocated.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterMirrorBomdWriteReq

enum ZclStatusCodeT ZbZclMeterMirrorBomdWriteReq(struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *client, struct ZbZclWriteReqT *req,
void (*callback)(const struct ZbZclWriteRspT *writeRsp, void *cb_arg), void *arg);

Sends a One-Way Mirror ZCL Write Request to the BOMD. The request is queued until the BOMD wakes up. The ZCL_METER_FUNC_NOTIF_FLAG_STAY_AWAKE_HAN notification flag is set so the BOMD knows to keep polling for data after waking up. The Metering Mirror Cluster must already be allocated.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerAlloc

struct ZbZclClusterT * ZbZclMeterServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclMeterServerCallbacksT *callbacks, void *arg);

Create a new instance of the Metering Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMeterServerPublishSnapshotRsp

enum ZclStatusCodeT ZbZclMeterServerPublishSnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMeterServerPublishSnapshotT *rsp);

Send a Publish Snapshot Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerPublishSnapshotUnsolic

enum ZclStatusCodeT ZbZclMeterServerPublishSnapshotUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclMeterServerPublishSnapshotT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Unsolicited Publish Snapshot command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendConfigMirror

enum ZclStatusCodeT ZbZclMeterServerSendConfigMirror(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst, struct ZbZclMeterServerConfigMirrorT *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a ConfigureMirror Command (ZCL_METER_SVR_CMD_CONFIGURE_MIRROR)

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendConfigNotifFlags

enum ZclStatusCodeT ZbZclMeterServerSendConfigNotifFlags(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclMeterServerConfigNotifFlagsT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Configure Notification Flags Command (ZCL_METER_SVR_CMD_CONFIGURE_NOTIFICATION_FLAG) "Where ‘Two Way Mirroring’ is being implemented, and a non-default Notification Scheme is to be used, the ConfigureNotificationFlags command allows a BOMD to set the commands relating to the bit value for each NotificationFlags#N attribute that the scheme is proposing to use. This command should be used in conjunction with the associated ConfigureNotificationScheme command."

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendConfigNotifScheme

enum ZclStatusCodeT ZbZclMeterServerSendConfigNotifScheme(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclMeterServerConfigNotifSchemeT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Configure Notification Scheme Command (ZCL_METER_SVR_CMD_CONFIGURE_NOTIFICATION_SCHEME)

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendFastPollModeRsp

enum ZclStatusCodeT ZbZclMeterServerSendFastPollModeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMeterServerFastPollModeRspT *rsp);

Send a Request Fast Poll Mode Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendGetNotifMsg

enum ZclStatusCodeT ZbZclMeterServerSendGetNotifMsg(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclMeterServerGetNotifMsgT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Notified Message Command.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendGetProfileRsp

enum ZclStatusCodeT ZbZclMeterServerSendGetProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterServerGetProfileRspT *rsp);

Send a Get Profile Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendGetSampledDataRsp

enum ZclStatusCodeT ZbZclMeterServerSendGetSampledDataRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterServerGetSampledDataRspT *rsp);

Send a Get Sampled Data Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendRemoveMirror

enum ZclStatusCodeT ZbZclMeterServerSendRemoveMirror(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Remove Mirror Command (ZCL_METER_SVR_CMD_REMOVE_MIRROR)

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendRequestMirror

enum ZclStatusCodeT ZbZclMeterServerSendRequestMirror(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Request Mirror Command (ZCL_METER_SVR_CMD_REQUEST_MIRROR)

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. The callback will only be called if this function returns SUCCESS.

ZbZclMeterServerSendScheduleSnapshotRsp

enum ZclStatusCodeT ZbZclMeterServerSendScheduleSnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterClientScheduleSnapshotRspT *rsp);

Send a Schedule Snapshot Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendStartSamplingRsp

enum ZclStatusCodeT ZbZclMeterServerSendStartSamplingRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterClientStartSamplingRspT *rsp);

Send a Start Sampling Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendSupplyStatusRsp

enum ZclStatusCodeT ZbZclMeterServerSendSupplyStatusRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclMeterServerSupplyStatusRspT *rsp);

Send a Supply Status Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMeterServerSendTakeSnapshotRsp

enum ZclStatusCodeT ZbZclMeterServerSendTakeSnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclMeterClientTakeSnapshotRspT *rsp);

Send a Take Snapshot Response command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclMeterClientMirrorReportAttrRspT

MirrorReportAttributeResponse Command

Parameters

6.4.8. Prepayment

#include "zcl/se/zcl.prepay.h"

Functions

ZbZclPrepayClientAlloc

struct ZbZclClusterT * ZbZclPrepayClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPrepayClientCallbacksT *callbacks, void *arg);

Create a new instance of the Prepayment Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPrepayClientChangeDebtReq

enum ZclStatusCodeT ZbZclPrepayClientChangeDebtReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayChangeDebtReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Change Debt command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientChangePaymentModeReq

enum ZclStatusCodeT ZbZclPrepayClientChangePaymentModeReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayChangePaymentModeReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Change Payment Mode command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientConsumerTopUpReq

enum ZclStatusCodeT ZbZclPrepayClientConsumerTopUpReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayConsumerTopUpReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Consumer Top Up command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientCreateMirror

struct ZbZclClusterT * ZbZclPrepayClientCreateMirror(struct ZbZclClusterT *cluster, uint8_t endpoint, struct ZbZclClusterT *meter_mirror_client,
struct ZbZclClusterT *meter_mirror_server, uint64_t rmt_addr, uint8_t rmt_endpoint);

Allocates a PrePayment Server Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror. By default, stack attaches the mandatory prepayment server attributes.

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPrepayClientCreditAdjustReq

enum ZclStatusCodeT ZbZclPrepayClientCreditAdjustReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayCreditAdjustReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Credit Adjustment command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientEmergCreditSetupReq

enum ZclStatusCodeT ZbZclPrepayClientEmergCreditSetupReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayEmergCreditSetupReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Emergency Credit Setup command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientGetDebtRepayLogReq

enum ZclStatusCodeT ZbZclPrepayClientGetDebtRepayLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayGetDebtRepayLogReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Debt Repayment Log command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientGetPrepaySnapshotReq

enum ZclStatusCodeT ZbZclPrepayClientGetPrepaySnapshotReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayGetPrepaySnapshotReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Prepay Snapshot command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientGetTopUpLogReq

enum ZclStatusCodeT ZbZclPrepayClientGetTopUpLogReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayGetTopUpLogReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get TopUp Log command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSelectAvailEmergCreditReq

enum ZclStatusCodeT ZbZclPrepayClientSelectAvailEmergCreditReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySelectAvailEmergCreditReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Select Available Emergency Credit command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSetLowCreditWarnLevelReq

enum ZclStatusCodeT ZbZclPrepayClientSetLowCreditWarnLevelReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySetLowCreditWarnLevelReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Low Credit Warning Level command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSetMaxCreditLimitReq

enum ZclStatusCodeT ZbZclPrepayClientSetMaxCreditLimitReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySetMaxCreditLimitReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Max Credit Limit command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayClientSetOverallDebtCapReq

enum ZclStatusCodeT ZbZclPrepayClientSetOverallDebtCapReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepaySetOverallDebtCapReqT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Overall Debt Cap command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerAlloc

struct ZbZclClusterT * ZbZclPrepayServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *time_server,
struct ZbZclPrepayServerCallbacksT *callbacks, void *arg);

Create a new instance of the Prepayment Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPrepayServerAttrCreditRemainingWriteCb

enum ZclStatusCodeT ZbZclPrepayServerAttrCreditRemainingWriteCb(struct ZbZclClusterT *cluster, struct ZbZclAttrCbInfoT *info);

Prepayment server default write callback for optional attribute 'Credit Remaining'.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerChangePaymentModeRsp

enum ZclStatusCodeT ZbZclPrepayServerChangePaymentModeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPrepayChangePaymentModeRspT *info);

Send a Change Payment Mode response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerConsumerTopUpRsp

enum ZclStatusCodeT ZbZclPrepayServerConsumerTopUpRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPrepayConsumerTopUpRspT *info);

Send a Consumer Top Up response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishDebtLogRsp

enum ZclStatusCodeT ZbZclPrepayServerPublishDebtLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclPrepayPublishDebtLogT *info);

Send a Publish Debt Log Response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishDebtLogUnsolic

enum ZclStatusCodeT ZbZclPrepayServerPublishDebtLogUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayPublishDebtLogT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Debt Log

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishPrepaySnapshotRsp

enum ZclStatusCodeT ZbZclPrepayServerPublishPrepaySnapshotRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclPrepayPublishPrepaySnapshotT *info);

Send a Publish Prepay Snapshot as a response to the GetPrepaySnapshot command.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishPrepaySnapshotUnsolic

enum ZclStatusCodeT ZbZclPrepayServerPublishPrepaySnapshotUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayPublishPrepaySnapshotT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Prepay Snapshot as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishTopUpLogRsp

enum ZclStatusCodeT ZbZclPrepayServerPublishTopUpLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dstInfo,
struct ZbZclPrepayPublishTopUpLogT *info);

Send a Publish Top Up Log as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerPublishTopUpLogUnsolic

enum ZclStatusCodeT ZbZclPrepayServerPublishTopUpLogUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPrepayPublishTopUpLogT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Publish Top Up Log as an unsolicited command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerUpdateAlarmStatusFlag

enum ZclStatusCodeT ZbZclPrepayServerUpdateAlarmStatusFlag(struct ZbZclClusterT *cluster, uint16_t flag, bool set);

Set/Clear the alram status flag in 'Alarm Status' attribute.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPrepayServerUpdateCreditStatusFlag

enum ZclStatusCodeT ZbZclPrepayServerUpdateCreditStatusFlag(struct ZbZclClusterT *cluster, uint8_t flag, bool set);

Set/Clear the credit status flag in 'Credit Status' attribute.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_prepay_get_topup_record

bool zcl_prepay_get_topup_record(struct ZbZclClusterT *cluster, struct ZbZclPrepayTopUpPayloadT *payload, uint8_t attr_idx);

Helper function to retrieve the topup record from the topup attribute set pointed by attribute index.

Parameters

Return

  • true if the top up record is retrieved successfully, false otherwise.

zcl_prepay_topup_code_duplicate_check

bool zcl_prepay_topup_code_duplicate_check(struct ZbZclClusterT *cluster, const uint8_t *topup_code);

Helper function to check if the topup code received is duplicate or not.

Parameters

Return

  • true if the received topup code is duplicate, false otherwise.

zcl_prepay_update_topup_attrs

enum ZbZclPrepayTopUpResultT zcl_prepay_update_topup_attrs(struct ZbZclClusterT *cluster, enum ZbZclPrepayOriginDeviceT origin_device,
uint8_t *topup_code, int32_t topup_value);

Helper function to update the prepayment server topup attributes on receiving the consumer topup command.

Parameters

Return

  • ZCL_PREPAY_TOPUP_RSLT_ACCEPTED if the topup attributes are updated successfully, ZCL_PREPAY_TOPUP_RSLT_RJCTD_MAX_CREDIT if the top amount results in credit remaining value exceeding the maximum credit limit.

Enumerations

ZbZclPreaymentSvrAttrT

Prepayment Server Attribute IDs

ZbZclPrepayCreditTypeT

Credit Type Field enumerations

ZbZclPrepayDebtRecMethodT

Debt Recovery Method enumerations

ZbZclPrepayDebtTypeT

Debt Type Field enumerations

ZbZclPrepayOriginDeviceT

Originating Device Field enumerations

ZbZclPrepaySnapshotPayloadTypeT

Prepayment Snapshot Payload type.

ZbZclPrepayTopUpResultT

Result Type Field enumerations

Structures

ZbZclPrepayChangeDebtReqT

Change Debt command structure

Parameters

ZbZclPrepayChangePaymentModeReqT

Change Payment Mode command structure (ZCL_PREPAY_CLI_CMD_CHANGE_PAYMENT_MODE)

Parameters

ZbZclPrepayChangePaymentModeRspT

Consumer Change Supply Mode Response command structure

Parameters

ZbZclPrepayConsumerTopUpReqT

Consumer Top Up command structure

Parameters

ZbZclPrepayConsumerTopUpRspT

Consumer Top Up Response command structure

Parameters

ZbZclPrepayCreditAdjustReqT

Credit Adjustment command structure (ZCL_PREPAY_CLI_CMD_CREDIT_ADJUST)

Parameters

ZbZclPrepayDebtRecordT

Debt Payload structure

Parameters

ZbZclPrepayEmergCreditSetupReqT

Emergency Credit Setup command structure

Parameters

ZbZclPrepayGetDebtRepayLogReqT

Get Debt Repayment Log command structure

Parameters

ZbZclPrepayGetPrepaySnapshotReqT

Get Prepay Snapshot command structure (ZCL_PREPAY_CLI_CMD_GET_PREPAY_SNAPSHOT)

Parameters

ZbZclPrepayGetTopUpLogReqT

Get TopUp Log command structure

Parameters

ZbZclPrepayPublishDebtLogT

Publish Debt Log command structure

Parameters

ZbZclPrepaySelectAvailEmergCreditReqT

Select Available Emergency Credit command structure

Parameters

ZbZclPrepayServerCallbacksT

Prepayment Server callbacks configuration

Parameters

ZbZclPrepaySetLowCreditWarnLevelReqT

Set Low Credit Warning Level

Parameters

ZbZclPrepaySetMaxCreditLimitReqT

Set Maximum Credit Limit

Parameters

ZbZclPrepaySetOverallDebtCapReqT

Set Overall Debt Cap

Parameters

6.4.9. Price

#include "zcl/se/zcl.price.h"

Functions

ZbZclPriceClientAlloc

struct ZbZclClusterT * ZbZclPriceClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPriceClientCallbacksT *callbacks, void *arg);

Create a new instance of the Price Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPriceClientCommandGetBillingPeriodReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetBillingPeriodReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetBillingPeriodT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Billing Period command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetBlockPeriodReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetBlockPeriodReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetBlockPeriodT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Block Period(s) command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetBlockThresholdsReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetBlockThresholdsReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetBlockThresholdsT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Block Thresholds command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCO2ValueReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCO2ValueReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetCO2ValueT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get CO2 Value command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCalorificValueReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCalorificValueReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetCalorificValueT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Calorific Value command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetConsolidatedBillReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetConsolidatedBillReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetConsolidatedBillT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Consolidated Bill command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetConversionFactorReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetConversionFactorReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetConversionFactorT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Conversion Factor command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCurrencyConversionReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCurrencyConversionReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Currency Conversion command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetCurrentPriceReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetCurrentPriceReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Current Price command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetPriceMatrixReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetPriceMatrixReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetPriceMatrixT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Price Matrix command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetScheduledPricesReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetScheduledPricesReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetScheduledPricesT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Scheduled Prices command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandGetTariffInfoReq

enum ZclStatusCodeT ZbZclPriceClientCommandGetTariffInfoReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientGetTariffInfoT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Tariff Information command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceClientCommandPriceAckReq

enum ZclStatusCodeT ZbZclPriceClientCommandPriceAckReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceClientPriceAckT *cmd_req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Price Acknowledgement command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceMirrorAlloc

struct ZbZclClusterT * ZbZclPriceMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *price_server,
struct ZbZclClusterT *meter_mirror, struct ZbZclClusterT *meter_client);

Allocates a Price Client Mirror cluster.

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPriceServerAlloc

struct ZbZclClusterT * ZbZclPriceServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPriceServerCallbacksT *callbacks, void *arg);

Create a new instance of the Price Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPriceServerPublishPriceInit

void ZbZclPriceServerPublishPriceInit(struct ZbZclPriceServerPublishPriceT *rsp);

Initialize Publish Price information

Parameters

Return

  • Void

ZbZclPriceServerSendPublishBillingPeriodRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishBillingPeriodRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishBillingPeriodT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Billing Period command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBillingPeriodUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishBillingPeriodUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishBillingPeriodT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Billing Period command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockPeriodRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockPeriodRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishBlockPeriodT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Block Period command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockPeriodUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockPeriodUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishBlockPeriodT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Block Period command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockThresholdsRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockThresholdsRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishBlockThresholdsT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Block Thresholds command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishBlockThresholdsUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishBlockThresholdsUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishBlockThresholdsT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Block Thresholds command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCO2ValueRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishCO2ValueRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishCO2ValueT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish CO2 Value command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCO2ValueUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishCO2ValueUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishCO2ValueT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish CO2 Value command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCalorificValueRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishCalorificValueRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishCalorificValueT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Calorific Value command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCalorificValueUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishCalorificValueUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishCalorificValueT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Calorific Value command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishConsolidatedBillRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishConsolidatedBillRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishConsolidatedBillT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Consolidated Bill command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishConsolidatedBillUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishConsolidatedBillUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishConsolidatedBillT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Consolidated Bill command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishConversionFactorRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishConversionFactorRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishConversionFactorT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Conversion Factor command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishConversionFactorUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishConversionFactorUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishConversionFactorT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Conversion Factor command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishCurrencyConversionRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishCurrencyConversionRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishCurrencyConversionT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Currency Conversion command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishCurrencyConversionUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishCurrencyConversionUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishCurrencyConversionT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Currency Conversion command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful or other ZCL_STATUS value on error

ZbZclPriceServerSendPublishMatrixUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishMatrixUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishPriceMatrixT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Price Matrix command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishPriceRsp

enum ZclStatusCodeT ZbZclPriceServerSendPublishPriceRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPriceServerPublishPriceT *info, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Publish Price command as a response

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishPriceUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishPriceUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishPriceT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Price command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPriceServerSendPublishTariffInfoUnsolic

enum ZclStatusCodeT ZbZclPriceServerSendPublishTariffInfoUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPriceServerPublishTariffInfoT *info, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an unsolicited Publish Tariff Information command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclPriceSvrAttrT

Price Server Attribute IDs

ZbZclPriceTariffChargingSchemeT

Tariff Charging Scheme Enumeration

ZbZclPriceTariffTypeT

Tariff Type Enumeration

ZbZclPriceTierBlockModeT

Tier Block Mode Enumeration

Structures

ZbZclPriceClientCallbacksT

Price Client callbacks configuration

Parameters

ZbZclPriceClientGetBillingPeriodT

Get Billing Period command structure

Parameters

ZbZclPriceClientGetBlockPeriodT

Get Block Period command structure

Parameters

ZbZclPriceClientGetBlockThresholdsT

Get Block Thresholds command structure

Parameters

ZbZclPriceClientGetCO2ValueT

Get CO2 Value command structure

Parameters

ZbZclPriceClientGetCalorificValueT

Get Calorific Value command structure

Parameters

ZbZclPriceClientGetConsolidatedBillT

Get Consolidated Bill command structure

Parameters

ZbZclPriceClientGetConversionFactorT

Get Conversion Factor command structure

Parameters

ZbZclPriceClientGetCurrentPriceT

Get Current Price command structure

Parameters

ZbZclPriceClientGetPriceMatrixT

Get Price Matrix command structure

Parameters

ZbZclPriceClientGetScheduledPricesT

Get Scheduled Prices command structure

Parameters

ZbZclPriceClientGetTariffInfoT

Get Tariff Information command structure

Parameters

ZbZclPriceClientPriceAckT

Price Acknowledge command structure

Parameters

ZbZclPriceServerBlockThreshEntryT

Block Threshold Entry structure

Parameters

ZbZclPriceServerCallbacksT

Price Server callbacks configuration

Parameters

ZbZclPriceServerPriceMatrixEntryT

Price Matrix Entry structure

Parameters

ZbZclPriceServerPublishBillingPeriodT

Publish Billing Period command structure

Parameters

ZbZclPriceServerPublishBlockPeriodT

Publish Block Period

Parameters

ZbZclPriceServerPublishBlockThresholdsT

Publish Block Thresholds command structure

Parameters

ZbZclPriceServerPublishCO2ValueT

Publish CO2 Value command structure

Parameters

ZbZclPriceServerPublishCalorificValueT

Publish Calorific Value command structure

Parameters

ZbZclPriceServerPublishConsolidatedBillT

Publish Consolidated Bill command structure

Parameters

ZbZclPriceServerPublishConversionFactorT

Publish Conversion Factor command structure

Parameters

ZbZclPriceServerPublishCurrencyConversionT

Publish Currency Conversion command structure

Parameters

ZbZclPriceServerPublishPriceMatrixT

Publish Price Matrix command structure

Parameters

ZbZclPriceServerPublishPriceT

Publish Price command structure

Parameters

ZbZclPriceServerPublishTariffInfoT

Publish Tariff Info command structure

Parameters

6.4.10. Tunneling

#include "zcl/se/zcl.tunnel.h"

Functions

ZbZclTunnelClientAddProto

enum ZclStatusCodeT ZbZclTunnelClientAddProto(struct ZbZclClusterT *cluster, enum ZbZclTunnelProtocolT protocol, uint16_t mfr,
uint16_t mtu, struct ZbZclTunnelProtoCbT *callbacks);

Add a protocol tunnel to the server

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientAlloc

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

Create a new instance of the Tunneling Client cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTunnelClientCloseQuietReq

enum ZclStatusCodeT ZbZclTunnelClientCloseQuietReq(struct ZbZclClusterT *cluster);

Close the local tunnel without informing the server

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientCloseReq

enum ZclStatusCodeT ZbZclTunnelClientCloseReq(struct ZbZclClusterT *cluster, struct ZbZclTunnelCloseT *close,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Close Tunnel command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientGetSupportedProtocols

enum ZclStatusCodeT ZbZclTunnelClientGetSupportedProtocols(struct ZbZclClusterT *cluster, struct ZbApsAddrT *dst,
struct ZbZclTunnelGetSupportedProtocolsT *suppported_proto, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Get Supported Protocols command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelClientSendReq

enum ZclStatusCodeT ZbZclTunnelClientSendReq(struct ZbZclClusterT *cluster, struct ZbZclTunnelDataT *data,
void (*callback)(struct ZbZclCommandRspT *rspPr, void *arg), void *arg);

Send a Transfer Data command

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelMirrorAlloc

struct ZbZclClusterT * ZbZclTunnelMirrorAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *tunnel, struct ZbZclClusterT *meter_mirror);

Allocates a Tunneling Client/Server Mirror cluster. The caller (application) must attach any attributes to the cluster you want to mirror.

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTunnelSendData

enum ZclStatusCodeT ZbZclTunnelSendData(struct ZbZclClusterT *cluster, struct ZbZclTunnelStateT *state, struct ZbZclTunnelDataT *data,
void (*callback)(struct ZbZclCommandRspT *rspPtr, void *arg), void *arg);

Send data via the tunnel. If the input cluster is server then the data will be sent to the client and vice versa.

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelServerAddProto

enum ZclStatusCodeT ZbZclTunnelServerAddProto(struct ZbZclClusterT *cluster, enum ZbZclTunnelProtocolT protocol, uint16_t mfr, uint16_t mtu,
struct ZbZclTunnelProtoCbT *callbacks);

Add a protocol tunnel to the server

Parameters

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclTunnelServerAlloc

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

Create a new instance of the Tunneling Server cluster

Parameters

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTunnelServerStateFindById

struct ZbZclTunnelStateT * ZbZclTunnelServerStateFindById(struct ZbZclClusterT *cluster, uint16_t tunnel_id);

Get tunnel server state by tunnel ID

Parameters

Return

  • State of the tunnel

ZbZclTunnelStateGetDataLen

uint32_t ZbZclTunnelStateGetDataLen(struct ZbZclTunnelStateT *state, bool clear_data);

Get received data length using Tunneling Cluster State structure

Parameters

Return

  • Length of data in the buffer

ZbZclTunnelStateGetDataPtr

uint8_t * ZbZclTunnelStateGetDataPtr(struct ZbZclTunnelStateT *state);

Get received data using Tunneling Cluster State structure

Parameters

Return

  • Pointer to received data buffer. Length of data is determined by ZbZclTunnelStateGetDataLen.

ZbZclTunnelStateGetId

uint16_t ZbZclTunnelStateGetId(struct ZbZclTunnelStateT *state);

Get ID using Tunneling Cluster State structure

Parameters

Return

  • Allocated tunnel ID

ZbZclTunnelStateGetMtu

uint16_t ZbZclTunnelStateGetMtu(struct ZbZclTunnelStateT *state);

Get the current tunnel’s MTU, which is the smaller of the two side’s MTUs.

Parameters

Return

  • MTU size in bytes

ZbZclTunnelStateGetProtocol

enum ZbZclTunnelProtocolT ZbZclTunnelStateGetProtocol(struct ZbZclTunnelStateT *state);

Get Tunneling Protocol Instance using Tunneling Cluster State structure

Parameters

Return

  • Tunneling Protocol Instance structure

ZbZclTunnelStateGetRmtAddr

bool ZbZclTunnelStateGetRmtAddr(struct ZbZclTunnelStateT *state, uint64_t *addr, uint8_t *endpoint);

Get the current tunnel’s remote addressing.

Parameters

Return

  • True if address info is present and valid, false otherwise.

Enumerations

ZbZclTunnelProtocolT

Tunneling Protocol ID enumerations

ZbZclTunnelStatusT

Tunneling Status Values

ZbZclTunnelSvrAttrT

Tunneling Server Attribute IDs

ZbZclTunnelXferStatusT

Tunneling Transfer Data Status Values

Structures

ZbZclTunnelCloseT

Close Tunnel command structure

Parameters

ZbZclTunnelConnectT

Request Tunnel command structure

Parameters

ZbZclTunnelDataT

Tunnel Data command structure

Parameters

ZbZclTunnelGetSupportedProtocolsT

Get Supported Protocols command structure

Parameters

ZbZclTunnelProtoCbT

ZbZclTunnelServerAddProto and ZbZclTunnelClientAddProto callback data structure

Parameters

7. References