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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
tcso_callback Callback function that will be invoked when the TCSO is ever started (ZB_TCSO_STATUS_DISCOVERY_UNDERWAY), and when it completes, with the resultant status. The return value for this callback determines whether the stack starts or continues with TCSO (true), or if the stack should not start or continue with TCSO (false).
tcso_arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclKeepAliveClientStart

void ZbZclKeepAliveClientStart(struct ZigBeeT *zb);

Start Keep Alive

Parameters

zb Zigbee stack instance

Return

  • Void

ZbZclKeepAliveClientStop

void ZbZclKeepAliveClientStop(struct ZigBeeT *zb);

Stop Keep Alive and abort the TCSO

Parameters

zb Zigbee stack instance

Return

  • Void

ZbZclKeepAliveServerAlloc

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

Create a new instance of the Keep Alive Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclKeepAliveServerWriteDirect

enum ZclStatusCodeT ZbZclKeepAliveServerWriteDirect(struct ZigBeeT *zb, uint16_t attrId, uint16_t value);

Write a Keep Alive Server attribute

Parameters

zb Zigbee instance
attrId The attribute Id to write
value Attribute data to be writen.

Return

  • ZCL Status Code

Enumerations

ZbZclKeepAliveSvrAttrT

Keep Alive Server Attribute IDs

ZCL_KEEPALIVE_SVR_ATTR_BASE TC Keep-Alive Base - minutes (valid range is from 0x01 to 0xff, but not enforced by cluster, for testing)
ZCL_KEEPALIVE_SVR_ATTR_JITTER TC Keep-Alive Jitter - seconds (valid range is from 0x0000 to 0x0200)

6.2. General Clusters

6.2.1. Alarms

#include "zcl/general/zcl.alarm.h"

Description

ZCL 8 section 3.11

Zigbee defines an alarm as the occurrence of a specific condition. Individual clusters (such as Basic, Power Configuration, Door Lock, Ballast Configuration, etc.) define these conditions and a corresponding alarm code.

For the definition of the alarm condition its corresponding code for a specific cluster, see the Zigbee Cluster Library Specification 8 (ZCL8).

Alarm conditions are typically defined in terms of a cluster attribute. For example, the Power Configuration cluster defines alarm code 0x00 for the alarm generated when the MainsVoltage attribute drops below the value specified in the MainsVoltageMinThreshold attribute for a time period greater than the MainsVoltageDwellTripPoint attribute in seconds.

Clusters typically have an additional AlarmMask attribute which is a bitmask that allows the client to enable or disable the generation of individual alarms when the corresponding alarm condition is met.

It is the responsibility of the cluster application implementation to detect the alarm condition, check the alarm mask, and when needed initiate generation of the alarm by calling ZbZclClusterSendAlarm() (defined in zcl.h), resulting in the sending of an Alarm command. It is important to note that this Alarm command is not sent from the originating cluster. Instead, it is sent from an instance of the Alarm cluster that must reside on the same endpoint as the originating cluster.

The alarm cluster sends the alarm command to all clients with bindings to the alarm cluster on this endpoint. It also adds alarm details to an internal log. The alarm cluster provides commands that allow clients to query this alarm log. The alarm log is shared by all clusters on the same endpoint. In order to receive alarms, clients must bind to the alarms cluster on the same endpoint as the alarm generating cluster. For clusters that support an alarm mask, any client can enable/disable generation of alarm commands by setting/clearing the mask bit in the originating cluster. The mask controls sending of alarms to all bound clients.

Some alarm conditions do not automatically reset and must be manually reset by the client. The Alarm cluster provides the Reset Alarm and Reset all Alarms commands for this reason the application should register a callback for each endpoint with cluster(s) that require resetting using ZbZclClusterRegisterAlarmResetHandler(). The callback handles the specific cluster(s) against which it was registered.

When the alarm cluster receives a Reset Alarm or Reset all Alarms command, the cluster application callback will be invoked and can then handle the whatever is necessary to internally reset to detect new occurrences of the alarm condition. The same callback is invoked for both commands. When the Reset all Alarms command is received the callback is invoked with an Alarm Code of 0xFF and Cluster ID of 0xFFFF. When a callback is provided the function return code is provided as the status in the Default Response. When no callbacks are provided the alarm cluster will send a Default Response with a status of SUCCESS.

As a summary:

  • When an endpoint contains a cluster that can generate alarms, it is the application’s responsibility to also instantiate the alarms cluster on that endpoint.
  • It is the responsibility of the cluster implementation to
    • Detect alarm conditions
    • Check the alarm mask (where supported)
    • Generate an alarm by calling ZbZclClusterSendAlarm()
  • If the alarm conditions for any cluster(s) on an endpoint need to be manually reset, then the application should register a callback for each endpoint with cluster(s) that require resetting using ZbZclClusterRegisterAlarmResetHandler().

For more information about the Alarms cluster, see Section 3.11 in ZCL8.

Functions

ZbZclAlarmClientAlloc

struct ZbZclClusterT * ZbZclAlarmClientAlloc(struct ZigBeeT *zb, uint8_t endpoint,
ZbZclAlarmClientCallbackT callback, void *arg);

Create a new instance of the Alarms Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callback Callback function that will be invoked when an alarm occurs
arg Pointer to application data that will later be provided back to the callback function when it is invoked

Return

  • Cluster pointer, or NULL if there is an error

ZbZclAlarmClientGetAlarmReq

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

Send a Get Alarm command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when response is received
arg Pointer to application data that will later be provided back to the callback function when it is invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclAlarmClientResetAlarmLogReq

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

Send a Reset Alarm Log command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when response is received
arg Pointer to application data that will later be provided back to the callback function when it is invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclAlarmClientResetAlarmReq

enum ZclStatusCodeT ZbZclAlarmClientResetAlarmReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, 
uint8_t alarm_code, uint16_t cluster_id, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Reset Alarm command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
alarm_code Code of the detected alarm condition
cluster_id ID of cluster where alarm condition occurred
callback Callback function that will be invoked when response is received
arg Pointer to application data that will later be provided back to the callback function when it is invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclAlarmClientResetAllAlarmsReq

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

Send a Reset All Alarms command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when response is received
arg Pointer to application data that will later be provided back to the callback function when it is invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclAlarmServerAlloc

struct ZbZclClusterT * ZbZclAlarmServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t logSize,
struct ZbZclClusterT *time_server);

Create a new instance of the Alarms Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
logSize Alarm log size
time_server Time Server cluster instance

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclAlarmsAttrT

Alarms Attribute IDs

ZCL_ALARM_ATTR_COUNT AlarmCount (Optional)

6.2.2. Ballast Configuration

#include "zcl/general/zcl.ballast.config.h"

Functions

ZbZclBallastConfigClientAlloc

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

Create a new instance of the Ballast Configuration Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclBallastConfigServerAlloc

struct ZbZclClusterT * ZbZclBallastConfigServerAlloc(struct ZigBeeT *zb, uint8_t endpoint,
uint8_t phyMin, uint8_t phyMax);

Create a new instance of the Ballast Configuration Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
phyMin The default minimum light output
phyMax The default maximum light output

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclBallastConfigSvrAttrT

Ballast Configuration Server Attributes IDs

ZCL_BALLAST_CONFIG_ATTR_PHY_MIN_LEVEL PhysicalMinLevel
ZCL_BALLAST_CONFIG_ATTR_PHY_MAX_LEVEL PhysicalMaxLevel
ZCL_BALLAST_CONFIG_ATTR_BALLAST_STATUS BallastStatus
ZCL_BALLAST_CONFIG_ATTR_MIN_LEVEL MinLevel
ZCL_BALLAST_CONFIG_ATTR_MAX_LEVEL MaxLevel
ZCL_BALLAST_CONFIG_ATTR_POWER_ON_LEVEL PowerOnLevel (Deprecated)
ZCL_BALLAST_CONFIG_ATTR_POWER_ON_FADE_TIME PowerOnFadeTime (Deprecated)
ZCL_BALLAST_CONFIG_ATTR_INTRINSIC_BALLAST_FACT OR IntrinsicBallastFactor (Optional)
ZCL_BALLAST_CONFIG_ATTR_BALLAST_FACTOR_ADJUST MENT BallastFactorAdjustment (Optional)
ZCL_BALLAST_CONFIG_ATTR_LAMP_QUANTITY LampQuantity (Optional)
ZCL_BALLAST_CONFIG_ATTR_LAMP_TYPE LampType (Optional)
ZCL_BALLAST_CONFIG_ATTR_LAMP_MANUFACTURER LampManufacturer (Optional)
ZCL_BALLAST_CONFIG_ATTR_LAMP_RATED_HOURS LampRatedHours (Optional)
ZCL_BALLAST_CONFIG_ATTR_LAMP_BURN_HOURS LampBurnHours (Optional)
ZCL_BALLAST_CONFIG_ATTR_LAMP_ALARM_MODE LampAlarmMode (Optional)
ZCL_BALLAST_CONFIG_ATTR_LAMP_BURN_HOURS_TRIP

_POINT

LampBurnHoursTripPoint (Optional)

6.2.3. Basic

#include "zcl/general/zcl.basic.h"

Functions

ZbZclBasicClientAlloc

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

Create a new instance of the Basic Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclBasicClientResetReq

enum ZclStatusCodeT ZbZclBasicClientResetReq(struct ZbZclClusterT *cluster,
const struct ZbApsAddrT *dst);

Send a Reset to Factory Defaults command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclBasicSvrAttrT

Basic Server Attribute IDs

ZCL_BASIC_ATTR_ZCL_VERSION ZCLVersion
ZCL_BASIC_ATTR_APP_VERSION ApplicationVersion (Optional)
ZCL_BASIC_ATTR_STACK_VERSION StackVersion (Optional)
ZCL_BASIC_ATTR_HARDWARE_VERSION HWVersion (Optional)
ZCL_BASIC_ATTR_MFR_NAME ManufacturerName (Optional)
ZCL_BASIC_ATTR_MODEL_NAME ModelIdentifier (Optional)
ZCL_BASIC_ATTR_DATE_CODE DateCode (Optional)
ZCL_BASIC_ATTR_POWER_SOURCE PowerSource
ZCL_BASIC_ATTR_MFR_VERSION_DETAILS ManufacturerVersionDetails (Optional)
ZCL_BASIC_ATTR_SERIAL_NUMBER SerialNumber (Optional)
ZCL_BASIC_ATTR_PRODUCT_LABEL ProductLabel (Optional)
ZCL_BASIC_ATTR_LOCATION LocationDescription (Optional)
ZCL_BASIC_ATTR_ENVIRONMENT PhysicalEnvironment (Optional)
ZCL_BASIC_ATTR_ENABLED DeviceEnabled (Optional)
ZCL_BASIC_ATTR_ALARM_MASK AlarmMask (Optional)
ZCL_BASIC_ATTR_DISABLE_LOCAL_CONFIG DisableLocalConfig (Optional)
ZCL_BASIC_ATTR_SW_BUILD_ID SWBuildID (Optional)

6.2.4. Color Control

#include "zcl/general/zcl.color.h"

Functions

ZbZclColorClientAlloc

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

Instantiate a new instance of the Color Control client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclColorClientColorLoopSetReq

enum ZclStatusCodeT ZbZclColorClientColorLoopSetReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientColorLoopSetReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Color Loop Set command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Color Loop Set command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveColorTempReq

enum ZclStatusCodeT ZbZclColorClientMoveColorTempReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveColorTempReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move Color Temperature command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move Color Temperature command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveColorXYReq

enum ZclStatusCodeT ZbZclColorClientMoveColorXYReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveColorXYReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move Color command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move Color command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveHueEnhReq

enum ZclStatusCodeT ZbZclColorClientMoveHueEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveHueEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Enhanced Move Hue command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Enhanced Move Hue command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveHueReq

enum ZclStatusCodeT ZbZclColorClientMoveHueReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveHueReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move Hue command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move Hue command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveSatReq

enum ZclStatusCodeT ZbZclColorClientMoveSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move Saturation command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move Saturation command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveToColorTempReq

enum ZclStatusCodeT ZbZclColorClientMoveToColorTempReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveToColorTempReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move to Color Temperature command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move to Color Temperature command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveToColorXYReq

enum ZclStatusCodeT ZbZclColorClientMoveToColorXYReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveToColorXYReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move to Color command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move to Color command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveToHueEnhReq

enum ZclStatusCodeT ZbZclColorClientMoveToHueEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveToHueEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Enhanced Move to Hue command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Enhanced Move to Hue command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveToHueReq

enum ZclStatusCodeT ZbZclColorClientMoveToHueReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveToHueReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move to Hue command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move to Hue command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveToHueSatEnhReq

enum ZclStatusCodeT ZbZclColorClientMoveToHueSatEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveToHueSatEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Enhanced Move to Hue and Saturation command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Enhanced Move to Hue and Saturation command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveToHueSatReq

enum ZclStatusCodeT ZbZclColorClientMoveToHueSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveToHueSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move to Hue and Saturation command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move to Hue and Saturation command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientMoveToSatReq

enum ZclStatusCodeT ZbZclColorClientMoveToSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientMoveToSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Move to Saturation command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Move to Saturation command command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientStepColorTempReq

enum ZclStatusCodeT ZbZclColorClientStepColorTempReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientStepColorTempReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Step Color Temperature command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Step Color Temperature command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientStepColorXYReq

enum ZclStatusCodeT ZbZclColorClientStepColorXYReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientStepColorXYReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Step Color command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Step Color command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientStepHueEnhReq

enum ZclStatusCodeT ZbZclColorClientStepHueEnhReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientStepHueEnhReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Enhanced Step Hue command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Enhanced Step Hue command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientStepHueReq

enum ZclStatusCodeT ZbZclColorClientStepHueReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientStepHueReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Step Hue command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Step Hue command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientStepSatReq

enum ZclStatusCodeT ZbZclColorClientStepSatReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientStepSatReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Step Saturation command

Parameters

clusterPtr Cluster instance from which to send this command
dst Destination address for request
req Step Saturation command command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorClientStopMoveStepReq

enum ZclStatusCodeT ZbZclColorClientStopMoveStepReq(struct ZbZclClusterT *clusterPtr, const struct ZbApsAddrT *dst,
struct ZbZclColorClientStopMoveStepReqT *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Stop Move Step command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Stop Move Step command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclColorServerAlloc

struct ZbZclClusterT * ZbZclColorServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *onoff_server,
const struct ZbZclAttrT *attribute_list, unsigned int num_attrs, struct ZbColorClusterConfig *config, void *arg);

Instantiate a new instance of the Color Control server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
onoff_server OnOff Server cluster pointer for processing commands with the Options fields, may be NULL
attribute_list List of application defined attributes to be appended, may be NULL
num_attrs Number of application defined attributes to be added, may be 0 if attribute_list is NULL
config Configuration containing Color Control capabilities and callbacks for handling requests
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclColorSvrAttrT

Color Control Server Attribute IDs

ZCL_COLOR_ATTR_CURRENT_HUE CurrentHue
ZCL_COLOR_ATTR_CURRENT_SAT CurrentSaturation
ZCL_COLOR_ATTR_REMAINING_TIME RemainingTime (Optional but is used in mandatory commands)
ZCL_COLOR_ATTR_CURRENT_X CurrentX
ZCL_COLOR_ATTR_CURRENT_Y CurrentY
ZCL_COLOR_ATTR_DRIFT_COMP DriftCompensation (Optional)
ZCL_COLOR_ATTR_COMPENSATION_TEXT CompensationText (Optional)
ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS ColorTemperatureMireds
ZCL_COLOR_ATTR_COLOR_MODE ColorMode
ZCL_COLOR_ATTR_OPTIONS Options
ZCL_COLOR_ATTR_NUM_PRIMARIES NumberOfPrimaries
ZCL_COLOR_ATTR_PRIMARY_1X Primary1X
ZCL_COLOR_ATTR_PRIMARY_1Y Primary1Y
ZCL_COLOR_ATTR_PRIMARY_1_INTENS Primary1Intensity
ZCL_COLOR_ATTR_PRIMARY_2X Primary2X
ZCL_COLOR_ATTR_PRIMARY_2Y Primary2Y
ZCL_COLOR_ATTR_PRIMARY_2_INTENS Primary2Intensity
ZCL_COLOR_ATTR_PRIMARY_3X Primary3X
ZCL_COLOR_ATTR_PRIMARY_3Y Primary3Y
ZCL_COLOR_ATTR_PRIMARY_3_INTENS Primary3Intensity
ZCL_COLOR_ATTR_PRIMARY_4X Primary4X
ZCL_COLOR_ATTR_PRIMARY_4Y Primary4Y
ZCL_COLOR_ATTR_PRIMARY_4_INTENS Primary4Intensity
ZCL_COLOR_ATTR_PRIMARY_5X Primary5X
ZCL_COLOR_ATTR_PRIMARY_5Y Primary5Y
ZCL_COLOR_ATTR_PRIMARY_5_INTENS Primary5Intensity
ZCL_COLOR_ATTR_PRIMARY_6X Primary6X
ZCL_COLOR_ATTR_PRIMARY_6Y Primary6Y
ZCL_COLOR_ATTR_PRIMARY_6_INTENS Primary6Intensity
ZCL_COLOR_ATTR_WHITE_POINT_X WhitePointX (Optional)
ZCL_COLOR_ATTR_WHITE_POINT_Y WhitePointY (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_RX ColorPointRX (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_RY ColorPointRY (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_R_INTENS ColorPointRIntensity (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_GX ColorPointGX (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_GY ColorPointGY (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_G_INTENS ColorPointGIntensity (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_BX ColorPointBX (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_BY ColorPointBY (Optional)
ZCL_COLOR_ATTR_COLOR_POINT_B_INTENS ColorPointBIntensity (Optional)
ZCL_COLOR_ATTR_ENH_CURR_HUE EnhancedCurrentHue
ZCL_COLOR_ATTR_ENH_COLOR_MODE EnhancedColorMode
ZCL_COLOR_ATTR_COLOR_LOOP_ACTIVE ColorLoopActive
ZCL_COLOR_ATTR_COLOR_LOOP_DIR ColorLoopDirection
ZCL_COLOR_ATTR_COLOR_LOOP_TIME ColorLoopTime
ZCL_COLOR_ATTR_COLOR_LOOP_START_HUE ColorLoopStartEnhancedHue
ZCL_COLOR_ATTR_COLOR_LOOP_STORE_HUE ColorLoopStoredEnhancedHue
ZCL_COLOR_ATTR_COLOR_CAPABILITIES ColorCapabilities
ZCL_COLOR_ATTR_COLOR_TEMP_MIN ColorTempPhysicalMinMireds
ZCL_COLOR_ATTR_COLOR_TEMP_MAX ColorTempPhysicalMaxMireds
ZCL_COLOR_ATTR_COUPLE_COLOR_TL_MIN ColorTempPhysicalMaxMireds
ZCL_COLOR_ATTR_STARTUP_COLOR_TEMP StartUpColorTemperatureMireds

Structures

ZbZclColorClientColorLoopSetReqT

Color Loop Set command structure

Parameters

uint8_t update_flags Update Flags
uint8_t action Action
uint8_t direction Direction
uint16_t transition_time Time
uint16_t start_hue Start Hue
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveColorTempReqT

Move Color Temperature command structure

Parameters

uint8_t move_mode Move Mode
uint16_t rate Rate
uint16_t color_temp_min Color Temperature Minimum Mireds
uint16_t color_temp_max Color Temperature Maximum Mireds
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveColorXYReqT

Move Color command structure

Parameters

uint16_t rate_x RateX
uint16_t rate_y RateY
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveHueEnhReqT

Enhanced Move Hue command structure

Parameters

uint8_t move_mode Move Mode
uint16_t rate Rate
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveHueReqT

Move Hue command structure

Parameters

uint8_t move_mode Move Mode
uint8_t rate Rate
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveSatReqT

Move Saturation command structure

Parameters

uint8_t move_mode Move Mode
uint8_t rate Rate
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveToColorTempReqT

Move to Color Temperature command structure

Parameters

uint16_t color_temp Color Temperature Mireds
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveToColorXYReqT

Move to Color command structure

Parameters

uint16_t color_x ColorX
uint16_t color_y ColorY
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveToHueEnhReqT

Enhanced Move to Hue command structure

Parameters

uint16_t enh_hue Enhanced Hue
uint8_t direction Direction
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveToHueReqT

Move to Hue command structure

Parameters

uint8_t hue Hue
uint8_t direction Direction
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveToHueSatEnhReqT

Enhanced Move to Hue and Saturation command structure

Parameters

uint16_t enh_hue Enhanced Hue
uint8_t sat Saturation
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveToHueSatReqT

Move to Hue and Saturation command structure

Parameters

uint8_t hue Hue
uint8_t sat Saturation
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientMoveToSatReqT

Move to Saturation command structure

Parameters

uint8_t sat Saturation
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientStepColorTempReqT

Step Color Temperature command structure

Parameters

uint8_t step_mode Step Mode
uint16_t step_size Step Size
uint16_t transition_time Transition Time
uint16_t color_temp_min Color Temperature Minimum Mireds
uint16_t color_temp_max Color Temperature Maximum Mireds
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientStepColorXYReqT

Step Color command structure

Parameters

uint16_t step_x StepX
uint16_t step_y StepY
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientStepHueEnhReqT

Enhanced Step Hue command structure

Parameters

uint8_t step_mode Step Mode
uint16_t step_size Step Size
uint16_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientStepHueReqT

Step Hue command structure

Parameters

uint8_t step_mode Step Mode
uint8_t step_size Step Size
uint8_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override

ZbZclColorClientStepSatReqT

Step Saturation command structure

Parameters

uint8_t step_mode Step Mode
uint8_t step_size Step Size
uint8_t transition_time Transition Time
uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorClientStopMoveStepReqT

Stop Move Step command structure

Parameters

uint8_t mask OptionsMask
uint8_t override OptionsOverride

ZbZclColorServerCallbacksT

Color Control Server callbacks configuration

Parameters

move_to_hue

(callback function pointer)

enum ZclStatusCodeT (*move_to_hue)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move to Hue command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME

move_hue

(callback function pointer)

enum ZclStatusCodeT (*move_hue)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveHueReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move Hue command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME

step_hue

(callback function pointer)

enum ZclStatusCodeT (*step_hue)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepHueReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Step Hue command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME

move_to_sat

(callback function pointer)

enum ZclStatusCodeT (*move_to_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move to Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME

move_sat

(callback function pointer)

enum ZclStatusCodeT (*move_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME


step_sat

(callback function pointer)

enum ZclStatusCodeT (*step_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Step Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME

move_to_hue_sat

(callback function pointer)

enum ZclStatusCodeT (*move_to_hue_sat)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueSatReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move to Hue and Saturation command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_HUE, ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME

move_to_color_xy

(callback function pointer)

enum ZclStatusCodeT (*move_to_color_xy)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToColorXYReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move to Color command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_X, ZCL_COLOR_ATTR_CURRENT_Y, and ZCL_COLOR_ATTR_REMAINING_TIME

move_color_xy

(callback function pointer)

enum ZclStatusCodeT (*move_color_xy)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveColorXYReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move Color command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_X, ZCL_COLOR_ATTR_CURRENT_Y, and ZCL_COLOR_ATTR_REMAINING_TIME

step_color_xy

(callback function pointer)

enum ZclStatusCodeT (*step_color_xy)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepColorXYReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Step Color command. The application is expected to update ZCL_COLOR_ATTR_CURRENT_X, ZCL_COLOR_ATTR_CURRENT_Y, and ZCL_COLOR_ATTR_REMAINING_TIME

move_to_color_temp

(callback function pointer)

enum ZclStatusCodeT (*move_to_color_temp)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToColorTempReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move to Color Temperature command. The application is expected to update ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS, and ZCL_COLOR_ATTR_REMAINING_TIME

move_to_hue_enh

(callback function pointer)

enum ZclStatusCodeT (*move_to_hue_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Enhanced Move to Hue command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME

move_hue_enh

(callback function pointer)

enum ZclStatusCodeT (*move_hue_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveHueEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move Hue command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME

step_hue_enh

(callback function pointer)

enum ZclStatusCodeT (*step_hue_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepHueEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Enhanced Step Hue command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME

move_to_hue_sat_enh

(callback function pointer)

enum ZclStatusCodeT (*move_to_hue_sat_enh)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveToHueSatEnhReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Enhanced Move to Hue and Saturation command. The application is expected to update ZCL_COLOR_ATTR_ENH_CURR_HUE, ZCL_COLOR_ATTR_CURRENT_SAT, and ZCL_COLOR_ATTR_REMAINING_TIME

color_loop_set

(callback function pointer)

enum ZclStatusCodeT (*color_loop_set)(struct ZbZclClusterT *cluster, struct ZbZclColorClientColorLoopSetReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Color Loop Set command. The application is expected to update the following attributes according to the update flags and action fields: ZCL_COLOR_ATTR_COLOR_LOOP_ACTIVE, ZCL_COLOR_ATTR_COLOR_LOOP_DIR, ZCL_COLOR_ATTR_COLOR_LOOP_TIME, ZCL_COLOR_ATTR_COLOR_LOOP_START_HUE, ZCL_COLOR_ATTR_ENH_CURR_HUE, ZCL_COLOR_ATTR_COLOR_LOOP_STORE_HUE, and ZCL_COLOR_ATTR_REMAINING_TIME

stop_move_step

(callback function pointer)

enum ZclStatusCodeT (*stop_move_step)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStopMoveStepReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Stop Move Step command. The application is expected to update ZCL_COLOR_ATTR_REMAINING_TIME

move_color_temp

(callback function pointer)

enum ZclStatusCodeT (*move_color_temp)(struct ZbZclClusterT *cluster, struct ZbZclColorClientMoveColorTempReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Move Color Temperature command. The application is expected to update ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS, and ZCL_COLOR_ATTR_REMAINING_TIME

step_color_temp

(callback function pointer)

enum ZclStatusCodeT (*step_color_temp)(struct ZbZclClusterT *cluster, struct ZbZclColorClientStepColorTempReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Step Color Temperature command. The application is expected to update ZCL_COLOR_ATTR_COLOR_TEMP_MIREDS, and ZCL_COLOR_ATTR_REMAINING_TIME

6.2.5. Commissioning

#include "zcl/general/zcl.commission.h"

Functions

ZbZclCommissionClientAlloc

struct ZbZclClusterT * ZbZclCommissionClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t profile, bool aps_secured);

Create a new instance of the Commissioning Client cluster

Parameters

zb Zigbee stack instance
endpoint Set to ZB_ENDPOINT_BCAST if using Inter-PAN for communicating ZCL messages. Otherwise, set a valid ZCL endpoint.
profile Profile ID for this cluster (e.g. ZCL_PROFILE_HOME_AUTOMATION)
aps_secured APS Security - true if APS Security enabled, else false

Return

  • Cluster pointer, or NULL if there is an error

ZbZclCommissionClientEnable

enum ZclStatusCodeT ZbZclCommissionClientEnable(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientEnableInfoT *info);

Enable Commissioning Client by configuring MAC layer to listen for packets.

Parameters

cluster Cluster instance from which to send this command
info Commissioning Client Enable Information structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionClientSendResetStartup

enum ZclStatusCodeT ZbZclCommissionClientSendResetStartup(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep,
struct ZbZclCommissionClientResetStartup *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Reset Startup Parameters command

Parameters

cluster Cluster instance from which to send this command
dst_ext Extended address of the device to send this command
dst_ep If cluster is not using Inter-PAN, this is the destination endpoint to send the command to.
req Reset Startup Parameters command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionClientSendRestart

enum ZclStatusCodeT ZbZclCommissionClientSendRestart(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep,
struct ZbZclCommissionClientRestartDev *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Restart Device command

Parameters

cluster Cluster instance from which to send this command
dst_ext Extended address of the device to send this command
dst_ep If cluster is not using Inter-PAN, this is the destination endpoint to send the command to.
req Restart Device command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionClientSendRestoreStartup

enum ZclStatusCodeT ZbZclCommissionClientSendRestoreStartup(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep,
struct ZbZclCommissionClientRestoreStartup *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Restore Startup Parameters command

Parameters

cluster Cluster instance from which to send this command
dst_ext Extended address of the device to send this command
dst_ep If cluster is not using Inter-PAN, this is the destination endpoint to send the command to.
req Restore Startup Parameters command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionClientSendSaveStartup

enum ZclStatusCodeT ZbZclCommissionClientSendSaveStartup(struct ZbZclClusterT *cluster, uint64_t dst_ext, uint8_t dst_ep,
struct ZbZclCommissionClientSaveStartup *req, void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Save Startup Parameters command

Parameters

cluster Cluster instance from which to send this command
dst_ext Extended address of the device to send this command
dst_ep If cluster is not using Inter-PAN, this is the destination endpoint to send the command to.
req Save Startup Parameters command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionServerAlloc

struct ZbZclClusterT * ZbZclCommissionServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t profile, bool aps_secured,
struct ZbZclCommissionServerCallbacksT *callbacks, void *arg);

Create a new instance of the Commissioning Server cluster

Parameters

zb Zigbee stack instance
endpoint Set to ZB_ENDPOINT_BCAST if using Inter-PAN for communicating ZCL messages. Otherwise, set a valid ZCL endpoint.
profile Profile ID for this cluster (e.g. ZCL_PROFILE_HOME_AUTOMATION)
aps_secured APS Security - true if APS Security enabled, else false
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclCommissionServerEnable

enum ZclStatusCodeT ZbZclCommissionServerEnable(struct ZbZclClusterT *cluster, bool enable,
struct ZbZclCommissionServerEnableInfoT *info);

Enable the Commissioning Server by configuring the MAC layer to listen for packets. If enable is false, then Commissioning Server will stop processing any received Commissioning packets.

Parameters

cluster Cluster instance from which to send this command
enable Enable or disable the ability to receive and process Commissioning commands.
info Commissioning Server Enable Information structure. Contains information needed to start listening for Commissioning commands on a given channel. Optional and only applicable if enable is true. This may be NULL if already configured and operational on a network.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionServerGetStartup

enum ZclStatusCodeT ZbZclCommissionServerGetStartup(struct ZbZclClusterT *cluster, struct ZbStartupT *config);

Load startup configuration from Cluster Server’s attributes to the stack’s ZbStartupT structure

Parameters

cluster Cluster instance from which to send this command
config Zigbee Stack Startup Configuration structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionServerResetStartup

enum ZclStatusCodeT ZbZclCommissionServerResetStartup(struct ZbZclClusterT *cluster);

Reset startup configurations cluster attributes back to defaults

Parameters

cluster Cluster instance from which to send this command

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionServerSendResetStartupRsp

enum ZclStatusCodeT ZbZclCommissionServerSendResetStartupRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclCommissionServerResetStartupRsp *rsp);

Send a Reset Startup Parameters Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Reset Startup Parameters Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionServerSendRestartRsp

enum ZclStatusCodeT ZbZclCommissionServerSendRestartRsp(struct ZbZclClusterT *cluster, struct

ZbZclAddrInfoT *dst, struct ZbZclCommissionServerRestartDevRsp *rsp);

Send a Restart Device Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Restart Device Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionServerSendRestoreStartupRsp

enum ZclStatusCodeT ZbZclCommissionServerSendRestoreStartupRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclCommissionServerRestoreStartupRsp *rsp);

Send a Restore Startup Parameters Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Restore Startup Parameters Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCommissionServerSendSaveStartupRsp

enum ZclStatusCodeT ZbZclCommissionServerSendSaveStartupRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclCommissionServerSaveStartupRsp *rsp);

Send a Save Startup Parameters Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Save Startup Parameters Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclCommissionServerAttrT

Commissioning Server Attribute IDs

ZCL_COMMISSION_SVR_ATTR_SHORT_ADDR ShortAddress. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured) or 0x02 (ZbStartTypeRejoin).
ZCL_COMMISSION_SVR_ATTR_EPID ExtendedPANId
ZCL_COMMISSION_SVR_ATTR_PANID PANId. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured) or 0x02 (ZbStartTypeRejoin).
ZCL_COMMISSION_SVR_ATTR_CHANNELMASK Channelmask
ZCL_COMMISSION_SVR_ATTR_PROTOCOLVER ProtocolVersion. Default value is 0x0002 (ZB_PROTOCOL_VERSION_2007)
ZCL_COMMISSION_SVR_ATTR_STACKPROFILE StackProfile. Default value is 0x02 (ZB_NWK_STACK_PROFILE_PRO)
ZCL_COMMISSION_SVR_ATTR_STARTUPCONTROL StartupControl. ZbStartTypePreconfigured = 0x00, ZbStartTypeForm = 0x01, ZbStartTypeRejoin = 0x02, ZbStartTypeJoin = 0x03
ZCL_COMMISSION_SVR_ATTR_TCADDR TrustCenterAddress. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured). Otherwise it should be zero to allow the Transport Key to be decrypted and processed correctly during joining.
ZCL_COMMISSION_SVR_ATTR_TCMASTER TrustCenterMasterKey (Optional)
ZCL_COMMISSION_SVR_ATTR_NWKKEY NetworkKey. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured).
ZCL_COMMISSION_SVR_ATTR_USEINSECJOIN UseInsecureJoin
ZCL_COMMISSION_SVR_ATTR_PRECONFLINKKEY PreconfiguredLinkKey
ZCL_COMMISSION_SVR_ATTR_NWKKEYSEQNUM NetworkKeySeqNum. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured).
ZCL_COMMISSION_SVR_ATTR_NWKKEYTYPE NetworkKeyType. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured).
ZCL_COMMISSION_SVR_ATTR_NWKMGRADDR NetworkManagerAddress. This should only be set if StartupControl is equal to 0x00 (ZbStartTypePreconfigured) or 0x02 (ZbStartTypeRejoin).
ZCL_COMMISSION_SVR_ATTR_SCANATTEMPTS ScanAttempts (Optional)
ZCL_COMMISSION_SVR_ATTR_TIMEBTWSCANS TimeBetweenScans (Optional)
ZCL_COMMISSION_SVR_ATTR_REJOININTERVAL RejoinInterval (Optional)
ZCL_COMMISSION_SVR_ATTR_MAXREJOININTERVAL MaxRejoinInterval (Optional)
ZCL_COMMISSION_SVR_ATTR_POLLRATE IndirectPollRate (Optional)
ZCL_COMMISSION_SVR_ATTR_PARENTRETRYTHRESH ParentRetryThreshold (Optional)
ZCL_COMMISSION_SVR_ATTR_CONCFLAG ConcentratorFlag (Optional)
ZCL_COMMISSION_SVR_ATTR_CONCRADIUS ConcentratorRadius (Optional)
ZCL_COMMISSION_SVR_ATTR_CONCDISCTIME ConcentratorDiscoveryTime (Optional)

Structures

ZbZclCommissionClientEnableInfoT

Commissioning Client Enable Information structure

Parameters

uint8_t page Page
uint8_t channel Channel

ZbZclCommissionClientResetStartup

Reset Startup Parameters command structure

Parameters

uint8_t options Options - e.g. ZCL_COMMISS_RESET_OPTS_RESET_CURR
uint8_t index Index

ZbZclCommissionClientRestartDev

Restart Device command structure

Parameters

uint8_t options Options - e.g. ZCL_COMMISS_RESTART_OPTS_MODE_MASK
uint8_t delay Delay (seconds)
uint8_t jitter Jitter - RAND(jitter * 80) milliseconds

ZbZclCommissionClientRestoreStartup

Restore Startup Parameters command structure

Parameters

uint8_t options Options (Reserved)
uint8_t index Index

ZbZclCommissionClientSaveStartup

Save Startup Parameters command structure

Parameters

uint8_t options Options (Reserved)
uint8_t index Index

ZbZclCommissionServerCallbacksT

Commissioning Server callbacks configuration

Parameters

restart_device

(callback function pointer)

enum ZclStatusCodeT (*restart_device)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientRestartDev *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Restart Device command. Should call ZbZclCommissionServerSendRestartRsp to send response. Since the application will end up calling ZbStartup or similar, the application must wait and let the stack send the response before something like ZbStartup is called. 100 milliseconds should be sufficient (ZCL_COMMISSION_RESTART_DEVICE_DELAY_MS).

save_startup

(callback function pointer)

enum ZclStatusCodeT (*save_startup)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientSaveStartup *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Save Startup Parameters command.

restore_startup

(callback function pointer)

enum ZclStatusCodeT (*restore_startup)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientRestoreStartup *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Restore Startup Parameters command.

reset_startup

(callback function pointer)

enum ZclStatusCodeT (*reset_startup)(struct ZbZclClusterT *cluster, struct ZbZclCommissionClientResetStartup *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Reset Startup Parameters command.

ZbZclCommissionServerEnableInfoT

Commissioning Server Enable Information structure

Parameters

uint8_t page Page
uint8_t channel Channel

ZbZclCommissionServerResetStartupRsp

Reset Startup Parameters Response command structure

Parameters

enum ZclStatusCodeT status ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.

ZbZclCommissionServerRestartDevRsp

Restart Device Response command structure

Parameters

enum ZclStatusCodeT status ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.

ZbZclCommissionServerRestoreStartupRsp

Restore Startup Parameters Response command structure

Parameters

enum ZclStatusCodeT status ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.

ZbZclCommissionServerSaveStartupRsp

Save Startup Parameters Response command structure

Parameters

enum ZclStatusCodeT status ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.

6.2.6. Dehumidification Control

#include "zcl/general/zcl.dehum.ctrl.h"

Functions

ZbZclDehumCtrlClientAlloc

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

Instantiate a new instance of the Dehumidification Control client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDehumCtrlServerAlloc

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

Instantiate a new instance of the Dehumidification Control server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclDehumCtrlServerAttrT

Dehumidification Control Attribute Ids

ZCL_DEHUM_CTRL_SVR_ATTR_REL_HUM RelativeHumidity
ZCL_DEHUM_CTRL_SVR_ATTR_DEHUM_COOLING DehumidificationCooling
ZCL_DEHUM_CTRL_SVR_ATTR_RHDH_SETPT RHDehumidificationSetpoint
ZCL_DEHUM_CTRL_SVR_ATTR_RH_MODE RelativeHumidityMode
ZCL_DEHUM_CTRL_SVR_ATTR_DH_LOCKOUT DehumidificationLockout
ZCL_DEHUM_CTRL_SVR_ATTR_DH_HYS DehumidificationHysteresis
ZCL_DEHUM_CTRL_SVR_ATTR_DH_MAX_COOL DehumidificationMaxCool
ZCL_DEHUM_CTRL_SVR_ATTR_RH_DISPLAY RelativeHumidityDisplay

6.2.7. Device Temperature Configuration

#include "zcl/general/zcl.device.temp.h"

Functions

ZbZclDevTempClientAlloc

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

Create a new instance of the Device Temperature Configuration Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDevTempServerAlloc

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

Instantiate a new instance of the Device Temp client cluster.

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclDeviceTempAlarmCode

Device Temperature Configuration Alarm Code

ZCL_DEV_TEMP_ALARM_CODE_LOW Device Temperature too low
ZCL_DEV_TEMP_ALARM_CODE_HIGH Device Temperature too high

ZbZclDeviceTempAlarmMask

Device Temperature Configuration Alarm Mask

ZCL_DEV_TEMP_ALARM_MASK_CLEAR Alarm mask clear
ZCL_DEV_TEMP_ALARM_MASK_LOW Alarm mask low
ZCL_DEV_TEMP_ALARM_MASK_HIGH Alarm mask high

ZbZclDeviceTempSvrAttrT

Device Temperature Cluster Attribute Ids

ZCL_DEV_TEMP_CURRENT CurrentTemperature
ZCL_DEV_TEMP_MIN_TEMP MinTempExperienced (Optional)
ZCL_DEV_TEMP_MAX_TEMP MaxTempExperienced (Optional)
ZCL_DEV_TEMP_OVER_TEMP_DWELL OverTempTotalDwell (Optional)
ZCL_DEV_TEMP_ALARM_MASK DeviceTempAlarmMask (Optional)
ZCL_DEV_TEMP_LOW_THRESHOLD LowTempThreshold (Optional)
ZCL_DEV_TEMP_HIGH_THRESHOLD HighTempThreshold (Optional)
ZCL_DEV_TEMP_LOW_DWELL_TRIP LowTempDwellTripPoint (Optional)
ZCL_DEV_TEMP_HIGH_DWELL_TRIP HighTempDwellTripPoint (Optional)

6.2.8. Diagnostics

#include "zcl/general/zcl.diagnostics.h"

Functions

ZbZclDiagClientAlloc

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

Create a new instance of the Diagnostics Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDiagServerAlloc

bool ZbZclDiagServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t profileId,
enum ZbStatusCodeT minSecurity);

Create a new instance of the Diagnostics Server cluster. Only one Diagnostics Server can be allocated on the device

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
profileId Profile ID setting, unless set to ZCL_PROFILE_WILDCARD
minSecurity Minimum security level can be either: ZB_APS_STATUS_UNSECURED, ZB_APS_STATUS_SECURED_NWK_KEY, or ZB_APS_STATUS_SECURED_LINK_KEY

Return

  • True on success, false otherwise

Enumerations

ZbZclDiagSvrAttrT

Diagnostics Server Attribute IDs

ZCL_DIAG_SVR_ATTR_RESETS NumberOfResets (Optional)
ZCL_DIAG_SVR_ATTR_PERSIST_WRITES PersistentMemoryWrites (Optional)
ZCL_DIAG_SVR_ATTR_MAC_RX_BCAST MacRxBcast (Optional)
ZCL_DIAG_SVR_ATTR_MAC_TX_BCAST MacTxBcast (Optional)
ZCL_DIAG_SVR_ATTR_MAC_RX_UCAST MacRxUcast (Optional)
ZCL_DIAG_SVR_ATTR_MAC_TX_UCAST MacTxUcast (Optional)
ZCL_DIAG_SVR_ATTR_MAC_TX_UCAST_RETRY MacTxUcastRetry (Optional)
ZCL_DIAG_SVR_ATTR_MAC_TX_UCAST_FAIL MacTxUcastFail (Optional)
ZCL_DIAG_SVR_ATTR_APS_RX_BCAST APSRxBcast (Optional)
ZCL_DIAG_SVR_ATTR_APS_TX_BCAST APSTxBcast (Optional)
ZCL_DIAG_SVR_ATTR_APS_RX_UCAST APSRxUcast (Optional)
ZCL_DIAG_SVR_ATTR_APS_TX_UCAST_SUCCESS APSTxUcastSuccess (Optional)
ZCL_DIAG_SVR_ATTR_APS_TX_UCAST_RETRY APSTxUcastRetry (Optional)
ZCL_DIAG_SVR_ATTR_APS_TX_UCAST_FAIL APSTxUcastFail (Optional)
ZCL_DIAG_SVR_ATTR_ROUTE_DISC_INIT RouteDiscInitiated (Optional)
ZCL_DIAG_SVR_ATTR_NEIGHBOR_ADDED NeighborAdded (Optional)
ZCL_DIAG_SVR_ATTR_NEIGHBOUR_REMOVED NeighborRemoved (Optional)
ZCL_DIAG_SVR_ATTR_NEIGHBOUR_STALE NeighborStale (Optional)
ZCL_DIAG_SVR_ATTR_JOIN_IND JoinIndication (Optional)
ZCL_DIAG_SVR_ATTR_CHILD_MOVED ChildMoved (Optional)
ZCL_DIAG_SVR_ATTR_NWK_FC_FAILURE NWKFCFailure (Optional)
ZCL_DIAG_SVR_ATTR_APS_FC_FAILURE APSFCFailure (Optional)
ZCL_DIAG_SVR_ATTR_APS_UNAUTH_KEY APSUnauthorizedKey (Optional)
ZCL_DIAG_SVR_ATTR_NWK_DECRYPT_FAILS NWKDecryptFailures (Optional)
ZCL_DIAG_SVR_ATTR_APS_DECRYPT_FAILS APSDecryptFailures (Optional)
ZCL_DIAG_SVR_ATTR_PACKET_BUF_ALLOC_FAILS PacketBufferAllocateFailures (Optional)
ZCL_DIAG_SVR_ATTR_RELAYED_UCAST RelayedUcast (Optional)
ZCL_DIAG_SVR_ATTR_PHY_MAC_QUEUE_LIM PhytoMACqueuelimitreached (Optional)
ZCL_DIAG_SVR_ATTR_PACKET_VAL_DROP_COUNT PacketValidatedropcount (Optional)
ZCL_DIAG_SVR_ATTR_AVG_MAC_RETRY_PER_APS_MSG AverageMACRetryPerAPSMessageSent (Optional)
ZCL_DIAG_SVR_ATTR_LAST_MSG_LQI LastMessageLQI (Optional)
ZCL_DIAG_SVR_ATTR_LAST_MSG_RSSI LastMessageRSSI (Optional)

6.2.9. Door Lock

#include "zcl/general/zcl.doorlock.h"

Functions

ZbZclDoorLockClientAlloc

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

Create a new instance of the Door Lock Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDoorLockClientClrAllPinReq

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

Send a Clear All PIN Codes request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientClrAllRfidReq

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

Send a Clear All RFID Codes request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientClrHDScheduleReq

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

Send a Clear Holiday Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Clear Holiday Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientClrPinReq

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

Send a Clear PIN Code request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Clear PIN Code request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientClrRfidReq

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

Send a Clear RFID Code request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Clear RFID Code request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientClrWDScheduleReq

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

Send a Clear Weekday Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Clear Weekday Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientClrYDScheduleReq

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

Send a Clear Year Day Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Clear Year Day Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetHDScheduleReq

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

Send a Get Holiday Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get Holiday Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetLogReq

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

Send a Get Log Record request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get Log Record request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetPinReq

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

Send a Get PIN Code request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get PIN Code request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetRfidReq

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

Send a Get RFID Code request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get RFID Code request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetUserStatusReq

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

Send a Get User Status request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get User Status request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetUserTypeReq

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

Send a Get User Type request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get User Type request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetWDScheduleReq

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

Send a Get Weekday Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get Weekday Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientGetYDScheduleReq

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

Send a Get Year Day Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get Year Day Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientLockReq

enum ZclStatusCodeT ZbZclDoorLockClientLockReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDoorLockLockDoorReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Lock Door request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Lock Door request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientSetHDScheduleReq

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

Send a Set Holiday Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Set Holiday Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientSetPinReq

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

Send a Set PIN Code request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Set PIN Code request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientSetRfidReq

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

Send a Set RFID Code request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Set RFID Code request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientSetUserStatusReq

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

Send a Set User Status request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Set User Status request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientSetUserTypeReq

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

Send a Set User Type request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Set User Type request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientSetWDScheduleReq

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

Send a Set Weekday Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Set Weekday Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientSetYDScheduleReq

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

Send a Set Year Day Schedule request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Set Year Day Schedule request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientToggleReq

enum ZclStatusCodeT ZbZclDoorLockClientToggleReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDoorLockToggleReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send Toggle request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Toggle request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientUnlockReq

enum ZclStatusCodeT ZbZclDoorLockClientUnlockReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDoorLockUnlockDoorReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send an Unlock Door request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Unlock Door request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockClientUnlockTimeoutReq

enum ZclStatusCodeT ZbZclDoorLockClientUnlockTimeoutReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclDoorLockUnlockTimeoutReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send an Unlock with Timeout request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Unlock with Timeout request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerAlloc

struct ZbZclClusterT * ZbZclDoorLockServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclDoorLockServerCallbacksT *callbacks, void *arg);

Create a new instance of the Door Lock Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclDoorLockServerSendClrAllPinRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendClrAllPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockClrAllPinRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Clear All PIN Codes response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Clear All PIN Codes response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendClrAllRfidRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendClrAllRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockClrAllRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Clear All RFID Codes response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Clear All RFID Codes response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendClrHDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendClrHDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockClrHDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Clear Holiday Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Clear Holiday Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendClrPinRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendClrPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockClrPinRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Clear PIN Code response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Clear PIN Code response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendClrRfidRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendClrRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockClrRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Clear RFID Code response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Clear RFID Code response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendClrWDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendClrWDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockClrWDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Clear Weekday Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Clear Weekday Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendClrYDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendClrYDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockClrYDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Clear Year Day Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Clear Year Day Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetHDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetHDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockGetHDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get Holiday Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Holiday Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetLogRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclDoorLockGetLogRspT *rsp,
void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get Log Record response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Log Record response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetPinRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockGetPinRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get PIN Code response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get PIN Code response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetRfidRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockGetRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get RFID Code response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get RFID Code response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetUserStatusRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetUserStatusRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockGetUserStatusRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get User Status response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get User Status response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetUserTypeRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetUserTypeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockGetUserTypeRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get User Type response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get User Type response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetWDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetWDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockGetWDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get Weekday Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Weekday Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendGetYDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendGetYDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockGetYDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Get Year Day Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Year Day Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendLockRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendLockRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockLockDoorRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Lock Door response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Lock Door response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendSetHDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendSetHDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockSetHDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Set Holiday Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Set Holiday Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendSetPinRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendSetPinRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockSetPinRspT *rsp,void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Set PIN Code response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Set PIN Code response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendSetRfidRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendSetRfidRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockSetRfidRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Set RFID Code response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Set RFID Code response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendSetUserStatusRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendSetUserStatusRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockSetUserStatusRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Set User Status response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Set User Status response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendSetUserTypeRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendSetUserTypeRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockSetUserTypeRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Set User Type response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Set User Type response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendSetWDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendSetWDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockSetWDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Set Weekday Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Set Weekday Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendSetYDScheduleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendSetYDScheduleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockSetYDScheduleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Set Year Day Schedule response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Set Year Day Schedule response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendToggleRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendToggleRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockToggleRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a Toggle response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Toggle response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendUnlockRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendUnlockRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockUnlockDoorRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send an Unlock Door response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Unlock Door response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDoorLockServerSendUnlockTimeoutRsp

enum ZclStatusCodeT ZbZclDoorLockServerSendUnlockTimeoutRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclDoorLockUnlockTimeoutRspT *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send an Unlock with Timeout response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Unlock with Timeout response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclDoorLockClrAllPinRspT

Clear All PIN Codes response structure

Parameters

uint8_t status Status

ZbZclDoorLockClrAllRfidRspT

Clear All RFID Codes response structure

Parameters

uint8_t status Status

ZbZclDoorLockClrHDScheduleReqT

Clear Holiday Schedule request structure

Parameters

uint8_t schedule_id Holiday Schedule ID

ZbZclDoorLockClrHDScheduleRspT

Clear Holiday Schedule response structure

Parameters

uint8_t status Status

ZbZclDoorLockClrPinReqT

Clear PIN Code request structure

Parameters

uint16_t user_id User ID

ZbZclDoorLockClrPinRspT

Clear PIN Code response structure

Parameters

uint8_t status Status

ZbZclDoorLockClrRfidReqT

Clear RFID Code request structure

Parameters

uint16_t user_id User ID

ZbZclDoorLockClrRfidRspT

Clear RFID Code response structure

Parameters

uint8_t status Status

ZbZclDoorLockClrWDScheduleReqT

Clear Weekday Schedule request structure

Parameters

uint8_t schedule_id Schedule ID
uint16_t user_id User ID

ZbZclDoorLockClrWDScheduleRspT

Clear Weekday Schedule response structure

Parameters

uint8_t status Status

ZbZclDoorLockClrYDScheduleReqT

Clear Year Day Schedule request structure

Parameters

uint8_t schedule_id Schedule ID
uint16_t user_id User ID

ZbZclDoorLockClrYDScheduleRspT

Clear Year Day Schedule response structure

Parameters

uint8_t status Status

ZbZclDoorLockGetHDScheduleReqT

Get Holiday Schedule request structure

Parameters

uint8_t schedule_id Holiday Schedule ID

ZbZclDoorLockGetHDScheduleRspT

Get Holiday Schedule response structure

Parameters

uint8_t schedule_id Holiday Schedule ID
uint8_t status Status
uint32_t local_start_time Local Start Time
uint32_t local_end_time Local End Time
uint8_t operating_mode Operating Mode During Holiday

ZbZclDoorLockGetLogReqT

Get Log Record request structure

Parameters

uint16_t log_index Log Index

ZbZclDoorLockGetLogRspT

Get Log Record response structure

Parameters

uint16_t log_entry_id Log Entry ID
uint32_t time_stamp Timestamp
uint8_t event_type Event Type
uint8_t source Source (see Operation Event Sources)
uint8_t alarm_code Event ID/Alarm Code (see Operation Event Codes)
uint16_t user_id User ID
uint8_t pin PIN
uint8_t pin_len Length of PIN

ZbZclDoorLockGetPinReqT

Get PIN Code request structure

Parameters

uint16_t user_id User ID

ZbZclDoorLockGetPinRspT

Get PIN Code response structure

Parameters

uint16_t user_id User ID
uint8_t user_status User Status
uint8_t user_type User Type
uint8_t pin Code
uint8_t pin_len Length of Code

ZbZclDoorLockGetRfidReqT

Get RFID Code request structure

Parameters

uint16_t user_id User ID

ZbZclDoorLockGetRfidRspT

Get RFID Code response structure

Parameters

uint16_t user_id User ID
uint8_t user_status User Status
uint8_t user_type User Type
uint8_t rfid RFID Code
uint8_t rfid_len Length of RFID Code

ZbZclDoorLockGetUserStatusReqT

Get User Status request structure

Parameters

uint16_t user_id User ID

ZbZclDoorLockGetUserStatusRspT

Get User Status response structure

Parameters

uint16_t user_id User ID
uint8_t user_status User Status

ZbZclDoorLockGetUserTypeReqT

Get User Type request structure

Parameters

uint16_t user_id User ID

ZbZclDoorLockGetUserTypeRspT

Get User Type response structure

Parameters

uint16_t user_id User ID
uint8_t user_type User Type

ZbZclDoorLockGetWDScheduleReqT

Get Weekday Schedule request structure

Parameters

uint8_t schedule_id Schedule ID
uint16_t user_id User ID

ZbZclDoorLockGetWDScheduleRspT

Get Weekday Schedule response structure

Parameters

uint8_t schedule_id Schedule ID
uint16_t user_id User ID
uint8_t status Status
uint8_t days_mask Days Mask
uint8_t start_hour Start Hour
uint8_t start_minute Start Minute
uint8_t end_hour End Hour
uint8_t end_minute End Minute

ZbZclDoorLockGetYDScheduleReqT

Get Year Day Schedule request structure

Parameters

uint8_t schedule_id Schedule ID
uint16_t user_id User ID

ZbZclDoorLockGetYDScheduleRspT

Get Year Day Schedule response structure

Parameters

uint8_t schedule_id Schedule ID
uint16_t user_id User ID
uint8_t status Status
uint32_t local_start_time Local Start Time
uint32_t local_end_time Local End Time

ZbZclDoorLockLockDoorReqT

Lock Door request structure

Parameters

uint8_t pin PIN/RFID Code
uint8_t pin_len Length of PIN/RFID Code

ZbZclDoorLockLockDoorRspT

Lock Door response structure

Parameters

uint8_t status Status

ZbZclDoorLockServerCallbacksT

Door Lock Server callbacks configuration

Parameters

lock

(callback function pointer)

enum ZclStatusCodeT (*lock)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockLockDoorReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Lock Door command.

unlock

(callback function pointer)

enum ZclStatusCodeT (*unlock)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockUnlockDoorReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Unlock Door command.

toggle

(callback function pointer)

enum ZclStatusCodeT (*toggle)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockToggleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Toggle command.

unlock_timeout

(callback function pointer)

enum ZclStatusCodeT (*unlock_timeout)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockUnlockTimeoutReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Unlock with Timeout command.

get_log

(callback function pointer)

enum ZclStatusCodeT (*get_log)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetLogReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get Log Record command.

set_pin

(callback function pointer)

enum ZclStatusCodeT (*set_pin)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetPinReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Set PIN Code command.

get_pin

(callback function pointer)

enum ZclStatusCodeT (*get_pin)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetPinReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get PIN Code command.

clr_pin

(callback function pointer)

enum ZclStatusCodeT (*clr_pin)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrPinReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Clear PIN Code command.

clr_all_pins

(callback function pointer)

enum ZclStatusCodeT (*clr_all_pins)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Clear All PIN Codes command.

set_user_status

(callback function pointer)

enum ZclStatusCodeT (*set_user_status)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetUserStatusReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Set User Status command.

get_user_status

(callback function pointer)

enum ZclStatusCodeT (*get_user_status)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetUserStatusReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get User Status command.

set_wd_sched

(callback function pointer)

enum ZclStatusCodeT (*set_wd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetWDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Set Weekday Schedule command.

get_wd_sched

(callback function pointer)

enum ZclStatusCodeT (*get_wd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetWDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get Weekday Schedule command.

clr_wd_sched

(callback function pointer)

enum ZclStatusCodeT (*clr_wd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrWDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Clear Weekday Schedule command.

set_yd_sched

(callback function pointer)

enum ZclStatusCodeT (*set_yd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetYDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Set Year Day Schedule command.

get_yd_sched

(callback function pointer)

enum ZclStatusCodeT (*get_yd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetYDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get Year Day Schedule command.

clr_yd_sched

(callback function pointer)

enum ZclStatusCodeT (*clr_yd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrYDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Clear Year Day Schedule command.

set_hd_sched

(callback function pointer)

enum ZclStatusCodeT (*set_hd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetHDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Set Holiday Schedule command.

get_hd_sched

(callback function pointer)

enum ZclStatusCodeT (*get_hd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetHDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get Holiday Schedule command.

clr_hd_sched

(callback function pointer)

enum ZclStatusCodeT (*clr_hd_sched)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrHDScheduleReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Clear Holiday Schedule command.

set_user_type

(callback function pointer)

enum ZclStatusCodeT (*set_user_type)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetUserTypeReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Set User Type command.

get_user_type

(callback function pointer)

enum ZclStatusCodeT (*get_user_type)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetUserTypeReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get User Type command.

set_rfid

(callback function pointer)

enum ZclStatusCodeT (*set_rfid)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockSetRfidReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Set RFID Code command.

get_rfid

(callback function pointer)

enum ZclStatusCodeT (*get_rfid)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockGetRfidReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Get RFID Code command.

clr_rfid

(callback function pointer)

enum ZclStatusCodeT (*clr_rfid)(struct ZbZclClusterT *cluster, struct ZbZclDoorLockClrRfidReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Clear RFID Code command.

clr_all_rfids

(callback function pointer)

enum ZclStatusCodeT (*clr_all_rfids)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Clear All RFID Codes command.

ZbZclDoorLockSetHDScheduleReqT

Set Holiday Schedule request structure

Parameters

uint8_t schedule_id Holiday Schedule ID
uint32_t local_start_time Local Start Time
uint32_t local_end_time Local End Time
uint8_t operating_mode Operating Mode During Holiday

ZbZclDoorLockSetHDScheduleRspT

Set Holiday Schedule response structure

Parameters

uint8_t status Status

ZbZclDoorLockSetPinReqT

Set PIN Code request structure

Parameters

uint16_t user_id User ID
uint8_t user_status User Status
uint8_t user_type User Type
uint8_t pin PIN
uint8_t pin_len Length of PIN

ZbZclDoorLockSetPinRspT

Set PIN Code response structure

Parameters

uint8_t status Status

ZbZclDoorLockSetRfidReqT

Set RFID Code request structure

Parameters

uint16_t user_id User ID
uint8_t user_status User Status
uint8_t user_type User Type
uint8_t rfid RFID Code
uint8_t rfid_len Length of RFID Code

ZbZclDoorLockSetRfidRspT

Set RFID Code response structure

Parameters

uint8_t status Status

ZbZclDoorLockSetUserStatusReqT

Set User Status request structure

Parameters

uint16_t user_id User ID
uint8_t user_status User Status

ZbZclDoorLockSetUserStatusRspT

Set User Status response structure

Parameters

uint8_t status Status

ZbZclDoorLockSetUserTypeReqT

Set User Type request structure

Parameters

uint16_t user_id User ID
uint8_t user_type User Type

ZbZclDoorLockSetUserTypeRspT

Set User Type response structure

Parameters

uint8_t status Status

ZbZclDoorLockSetWDScheduleReqT

Set Weekday Schedule request structure

Parameters

uint8_t schedule_id ScheduleID #
uint16_t user_id User ID
uint8_t days_mask Days Mask
uint8_t start_hour Start Hour
uint8_t start_minute Start Minute
uint8_t end_hour End Hour
uint8_t end_minute End Minute

ZbZclDoorLockSetWDScheduleRspT

Set Weekday Schedule response structure

Parameters

uint8_t status Status

ZbZclDoorLockSetYDScheduleReqT

Set Year Day Schedule request structure

Parameters

uint8_t schedule_id Schedule ID
uint16_t user_id User ID
uint32_t local_start_time Local Start Time
uint32_t local_end_time Local End Time

ZbZclDoorLockSetYDScheduleRspT

Set Year Day Schedule response structure

Parameters

uint8_t status Status

ZbZclDoorLockToggleReqT

Toggle request structure

Parameters

uint8_t pin PIN/RFID Code
uint8_t pin_len Length of PIN/RFID Code

ZbZclDoorLockToggleRspT

Toggle response structure

Parameters

uint8_t status Status

ZbZclDoorLockUnlockDoorReqT

Unlock Door request structure

Parameters

uint8_t pin PIN/RFID Code
uint8_t pin_len Length of PIN/RFID Code

ZbZclDoorLockUnlockDoorRspT

Unlock Door response structure

Parameters

uint8_t status Status

ZbZclDoorLockUnlockTimeoutReqT

Unlock with Timeout request structure

Parameters

uint16_t timeout Timeout in seconds
uint8_t pin PIN/RFID Code
uint8_t pin_len Length of PIN/RFID Code

ZbZclDoorLockUnlockTimeoutRspT

Unlock with Timeout response structure

Parameters

uint8_t status Status

6.2.10. Electrical Measurement

#include "zcl/general/zcl.elec.meas.h"

Functions

ZbZclElecMeasClientAlloc

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

Create a new instance of the Electrical Measurement Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclElecMeasClientGetMeasProfileReq

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

Send a Get Measurement Profile command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Get Measurement Profile command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclElecMeasClientGetProfileInfoReq

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

Send a Get Profile Info command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclElecMeasServerAlloc

struct ZbZclClusterT * ZbZclElecMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclElecMeasSvrCallbacksT *callbacks, void *arg);

Create a new instance of the Electrical Measurement Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclElecMeasServerSendMeasProfileRsp

enum ZclStatusCodeT ZbZclElecMeasServerSendMeasProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclElecMeasSvrGetMeasProfileRspT *rsp);

Send a Get Measurement Profile response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
rsp Get Measurement Profile response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclElecMeasServerSendProfileInfoRsp

enum ZclStatusCodeT ZbZclElecMeasServerSendProfileInfoRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclElecMeasSvrGetProfileInfoRspT *rsp);

Send a Get Profile Info response

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
rsp Get Profile Info response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclElecMeasSvrAttrT

Electrical Measurement Server Attribute IDs

ZCL_ELEC_MEAS_ATTR_MEAS_TYPE MeasurementType
ZCL_ELEC_MEAS_ATTR_DC_VOLT DCVoltage (Optional)
ZCL_ELEC_MEAS_ATTR_DC_VOLT_MIN DCVoltageMin (Optional)
ZCL_ELEC_MEAS_ATTR_DC_VOLT_MAX DCVoltageMax (Optional)
ZCL_ELEC_MEAS_ATTR_DC_CURRENT DCCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_DC_CURRENT_MIN DCCurrentMin (Optional)
ZCL_ELEC_MEAS_ATTR_DC_CURRENT_MAX DCCurrentMax (Optional)
ZCL_ELEC_MEAS_ATTR_DC_POWER DCPower (Optional)
ZCL_ELEC_MEAS_ATTR_DC_POWER_MIN DCPowerMin (Optional)
ZCL_ELEC_MEAS_ATTR_DC_POWER_MAX DCPowerMax (Optional)
ZCL_ELEC_MEAS_ATTR_DC_VOLT_MULTIPLIER DCVoltageMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_DC_VOLT_DIVISOR DCVoltageDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_DC_CURR_MULTIPLIER DCCurrentMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_DC_CURR_DIVISOR DCCurrentDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_DC_PWR_MULTIPLIER DCPowerMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_DC_PWR_DIVISOR DCPowerDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_AC_FREQ ACFrequency (Optional)
ZCL_ELEC_MEAS_ATTR_AC_FREQ_MIN ACFrequencyMin (Optional)
ZCL_ELEC_MEAS_ATTR_AC_FREQ_MAX ACFrequencyMax (Optional)
ZCL_ELEC_MEAS_ATTR_NEUTRAL_CURR NeutralCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_TOTAL_ACTIVE_PWR TotalActivePower (Optional)
ZCL_ELEC_MEAS_ATTR_TOTAL_REACTIVE_PWR TotalReactivePower (Optional)
ZCL_ELEC_MEAS_ATTR_TOTAL_APPARENT_PWR TotalApparentPower (Optional)
ZCL_ELEC_MEAS_ATTR_1ST_HARM_CURR Measured1stHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_3RD_HARM_CURR Measured3rdHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_5TH_HARM_CURR Measured5thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_7TH_HARM_CURR Measured7thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_9TH_HARM_CURR Measured9thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_11TH_HARM_CURR Measured11thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_PHASE_1ST_HARM_CURR MeasuredPhase1stHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_PHASE_3RD_HARM_CURR MeasuredPhase3rdHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_PHASE_5TH_HARM_CURR MeasuredPhase5thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_PHASE_7TH_HARM_CURR MeasuredPhase7thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_PHASE_9TH_HARM_CURR MeasuredPhase9thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_PHASE_11TH_HARM_CURR MeasuredPhase11thHarmonicCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_AC_FREQ_MULTIPLIER ACFrequencyMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_AC_FREQ_DIVISOR ACFrequencyDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_PWR_MULTIPLIER PowerMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_PWR_DIVISOR PowerDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_HARM_CURR_MULTIPLIER HarmonicCurrentMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_PHASE_CURR_MULTIPLIER PhaseHarmonicCurrentMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_LINE_CURR LineCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_CURR ActiveCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_REACTIVE_CURR ReactiveCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT RMSVoltage (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MIN RMSVoltageMin (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MAX RMSVoltageMax (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR RMSCurrent (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MIN RMSCurrentMin (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MAX RMSCurrentMax (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR ActivePower (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MIN ActivePowerMin (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MAX ActivePowerMax (Optional)
ZCL_ELEC_MEAS_ATTR_REACTIVE_PWR ReactivePower (Optional)
ZCL_ELEC_MEAS_ATTR_APPARENT_PWR ApparentPower (Optional)
ZCL_ELEC_MEAS_ATTR_PWR_FACTOR PowerFactor (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_VOLT_PERIOD AverageRMSVoltageMeasurementPeriod (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV_COUNT AverageRMSOverVoltageCounter (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV_COUNT AverageRMSUnderVoltageCounter (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OVER_PERIOD RMSExtremeOverVoltagePeriod (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UNDER_PERIOD RMSExtremeUnderVoltagePeriod (Optional)
ZCL_ELEC_MEAS_ATTR_VOLT_SAG_PERIOD RMSVoltageSagPeriod (Optional)
ZCL_ELEC_MEAS_ATTR_VOLT_SWELL_PERIOD RMSVoltageSwellPeriod (Optional)
ZCL_ELEC_MEAS_ATTR_AC_VOLT_MULTIPLIER ACVoltageMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_AC_VOLT_DIVISOR ACVoltageDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_AC_CURR_MULT ACCurrentMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_AC_CURR_DIVISOR ACCurrentDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_AC_PWR_MULTIPLIER ACPowerMultiplier (Optional)
ZCL_ELEC_MEAS_ATTR_AC_PWR_DIVISOR ACPowerDivisor (Optional)
ZCL_ELEC_MEAS_ATTR_DC_OL_ALARMS_MASK DCOverloadAlarmsMask (Optional)
ZCL_ELEC_MEAS_ATTR_DC_VOLT_OL DCVoltageOverload (Optional)
ZCL_ELEC_MEAS_ATTR_DC_CURR_OL DCCurrentOverload (Optional)
ZCL_ELEC_MEAS_ATTR_AC_ALARMS_MASK ACAlarmsMask (Optional)
ZCL_ELEC_MEAS_ATTR_AC_VOLT_OL ACVoltageOverload (Optional)
ZCL_ELEC_MEAS_ATTR_AC_CURR_OL ACCurrentOverload (Optional)
ZCL_ELEC_MEAS_ATTR_AC_ACTIVE_PWR_OL ACActivePowerOverload (Optional)
ZCL_ELEC_MEAS_ATTR_AC_REACTIVE_PWR_OL ACReactivePowerOverload (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV AverageRMSOverVoltage (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV AverageRMSUnderVoltage (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OV RMSExtremeOverVoltage (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UV RMSExtremeUnderVoltage (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_SAG RMSVoltageSag (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_SWELL RMSVoltageSwell (Optional)
ZCL_ELEC_MEAS_ATTR_LINE_CURR_B LineCurrentPhB (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_CURR_B ActiveCurrentPhB (Optional)
ZCL_ELEC_MEAS_ATTR_REACTIVE_CURR_B ReactiveCurrentPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_B RMSVoltagePhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MIN_B RMSVoltageMinPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MAX_B RMSVoltageMaxPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_B RMSCurrentPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MIN_B RMSCurrentMinPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MAX_B RMSCurrentMaxPhB (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_B ActivePowerPhB (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MIN_B ActivePowerMinPhB (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MAX_B ActivePowerMaxPhB (Optional)
ZCL_ELEC_MEAS_ATTR_REACTIVE_PWR_B ReactivePowerPhB (Optional)
ZCL_ELEC_MEAS_ATTR_APPARENT_PWR_B ApparentPowerPhB (Optional)
ZCL_ELEC_MEAS_ATTR_PWR_FACTOR_B PowerFactorPhB (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_VOLT_PERIOD_B AverageRMSVoltageMeasurementPeriodPhB (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV_B AverageRMSOverVoltageCounterPhB (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV_B AverageRMSUnderVoltageCounterPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OVER_B RMSExtremeOverVoltagePeriodPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UNDER_B RMSExtremeUnderVoltagePeriodPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_SAG_PERIOD_B RMSVoltageSagPeriodPhB (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_SWELL_PERIOD_B RMSVoltageSwellPeriodPhB (Optional)
ZCL_ELEC_MEAS_ATTR_LINE_CURR_C LineCurrentPhC (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_CURR_C ActiveCurrentPhC (Optional)
ZCL_ELEC_MEAS_ATTR_REACTIVE_CURR_C ReactiveCurrentPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_C RMSVoltagePhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MIN_C RMSVoltageMinPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_VOLT_MAX_C RMSVoltageMaxPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_C RMSCurrentPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MIN_C RMSCurrentMinPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_CURR_MAX_C RMSCurrentMaxPhC (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_C ActivePowerPhC (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MIN_C ActivePowerMinPhC (Optional)
ZCL_ELEC_MEAS_ATTR_ACTIVE_PWR_MAX_C ActivePowerMaxPhC (Optional)
ZCL_ELEC_MEAS_ATTR_REACTIVE_PWR_C ReactivePowerPhC (Optional)
ZCL_ELEC_MEAS_ATTR_APPARENT_PWR_C ApparentPowerPhC (Optional)
ZCL_ELEC_MEAS_ATTR_PWR_FACTOR_C PowerFactorPhC (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_VOLT_PERIOD_C AverageRMSVoltageMeasurementPeriodPhC (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_OV_C AverageRMSOverVoltageCounterPhC (Optional)
ZCL_ELEC_MEAS_ATTR_AVG_RMS_UV_C AverageRMSUnderVoltageCounterPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_OVER_C RMSExtremeOverVoltagePeriodPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_EXT_UNDER_C RMSExtremeUnderVoltagePeriodPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_SAG_PERIOD_C RMSVoltageSagPeriodPhC (Optional)
ZCL_ELEC_MEAS_ATTR_RMS_SWELL_PERIOD_C RMSVoltageSwellPeriodPhC (Optional)

Structures

ZbZclElecMeasClientGetMeasProfileReqT

Get Measurement Profile command structure

Parameters

uint16_t attr_id Attribute ID
uint32_t start_time Start Time
uint8_t num_intervals NumberOfIntervals

ZbZclElecMeasSvrCallbacksT

Electrical Measurement Server callbacks configuration

Parameters

get_profile_info

(callback function pointer)

enum ZclStatusCodeT (*get_profile_info)(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Get Profile Info command.

get_meas_profile

(callback function pointer)

enum ZclStatusCodeT (*get_meas_profile)(struct ZbZclClusterT *clusterPtr, struct ZbZclElecMeasClientGetMeasProfileReqT *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Get Measurement Profile command.

ZbZclElecMeasSvrGetMeasProfileRspT

Get Measurement Profile response structure

Parameters

uint32_t start_time StartTime
uint8_t status Status
uint8_t profile_interval_period ProfileIntervalPeriod
uint8_t num_intervals_delivered NumberOfIntervalsDelivered
uint16_t attr_id Attribute ID
uint8_t *interval_data Intervals
uint16_t interval_len Number of Intervals

ZbZclElecMeasSvrGetProfileInfoRspT

Get Profile Info response structure

Parameters

uint8_t profile_count Profile Count
uint8_t profile_interval_period ProfileIntervalPeriod
uint8_t max_num_intervals MaxNumberOfIntervals
uint16_t *attr_list ListOfAttributes

6.2.11. Fan Control

#include "zcl/general/zcl.fan.h"

Functions

ZbZclFanClientAlloc

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

Create a new instance of the Fan Control Client cluster

Parameters'

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclFanServerAlloc

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

Create a new instance of the Fan Control Server cluster

Parameters'

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclFanModeT

Fan Mode Attribute Values

ZCL_FAN_MODE_OFF Off
ZCL_FAN_MODE_LOW Low
ZCL_FAN_MODE_MED Medium
ZCL_FAN_MODE_HI High
ZCL_FAN_MODE_ON On
ZCL_FAN_MODE_AUTO Auto (the fan speed is self-regulated)
ZCL_FAN_MODE_SMART Smart (when the heated/cooled space is occupied, the fan is always on)

ZbZclFanSeqT

Fan Sequence Operation Attribute Values

ZCL_FAN_SEQ_LMH Low/Med/High
ZCL_FAN_SEQ_LH Low/High
ZCL_FAN_SEQ_LMHA Low/Med/High/Auto
ZCL_FAN_SEQ_LHA Low/High/Auto
ZCL_FAN_SEQ_OA On/Auto

ZbZclFanSvrAttrT

Fan Control Server Attribute IDs

ZCL_FAN_ATTR_MODE FanMode
ZCL_FAN_ATTR_SEQUENCE FanModeSequence

6.2.12. Groups

#include "zcl/general/zcl.groups.h"

Functions

ZbZclGroupsClientAddIdentifyingReq

enum ZclStatusCodeT ZbZclGroupsClientAddIdentifyingReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientAddIdentifyingReqT *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Add Group If Identifying command

Parameters

cluster Cluster instance from which to send this command
req Add Group If Identifying command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclGroupsClientAddReq

enum ZclStatusCodeT ZbZclGroupsClientAddReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientAddReqT *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send an Add Group command

Parameters

cluster Cluster instance from which to send this command
req Add Group command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclGroupsClientAlloc

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

Create a new instance of the Groups Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclGroupsClientGetMembershipReq

enum ZclStatusCodeT ZbZclGroupsClientGetMembershipReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientGetMembershipReqT *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Get Group Membership command

Parameters

cluster Cluster instance from which to send this command
req Get Group Membership command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclGroupsClientRemoveAllReq

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

Send a Remove All Groups command

Parameters

cluster Cluster instance from which to send this command
req Remove All Group command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclGroupsClientRemoveReq

enum ZclStatusCodeT ZbZclGroupsClientRemoveReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientRemoveReqT *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Remove Group command

Parameters

cluster Cluster instance from which to send this command
req Remove Group command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclGroupsClientViewReq

enum ZclStatusCodeT ZbZclGroupsClientViewReq(struct ZbZclClusterT *cluster, struct ZbZclGroupsClientViewReqT *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a View Group command

Parameters

cluster Cluster instance from which to send this command
req View Group command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclGroupsServerAlloc

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

Create a new instance of the Groups Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclGroupsSvrAttrT

Groups Server Attribute IDs

ZCL_GROUPS_ATTR_NAME_SUPPORT NameSupport

Structures

ZbZclGroupsClientAddIdentifyingReqT

Add Group If Identifying command structure

Parameters

struct ZbApsAddrT dst Destination Address
uint16_t group_id Group ID

ZbZclGroupsClientAddReqT

Add Group command structure

Parameters

struct ZbApsAddrT dst Destination Address
uint16_t group_id Group ID

ZbZclGroupsClientGetMembershipReqT

Get Group Membership command structure

Parameters

struct ZbApsAddrT dst Destination Address
uint8_t num_groups Group count
uint16_t group_list Group list

ZbZclGroupsClientRemoveReqT

Remove Group command structure

Parameters

struct ZbApsAddrT dst Destination Address
uint16_t group_id Group ID

ZbZclGroupsClientViewReqT

View Group command structure

Parameters

struct ZbApsAddrT dst Destination Address
uint16_t group_id Group ID

6.2.13. Identify

#include "zcl/general/zcl.identify.h"

Functions

ZbZclIdentifyClientAlloc

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

Create a new instance of the Identify Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIdentifyServerAlloc

struct ZbZclClusterT * ZbZclIdentifyServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, const struct zcl_identify_server_callbacks_t *callbacks, void *arg);

Create a new instance of the Identify Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIdentifyServerGetTime

uint16_t ZbZclIdentifyServerGetTime(struct ZbZclClusterT *cluster);

Get the local Identify Server time

Parameters

cluster Cluster instance with timer to get

Return

  • uint16_t Time remaining in zigbee timer

ZbZclIdentifyServerSetTime

void ZbZclIdentifyServerSetTime(struct ZbZclClusterT *cluster, uint16_t seconds);

Set the local Identify Server time

If BDB_COMMISSION_MODE_FIND_BIND is enabled and seconds > 0, seconds is adjusted to be >= ZB_BDBC_MinCommissioningTime

Parameters

cluster Cluster instance with timer to set
seconds Seconds for updating the identify time counter

Return

  • Void

zcl_identify_cli_identify_req

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

Send an Identify command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
identify_time Time which will be used to set the IdentifyTime attribute
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_identify_cli_query_req

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

Send an Identify Query command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclIdentifySvrAttrT

Identify Server Attribute IDs

ZCL_IDENTIFY_ATTR_TIME IdentifyTime

6.2.14. Illuminance Level Sensing

#include "zcl/general/zcl.illum.level.h"

Functions

ZbZclIllumLevelClientAlloc

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

Create a new instance of the Illuminance Level Sensing Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIllumLevelServerAlloc

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

Create a new instance of the Illuminance Level Sensing Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclIllumLevelSvrAttrT

Attribute Identifiers

ZCL_ILLUM_LEVEL_ATTR_LEVEL_STATUS LevelStatus
ZCL_ILLUM_LEVEL_ATTR_LIGHT_SENSOR_TYPE LightSensorType
ZCL_ILLUM_LEVEL_ATTR_ILLUM_TARGET_LEVEL IlluminanceTargetLevel

6.2.15. Illuminance Measurement

#include "zcl/general/zcl.illum.meas.h"

Functions

ZbZclIllumMeasClientAlloc

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

Create a new instance of the Illuminance Measurement Client cluster

Parameters
zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIllumMeasServerAlloc

struct ZbZclClusterT * ZbZclIllumMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t min, uint16_t max);

Create a new instance of the Illuminance Measurement Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
min Minimum value capable of being measured (MinMeasuredValue)
max Maximum value capable of being measured (MaxMeasuredValue)

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclIllumMeasSvrAttrT

Illuminance Measurement Server Attribute IDs

ZCL_ILLUM_MEAS_ATTR_MEAS_VAL MeasuredValue
ZCL_ILLUM_MEAS_ATTR_MIN_MEAS_VAL MinMeasuredValue
ZCL_ILLUM_MEAS_ATTR_MAX_MEAS_VAL MaxMeasuredValue
ZCL_ILLUM_MEAS_ATTR_TOLERANCE Tolerance (Optional)
ZCL_ILLUM_MEAS_ATTR_LIGHT_SENSOR_TYPE LightSensorType (Optional)

6.2.16. Level

#include "zcl/general/zcl.level.h"

Functions

ZbZclLevelClientAlloc

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

Create a new instance of the Level Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclLevelClientMoveReq

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

Send a Move command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Move command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclLevelClientMoveToFreqReq

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

Send a Move to Frequency command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Stop command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclLevelClientMoveToLevelReq

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

Send a Move to Level command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Move To Level command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclLevelClientStepReq

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

Send a Step command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Step command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclLevelClientStopReq

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

Send a Stop command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Stop command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclLevelServerAlloc

struct ZbZclClusterT * ZbZclLevelServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclClusterT *onoff_server,
struct ZbZclLevelServerCallbacksT *callbacks, void *arg);

Create a new instance of the Level Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
onoff_server OnOff server cluster pointer for processing commands with the Options fields. May be NULL
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclLevelSvrAttrT

Level Server Attribute IDs

ZCL_LEVEL_ATTR_CURRLEVEL CurrentLevel
ZCL_LEVEL_ATTR_REMAINTIME RemainingTime (Optional)
ZCL_LEVEL_ATTR_MINLEVEL MinLevel (Optional)
ZCL_LEVEL_ATTR_MAXLEVEL MaxLevel (Optional)
ZCL_LEVEL_ATTR_CURRFREQ CurrentFrequency (Optional)
ZCL_LEVEL_ATTR_MINFREQ MinFrequency (Optional)
ZCL_LEVEL_ATTR_MAXFREQ MaxFrequency (Optional)
ZCL_LEVEL_ATTR_OPTIONS OnOffTransitionTime (Optional)
ZCL_LEVEL_ATTR_ONOFF_TRANS_TIME OnLevel (Optional)
ZCL_LEVEL_ATTR_ONLEVEL OnTransitionTime (Optional)
ZCL_LEVEL_ATTR_ON_TRANS_TIME OffTransitionTime (Optional)
ZCL_LEVEL_ATTR_OFF_TRANS_TIME DefaultMoveRate (Optional)
ZCL_LEVEL_ATTR_DEFAULT_MOVE_RATE Options (Optional)
ZCL_LEVEL_ATTR_STARTUP_CURRLEVEL StartUpCurrentLevel (Optional)

Structures

ZbZclLevelClientMoveReqT

Move command structure

Parameters

bool with_onoff With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_MOVE_ONOFF, else ZCL_LEVEL_CLI_CMD_MOVE
uint8_t mode Mode
uint8_t rate Rate
uint8_t mask OptionsMask - Not included if with_onoff is true
uint8_t override OptionsOverride - Not included if with_onoff is true

ZbZclLevelClientMoveToFreqT

Move to Closest Frequency command structure

Parameters

uint16_t freq Frequency

ZbZclLevelClientMoveToLevelReqT

Move To Level command structure

Parameters

bool with_onoff With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_MOVE_LEVEL_ONOFF, else ZCL_LEVEL_CLI_CMD_MOVE_LEVEL
uint8_t level Level
uint16_t transition_time Transition time
uint8_t mask OptionsMask - Not included if with_onoff is true
uint8_t override OptionsOverride - Not included if with_onoff is true

ZbZclLevelClientStepReqT

Step command structure

Parameters

bool with_onoff With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_STEP_ONOFF, else ZCL_LEVEL_CLI_CMD_STEP
uint8_t mode Mode
uint8_t size Size
uint16_t transition_time Transition Time
uint8_t mask OptionsMask - Not included if with_onoff is true
uint8_t override OptionsOverride - Not included if with_onoff is true

ZbZclLevelClientStopReqT

Stop command structure

Parameters

bool with_onoff With Onoff - If true then cmd is ZCL_LEVEL_CLI_CMD_STOP_ONOFF, else ZCL_LEVEL_CLI_CMD_STOP
uint8_t mask OptionsMask - Not included if with_onoff is true
uint8_t override OptionsOverride - Not included if with_onoff is true

ZbZclLevelServerCallbacksT

Level Server callbacks configuration

Parameters

move_to_level

(callback function pointer)

enum ZclStatusCodeT (*move_to_level)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientMoveToLevelReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of a Move To Level command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute.

move

(callback function pointer)

enum ZclStatusCodeT (*move)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientMoveReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of a Move command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute.

step

(callback function pointer)

enum ZclStatusCodeT (*step)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientStepReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of a Step command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute.

stop

(callback function pointer)

enum ZclStatusCodeT (*stop)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientStopReqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of a Stop command. Set with_onoff to true in the req struct when utilizing the onoff cluster on the same endpoint. The application is expected to update the ZCL_LEVEL_ATTR_CURRLEVEL attribute.

move_to_freq

(callback function pointer)

enum ZclStatusCodeT (*move_to_freq)(struct ZbZclClusterT *cluster, struct ZbZclLevelClientMoveToFreqT *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of a Move to Frequency command. The application is expected to update the ZCL_LEVEL_ATTR_CURRFREQ attribute.

6.2.17. Meter Identification

#include "zcl/general/zcl.meter.id.h"

Functions

ZbZclMeterIdClientAlloc

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

Instantiate a new instance of the Meter Identification Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMeterIdServerAlloc

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

Instantiate a new instance of the Meter Identification Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclMeterIdSvrAttrT

Attribute Identifiers

ZCL_METER_ID_ATTR_COMPANY_NAME CompanyName
ZCL_METER_ID_ATTR_METER_TYPE_ID MeterTypeID
ZCL_METER_ID_ATTR_DATA_QUAL_ID DataQualityID
ZCL_METER_ID_ATTR_CUSTOMER_NAME CustomerName (Optional)
ZCL_METER_ID_ATTR_MODEL Model (Optional)
ZCL_METER_ID_ATTR_PART_NUMBER PartNumber (Optional)
ZCL_METER_ID_ATTR_PRODUCT_REV ProductRevision (Optional)
ZCL_METER_ID_ATTR_SOFTWARE_REV SoftwareRevision (Optional)
ZCL_METER_ID_ATTR_UTILITY_NAME UtilityName (Optional)
ZCL_METER_ID_ATTR_POD POD
ZCL_METER_ID_ATTR_AVAILABLE_POWER AvailablePower
ZCL_METER_ID_ATTR_POWER_THRESH PowerThreshold

6.2.18. Nearest Gateway

#include "zcl/general/zcl.nearest.gw.h"

Functions

ZbZclNearestGwClientAlloc

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

Instantiate a new instance of the Nearest Gateway client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclNearestGwServerAlloc

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

Instantiate a new instance of the Nearest Gateway server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclNearestGwServerAttrT

Nearest Gateway Attribute Ids

ZCL_NEAREST_GW_SVR_ATTR_NEAREST_GW Nearest Gateway
ZCL_NEAREST_GW_SVR_ATTR_NEW_MOBILE_NODE New Mobile Node

6.2.19. Occupancy Sensing

#include "zcl/general/zcl.occupancy.h"

Functions

ZbZclOccupancyClientAlloc

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

Create a new instance of the Occupancy Sensing Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclOccupancyServerAlloc

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

Create a new instance of the Occupancy Sensing Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclOccupancySvrAttrT

Occupancy Sensing Server Attribute IDs

ZCL_OCC_ATTR_OCCUPANCY Occupancy
ZCL_OCC_ATTR_SENSORTYPE OccupancySensorType
ZCL_OCC_ATTR_SENSORTYPE_BITMAP OccupancySensorTypeBitmap
ZCL_OCC_ATTR_PIR_OU_DELAY PIROccupiedToUnoccupiedDelay (Optional)
ZCL_OCC_ATTR_PIR_UO_DELAY PIRUnoccupiedToOccupiedDelay (Optional)
ZCL_OCC_ATTR_PIR_UO_THRESHOLD PIRUnoccupiedToOccupiedThreshold (Optional)
ZCL_OCC_ATTR_US_OU_DELAY UltrasonicOccupiedToUnoccupiedDelay (Optional)
ZCL_OCC_ATTR_US_UO_DELAY UltrasonicUnoccupiedToOccupiedDelay (Optional)
ZCL_OCC_ATTR_US_UO_THRESHOLD UltrasonicUnoccupiedToOccupiedThreshold (Optional)
ZCL_OCC_ATTR_PHY_OU_DELAY PhysicalContactOccupiedToUnoccupiedDelay (Optional)
ZCL_OCC_ATTR_PHY_UO_DELAY PhysicalContactUnoccupiedToOccupiedDelay (Optional)
ZCL_OCC_ATTR_PHY_UO_THRESHOLD PhysicalContactUnoccupiedToOccupiedThreshold (Optional)

6.2.20. On/Off Switch Configuration

#include "zcl/general/zcl.onoff.swconfig.h"

Functions

ZbZclOnOffSwConfigClientAlloc

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

Create a new instance of the OnOff Switch Configuration Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclOnOffSwConfigServerAlloc

struct ZbZclClusterT * ZbZclOnOffSwConfigServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint8_t switch_type);

Create a new instance of the OnOff Switch Configuration Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
switch_type Type of switch associated with this cluster server

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclOnOffSwConfigSvrAttrId

Onoff Switch Configuration cluster attribute IDs

ZCL_ONOFF_SWCONFIG_ATTR_TYPE SwitchType
ZCL_ONOFF_SWCONFIG_ATTR_ACTIONS SwitchActions

6.2.21. On/Off

#include "zcl/general/zcl.onoff.h"

Functions

ZbZclOnOffClientAlloc

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

Create a new instance of the OnOff Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclOnOffClientOffReq

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

Send an Off command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when response is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclOnOffClientOnReq

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

Send an On command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when response is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclOnOffClientToggleReq

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

Send a Toggle command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when response is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclOnOffServerAlloc

struct ZbZclClusterT * ZbZclOnOffServerAlloc(struct ZigBeeT *zb, uint8_t endpoint,
struct ZbZclOnOffServerCallbacksT *callbacks, void *arg);

Create a new instance of the OnOff Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclOnOffServerSetLevelControlCallback

void ZbZclOnOffServerSetLevelControlCallback(struct ZbZclClusterT *on_off_cluster, struct ZbZclClusterT
*level_cluster, ZbZclLevelControlCallbackT levelControlCallback);

Set the Level control callback

Parameters

on_off_cluster OnOff cluster instance
level_cluster Level cluster instance
levelControlCallback Level control callback function

Return

  • Void

Enumerations

ZbZclOnOffSvrAttrT

OnOff Server Attribute IDs

ZCL_ONOFF_ATTR_ONOFF OnOff
ZCL_ONOFF_ATTR_GLOBAL_SCENE_CONTROL GlobalSceneControl (Optional)
ZCL_ONOFF_ATTR_ON_TIME OnTime (Optional)
ZCL_ONOFF_ATTR_OFF_WAIT_TIME OffWaitTime (Optional)

Structures

ZbZclOnOffServerCallbacksT

OnOff Server callbacks configuration

Parameters

off

(callback function pointer)

enum ZclStatusCodeT (*off)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of an Off command. The application is expected to update ZCL_ONOFF_ATTR_ONOFF.

on

(callback function pointer)

enum ZclStatusCodeT (*on)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of an On command. The application is expected to update ZCL_ONOFF_ATTR_ONOFF.

toggle

(callback function pointer)

enum ZclStatusCodeT (*toggle)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of a Toggle command. The application is expected to update ZCL_ONOFF_ATTR_ONOFF.

6.2.22. Over-The-Air Upgrade

#include "zcl/general/zcl.ota.h"

Functions

ZbZclOtaClientAlloc

struct ZbZclClusterT * ZbZclOtaClientAlloc(struct ZigBeeT *zb, struct ZbZclOtaClientConfig *config, void *arg);

Create a new instance of the OTA Upgrade Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
config Pointer to OTA client configuration structure
arg Pointer to application data provided in initiating API call

Return

  • Cluster pointer, or NULL if there is an error

ZbZclOtaClientDiscover

enum ZclStatusCodeT ZbZclOtaClientDiscover(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *addr);

Discover OTA Upgrade Server

Parameters

cluster Cluster instance from which to send this command
addr Destination address for discovery

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclOtaClientDiscoverForced

void ZbZclOtaClientDiscoverForced(struct ZbZclClusterT *cluster, uint64_t ieee, uint8_t endpoint);

Set the OTA Upgrade Server directly (without discovery)

Parameters

cluster Cluster instance from which to send this command
ieee OTA Upgrade server IEEE address
endpoint Endpoint on which to create cluster

Return

  • None

ZbZclOtaClientGetDefaultCallbacks

void ZbZclOtaClientGetDefaultCallbacks(struct ZbZclOtaClientCallbacksT *callbacks);

Load the default callbacks for ECDSA Suite 2 support

Parameters

callbacks Structure containing any callback function pointers for this cluster

Return

  • None

ZbZclOtaClientImageTransferResume

enum ZclStatusCodeT ZbZclOtaClientImageTransferResume(struct ZbZclClusterT *cluster);

Resume an OTA Upgrade transfer. ZbZclOtaClientImageTransferResume is called if the NHLE (app) returned ZCL_STATUS_WAIT_FOR_DATA for the write_image callback. The OTA Client won’t request the next block of data in this case, until this function is called.

Parameters

cluster Cluster instance from which to send this command

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclOtaClientImageTransferStart

enum ZclStatusCodeT ZbZclOtaClientImageTransferStart(struct ZbZclClusterT *cluster);

Initiate an OTA Upgrade transfer.

Parameters

cluster Cluster instance from which to send this command

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclOtaClientQueryNextImageReq

enum ZclStatusCodeT ZbZclOtaClientQueryNextImageReq(struct ZbZclClusterT *cluster, struct ZbZclOtaImageDefinition
*image_definition, uint8_t field_control, uint16_t hardware_version);

Send a Query Next Image Request command. If a response is received, or an error occurs, the 'query_next' callback is invoked to the application.

Parameters

cluster Cluster instance from which to send this command
image_definition OTA Header Image Definition structure (See 'struct ZbZclOtaImageDefinition')
field_control Field Control
hardware_version Hardware Version to include in request, unless set to 0xff.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.

ZbZclOtaHeaderParse

uint8_t ZbZclOtaHeaderParse(const uint8_t *payload, const uint8_t length, struct ZbZclOtaHeader *header);

Parse an OTA Upgrade payload buffer’s header information

Parameters

payload OTA Upgrade Payload buffer
length Length of OTA Upgrade Payload
header OTA Upgrade Header Fields structure

Return

  • Number of bytes parsed

ZbZclOtaServerAlloc

struct ZbZclClusterT * ZbZclOtaServerAlloc(struct ZigBeeT *zb, struct ZbZclOtaServerConfig
  • config, void *arg);

Create a new instance of the OTA Upgrade Server cluster

Parameters

zb Zigbee stack instance
config OTA Upgrade Server Configuration structure
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • Cluster pointer, or NULL if there is an error

ZbZclOtaServerImageNotifyReq

enum ZclStatusCodeT ZbZclOtaServerImageNotifyReq(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
uint8_t payload_type, uint8_t jitter, struct ZbZclOtaImageDefinition *image_definition);

Send an OTA Image Notify Server command Registering an image does not automatically send an Image Notify message, the OTA Server application can use ZbZclOtaServerImageNotifyReq after registering an image to notify clients of the availability of a new image

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
payload_type Payload Type
jitter Jitter
image_definition OTA Header Image Definition structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclOtaServerUpgradeEndRespUnsolic

enum ZclStatusCodeT ZbZclOtaServerUpgradeEndRespUnsolic(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclOtaImageDefinition *image_definition, struct ZbZclOtaEndResponseTimes *end_response_times);

Send an Unsolicited OTA Upgrade End Response. This command is sent at some point in time after receiving the Upgrade End Request, which was already responsed to by a Default Response. This should be the normal way to handle the Upgrade End commands, rather than the Solicated Upgrade End Response (ZbZclOtaServerUpgradeEndRespSolic).

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
image_definition OTA Header Image Definition
end_response_times Upgrade End Response command

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclOtaActivationPolicy

OTA Upgrade UpgradeActivationPolicy enumerations

ZCL_OTA_ACTIVATION_POLICY_SERVER OTA Server Activation Allowed
ZCL_OTA_ACTIVATION_POLICY_OUT_OF_BAND Out-of-band Activation Only

ZbZclOtaHeaderFieldCtrlBitmask

OTA Upgrade Header Field Control Bitmask enumerations

ZCL_OTA_HEADER_FIELD_CONTROL_SECURITY_VERSION Security Credential Version Present
ZCL_OTA_HEADER_FIELD_CONTROL_DEVICE_SPECIFIC Device Specific File
ZCL_OTA_HEADER_FIELD_CONTROL_HARDWARE_VERSI ONS Hardware Versions Present

ZbZclOtaImageBlkReqFldCtrl

OTA Upgrade Image Block Request Field Control Bitmask enumerations

ZCL_OTA_IMAGE_BLOCK_FC_IEEE Request node’s IEEE address Present
ZCL_OTA_IMAGE_BLOCK_FC_MIN_PERIOD MinimumBlockPeriod present

ZbZclOtaImageNotifyCmd

OTA Upgrade Image Notify Command Payload enumerations

ZCL_OTA_NOTIFY_TYPE_JITTER Query jitter
ZCL_OTA_NOTIFY_TYPE_MFG_CODE Query jitter and manufacturer code
ZCL_OTA_NOTIFY_TYPE_IMAGE_TYPE Query jitter, manufacturer code, and image type
ZCL_OTA_NOTIFY_TYPE_FILE_VERSION Query jitter, manufacturer code, image type, and new file version

ZbZclOtaImageType

OTA Upgrade Image Types enumerations

ZCL_OTA_IMAGE_TYPE_MFG_MIN Manufacturer Specific (start)
ZCL_OTA_IMAGE_TYPE_MFG_MAX Manufacturer Specific (end)
ZCL_OTA_IMAGE_TYPE_CLI_SECURITY_CRED Client Security credentials
ZCL_OTA_IMAGE_TYPE_CLI_CONFIG Client Configuration
ZCL_OTA_IMAGE_TYPE_SERVER_LOG Server Log
ZCL_OTA_IMAGE_TYPE_PICTURE Picture
ZCL_OTA_IMAGE_TYPE_WILDCARD Wild Card

ZbZclOtaQueryFldCtrlHwVer

OTA Upgrade Field Control Hardware Version enumerations

ZCL_OTA_QUERY_FIELD_CONTROL_HW_VERSION Hardware Version

ZbZclOtaSecCredential

OTA Upgrade Security Credential Version enumerations

ZCL_OTA_SEC_CRED_SE_1_0 SE 1.0
ZCL_OTA_SEC_CRED_SE_1_1 SE 1.1
ZCL_OTA_SEC_CRED_SE_2_0 SE 2.0
ZCL_OTA_SEC_CRED_SE_1_2 SE 1.2

ZbZclOtaStackVersion

OTA Upgrade Zigbee Stack Version Values

ZCL_OTA_STACK_VERSION_2006 ZigBee 2006
ZCL_OTA_STACK_VERSION_2007 ZigBee 2007
ZCL_OTA_STACK_VERSION_PRO ZigBee Pro
ZCL_OTA_STACK_VERSION_IP ZigBee IP

ZbZclOtaStatus

OTA Upgrade Status Attribute Values (ImageUpgradeStatus)

ZCL_OTA_STATUS_NORMAL Normal
ZCL_OTA_STATUS_DOWNLOAD_IN_PROGRESS Download in progress
ZCL_OTA_STATUS_DOWNLOAD_COMPLETE Download complete
ZCL_OTA_STATUS_WAITING_TO_UPGRADE Waiting to upgrade
ZCL_OTA_STATUS_COUNT_DOWN Count down
ZCL_OTA_STATUS_WAIT_FOR_MORE Wait for more
ZCL_OTA_STATUS_WAIT_UPGRADE_EXT Waiting to Upgrade via External Event

ZbZclOtaSubElementTag

OTA Upgrade Tag Identifiers enumerations

ZCL_OTA_SUB_TAG_UPGRADE_IMAGE Upgrade Image
ZCL_OTA_SUB_TAG_ECDSA_SIG1 ECDSA Signature (Crypto Suite 1)
ZCL_OTA_SUB_TAG_ECDSA_CERT_1 ECDSA Signing Certificate (Crypto Suite 1)
ZCL_OTA_SUB_TAG_IMAGE_INTEGRITY_CODE Image Integrity Code
ZCL_OTA_SUB_TAG_PICTURE_DATA Picture Data
ZCL_OTA_SUB_TAG_ECDSA_SIG2 ECDSA Signature (Crypto Suite 2)
ZCL_OTA_SUB_TAG_ECDSA_CERT_2 ECDSA Signing Certificate (Crypto Suite 2)

ZbZclOtaSvrAttrId

OTA Upgrade Server Attribute IDs

ZCL_OTA_ATTR_UPGRADE_SERVER_ID UpgradeServerID
ZCL_OTA_ATTR_FILE_OFFSET FileOffset (Optional).

When writing a non-zero value to ZCL_OTA_ATTR_FILE_OFFSET, the entire OTA Header must have already been received by this cluster. This can be used to resume a transfer that was interrupted by the local device being power cycled in the middle of an OTA download. The procedure in this case is to start the transfer over (ZbZclOtaClientImageTransferStart) and during the first write_image() callback to the application, you write a new value to the FileOffset attribute before returning from the callback. The OTA Client will then request the next block starting from the new FileOffset.

During the write_image() callback, the application can also compare that the current OTA header matches the previous one, if saved before the reset.

If relying on the Integrity Code (hash), the application must define it’s own image_validate() callback. This is because data that has already been saved to NVM will be skipped by the OTA Client after the reset, so the running hash is no longer valid.

ZCL_OTA_ATTR_CURRENT_FILE_VERSION CurrentFileVersion (Optional)
ZCL_OTA_ATTR_CURRENT_STACK_VERSION CurrentZigBeeStackVersion (Optional)
ZCL_OTA_ATTR_DOWNLOAD_FILE_VERSION DownloadedFileVersion (Optional)
ZCL_OTA_ATTR_DOWNLOAD_STACK_VERSION DownloadedZigBeeStackVersion (Optional)
ZCL_OTA_ATTR_IMAGE_UPGRADE_STATUS ImageUpgradeStatus (Optional).

Writing ZCL_OTA_STATUS_NORMAL (0) to this attribute will reset the cluster back to defaults.

ZCL_OTA_ATTR_MANUFACTURER_ID ManufacturerID (Optional)
ZCL_OTA_ATTR_IMAGE_TYPE_ID ImageTypeID (Optional)
ZCL_OTA_ATTR_MIN_BLOCK_PERIOD MinimumBlockPeriod (Optional)
ZCL_OTA_ATTR_IMAGE_STAMP ImageStamp (Optional)
ZCL_OTA_ATTR_UPGRADE_ACTIVATION_POLICY UpgradeActivationPolicy (Optional)
ZCL_OTA_ATTR_UPGRADE_TIMEOUT_POLICY UpgradeTimeoutPolicy (Optional)

ZbZclOtaTimeoutPolicy

OTA Upgrade UpgradeTimeoutPolicy enumerations

ZCL_OTA_TIMEOUT_POLICY_APPLY_UPGRADE Apply Upgrade After Timeout
ZCL_OTA_TIMEOUT_POLICY_DO_NOT_APPLY Do not Apply Upgrade After Timeout

Structures

ZbZclOtaClientCallbacksT

OTA Upgrade callbacks configuration

Parameters

discover_complete

(callback function pointer)

void (*discover_complete)(struct ZbZclClusterT *cluster, enum ZclStatusCodeT status, void *arg)

Callback to Server, invoked on discovery of OTA Upgrade Server. If NULL and ZbZclOtaClientDiscover is successful, the default handler will automatically call ZbZclOtaClientQueryNextImageReq.

image_notify

(callback function pointer)

enum ZclStatusCodeT (*image_notify)(struct ZbZclClusterT *cluster, uint8_t payload_type, uint8_t jitter, struct ZbZclOtaImageDefinition *image_definition, struct ZbApsdeDataIndT *data_ind, struct ZbZclHeaderT *zcl_header)

Callback to Server, invoked on receipt of Image Notify Server command If NULL, the OTA Client has default callback handlers to take care of a typical OTA firmware upgrade file.

Callback Function Parameters:

  • payload_type

The value of the payload type from the Image Notify command payload. The value indicates which parameters in the image_definition are valid.

  • 0x00 = Query Jitter
  • 0x01 = Query Jitter, Manufacturer Code
  • 0x02 = Query Jitter, Manufacturer Code, Image Type
  • 0x03 = Query Jitter, Manufacturer Code, Image Type, File Version
  • jitter

The value of the query jitter from the Image Notify command payload. The jitter is used to decide if the client should drop the command or not. Refer to section 11.13.3.4 (Effect on Receipt) of the ZCL6 spec.

  • image_definition

Pointer to the parsed image definition of the image from the Image notify payload.

  • manufacturer_code

The manufacturer code for this image.

  • image_type

The manufacturer specific image type, defined by the manufacturer.

  • file_version

The file version.

  • data_ind

Pointer to the incoming APSDE-DATA.indication struct.

  • zcl_header

Pointer to the incoming ZCL Header struct.

query_next

(callback function pointer)

void (*query_next)(struct ZbZclClusterT *cluster, enum ZclStatusCodeT status, struct ZbZclOtaImageDefinition image_definition, uint32_t image_size, void *arg)

Callback to Server, invoked on receipt of Query Next Image Response command. If no image was found, the status will be set to ZCL_STATUS_NO_IMAGE_AVAILABLE. Otherwise the status should be set to ZCL_STATUS_SUCCESS from the OTA Server.

update_raw

(callback function pointer)

enum ZclStatusCodeT (*update_raw)(struct ZbZclClusterT *cluster, uint8_t length, uint8_t *data, void *arg)

Raw image data is sent through this callback, to update running hash of image for example. Normally, this callback should be left to use the cluster’s default internal handler, but if the application does define its own callback, it must also provide its own handler for the 'image_validate' callback. Return code is ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE).

Callback Function Parameters:

  • length

The length of the data to be written in this invocation

  • data

The data to be written

write_tag

(callback function pointer)

enum ZclStatusCodeT (*write_tag)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint16_t tag_id, uint32_t tag_length, uint8_t data_length, uint8_t *data, void *arg)

Callback to write tag sub-element information. Normally this is left as-is after the cluster is allocated to use the default internal callback handler. The default handler will call the 'write_image' callback to process any image tag data (i.e. the actual firmware binary).

Callback Function Parameters:

  • header

A pointer to the OTA header from the start of the transferred, see Table 11-2 OTA Header Fields in the OTA spec

  • tag_id

The tag id for the data to be written, see Table 11-9 Tag Identifiers

  • tag_length

The total length of data assocated with this tag. This value will remain constant for a given image for each tag id

  • data_length

The length of the data to be written in this invocation

  • data

The data to be written

Return Code:

ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE).

write_image

(callback function pointer)

enum ZclStatusCodeT (*write_image)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint8_t length, uint8_t *data, void *arg)

If not NULL, this is called by the cluster’s default 'write_tag' handler for ZCL_OTA_SUB_TAG_UPGRADE_IMAGE data. If the application has provided its own 'write_tag' handler, then this callback is not used.

Callback Function Parameters:

  • header

A pointer to the OTA header.

  • length

The length of the data to be written in this invocation

  • data

The data to be written

Return Code:

  • ZCL_STATUS_SUCCESS : request the next block
  • ZCL_STATUS_WAIT_FOR_DATA : wait before requesting the next block.
  • ZCL_STATUS_FAILURE : abort the OTA download
integrity_code

(callback function pointer)

void (*integrity_code)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint8_t length, uint8_t *data, void *arg)

If not NULL, this is called upon reception of the IMAGE_INTEGRITY_CODE sub-tag field. The 'data' parameter will contain the 16-byte hash value. This is used in conjunction with the 'update_raw' callback, which is called for all data up to just before the IMAGE_INTEGRITY_CODE sub-tag.

image_validate

(callback function pointer)

enum ZclStatusCodeT (*image_validate)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, void *arg)

If not NULL, this is called to validate the image, such as the hash. If NULL, and the image is verified using a Security Certificate, the application must provide a valid ca_pub_key_array parameter in ZbZclOtaClientConfig at initialization. Return code is ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE).

Callback Function Parameters:

header

A pointer to the OTA header from the start of the transferred, see Table 11-2 OTA Header Fields in the OTA specification.

Return Code:

  • ZCL_STATUS_SUCCESS

The the image has passed validation and the upgrade is ready to proceed.

  • ZCL_STATUS_INVALID_IMAGE

Validation of the image has failed

  • ZCL_STATUS_REQUIRE_MORE_IMAGE

This image has passed validation, but this device requires more images which are yet to be received before performing an upgrade. The application will need to use one of the CheckForUpdate API calls to locate then transfer the remaining images. When all images have been successfully transferred and validated a SUCCESS status should should be returned instead.

  • ZCL_STATUS_ABORT

The client is aborting the upgrade.

These status codes are used to notify the OTA server of the completion of the transfer via the UpgradeEnd message.

upgrade_end

(callback function pointer)

enum ZclStatusCodeT (*upgrade_end)(struct ZbZclClusterT *cluster, struct ZbZclOtaHeader *header, uint32_t current_time, uint32_t upgrade_time, void *arg)

Callback to handle an Upgrade End Response command, which specifies the time to perform the reboot and start using the updated firmware. If using the default callback handler defined by ZbZclOtaClientGetDefaultCallbacks, the 'reboot' callback will be called when the transfer has completed succesfully and it’s time for the upgrade to take place. If the application has selected the "Out-of-band" Activation Policy, then it’s best for the application to define its own 'upgrade_end' callback to decide when to perform the upgrade.

The callback should update the ZCL_OTA_ATTR_IMAGE_UPGRADE_STATUS attribute accordingly. Writing ZCL_OTA_STATUS_NORMAL to the ZCL_OTA_ATTR_IMAGE_UPGRADE_STATUS attribute will reset the cluster back to defaults.

If the callback returns ZCL_STATUS_SUCCESS, the cluster data is not reset, since the OTA upgrade may be waiting to finish through an external event or timeout. Return code is ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error (e.g. ZCL_STATUS_FAILURE).

If the callback returns an error, the cluster is reset back to defaults.

Callback Function Parameters:

  • header A pointer to the OTA header from the start of the transferred, see Table 11-2 OTA Header Fields in the OTA spec
  • current_time Current time of the server from the upgrade end response payload.
  • upgrade_time Upgrade time from the upgrade end response payload.
reboot

(callback function pointer)

void (*reboot)(struct ZbZclClusterT *cluster, void *arg)

If using the default 'upgrade_end' handler, then a callback must be provided by the application. This is called by the 'upgrade_end' handler if the OTA download was successful, to indicate it is now time to reboot the system.

abort_download

(callback function pointer)

enum ZclStatusCodeT (*abort_download)(struct ZbZclClusterT *cluster, enum ZbZclOtaCommandId commandId, void *arg)

Callback to inform application of a problem with the download. It gives the application the option to perform network diagnostics or repairs (e.g. NWK Route Discovery) before attempting to restart the OTA transfer where it left off. The application can also tell the OTA Client to abort this transfer by returning ZCL_STATUS_SUCCESS. This callback cannot be set to NULL.

The commandId is the OTA command responsible for aborting the transmission (e.g. ZCL_OTA_COMMAND_IMAGE_BLOCK_RESPONSE).

If the application returns ZCL_STATUS_SUCCESS, the OTA transfer will be aborted and cluster reset to defaults, ready for a new transfer. If the application returns an error (i.e. ZCL_STATUS_FAILURE), the OTA transfer will be paused rather than aborted, and can be resumed by the application calling ZbZclOtaClientImageTransferResume.

Callback Function Parameters:

  • commandId

The associated command responsible for this callback. E.g. Image Block Request (0x04) if there was a problem sending the command to retrieve more data, or Image Block Response (0x05) if the block response contained the ABORT status code.

Return Code:

  • ZCL_STATUS_SUCCESS

The OTA transfer will be aborted and cluster reset to defaults, ready for a new transfer.

  • ZCL_STATUS_FAILURE

The OTA transfer will be paused rather than aborted, and can be resumed by the application calling ZbZclOtaClientImageTransferResume. The application may use this opportunity to perform a Route Discovery of the OTA Server or try to poll the OTA Server until it comes back online and communication is able to resume. Refer to the Resume a Partial Download section for more information.

ZbZclOtaClientConfig

OTA Upgrade Client Configuration structure

Parameters

uint16_t profile_id Profile ID
uint8_t endpoint Endpoint on which the cluster is created on
enum ZbZclOtaActivationPolicy

activation_policy

Activation Policy
enum ZbZclOtaTimeoutPolicy

timeout_policy

Timeout Policy - Value written to ZCL_OTA_ATTR_UPGRADE_TIMEOUT_POLICY
uint32_t image_block_delay Image block delay - milliseconds
struct ZbZclOtaHeader current_image OTA Upgrade Header Fields structure. This is used to configure the client’s attributes that describe the firmware image currently running on the device.
uint16_t hardware_version Revision (0x00NN). Included in the Query Next Image command.
const uint8_t *ca_pub_key_array CA Public Key array
unsigned int ca_pub_key_len CA Public Key array length
struct ZbZclOtaClientCallbacksT

callbacks

Client callback functions

ZbZclOtaEndResponseTimes

Upgrade End Response command structure

Parameters

uint32_t current_time Current time
uint32_t upgrade_time Upgrade time

ZbZclOtaHeader

OTA Upgrade Header Fields structure

Parameters

uint32_t file_identifier OTA Upgrade file identifier
uint16_t header_version OTA Header version
uint16_t header_length OTA Header length
uint16_t header_field_control OTA Header Field control
uint16_t manufacturer_code Manufacturer code
uint16_t image_type Image type
uint32_t file_version File version
uint16_t stack_version Zigbee Stack version
uint8_t header_string OTA Header string
uint32_t total_image_size Total Image size (including header)
uint8_t sec_credential_version Security credential version (Optional)
uint64_t file_destination Upgrade file destination (Optional)
uint16_t min_hardware_version Minimum hardware version (Optional)
uint16_t max_hardware_version Maximum hardware version (Optional)

ZbZclOtaImageData

OTA Upgrade Image Data structure

Parameters

uint32_t file_offset File Offset
uint8_t data_size Data Size
uint8_t data Data

ZbZclOtaImageDefinition

OTA Header Image Definition structure

Parameters

uint16_t manufacturer_code Manufacturer code
uint16_t image_type Image type
uint32_t file_version File version

ZbZclOtaImageWaitForData

Image Block Response Command Payload with WAIT_FOR_DATA status structure

Parameters

uint32_t current_time Current time
uint32_t request_time Request time
uint16_t minimum_block_period MinimumBlock Period

ZbZclOtaServerConfig

OTA Upgrade Server Configuration structure

Parameters

uint16_t profile_id Profile ID
uint8_t endpoint Endpoint on which the cluster is created on
uint16_t minimum_block_period Minimum block period
uint32_t upgrade_end_current_time Upgrade End Current Time
uint32_t upgrade_end_upgrade_time Upgrade End Upgrade Time
ZbZclOtaServerImageEvalT image_eval Callback to determine if a suitable image exists
ZbZclOtaServerImageReadT image_read Callback read image data from the server
ZbZclOtaServerUpgradeEndReqT

image_upgrade_end_req

Callback to handle client Upgrade End request
void *arg Pointer to application data that will later be provided back to the callback function when invoked

6.2.23. Poll Control

#include "zcl/general/zcl.poll.control.h"

Description

ZCL 8 section 3.16

A Sleepy End Device (SED) may instantiate the Poll Control server to allow external devices to control its polling behaviour, including a short interval of rapid polling in order to communicate with the SED in a timely fashion. SEDs are usually in their sleep state where they are not able to receive packets, and devices may not know when those SEDs are awake and polling for data. The Poll Control cluster is used to solve this dilemma.

Devices with Poll Control clients can use Finding & Binding to create the bindings necessary to communicate with the Poll Control servers. The Poll Control server will perform periodic check-ins with any bound Poll Control clients, where the check-in response may ask the SED to start fast polling to allow the server device to exchange messages with it.


Functions

zcl_poll_client_alloc

struct ZbZclClusterT * zcl_poll_client_alloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPollControlClientCallbackT *callbacks, void *arg);

Create a new instance of the Poll Control Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

zcl_poll_client_set_checkin_rsp

enum ZclStatusCodeT zcl_poll_client_set_checkin_rsp(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientCheckinInfo *info);

Set Check-in Response configuration

Parameters

cluster Cluster instance from which to send this command
info Check-in configuration info

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_poll_client_set_long_intvl_req

enum ZclStatusCodeT zcl_poll_client_set_long_intvl_req(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientSetLongReq *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Long Interval command

Parameters

cluster Cluster instance from which to send this command
req Set Long Interval command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_poll_client_set_short_intvl_req

enum ZclStatusCodeT zcl_poll_client_set_short_intvl_req(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientSetShortReq *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Set Short Interval command

Parameters

cluster Cluster instance from which to send this command
req Set Short Interval command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_poll_client_stop_fastpoll_req

enum ZclStatusCodeT zcl_poll_client_stop_fastpoll_req(struct ZbZclClusterT *cluster, struct ZbZclPollControlClientStopReq *req,
void (*callback)(struct ZbZclCommandRspT *rsp, void *arg), void *arg);

Send a Fast Poll Stop command

Parameters

cluster Cluster instance from which to send this command
req Fast Poll Stop command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_poll_server_alloc

struct ZbZclClusterT * zcl_poll_server_alloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPollControlServerCallbackT *callbacks, void *arg);

Create a new instance of the Poll Control Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

zcl_poll_server_send_checkin

enum ZclStatusCodeT zcl_poll_server_send_checkin(struct ZbZclClusterT *cluster);

Send a Check-in command to any bound Clients.

Parameters

cluster Cluster instance from which to send this command

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclPollControlSvrAttrT

Poll Control Server Attribute IDs

ZCL_POLL_CHECK_IN_INTERVAL Check-inInterval. Range is (0, 0x6E0000), where 0 means disabled. 0x6E0000 = 7208960 qs = ~500 hours. Other than 0, the Min value is also governed by ZCL_POLL_CHECK_IN_INTERVAL_MIN.
ZCL_POLL_LONG_POLL_INTERVAL LongPollInterval. Range is (0x04, 0x6E0000) = (1 sec, ~500 hours). Min value is also governed by the value of ZCL_POLL_LONG_POLL_INTERVAL_MIN.
ZCL_POLL_SHORT_POLL_INTERVAL ShortPollInterval. Range is (1, 4) = (250 ms, 1 sec)
ZCL_POLL_FAST_POLL_TIMEOUT FastPollTimeout. Range is (0x0001, 0xffff) = (250 ms, 4.55 hours). Max value is also governed by the value of ZCL_POLL_FAST_POLL_TIMEOUT_MAX.
ZCL_POLL_CHECK_IN_INTERVAL_MIN Check-inIntervalMin (Optional). Range is (0, 0x6E0000)
ZCL_POLL_LONG_POLL_INTERVAL_MIN LongPollIntervalMin (Optional). Range is (0x4, 0x6E0000)
ZCL_POLL_FAST_POLL_TIMEOUT_MAX FastPollTimeoutMax (Optional). Range is (0x2, 0xffff)
ZCL_POLL_LONG_POLL_FROM_CLUSTER If True, the Poll Server cluster will perform the NLME- SYNC.request (polling) at the interval given by the 'LongPollInterval' (ZCL_POLL_LONG_POLL_INTERVAL). If False, the Poll Server will only expose the 'LongPollInterval' via the attribute to devices that want to read it, but the application will be responsible for any long polling it wants to do. Default is False (disabled), meaning the cluster will not perform an NLME- SYNC.request at the long poll intervals.
ZCL_POLL_CHECK_IN_RSP_WAIT_AFTER If True, then wait for the full check-in response timeout before stopping fast-polling for responses. If False, then as soon as the number of received check-in responses matches the number of bound clients, then stop fast-polling immediately. Note that this is an Exegin custom attribute and not exposed to the network.

Structures

ZbZclPollControlClientCallbackT

Poll Control Client callbacks configuration

Parameters

checkin_rsp_callback

(callback function pointer)

enum ZclStatusCodeT (*checkin_rsp_callback)(struct ZbZclClusterT *clusterPtr, struct zcl_poll_checkin_rsp_t *rsp_info, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Check-in Response command

ZbZclPollControlClientCheckinInfo

Check-in Info structure

Parameters

struct ZbApsAddrT dst Destination Address
bool start_fast_poll Start Fast Poll
uint16_t fast_poll_timeout Fast Poll Timeout
bool auto_refresh If true, check-in response is automatically refreshed for the next check-in request. If false, this is a one-time event.

ZbZclPollControlClientSetLongReq

Set Long Poll Interval command structure

Parameters

struct ZbApsAddrT dst Destination Address
uint32_t interval NewLongPollInterval

ZbZclPollControlClientSetShortReq

Set Short Poll Interval command structure

Parameters

struct ZbApsAddrT dst Destination Address
uint16_t interval New Short Poll Interval

ZbZclPollControlClientStopReq

Fast Poll Stop command structure

Parameters

struct ZbApsAddrT dst Destination Address

ZbZclPollControlServerCallbackT

Poll Control Server callbacks configuration

Parameters

checkin_rsp

(callback function pointer)

bool (*checkin_rsp)(struct ZbZclClusterT *clusterPtr, struct zcl_poll_checkin_rsp_t *rsp_info, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Check-in Response command. If the callback returns true, then the Check-in Response is allowed to start fast polling. The ZCL8 Spec makes it optional whether these commands allow the device to start fast polling, even if "Start Fast Polling" payload parameter is set to true. If the callback return false, then this command shall not have an effect on fast polling.

zcl_poll_checkin_rsp_t

Check-in Response command structure

Parameters

enum ZclStatusCodeT status Status
bool start_fast_poll Start Fast Polling
uint16_t fast_poll_timeout Fast Poll Timeout

6.2.24. Power Configuration

#include "zcl/general/zcl.power.config.h"

Functions

ZbZclPowerConfigClientAlloc

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

Create a new instance of the Power Configuration Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPowerConfigServerAlloc

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

Create a new instance of the Power Configuration Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclPowerConfigSvrAttrT

Power Configuration Server Attributes IDs

ZCL_POWER_CONFIG_ATTR_MAINS_VOLTAGE MainsVoltage (Optional)
ZCL_POWER_CONFIG_ATTR_MAINS_FREQ MainsFrequency (Optional)
ZCL_POWER_CONFIG_ATTR_MAINS_ALARM_MASK MainsAlarmMask (Optional)
ZCL_POWER_CONFIG_ATTR_MAINS_VOLT_MIN MainsVoltageMinThreshold (Optional)
ZCL_POWER_CONFIG_ATTR_MAINS_VOLT_MAX MainsVoltageMaxThreshold (Optional)
ZCL_POWER_CONFIG_ATTR_MAINS_VOLT_DWELL MainsVoltageDwellTripPoint (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_VOLTAGE BatteryVoltage (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_PCT BatteryPercentageRemaining (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_MFR_NAME BatteryManufacturer (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_SIZE BatterySize (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_AHRRATING BatteryAHrRating (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_QUANTITY BatteryQuantity (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_RATED_VOLT BatteryRatedVoltage (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_ALARM_MASK BatteryAlarmMask (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_VOLT_MIN BatteryVoltageMinThreshold (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_VTHRESHOLD1 BatteryVoltageThreshold1 (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_VTHRESHOLD2 BatteryVoltageThreshold2 (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_VTHRESHOLD3 BatteryVoltageThreshold3 (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_PCT_MIN BatteryPercentageMinThreshold (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_PTHRESHOLD1 BatteryPercentageThreshold1 (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_PTHRESHOLD2 BatteryPercentageThreshold2 (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_PTHRESHOLD3 BatteryPercentageThreshold3 (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY_ALARM_STATE BatteryAlarmState (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_VOLTAGE BatteryVoltage - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_PCT BatteryPercentageRemaining - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_MFR_NAME BatteryManufacturer - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_SIZE BatterySize - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_AHRRATING BatteryAHrRating - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_QUANTITY BatteryQuantity - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_RATED_VOLT BatteryRatedVoltage - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_ALARM_MASK BatteryAlarmMask - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_VOLT_MIN BatteryVoltageMinThreshold - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_VTHRESHOLD1 BatteryVoltageThreshold1 - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_VTHRESHOLD2 BatteryVoltageThreshold2 - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_VTHRESHOLD3 BatteryVoltageThreshold3 - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_PCT_MIN BatteryPercentageMinThreshold - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_PTHRESHOLD1 BatteryPercentageThreshold1 - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_PTHRESHOLD2 BatteryPercentageThreshold2 - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_PTHRESHOLD3 BatteryPercentageThreshold3 - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY2_ALARM_STATE BatteryAlarmState - Second battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_VOLTAGE BatteryVoltage - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_PCT BatteryPercentageRemaining - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_MFR_NAME BatteryManufacturer - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_SIZE BatterySize - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_AHRRATING BatteryAHrRating - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_QUANTITY BatteryQuantity - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_RATED_VOLT BatteryRatedVoltage - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_ALARM_MASK BatteryAlarmMask - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_VOLT_MIN BatteryVoltageMinThreshold - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_VTHRESHOLD1 BatteryVoltageThreshold1 - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_VTHRESHOLD2 BatteryVoltageThreshold2 - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_VTHRESHOLD3 BatteryVoltageThreshold3 - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_PCT_MIN BatteryPercentageMinThreshold - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_PTHRESHOLD1 BatteryPercentageThreshold1 - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_PTHRESHOLD2 BatteryPercentageThreshold2 - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_PTHRESHOLD3 BatteryPercentageThreshold3 - Third Battery (Optional)
ZCL_POWER_CONFIG_ATTR_BATTERY3_ALARM_STATE BatteryAlarmState - Third Battery (Optional)

6.2.25. Power Profile

#include "zcl/general/zcl.power.profile.h"

Functions

ZbZclPowerProfClientAlloc

struct ZbZclClusterT * ZbZclPowerProfClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPowerProfClientCallbacks *callbacks, void *arg);

Create a new instance of the Power Profile Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPowerProfClientPhasesNotify

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

Send an Energy Phases Schedule Notification command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
notify Energy Phases Schedule Notification command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientPhasesResponse

enum ZclStatusCodeT ZbZclPowerProfClientPhasesResponse(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfCliPhasesNotify *notify, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a EnergyPhasesScheduleResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp EnergyPhasesScheduleResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientPhasesSchedStateReq

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

Send a EnergyPhasesScheduleStateRequest command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req EnergyPhasesScheduleStateRequest command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientPriceExtRsp

enum ZclStatusCodeT ZbZclPowerProfClientPriceExtRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfCliPriceRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a GetPowerProfilePriceExtendedResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp GetPowerProfilePriceExtendedResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientPriceRsp

enum ZclStatusCodeT ZbZclPowerProfClientPriceRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfCliPriceRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a GetPowerProfilePriceResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp GetPowerProfilePriceResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientProfileReq

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

Send a PowerProfileRequest command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req PowerProfileRequest command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientSchedConsReq

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

Send a PowerProfileScheduleConstraintsRequest command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req PowerProfileScheduleConstraintsRequest command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientSchedPriceRsp

enum ZclStatusCodeT ZbZclPowerProfClientSchedPriceRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfCliSchedPriceRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a GetOverallSchedulePriceResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp GetOverallSchedulePriceResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfClientStateReq

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

Send a PowerProfileStateRequest command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerAlloc

struct ZbZclClusterT * ZbZclPowerProfServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclPowerProfServerCallbacks *callbacks, void *arg);

Create a new instance of the Power Profile Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPowerProfServerConstraintsNotify

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

Send a PowerProfileScheduleConstraintsNotification Command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
notify PowerProfileScheduleConstraintsNotification command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerConstraintsRsp

enum ZclStatusCodeT ZbZclPowerProfServerConstraintsRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfSvrConstraintsNotify *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a PowerProfileScheduleConstraintsResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp PowerProfileScheduleConstraintsResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerGetPriceReq

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

Send a GetPowerProfilePrice command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req GetPowerProfilePrice command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerGetPriceReqExtReq

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

Send a GetPowerProfilePriceExtended command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req GetPowerProfilePriceExtended command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerGetSchedPriceReq

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

Send a GetOverallSchedulePrice command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req GetOverallSchedulePrice command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerPhasesNotify

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

Send a EnergyPhasesScheduleStateNotification Command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
notify EnergyPhasesScheduleStateNotification command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerPhasesReq

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

Send a EnergyPhasesScheduleRequest command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req EnergyPhasesScheduleRequest command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerPhasesRsp

enum ZclStatusCodeT ZbZclPowerProfServerPhasesRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfSvrPhasesRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a EnergyPhasesScheduleStateResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp EnergyPhasesScheduleStateResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerProfileNotify

enum ZclStatusCodeT ZbZclPowerProfServerProfileNotify(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclPowerProfSvrProfileRsp *notify, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a PowerProfileNotification Command. It is sent as a ZCL request with a unique sequence number, and can receive a Default Response if applicable

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
notify PowerProfileNotification command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerProfileRsp

enum ZclStatusCodeT ZbZclPowerProfServerProfileRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfSvrProfileRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a PowerProfileResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp PowerProfileResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerStateNotify

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

Send a PowerProfileStateNotification Command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
notify PowerProfileStateNotification command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclPowerProfServerStateRsp

enum ZclStatusCodeT ZbZclPowerProfServerStateRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclPowerProfSvrStateRsp *rsp, void (*callback)(struct ZbApsdeDataConfT *conf, void *arg), void *arg);

Send a PowerProfileStateResponse command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp PowerProfileStateResponse command response structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclPowerProfileSvrAttrT

Power Profile Server Attribute IDs

ZCL_POWER_PROF_SVR_ATTR_TOTAL_PROFILENUM TotalProfileNum
ZCL_POWER_PROF_SVR_ATTR_MULTIPLE_SCHED MultipleScheduling
ZCL_POWER_PROF_SVR_ATTR_ENERGY_FORMAT EnergyFormatting
ZCL_POWER_PROF_SVR_ATTR_ENERGY_REMOTE EnergyRemote
ZCL_POWER_PROF_SVR_ATTR_SCHEDULE_MODE ScheduleMode

Structures

ZbZclPowerProfCliPhasesNotify

Energy Phases Schedule Notification command structure

Parameters

uint8_t profile_id Power ProfileID
uint8_t num_phases Num of Scheduled Phases
struct ZbZclPowerProfSchedPhase

sched_list

Schedule List

ZbZclPowerProfCliPriceRsp

GetPowerProfilePriceResponse command structure

Parameters

uint8_t profile_id Power Profile ID
uint16_t currency Currency
uint32_t price Price
uint8_t trailing_digit Price Trailing Digit

ZbZclPowerProfCliProfileReq

PowerProfileRequest command structure

Parameters

uint8_t profile_id PowerProfileID

ZbZclPowerProfCliSchedPriceRsp

GetOverallSchedulePriceResponse command structure

Parameters

uint16_t currency Currency
uint32_t price Price
uint8_t trailing_digit Price Trailing Digit

ZbZclPowerProfClientCallbacks

Power Profile Client callbacks configuration

Parameters

profile_notify

(callback function pointer)

enum ZclStatusCodeT (*profile_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrProfileRsp *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of PowerProfileNotification command

get_price

(callback function pointer)

enum ZclStatusCodeT (*get_price)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of GetPowerProfilePrice command

state_notify

(callback function pointer)

enum ZclStatusCodeT (*state_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrStateRsp *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of PowerProfileStateNotification command

get_sched_price

(callback function pointer)

enum ZclStatusCodeT (*get_sched_price)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of GetOverallSchedulePrice command

phases_req

(callback function pointer)

enum ZclStatusCodeT (*phases_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of EnergyPhasesScheduleRequest command

phases_notify

(callback function pointer)

enum ZclStatusCodeT (*phases_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrPhasesRsp *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of EnergyPhasesScheduleStateNotification command

constraints_notify

(callback function pointer)

enum ZclStatusCodeT (*constraints_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrConstraintsNotify *notify, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of PowerProfileScheduleConstraintsNotification command

get_price_ext

(callback function pointer)

enum ZclStatusCodeT (*get_price_ext)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfSvrGetPriceExtReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of GetPowerProfilePriceExtended command

ZbZclPowerProfPhase

Phase structure

Parameters

uint8_t energy_phase_id Energy PhaseID
uint8_t macro_phase_id Macro PhaseID
uint16_t expect_duration ExpectedDuration
uint16_t peak_power Peak Power
uint16_t energy Energy
uint16_t max_activation_delay MaxActivationDelay

ZbZclPowerProfSchedPhase

Schedule Phase structure

Parameters

uint8_t energy_phase_id Energy PhaseID
uint16_t sched_time Scheduled Time

ZbZclPowerProfServerCallbacks

Power Profile Server callbacks configuration

Parameters

profile_req

(callback function pointer)

enum ZclStatusCodeT (*profile_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of PowerProfileRequest command

state_req

(callback function pointer)

enum ZclStatusCodeT (*state_req)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of PowerProfileStateRequest command

phases_notify

(callback function pointer)

enum ZclStatusCodeT (*phases_notify)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliPhasesNotify *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of Energy Phases Schedule Notification command

sched_contraints_req

(callback function pointer)

enum ZclStatusCodeT (*sched_contraints_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of PowerProfileScheduleConstraintsRequest command

phases_sched_state_req

(callback function pointer)

enum ZclStatusCodeT (*phases_sched_state_req)(struct ZbZclClusterT *cluster, struct ZbZclPowerProfCliProfileReq *req, struct ZbZclAddrInfoT *srcInfo, void *arg)

Callback to application, invoked on receipt of EnergyPhasesScheduleStateRequest command

ZbZclPowerProfSvrConstraintsNotify

PowerProfileScheduleConstraintsNotification command structure

Parameters

uint8_t profile_id PowerProfileID
uint16_t start_after Start After
uint16_t stop_before Stop Before

ZbZclPowerProfSvrGetPriceExtReq

GetPowerProfilePriceExtended command structure

Parameters

uint8_t options Options - e.g. ZCL_PWR_PROF_PRICE_EXT_OPT_START_TIME_PRESENT
uint8_t profile_id PowerProfileID
uint16_t start_time PowerProfileStartTime - optional (ZCL_PWR_PROF_PRICE_EXT_OPT_START_TIME_PRESENT)

ZbZclPowerProfSvrPhasesRsp

Energy Phases Schedule Notification and EnergyPhasesScheduleResponse command structure

Parameters

uint8_t profile_id Power ProfileID
uint8_t num_sched_energy_phases Num of Scheduled Phases

ZbZclPowerProfSvrProfileRsp

PowerProfileNotification and PowerProfileResponse command structure

Parameters

uint8_t total_profile_num Total Profile Num
uint8_t profile_id Power ProfileID
uint8_t num_transferred_phases Num of Transferred Phases
struct ZbZclPowerProfPhase phase_list Phase List

ZbZclPowerProfSvrStateRsp

PowerProfileStateResponse command structure

Parameters

uint8_t profile_count Power Profile Count
struct ZbZclPowerProfileRecord record_list Record List

ZbZclPowerProfileRecord

Record structure

Parameters

uint8_t profile_id Power Profile ID
uint8_t energy_phase_id Energy Phase ID
uint8_t remote_control PowerProfileRemoteControl
enum ZbZclPowerProfState state PowerProfile State

6.2.26. Pressure Measurement

#include "zcl/general/zcl.press.meas.h"

Functions

ZbZclPressMeasClientAlloc

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

Create a new instance of the Pressure Measurement Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPressMeasServerAlloc

struct ZbZclClusterT * ZbZclPressMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, int16_t min, int16_t max);

Create a new instance of the Pressure Measurement Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
min Default minimum measured value written to ZCL_PRESS_MEAS_ATTR_MIN_MEAS_VAL attribute during allocation
max Default maximum measured value written to ZCL_PRESS_MEAS_ATTR_MAX_MEAS_VAL attribute during allocation

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclPressMeasSvrAttrT

Pressure Measurement Attribute IDs

ZCL_PRESS_MEAS_ATTR_MEAS_VAL MeasuredValue
ZCL_PRESS_MEAS_ATTR_MIN_MEAS_VAL MinMeasuredValue
ZCL_PRESS_MEAS_ATTR_MAX_MEAS_VAL MaxMeasuredValue
ZCL_PRESS_MEAS_ATTR_TOLERANCE Tolerance (Optional)
ZCL_PRESS_MEAS_ATTR_SCALED_VAL ScaledValue (Optional)
ZCL_PRESS_MEAS_ATTR_MIN_SCALED_VAL MinScaledValue (Optional)
ZCL_PRESS_MEAS_ATTR_MAX_SCALED_VAL MaxScaledValue (Optional)
ZCL_PRESS_MEAS_ATTR_SCALED_TOL ScaledTolerance (Optional)
ZCL_PRESS_MEAS_ATTR_SCALE Scale (Optional)

6.2.27. Pump Configuration and Control

#include "zcl/general/zcl.pump.h"

Functions

ZbZclPumpClientAlloc

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

Instantiate a new instance of the Pump Configuration and Control client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPumpServerAlloc

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

Instantiate a new instance of the Pump Configuration and Control server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclPumpServerAttrT

Pump Configuration and Control Attribute Ids

ZCL_PUMP_SVR_ATTR_MAX_PRESSURE MaxPressure
ZCL_PUMP_SVR_ATTR_MAX_SPEED MaxSpeed
ZCL_PUMP_SVR_ATTR_MAX_FLOW MaxFlow
ZCL_PUMP_SVR_ATTR_MIN_CONST_PRESSURE MinConstPressure
ZCL_PUMP_SVR_ATTR_MAX_CONST_PRESSURE MaxConstPressure
ZCL_PUMP_SVR_ATTR_MIN_COMP_PRESSURE MinCompPressure
ZCL_PUMP_SVR_ATTR_MAX_COMP_PRESSURE MaxCompPressure
ZCL_PUMP_SVR_ATTR_MIN_CONST_SPEED MinConstSpeed
ZCL_PUMP_SVR_ATTR_MAX_CONST_SPEED MaxConstSpeed
ZCL_PUMP_SVR_ATTR_MIN_CONST_FLOW MinConstFlow
ZCL_PUMP_SVR_ATTR_MAX_CONST_FLOW MaxConstFlow
ZCL_PUMP_SVR_ATTR_MIN_CONST_TEMP MinConstTemp
ZCL_PUMP_SVR_ATTR_MAX_CONST_TEMP MaxConstTemp
ZCL_PUMP_SVR_ATTR_PUMP_STATUS PumpStatus
ZCL_PUMP_SVR_ATTR_EFF_OP_MODE EffectiveOperationMode
ZCL_PUMP_SVR_ATTR_EFF_CTRL_MODE EffectiveControlMode
ZCL_PUMP_SVR_ATTR_CAPACITY Capacity
ZCL_PUMP_SVR_ATTR_SPEED Speed
ZCL_PUMP_SVR_ATTR_RUNNING_HOURS LifetimeRunningHours
ZCL_PUMP_SVR_ATTR_POWER Power
ZCL_PUMP_SVR_ATTR_ENERGY_CONSUMED LifetimeEnergyConsumed
ZCL_PUMP_SVR_ATTR_OP_MODE OperationMode
ZCL_PUMP_SVR_ATTR_CTRL_MODE ControlMode
ZCL_PUMP_SVR_ATTR_ALARM_MASK AlarmMask

6.2.28. RSSI Location

#include "zcl/general/zcl.rssi.loc.h"

Functions

ZbZclRssiLocClientAlloc

struct ZbZclClusterT * ZbZclRssiLocClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_rssi_loc_client_callbacks_t *callbacks, void *arg);

Create a new instance of the RSSI Location Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclRssiLocClientAnchorNodeAnnc

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

Send a Anchor Node Announce command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
anchor_node_annc Anchor Node Announce command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocClientGetDevConfig

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

Send a Get Device Configuration command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
get_dev_config Get Device Configuration command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocClientGetLocData

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

Send a Get Location Data command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
get_loc_data Get Location Data command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocClientSendPings

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

Send a Send Pings command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
send_pings Send Pings command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocClientSendRssiRsp

enum ZclStatusCodeT ZbZclRssiLocClientSendRssiRsp(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *dst_info, struct rssi_loc_rssi_rsp *rsp);

Send a RSSI Response command

Parameters

clusterPtr Cluster instance from which to send this command
dst_info Destination address for request
rsp Rssi Response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocClientSetAbsLocation

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

Send a Set Absolute Location command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
set_abs_loc Set Absolute Location command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocClientSetDevConfig

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

Send a Set Device Configuration command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
set_dev_config Set Device Config command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerAlloc

struct ZbZclClusterT * ZbZclRssiLocServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_rssi_loc_server_callbacks_t *callbacks, void *arg);

Create a new instance of the RSSI Location Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclRssiLocServerCompDataNotif

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

Send a Compact Data Notification command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerLocDataNotif

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

Send a Location Data Notification command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerReportRssi

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

Send a Report RSSI command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
report_rssi Report Rssi command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerReqOwnLoc

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

Send a Request Own Location command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req_own_loc Request Own Location command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerRssiPing

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

Send a RSSI Ping command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerRssiReq

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

Send a RSSI Request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerSendDevConfigRsp

enum ZclStatusCodeT ZbZclRssiLocServerSendDevConfigRsp(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *dst_info,
struct rssi_loc_dev_config_rsp *rsp);

Send a Device Configuration Response command

Parameters

clusterPtr Cluster instance from which to send this command
dst_info Destination address for request
rsp Send Device Configuration response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclRssiLocServerSendLocDataRsp

enum ZclStatusCodeT ZbZclRssiLocServerSendLocDataRsp(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *dst_info,
struct rssi_loc_loc_data_rsp *rsp);

Send a Location Data Response command

Parameters

clusterPtr Cluster instance from which to send this command
dst_info Destination address for request
rsp Send Location Data response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclRssiLocSvrAttrT

Rssi Location Attribute IDs

ZCL_RSSI_LOC_SVR_ATTR_LOCATION_TYPE LocationType
ZCL_RSSI_LOC_SVR_ATTR_LOCATION_METHOD LocationMethod
ZCL_RSSI_LOC_SVR_ATTR_LOCATION_AGE LocationAge (Optional)
ZCL_RSSI_LOC_SVR_ATTR_QUALITY_MEAS QualityMeasure (Optional)
ZCL_RSSI_LOC_SVR_ATTR_NUM_DEVICES NumberOfDevices (Optional)
ZCL_RSSI_LOC_SVR_ATTR_COORD1 Coordinate1
ZCL_RSSI_LOC_SVR_ATTR_COORD2 Coordinate2
ZCL_RSSI_LOC_SVR_ATTR_COORD3 Coordinate3 (Optional)
ZCL_RSSI_LOC_SVR_ATTR_POWER Power
ZCL_RSSI_LOC_SVR_ATTR_PATH_LOSS_EXP PathLossExponent
ZCL_RSSI_LOC_SVR_ATTR_REPORT_PERIOD ReportingPeriod (Optional)
ZCL_RSSI_LOC_SVR_ATTR_CALC_PERIOD CalculationPeriod (Optional)
ZCL_RSSI_LOC_SVR_ATTR_NUM_RSSI_MEAS NumberRSSIMeasurements

Structures

rssi_loc_anchor_node_annc

Anchor Node Announce command structure

Parameters

uint64_t addr Anchor Node IEEE Address
int16_t x X
int16_t y Y
int16_t z Z

rssi_loc_comp_data_notif

Compact Data Notification command structure

Parameters

uint8_t loc_type Location Type
int16_t coord1 Coordinate 1
int16_t coord2 Coordinate 2
int16_t coord3 Coordinate 3
uint8_t quality_meas Quality Measure
uint16_t loc_age Location Age

rssi_loc_dev_config_rsp

Device Configuration response structure

Parameters

enum ZclStatusCodeT status Status
int16_t power Power
uint16_t path_loss_exp Path Loss Exponent
uint16_t calc_period Calculation Period
uint8_t num_rssi_meas Number RSSI Measurements
uint16_t report_period Reporting Period

rssi_loc_get_dev_config

Get Device Configuration command structure

Parameters

uint64_t target_addr Target Address

rssi_loc_get_loc_data

Get Location Data command structure

Parameters

uint8_t bitmap Bitmap
uint8_t num_responses Number Responses
uint64_t target_addr Target Address

rssi_loc_loc_data_notif

Location Data Notification command structure

Parameters

uint8_t loc_type Location Type
int16_t coord1 Coordinate 1
int16_t coord2 Coordinate 2
int16_t coord3 Coordinate 3
int16_t power Power
uint16_t path_loss_exp Path Loss Exponent
uint8_t loc_method Location Method
uint8_t quality_meas Quality Measure
uint16_t loc_age Location Age

rssi_loc_loc_data_rsp

Location Data response structure

Parameters

enum ZclStatusCodeT status Status
uint8_t loc_type Location Type
int16_t coord1 Coordinate 1
int16_t coord2 Coordinate 2
int16_t coord3 Coordinate 3
int16_t power Power
uint16_t path_loss_exp Path Loss Exponent
uint8_t loc_method Location Method
uint8_t quality_meas Quality Measure
uint16_t loc_age Location Age

rssi_loc_neighbour_info

Neighbour Info structure

Parameters

uint64_t neighbour Neighbour
int16_t x X
int16_t y Y
int16_t z Z
int8_t rssi RSSI
uint8_t num_rssi_meas NumberRSSIMeasurements

rssi_loc_report_rssi

Report Rssi command structure

Parameters

uint64_t measuring_dev Measuring Device
uint8_t n_neighbours N Neighbours
struct rssi_loc_neighbour_info neighbours_info NeighboursInfo

rssi_loc_req_own_loc

Request Own Location command structure

Parameters

uint64_t addr IEEE Address of the Blind Node

rssi_loc_rssi_ping

Rssi Ping command structure

Parameters

uint8_t loc_type Location Type

rssi_loc_rssi_req

Rssi Request structure

Parameters

uint8_t rssi Rssi

rssi_loc_rssi_rsp

Rssi response structure

Parameters

uint64_t replying_dev Replying Device
int16_t x X
int16_t y Y
int16_t z Z
int8_t rssi RSSI
uint8_t num_rssi_meas NumberRSSIMeasurements

rssi_loc_send_pings

Send Pings command structure

Parameters

uint64_t target_addr Target Address
uint8_t num_rssi_meas NumberRSSIMeasurements
uint16_t calc_period CalculationPeriod

rssi_loc_set_abs_loc

Set Absolute Location command structure

Parameters

int16_t coord1 Coordinate 1
int16_t coord2 Coordinate 2
int16_t coord3 Coordinate 3
int16_t power Power
uint16_t path_loss_exp Path Loss Exponent

rssi_loc_set_dev_config

Set Device Configuration command structure

Parameters

int16_t power Power
uint16_t path_loss_exp Path Loss Exponent
uint16_t calc_period Calculation Period
uint8_t num_rssi_meas Number Rssi Measurements
uint16_t report_period Reporting Period

zcl_rssi_loc_client_callbacks_t

Rssi Location Client callbacks configuration

Parameters

loc_data_notif

(callback function pointer)

enum ZclStatusCodeT (*loc_data_notif)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_loc_data_notif *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Location Data Notification command

comp_data_notif

(callback function pointer)

enum ZclStatusCodeT (*comp_data_notif)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_comp_data_notif *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Compact Data Notification command

rssi_ping

(callback function pointer)

enum ZclStatusCodeT (*rssi_ping)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_rssi_ping *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of RSSI Ping command

rssi_req

(callback function pointer)

enum ZclStatusCodeT (*rssi_req)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_rssi_req *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of RSSI request.

report_rssi

(callback function pointer)

enum ZclStatusCodeT (*report_rssi)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_report_rssi *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Report Rssi command

req_own_loc

(callback function pointer)

enum ZclStatusCodeT (*req_own_loc)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_req_own_loc *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Request Own Location command

zcl_rssi_loc_server_callbacks_t

Rssi Location Server callbacks configuration

Parameters

get_dev_config

(callback function pointer)

enum ZclStatusCodeT (*get_dev_config)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_get_dev_config *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Get Device Configuration command

get_loc_data

(callback function pointer)

enum ZclStatusCodeT (*get_loc_data)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_get_loc_data *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Get Location Data command

send_pings

(callback function pointer)

enum ZclStatusCodeT (*send_pings)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_send_pings *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Send Pings command

anchor_node_annc

(callback function pointer)

enum ZclStatusCodeT (*anchor_node_annc)(struct ZbZclClusterT *clusterPtr, struct rssi_loc_anchor_node_annc *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Anchor Node Announce command

6.2.29. Scenes

#include "zcl/general/zcl.scenes.h"

Description

ZCL 8 section 3.7

A scene is a set of values for attributes from multiple clusters capable of being applied at the same time. The few clusters that support scenes are identified by a section with the title "Scene Table Extensions" in the ZCL 8 Specification (ZCL8) section for those cluster. There is only one scene table (list of attributes) for a cluster that supports scenes, and when a scene is invoked all scene table attributes are set to the values given in the scene table.

To use the scene table for a cluster, the cluster must reside on an endpoint which also hosts an instance of the Scenes cluster. There may be multiple scene table supporting clusters on a given endpoint. A scene is defined in the scenes cluster and contains scene tables for one or more clusters. Through the use of group addressing a scene may be applied to multiple endpoints on a node.

A scene may be created by the scene cluster using the Add Scene command, where the application manually defines the scene table for each cluster included in that scene. All attributes must have values in the scene table, but inclusion of individual clusters is optional. A scene may also be created using the Store Scene command where the current value of all the attributes in the cluster at the time the Store Scene command is issued are recorded in the scene table for later use.

The Scenes cluster Recall Scene command takes the scene table for each cluster in that scene and sets the values of every scene table attribute.

For example, a node could contain three endpoints:

  • 0x01 with the OnOff and Window Covering clusters
  • 0x02 with the OnOff and Door Lock clusters
  • 0x03 with the OnOff and Level.

A scene is defined with a scene tables for the:

  • OnOff cluster: OnOff = On
  • Level cluster: CurrentLevel = 50%
  • DoorLock cluster: LockState = Locked

Additionally:

  • Endpoints 0x01 and 0x02 are in group 0x0001
  • Endpoint 0x03 is not in group 0x0001

If the scenes cluster Recall Scenes command is issued with group address 0x0001 and the scene defined above, then on endpoint

0x01 and 0x02 the OnOff cluster OnOff attribute will be set on and the DoorLock on endpoint 0x02 will be locked.

The Window Covering cluster on endpoint 0x01 will not be affected because this scene does not include a scene table for this cluster and all of endpoint 0x03 will be unaffected because it is not in group 0x0001.

For more information about the Scenes cluster, see Section 3.7 in ZCL8.

Functions

ZbZclScenesClientAlloc

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

Create a new instance of the Scenes Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclScenesServerAlloc

struct ZbZclClusterT * ZbZclScenesServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint8_t maxScenes);

Create a new instance of the Scenes Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
maxScenes Maximum number of scenes supported by this cluster

Return

  • Cluster pointer, or NULL if there is an error

zcl_scenes_client_add_req

enum ZclStatusCodeT zcl_scenes_client_add_req(struct ZbZclClusterT *cluster, struct zcl_scenes_add_request_t *add_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send an Add Scene or Enhanced Add Scene command, depending on isEnhanced flag in Add Scene command structure

Parameters

cluster Cluster instance from which to send this command
add_req Add Scene command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_add_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_add_rsp_parse(struct zcl_scenes_add_response_t *add_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse an Add Scene Response command payload into a structure

Parameters

add_rsp Add Scene Response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_copy_req

enum ZclStatusCodeT zcl_scenes_client_copy_req(struct ZbZclClusterT *cluster, struct zcl_scenes_copy_request_t *copy_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Copy Scene command

Parameters

cluster Cluster instance from which to send this command
copy_req Copy Scene command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_copy_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_copy_rsp_parse(struct zcl_scenes_copy_response_t *copy_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse a Copy Scene Response command payload into a structure

Parameters

copy_rsp Copy Scene response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_get_membership_req

enum ZclStatusCodeT zcl_scenes_client_get_membership_req(struct ZbZclClusterT *cluster, struct zcl_scenes_membership_request_t *get_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Get Scene Membership command

Parameters

cluster Cluster instance from which to send this command
get_req Get Scene Membership command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_get_membership_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_get_membership_rsp_parse(struct zcl_scenes_membership_response_t *get_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse a Get Scene Membership Response command payload into a structure

Parameters

get_rsp Get Scene Membership Response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_recall_req

enum ZclStatusCodeT zcl_scenes_client_recall_req(struct ZbZclClusterT *cluster, struct zcl_scenes_recall_request_t *recall_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Recall Scene command

Parameters

cluster Cluster instance from which to send this command
recall_req Recall Scene command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_recall_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_recall_rsp_parse(struct zcl_scenes_recall_response_t *recall_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse a Recall Scene Response command payload into a structure

Parameters

recall_rsp Recall Scene response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_remove_all_req

enum ZclStatusCodeT zcl_scenes_client_remove_all_req(struct ZbZclClusterT *cluster, struct zcl_scenes_remove_all_request_t *remove_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Remove All Scenes command

Parameters

cluster Cluster instance from which to send this command
remove_req Remove All Scenes command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_remove_all_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_remove_all_rsp_parse(struct zcl_scenes_remove_all_response_t *remove_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse a Remove All Scenes Response command payload into a structure

Parameters

remove_rsp Remove All Scenes Response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_remove_req

enum ZclStatusCodeT zcl_scenes_client_remove_req(struct ZbZclClusterT *cluster, struct zcl_scenes_remove_request_t *remove_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Remove Scene command

Parameters

cluster Cluster instance from which to send this command
remove_req Remove Scene command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_remove_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_remove_rsp_parse(struct zcl_scenes_remove_response_t *remove_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse a Remove Scene Response command payload into a structure

Parameters

remove_rsp Remove Scene Response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_store_req

enum ZclStatusCodeT zcl_scenes_client_store_req(struct ZbZclClusterT *cluster, struct zcl_scenes_store_request_t *store_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Store Scene command

Parameters

cluster Cluster instance from which to send this command
store_req Store Scene command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_store_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_store_rsp_parse(struct zcl_scenes_store_response_t *store_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse a Store Scene Response command payload into a structure

Parameters

store_rsp Store Scene Response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_view_req

enum ZclStatusCodeT zcl_scenes_client_view_req(struct ZbZclClusterT *cluster, struct zcl_scenes_view_request_t *view_req,
void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send an View Scene or Enhanced View Scene command, depending on isEnhanced flag in View Scene command structure

Parameters

cluster Cluster instance from which to send this command
view_req View Scene command structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data provided in initiating API call

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

zcl_scenes_client_view_rsp_parse

enum ZclStatusCodeT zcl_scenes_client_view_rsp_parse(struct zcl_scenes_view_response_t *view_rsp, struct ZbZclCommandRspT *zcl_rsp);

Parse a View Scene Response command payload into a structure

Parameters

view_rsp View Scene Response command structure
zcl_rsp Cluster response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclScenesAttrT

Scenes Attribute IDs

ZCL_SCENES_ATTR_SCENE_COUNT SceneCount
ZCL_SCENES_ATTR_CURRENT_SCENE CurrentScene
ZCL_SCENES_ATTR_CURRENT_GROUP CurrentGroup
ZCL_SCENES_ATTR_SCENE_VALID SceneValid
ZCL_SCENES_ATTR_NAME_SUPPORT NameSupport
ZCL_SCENES_ATTR_LAST_CONFIGURED_BY LastConfiguredBy (Optional)

Structures

zcl_scenes_add_request_t

Add Scene command structure

Parameters

bool isEnhanced If true, send an Enhanced Add Scene request
struct ZbApsAddrT dst Destination address for request
uint16_t groupId Group ID
uint8_t sceneId Scene ID
uint16_t transition Transition time
const char *sceneName Scene Name (string length must be <= ZCL_SCENES_NAME_MAX_LENGTH)
const char *extStrPtr Extension field sets as an ASCII hex string in the format as sent in the command payload. As per the ZCL Spec, each set has the format: {clusterId, length, {extension field set}} E.g. For the OnOff cluster: "06000101"

zcl_scenes_add_response_t

Add Scene Response command structure

Parameters

uint8_t status Status
uint16_t groupId Group ID
uint8_t sceneId Scene ID

zcl_scenes_copy_request_t

Copy Scene command structure

Parameters

struct ZbApsAddrT dst Destination address for request
bool allScenes Copy All Scenes - sets bit within Mode parameter to enable Copy All Scenes
uint16_t groupFrom Group identifier from
uint8_t sceneFrom Scene identifier from - only used if allScenes is FALSE
uint16_t groupTo Group identifier to
uint8_t sceneTo Scene identifier to - only used if allScenes is FALSE

zcl_scenes_copy_response_t

Copy Scene Response command structure

Parameters

uint8_t status Status
uint16_t groupFrom Group identifier from
uint8_t sceneFrom Scene identifier from

zcl_scenes_membership_request_t

Get Scene Membership command structure

Parameters

struct ZbApsAddrT dst Destination address for request
uint16_t groupId Group ID

zcl_scenes_membership_response_t

Get Scene Membership Response command structure

Parameters

uint8_t status Status
uint8_t capacity Capacity
uint16_t groupId Group ID
uint8_t sceneCount Scent count
uint8_t sceneList Scene list

zcl_scenes_recall_request_t

Recall Scene command structure

Parameters

struct ZbApsAddrT dst Destination address for request
uint16_t groupId Group ID
uint8_t sceneId Scene ID
uint16_t transition Transition time - time in 1/10ths of second. ZCL_SCENES_RECALL_TRANSITION_INVALID (0xffff) means invalid, and won’t be included. (Optional)

zcl_scenes_recall_response_t

Recall Scene Response command structure

Parameters

uint8_t status Status

zcl_scenes_remove_all_request_t

Remove All Scenes command structure

Parameters

struct ZbApsAddrT dst Destination address for request
uint16_t groupId Group ID

zcl_scenes_remove_all_response_t

Remove All Scenes Response command structure

Parameters

uint8_t status Status
uint16_t groupId Group ID

zcl_scenes_remove_request_t

Remove Scene command structure

Parameters

struct ZbApsAddrT dst Destination address for request
uint16_t groupId Group ID
uint8_t sceneId Scene ID

zcl_scenes_remove_response_t

Remove Scene Response command structure

Parameters

uint8_t status Status
uint16_t groupId Group ID
uint8_t sceneId Scene ID

zcl_scenes_store_request_t

Store Scene command structure

Parameters

struct ZbApsAddrT dst Destination address for request
uint16_t groupId Group ID
uint8_t sceneId Scene ID

zcl_scenes_store_response_t

Store Scene Response command structure

Parameters

uint8_t status Status
uint16_t groupId Group ID
uint8_t sceneId Scene ID

zcl_scenes_view_request_t

View Scene command structure

Parameters

bool isEnhanced If true, send an Enhanced View Scene request
struct ZbApsAddrT dst Destination address for request
uint16_t groupId Group ID
uint8_t sceneId Scene ID

zcl_scenes_view_response_t

View Scene Response command structure

Parameters

uint8_t status Status
uint16_t groupId Group ID
uint8_t sceneId Scene ID
uint16_t transition Transition time
char nameStr Scene Name
uint8_t extNum Number of Extension field sets
struct { uint16_t clusterId Cluster ID
uint8_t length Length
uint8_t field Field - ZCL_SCENES_VIEW_EXT_FIELD_MAX_LEN

6.2.30. Temperature Measurement

#include "zcl/general/zcl.temp.meas.h"

Functions

ZbZclTempMeasClientAlloc

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

Create a new instance of the Temperature Measurement Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTempMeasServerAlloc

struct ZbZclClusterT * ZbZclTempMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, int16_t min, int16_t max, uint16_t tolerance);

Create a new instance of the Temperature Measurement Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
min Minimum value capable of being measured (MinMeasuredValue)
max Maximum value capable of being measured (MaxMeasuredValue)
tolerance Tolerance

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclTempMeasSvrAttrT

Temperature Measurement Server Attribute IDs

ZCL_TEMP_MEAS_ATTR_MEAS_VAL MeasuredValue
ZCL_TEMP_MEAS_ATTR_MIN_MEAS_VAL MinMeasuredValue
ZCL_TEMP_MEAS_ATTR_MAX_MEAS_VAL MaxMeasuredValue
ZCL_TEMP_MEAS_ATTR_TOLERANCE Tolerance (Optional)

6.2.31. Thermostat

#include "zcl/general/zcl.therm.h"

Functions

ZbZclThermClientAlloc

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

Create a new instance of the Scenes Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclThermClientClearWeeklySched

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

Send a Clear Weekly Schedule command (Optional)

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be called when the response for this request is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclThermClientGetRelayStatusLog

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

Send a Get Relay Status Log command (Optional)

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be called when the response for this request is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclThermClientGetWeeklySched

enum ZclStatusCodeT ZbZclThermClientGetWeeklySched(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst, struct ZbZclThermCliGetWeeklyT *req, void (*callback)(struct ZbZclCommandRspT
  • rsp, void *arg), void *arg);

Send a Get Weekly Schedule command (Optional)

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Thermostat Get Weekly Schedule info
callback Callback function that will be called when the response for this request is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclThermClientSetWeeklySched

enum ZclStatusCodeT ZbZclThermClientSetWeeklySched(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclThermWeeklySchedT *req, void (*callback)(struct ZbZclCommandRspT
  • rsp, void *arg), void *arg);

Send a Set Weekly Schedule command (Optional)

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Thermostat Weekly Schedule structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclThermClientSetpointRaiseLower

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

Send a Setpoint Raise/Lower command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Thermostat Setpoint structure
callback Callback function that will be called when the response for this request is received
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclThermServerAlloc

struct ZbZclClusterT * ZbZclThermServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclThermServerCallbacksT *callbacks, void *arg);

Create a new instance of the Thermostat Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclThermServerGetRelayStatusLogRsp

enum ZclStatusCodeT ZbZclThermServerGetRelayStatusLogRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst,
struct ZbZclThermSvrGetRelayStatusLogRspT *rsp);

Send a Get Relay Status Log Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
rsp Get Relay Status Log Response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclThermServerGetWeeklySchedRsp

enum ZclStatusCodeT ZbZclThermServerGetWeeklySchedRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct ZbZclThermWeeklySchedT *rsp);

Send a Get Weekly Schedule Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
rsp Server Clear Get Weekly Schedule response

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclThermAttrT

Thermostat Attribute IDs

ZCL_THERM_SVR_ATTR_LOCAL_TEMP LocalTemperature
ZCL_THERM_SVR_ATTR_OUTDOOR_TEMP OutdoorTemperature (Optional)
ZCL_THERM_SVR_ATTR_OCCUPANCY Occupancy (Optional)
ZCL_THERM_SVR_ATTR_ABS_MIN_HEAT_SETPOINT_LIMIT AbsMinHeatSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_ABS_MAX_HEAT_SETPOINT_LIMI T AbsMaxHeatSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_ABS_MIN_COOL_SETPOINT_LIMI T AbsMinCoolSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_ABS_MAX_COOL_SETPOINT_LIMI T AbsMaxCoolSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_PI_COOLING_DEMAND PICoolingDemand (Optional)
ZCL_THERM_SVR_ATTR_PI_HEATING_DEMAND PIHeatingDemand (Optional)
ZCL_THERM_SVR_ATTR_HVAC_SYSTYPE_CONFIG HVACSystemTypeConfiguration (Optional)
ZCL_THERM_SVR_ATTR_LOCAL_TEMP_CALIB LocalTemperatureCalibration (Optional)
ZCL_THERM_SVR_ATTR_OCCUP_COOL_SETPOINT OccupiedCoolingSetpoint
ZCL_THERM_SVR_ATTR_OCCUP_HEAT_SETPOINT OccupiedHeatingSetpoint
ZCL_THERM_SVR_ATTR_UNOCCUP_COOL_SETPOINT UnoccupiedCoolingSetpoint (Optional)
ZCL_THERM_SVR_ATTR_UNOCCUP_HEAT_SETPOINT UnoccupiedHeatingSetpoint (Optional)
ZCL_THERM_SVR_ATTR_MIN_HEAT_SETPOINT MinHeatSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_MAX_HEAT_SETPOINT MaxHeatSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_MIN_COOL_SETPOINT MinCoolSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_MAX_COOL_SETPOINT MaxCoolSetpointLimit (Optional)
ZCL_THERM_SVR_ATTR_MIN_SETPOINT_DEADBAND MinSetpointDeadBand (Optional)
ZCL_THERM_SVR_ATTR_RMT_SENSE RemoteSensing (Optional)
ZCL_THERM_SVR_ATTR_CONTROL_SEQ_OPER ControlSequenceOfOperation
ZCL_THERM_SVR_ATTR_SYSTEM_MODE SystemMode
ZCL_THERM_SVR_ATTR_ALARM_MASK AlarmMask (Optional)
ZCL_THERM_SVR_ATTR_RUNNING_MODE ThermostatRunningMode (Optional)
ZCL_THERM_SVR_ATTR_START_OF_WEEK StartOfWeek (Optional)
ZCL_THERM_SVR_ATTR_NUM_WEEKLY_TRANSITIONS NumberOfWeeklyTransitions (Optional)
ZCL_THERM_SVR_ATTR_NUM_DAILY_TRANSITIONS NumberOfDailyTransitions (Optional)
ZCL_THERM_SVR_ATTR_TEMP_SETPOINT_HOLD TemperatureSetpointHold (Optional)
ZCL_THERM_SVR_ATTR_TEMP_SETPOINT_HOLD_DUR TemperatureSetpointHoldDuration (Optional)
ZCL_THERM_SVR_ATTR_PROG_OPER_MODE ThermostatProgrammingOperationMode (Optional)
ZCL_THERM_SVR_ATTR_RUNNING_STATE ThermostatRunningState (Optional)
ZCL_THERM_SVR_ATTR_SETPOINT_CHANGE_SRC SetpointChangeSource
ZCL_THERM_SVR_ATTR_SETPOINT_CHANGE_AMT SetpointChangeAmount
ZCL_THERM_SVR_ATTR_SETPOINT_CHANGE_TIMESTAMP SetpointChangeSourceTimestamp
ZCL_THERM_SVR_ATTR_OCCUP_SETBACK OccupiedSetback (Optional)
ZCL_THERM_SVR_ATTR_OCCUP_SETBACK_MIN OccupiedSetbackMin (Optional)
ZCL_THERM_SVR_ATTR_OCCUP_SETBACK_MAX OccupiedSetbackMax (Optional)
ZCL_THERM_SVR_ATTR_UNOCCUP_SETBACK UnoccupiedSetback (Optional)
ZCL_THERM_SVR_ATTR_UNOCCUP_SETBACK_MIN UnoccupiedSetbackMin (Optional)
ZCL_THERM_SVR_ATTR_UNOCCUP_SETBACK_MAX UnoccupiedSetbackMax (Optional)
ZCL_THERM_SVR_ATTR_EMERGENCY_HEAT_DELTA EmergencyHeatDelta (Optional)
ZCL_THERM_SVR_ATTR_AC_TYPE ACType
ZCL_THERM_SVR_ATTR_AC_CAPACITY ACCapacity
ZCL_THERM_SVR_ATTR_AC_REFIGERANT_TYPE ACRefrigerantType
ZCL_THERM_SVR_ATTR_AC_COMPRESSOR_TYPE ACCompressorType
ZCL_THERM_SVR_ATTR_AC_ERROR_CODE ACErrorCode
ZCL_THERM_SVR_ATTR_AC_LOUVER_POSITION ACLouverPosition
ZCL_THERM_SVR_ATTR_AC_COIL_TEMP ACCoilTemperature
ZCL_THERM_SVR_ATTR_AC_CAPACITY_FORMAT ACCapacityFormat

Structures

ZbZclThermCliGetWeeklyT

Thermostat Get Weekly Schedule structure

Parameters

uint8_t days_to_return Days to Return
uint8_t mode_to_return Mode to Return

ZbZclThermCliSetpointT

Thermostat Setpoint structure

Parameters

uint8_t mode Mode
int8_t amount Amount

ZbZclThermServerCallbacksT

Thermostat Server callbacks configuration

Parameters

setpoint_raise_lower

(callback function pointer)

enum ZclStatusCodeT (*setpoint_raise_lower)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclThermCliSetpointT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to handle Setpoint Raise/Lower command response

set_weekly

(callback function pointer)

enum ZclStatusCodeT (*set_weekly)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclThermWeeklySchedT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to handle Set Weekly Schedule command response

get_weekly

(callback function pointer)

enum ZclStatusCodeT (*get_weekly)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclThermCliGetWeeklyT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to handle Get Weekly Schedule command response

clear_weekly

(callback function pointer)

enum ZclStatusCodeT (*clear_weekly)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to handle Clear Weekly Schedule command response

get_relay_status_log

(callback function pointer)

enum ZclStatusCodeT (*get_relay_status_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to handle Get Relay Status Log command response

ZbZclThermSvrGetRelayStatusLogRspT

Get Relay Status Log Response structure

Parameters

uint16_t time_of_day Time of Day
uint16_t relay_status Relay Status
int16_t local_temp Local Temperature
uint8_t humidity_percent Humidity in Percentage
int16_t set_point Unread Entries

ZbZclThermTransitionsT

Thermostat Transition structure

Parameters

uint16_t transition_time Transition Time
int16_t heat_set_point Heat Set Point (optional)
int16_t cool_set_point Cool Set Point (optional)

ZbZclThermWeeklySchedT

Thermostat Weekly Schedule structure

Parameters

uint8_t num_transitions Number of Transitions for Sequence
uint8_t day_of_week_seq Day of the Week for Sequence - e.g. ZCL_THERM_DAY_OF_WEEK_SUNDAY
uint8_t mode_for_seq Mode for Sequence - e.g. ZCL_THERM_MODE_HEAT_SETPOINT_PRESENT
struct ZbZclThermTransitionsT

transitions

List of transitions

6.2.32. Thermostat User Interface

#include "zcl/general/zcl.therm.ui.h"

Functions

ZbZclThermUiClientAlloc

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

Create a new instance of the Thermostat User Interface Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclThermUiServerAlloc

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

Create a new instance of the Thermostat User Interface Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclThermUiServerAttrT

Thermostat User Interface Attribute IDs

ZCL_THERM_UI_SVR_ATTR_DISPLAY_MODE TemperatureDisplayMode
ZCL_THERM_UI_SVR_ATTR_KEYPAD_LOCKOUT KeypadLockout
ZCL_THERM_UI_SVR_ATTR_SCHEDULE_PROG_VIS ScheduleProgrammingVisibility (Optional)

6.2.33. Time

#include "zcl/general/zcl.time.h"

Functions

ZbZclTimeClientAlloc

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

Create a new instance of the Time Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTimeServerAlloc

struct ZbZclClusterT * ZbZclTimeServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclTimeServerCallbacks *callbacks, void *arg);

Create a new instance of the Time Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclTimeServerCurrentTime

uint32_t ZbZclTimeServerCurrentTime(struct ZbZclClusterT *cluster);

Call the get_time callback defined as part of the Time Server callbacks configuration

Parameters

cluster Cluster instance from which to send this command

Return

  • Current time in seconds since Zigbee Epoch: Jan 1st 2000

ZbZclTimeServerSetTime

void ZbZclTimeServerSetTime(struct ZbZclClusterT *cluster, uint32_t current_time);

Call the set_time callback defined as part of the Time Server callbacks configuration

Parameters

cluster Cluster instance from which to send this command
current_time New current time value to set

Return

  • Void

Enumerations

ZbZclTimeSvrAttrT

Time Server Attribute IDs

ZCL_TIME_ATTR_TIME Time
ZCL_TIME_ATTR_STATUS TimeStatus
ZCL_TIME_ATTR_TIME_ZONE TimeZone (Optional)
ZCL_TIME_ATTR_DST_START DstStart (Optional)
ZCL_TIME_ATTR_DST_END DstEnd (Optional)
ZCL_TIME_ATTR_DST_SHIFT DstShift (Optional)
ZCL_TIME_ATTR_STANDARD_TIME StandardTime (Optional)
ZCL_TIME_ATTR_LOCAL_TIME LocalTime (Optional)
ZCL_TIME_ATTR_LAST_SET_TIME LastSetTime (Optional)
ZCL_TIME_ATTR_VALID_UNTIL_TIME ValidUntilTime (Optional)

Structures

ZbZclTimeServerCallbacks

Time Server callbacks configuration

Parameters

get_time

(callback function pointer)

uint32_t (*get_time)(struct ZbZclClusterT *clusterPtr, void *arg)

Callback to application, invoked on receipt of Read Attribute request. Returns current time in seconds since Zigbee Epoch: Jan 1st 2000.

set_time

(callback function pointer)

void (*set_time)(struct ZbZclClusterT *clusterPtr, uint32_t time_val, void *arg)

Callback to application, invoked on receipt of Write Attribute request for the ZCL_TIME_ATTR_TIME attribute. The set_time app callback should also set the ZCL_TIME_ATTR_LAST_SET_TIME attribute if successful. The time_val parameter is the current time in seconds since Zigbee Epoch: Jan 1st 2000.

6.2.34. Voice Over Zigbee

#include "zcl/general/zcl.voice.h"

Functions

ZbZclVoiceClientAlloc

struct ZbZclClusterT * ZbZclVoiceClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_voice_client_callbacks_t *callbacks, void *arg);

Create a new instance of the Voice Over Zigbee Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclVoiceClientEstabReq

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

Send an Establishment Request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
estab_req Establishment Request command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclVoiceClientSendControlRsp

enum ZclStatusCodeT ZbZclVoiceClientSendControlRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst_info, struct voice_control_rsp_t *rsp);

Send an Control command

Parameters

cluster Cluster instance from which to send this command
dst_info Destination address for response, including sequence number and tx options
rsp Control command response structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclVoiceServerAlloc

struct ZbZclClusterT * ZbZclVoiceServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct zcl_voice_server_callbacks_t *callbacks, void *arg);

Create a new instance of the Voice Over Zigbee Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclVoiceServerControlReq

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

Send a Control command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
control_cmd Control command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclVoiceServerSendEstabRsp

enum ZclStatusCodeT ZbZclVoiceServerSendEstabRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst_info, struct voice_estab_rsp_t *rsp);

Send an Establishment Response command

Parameters

cluster Cluster instance from which to send this command
dst_info Destination address for response, including sequence number and tx options
rsp Establishment Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclVoiceServerSendVoiceTxRsp

enum ZclStatusCodeT ZbZclVoiceServerSendVoiceTxRsp(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *dst, struct voice_voice_tx_rsp_t *rsp);

Send a Voice Transmission Response command. The application calls this if it ever encounters an error processing a Voice Transmission packet

Parameters

cluster Cluster instance from which to send this command
dst_info Destination address for response, including sequence number and tx options
rsp Voice Transmission Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclVoiceTxCompletedReq

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

Send a Voice Transmission Complete command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclVoiceVoiceTxReq

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

Send a Voice Transmission command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
voice_tx Voice Transmission command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclVoiceSvrAttrT

Voice Over Zigbee Server Attribute IDs

ZCL_VOICE_ATTR_CODEC_TYPE CodecType
ZCL_VOICE_ATTR_SAMP_FREQ SamplingFrequency
ZCL_VOICE_ATTR_CODECRATE Codecrate
ZCL_VOICE_ATTR_ESTAB_TIMEOUT EstablishmentTimeout
ZCL_VOICE_ATTR_CODEC_TYPE_SUB_1 CodecTypeSub1 (Optional)
ZCL_VOICE_ATTR_CODEC_TYPE_SUB_2 CodecTypeSub2 (Optional)
ZCL_VOICE_ATTR_CODEC_TYPE_SUB_3 CodecTypeSub3 (Optional)
ZCL_VOICE_ATTR_COMPRESSION_TYPE CompressionType (Optional)
ZCL_VOICE_ATTR_COMPRESSION_RATE CompressionRate (Optional)
ZCL_VOICE_ATTR_OPTION_FLAGS OptionFlags (Optional)
ZCL_VOICE_ATTR_THRESHOLD Threshold (Optional)

Structures

voice_control_rsp_t

Control Response command structure

Parameters

uint8_t ack_nak ACK=0x01 NAK=0x00

voice_control_t

Control command structure

Parameters

uint8_t control_type Control Type

voice_estab_req_t

Establishment Request command structure

Parameters

uint8_t flag Flag
uint8_t codec_type Codec Type
uint8_t samp_freq Samp. Freq.
uint8_t codec_rate Codec Rate
uint8_t service_type Service Type
uint8_t codec_type_s1 Codec TypeS1
uint8_t codec_type_s2 Codec TypeS2
uint8_t codec_type_s3 Codec TypeS3
uint8_t comp_type Comp. Type
uint8_t comp_rate Comp. Rate

voice_estab_rsp_t

Establishment Response command structure

Parameters

uint8_t ack_nak ACK=0x01 NAK=0x00
uint8_t codec_type CodecType

voice_voice_tx_rsp_t

Voice Transmission Response command structure

Parameters

uint8_t error_flag Error Flag - e.g. ZCL_VOICE_TX_RSP_ERROR_DECODE

voice_voice_tx_t

Voice Transmission command structure

Parameters

uint8_t *voice_data Voice Data
uint16_t voice_data_len Voice Data Length

zcl_voice_client_callbacks_t

Voice Over Zigbee Client callbacks configuration

Parameters

control

(callback function pointer)

enum ZclStatusCodeT (*control)(struct ZbZclClusterT *clusterPtr, struct voice_control_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Control command

zcl_voice_server_callbacks_t

Voice Over Zigbee Server callbacks configuration

Parameters

estab_req

(callback function pointer)

enum ZclStatusCodeT (*estab_req)(struct ZbZclClusterT *clusterPtr, struct voice_estab_req_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Establishment Request command

voice_tx

(callback function pointer)

enum ZclStatusCodeT (*voice_tx)(struct ZbZclClusterT *clusterPtr, struct voice_voice_tx_t *cmd_req, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Voice Transmission command. The application should return ZCL_STATUS_SUCCESS or call ZbZclVoiceServerSendVoiceTxRsp to send an error response and return ZCL_STATUS_SUCCESS_NO_DEFAULT_RESPONSE

tx_complete

(callback function pointer)

enum ZclStatusCodeT (*tx_complete)(struct ZbZclClusterT *clusterPtr, struct ZbZclAddrInfoT *src_info, void *arg)

Callback to application, invoked on receipt of Voice Transmission Completion command

6.2.35. Water Content Measurement

#include "zcl/general/zcl.wcm.h"

Functions

ZbZclWaterContentMeasClientAlloc

struct ZbZclClusterT * ZbZclWaterContentMeasClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, enum ZbZclClusterIdT clusterID);

Create a new instance of the Water Content Measurement Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
clusterID Cluster identifier (Relative Humidity 0x0405, Leaf Wetness 0x0407 or Soil Moisture 0x0408)
  • Cluster pointer, or NULL if there is an error

ZbZclWaterContentMeasServerAlloc

struct ZbZclClusterT * ZbZclWaterContentMeasServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, enum ZbZclClusterIdT clusterID, uint16_t min, uint16_t max);

Create a new instance of the Water Content Measurement Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
clusterID Cluster identifier (Relative Humidity 0x0405, Leaf Wetness 0x0407 or Soil Moisture 0x0408)
min Default minimum value
max Default maximum value

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclWcmSvrAttrT

Water Content Measurement Server Attribute IDs

ZCL_WC_MEAS_ATTR_MEAS_VAL MeasuredValue
ZCL_WC_MEAS_ATTR_MIN_MEAS_VAL MinMeasuredValue
ZCL_WC_MEAS_ATTR_MAX_MEAS_VAL MaxMeasuredValue
ZCL_WC_MEAS_ATTR_TOLERANCE Tolerance (Optional)

6.2.36. Window Covering

#include "zcl/general/zcl.window.h"

Functions

ZbZclWindowClientAlloc

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

Create a new instance of the Window Covering Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
  • Cluster pointer, or NULL if there is an error

ZbZclWindowClientCommandDown

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

Send a Down/Close command

Parameters

cluster Cluster instance from which to send this command
dst The destination address information
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclWindowClientCommandStop

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

Send a Stop command

Parameters

cluster Cluster instance from which to send this command
dst The destination address information
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclWindowClientCommandUp

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

Send an Up/Open command

Parameters

cluster Cluster instance from which to send this command
dst The destination address information
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclWindowClosureServerMode

enum ZclStatusCodeT ZbZclWindowClosureServerMode(struct ZbZclClusterT *cluster, uint8_t mode);

Configure the Window Covering mode

Parameters

cluster Cluster instance from which to send this command
mode Window Covering mode bit mask

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclWindowServerAlloc

struct ZbZclClusterT * ZbZclWindowServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclWindowServerCallbacksT *callbacks, void *arg);

Create a new instance of the Window Covering Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclWncvServerAttrT

Window Covering Server Attribute Ids

ZCL_WNCV_SVR_ATTR_COVERING_TYPE WindowCoveringType
ZCL_WNCV_SVR_ATTR_PHY_CLOSE_LIMIT_LIFT PhysicalClosedLimitLift (Optional)
ZCL_WNCV_SVR_ATTR_PHY_CLOSE_LIMIT_TILT PhysicalClosedLimitTilt (Optional)
ZCL_WNCV_SVR_ATTR_CURR_POSITION_LIFT CurrentPositionLift (Optional)
ZCL_WNCV_SVR_ATTR_CURR_POSITION_TILT CurrentPositionTilt (Optional)
ZCL_WNCV_SVR_ATTR_ACTUATION_NUMBER_LIFT NumberOfActuationsLift (Optional)
ZCL_WNCV_SVR_ATTR_ACCUATION_NUMBER_TILT NumberOfActuationsTilt (Optional)
ZCL_WNCV_SVR_ATTR_CONFIG_STATUS ConfigStatus
ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT CurrentPositionLiftPercentage
ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT CurrentPositionTiltPercentage
ZCL_WNCV_SVR_ATTR_INSTALLED_OPENED_LIMIT_LIFT InstalledOpenLimitLift
ZCL_WNCV_SVR_ATTR_INSTALLED_CLOSED_LIMIT_LIFT InstalledClosedLimitLift
ZCL_WNCV_SVR_ATTR_INSTALLED_OPENED_LIMIT_TILT InstalledOpenLimitTilt
ZCL_WNCV_SVR_ATTR_INSTALLED_CLOSED_LIMIT_TILT InstalledClosedLimitTilt
ZCL_WNCV_SVR_ATTR_VELOCITY_LIFT VelocityLift (Optional)
ZCL_WNCV_SVR_ATTR_ACCELERATION_TIME_LIFT AccelerationTimeLift (Optional)
ZCL_WNCV_SVR_ATTR_DECELERATION_TIME_LIFT DecelerationTimeLift (Optional)
ZCL_WNCV_SVR_ATTR_MODE Mode
ZCL_WNCV_SVR_ATTR_INTERMEDIATE_SETPOINTS_LIFT Intermediate Setpoints - Lift (Optional)
ZCL_WNCV_SVR_ATTR_INTERMEDIATE_SETPOINTS_TILT Intermediate Setpoints - Tilt (Optional)

ZbZclWncvTypes

Window Covering Type enumerations

ZCL_WNCV_TYPE_ROLLERSHADE Rollershade
ZCL_WNCV_TYPE_ROLLERSHADE_2_MOTOR Rollershade - 2 Motor
ZCL_WNCV_TYPE_ROLLERSHADE_EXTERIOR Rollershade – Exterior
ZCL_WNCV_TYPE_ROLLERSHADE_EXTERIOR_2_MOTOR Rollershade - Exterior - 2 Motor
ZCL_WNCV_TYPE_DRAPERY Drapery
ZCL_WNCV_TYPE_AWNING Awning
ZCL_WNCV_TYPE_SHUTTER Shutter
ZCL_WNCV_TYPE_TILT_BLIND_TILT_ONLY Tilt Blind - Tilt Only
ZCL_WNCV_TYPE_TILT_BLIND_LIFT_TILT Tilt Blind - Lift and Tilt
ZCL_WNCV_TYPE_PROJECTOR_SCREEN Projector Screen

Structures

ZbZclWindowServerCallbacksT

Window Covering Server callbacks configuration

Parameters

up_command

(callback function pointer)

enum ZclStatusCodeT (*up_command)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr, void *arg)

Callback to application, invoked on receipt of Up/Open command. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT.

down_command

(callback function pointer)

enum ZclStatusCodeT (*down_command)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr, void *arg)

Callback to application, invoked on receipt of Down/Close command. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT.

stop_command

(callback function pointer)

enum ZclStatusCodeT (*stop_command)(struct ZbZclClusterT *cluster, struct ZbZclHeaderT *zclHdrPtr, struct ZbApsdeDataIndT *dataIndPtr, void *arg)

Callback to application, invoked on receipt of Stop command. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT.

set_lift_and_tilt_command

(callback function pointer)

enum ZclStatusCodeT (*set_lift_and_tilt_command)(struct ZbZclClusterT *cluster, void *arg, uint8_t liftPercentage, uint8_t tiltPercentage)

Callback to application, invoked to handle setting a Scene, which includes Lift and Tilt values. Application should update ZCL_WNCV_SVR_ATTR_CURR_POS_LIFT_PERCENT and ZCL_WNCV_SVR_ATTR_CURR_POS_TILT_PERCENT.

6.3. IAS Security Clusters

6.3.1. IAS ACE

#include "zcl/security/zcl.ias_ace.h"

Functions

ZbZclIasAceClientAlloc

struct ZbZclClusterT * ZbZclIasAceClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, void *arg);

Allocate the IAS ACE Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIasAceClientCommandArmReq

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

Send an Arm command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Arm command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandBypassReq

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

Send a Bypass command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Bypass command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandEmergencyReq

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

Send an Emergency command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandFireReq

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

Send a Fire command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandGetBypassedZoneListReq

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

Send a Get Bypassed Zone List command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandGetPanelStatusReq

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

Send a Get Panel Status changed request

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandGetZoneIdMapReq

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

Send a Get Zone ID Map command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandGetZoneInfoReq

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

Send a Get Zone Info command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Zone Info command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandGetZoneStatusReq

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

Send a Get Zone Status command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Zone Status command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientCommandPanicReq

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

Send a Panic command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasAceClientParseArmRsp

bool ZbZclIasAceClientParseArmRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandArmRspT *rsp);

Parse an Arm Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Arm response structure

Return

  • True on success, false otherwise

ZbZclIasAceClientParseBypassRsp

bool ZbZclIasAceClientParseBypassRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandBypassRspT *rsp);

Parse a Bypass Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Bypass Response structure

Return

  • True on success, false otherwise

ZbZclIasAceClientParseGetPanelStatusRsp

bool ZbZclIasAceClientParseGetPanelStatusRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetPanelStatusRspT *rsp);

Parse a Get Panel Status Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Zone Status Changed Response structure

Return

  • True on success, false otherwise

ZbZclIasAceClientParseGetZoneIdMapRsp

bool ZbZclIasAceClientParseGetZoneIdMapRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetZoneIdMapRspT *rsp);

Parse a Get Zone ID Map Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Get Zone ID Map Response structure

Return

  • True on success, false otherwise

ZbZclIasAceClientParseGetZoneInfoRsp

bool ZbZclIasAceClientParseGetZoneInfoRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetZoneInfoRspT *rsp);

Parse a Get Zone Info Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Get Zone Info Response structure

Return

  • True on success, false otherwise

ZbZclIasAceClientParseGetZoneStatusRsp

bool ZbZclIasAceClientParseGetZoneStatusRsp(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandGetZoneStatusRspT *rsp);

Parse a Get Zone Status Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Get Zone Status Response structure

Return

  • True on success, false otherwise

ZbZclIasAceClientParseSetBypassedZoneList

bool ZbZclIasAceClientParseSetBypassedZoneList(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandSetBypassedZoneListT *rsp);

Parse a Set Bypassed Zone List Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Set Bypassed Zone List Response structure

Return

  • True on success, false otherwise

ZbZclIasAceClientParseZoneStatusChanged

bool ZbZclIasAceClientParseZoneStatusChanged(const uint8_t *buf, unsigned int len, struct ZbZclIasAceServerCommandZoneStatusChangedT *rsp);

Parse a Zone Status Changed Response command payload into a data structure

Parameters

buf Response buffer
len Length of response buffer
rsp Zone Status Changed Response structure

Return

  • True on success, false otherwise

ZbZclIasAceServerAlloc

struct ZbZclClusterT * ZbZclIasAceServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclIasAceServerCallbacksT *callbacks, void *arg);

Create a new instance of the IAS ACE Server cluster

If 'use_trip_pair' is true, application must call ZbZclIasAceServerEnrollRequest to perform the 'trip-to-pair' process, unless the IAS CIE has sent us an unsolicited Auto-Enroll-Response

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIasAceServerGetFreeZoneId

bool ZbZclIasAceServerGetFreeZoneId(struct ZbZclClusterT *cluster, uint8_t *zone_id_ptr);

Returns the first free Zone ID not already in the Zone Table

Parameters

cluster Cluster instance from which to send this command
zone_id_ptr Zone ID value

Return

  • True on success, false otherwise

ZbZclIasAceServerPanelCodeConfig

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

Change the Panel Arm/Disarm Code

Parameters

cluster Cluster instance from which to send this command
arm_code Arm code

Return

  • True on success, false otherwise

ZbZclIasAceServerPanelStatusConfig

bool ZbZclIasAceServerPanelStatusConfig(struct ZbZclClusterT *cluster, enum ZbZclIasAcePanelStatusT panel_status,
uint8_t seconds_remain, enum ZbZclIasAceAudibleNotifyT audible_notify);

Update the Panel Status

Parameters

cluster Cluster instance from which to send this command
panel_status Panel Status enumeration
seconds_remain Seconds remaining

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneBypassConfig

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

Bypass zone if allowed

Parameters

cluster Cluster instance from which to send this command
zone_id Zone ID of zone in question
bypass True if zone will be bypassed, false if not

Return

  • Result of bypass config command

ZbZclIasAceServerZoneBypassPerms

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

Configure Bypass Permissions

Parameters

cluster Cluster instance from which to send this command
zone_id Zone ID of zone in question
bypass_perms Desired bypass permissions

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneStatusConfig

bool ZbZclIasAceServerZoneStatusConfig(struct ZbZclClusterT *cluster, uint8_t zone_id,
enum ZbZclIasZoneServerZoneStatusT zone_status, enum ZbZclIasAceAudibleNotifyT audible_notify);

Configure Zone Status

Parameters

cluster Cluster instance from which to send this command
zone_id Zone ID of zone in question
zone_status Desired zone status
audible_notify Determines if zone notification is audible or not

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneTableAdd

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

Add new zone entry

Parameters

cluster Cluster instance from which to send this command
req Zone Table Add request structure

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneTableAddrLookup

uint64_t ZbZclIasAceServerZoneTableAddrLookup(struct ZbZclClusterT *cluster, uint8_t zone_id);

Returns address of paired zone, or 0 if not found

Parameters

cluster Cluster instance from which to send this command
zone_id ID of zone to be returned

Return

  • Address of zone if successful, 0 on error

ZbZclIasAceServerZoneTableDeleteByAddr

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

Delete a zone by address

Parameters

cluster Cluster instance from which to send this command
addr Address of zone to be deleted

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneTableDeleteById

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

Delete a zone by zone ID

Parameters

cluster Cluster instance from which to send this command
zone_id ID of zone to be deleted

Return

  • True on success, false otherwise

ZbZclIasAceServerZoneTableIdLookup

bool ZbZclIasAceServerZoneTableIdLookup(struct ZbZclClusterT *cluster, uint64_t zone_addr, uint8_t *zone_id_ptr);

Attempts to find a zone based on extended address, and returns the zone Id if found

Parameters

cluster Cluster instance from which to send this command
zone_addr Address of Zone being looked up
zone_id_ptr If successful, points to zone ID that was looked up

Return

  • True on success, false otherwise

Structures

ZbZclIasAceClientCommandArmT

Arm command structure

Parameters

enum ZbZclIasAceArmModeT arm_mode Arm Mode
char arm_code Arm/Disarm Code
uint8_t zone_id Zone ID

ZbZclIasAceClientCommandBypassT

Bypass command structure

Parameters

uint8_t num_zones Number of Zones
uint8_t zone_id_list Zone ID List
char arm_code Arm/Disarm Code

ZbZclIasAceClientCommandGetZoneInfoT

Get Zone Info command structure

Parameters

uint8_t zone_id Zone ID

ZbZclIasAceClientCommandGetZoneStatusT

Get Zone Status command structure

Parameters

uint8_t starting_zone_id Starting Zone ID
uint8_t max_zone_ids Max Number of Zone IDs
uint8_t zone_status_mask_flag Zone Status Mask Flag
uint16_t zone_status_mask Zone Status Mask

ZbZclIasAceServerCallbacksT

IAS ACE Server callbacks configuration

Parameters

arm_req

(callback function pointer)

bool (*arm_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclIasAceClientCommandArmT *arm_req, struct ZbZclIasAceServerCommandArmRspT *arm_rsp)

Callback to application, invoked on receipt of Arm command

bypass_req

(callback function pointer)

void (*bypass_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclIasAceClientCommandBypassT *bypass_req, struct ZbZclIasAceServerCommandBypassRspT *bypass_rsp)

Callback to application, invoked on receipt of Bypass command

emerg_req

(callback function pointer)

enum ZclStatusCodeT (*emerg_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Emergency command

fire_req

(callback function pointer)

enum ZclStatusCodeT (*fire_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Fire command

panic_req

(callback function pointer)

enum ZclStatusCodeT (*panic_req)(struct ZbZclClusterT *clusterPtr, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Panic command

ZbZclIasAceServerCommandArmRspT

Arm response structure

Parameters

enum ZbZclIasAceArmNotifyT arm_notify Arm Notification

ZbZclIasAceServerCommandBypassRspT

Bypass Response response structure

Parameters

uint8_t num_zones Number of Zones
enum ZbZclIasAceBypassResultT

bypass_result_list

Bypass Result for Zone ID List

ZbZclIasAceServerCommandGetPanelStatusRspT

Get Panel Status response structure

Parameters

enum ZbZclIasAcePanelStatusT

panel_status

Panel Status
uint8_t seconds_remain Seconds Remaining
enum ZbZclIasAceAudibleNotifyT

audible_notify

Audible Notification
enum ZbZclIasAceAlarmStatusT

alarm_status

Alarm Status

ZbZclIasAceServerCommandGetZoneIdMapRspT

Get Zone ID Map response structure

Parameters

uint16_t zond_id_map_list Zone ID Map List

ZbZclIasAceServerCommandGetZoneInfoRspT

Get Zone Info response structure

Parameters

uint8_t zone_id Zone ID
enum ZbZclIasZoneServerZoneTypeT

zone_type

Zone Type
uint64_t zone_addr IEEE Address
char zone_label Zone Label

ZbZclIasAceServerCommandGetZoneStatusRspT

Get Zone Status response structure

Parameters

uint8_t zone_status_complete Zone Status Complete
uint8_t num_zones Number of Zones
struct { uint8_t zone_id Zone ID
enum ZbZclIasZoneServerZoneStatusT

zone_status

Zone Status

ZbZclIasAceServerCommandSetBypassedZoneListT

Set Bypassed Zone List command structure

Parameters

uint8_t num_zones Number of Zones
uint8_t zone_id_list Zone ID List

ZbZclIasAceServerCommandZoneStatusChangedT

Zone Status Changed command structure

Parameters

uint8_t zone_id Zone ID
enum ZbZclIasZoneServerZoneStatusT

zone_status

Zone Status
enum ZbZclIasAceAudibleNotifyT

audible_notify

Audible Notification
char zone_label Zone Label

ZbZclIasAceServerZoneTableAddT

Zone Table Add request structure

Parameters

enum ZbZclIasZoneServerZoneTypeT

zone_type

Zone Type
uint64_t zone_addr Zone Address
const char *zone_label Zone Label - May be NULL, Max length = ZCL_IAS_ACE_ZONE_LABEL_STRING_MAX_LEN
uint8_t zone_id Zone ID - can use ZbZclIasAceServerGetFreeZoneId

6.3.2. IAS WD

#include "zcl/security/zcl.ias_wd.h"

Functions

ZbZclIasWdClientAlloc

struct ZbZclClusterT * ZbZclIasWdClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, void *arg);

Create a new instance of the IAS Warning Device Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIasWdServerAlloc

struct ZbZclClusterT * ZbZclIasWdServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclIasWdServerCallbacksT *callbacks, void *arg);

Create a new instance of the IAS Warning Device Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclIasWdLevelT

IAS Warning Device Siren Level Field Values

ZCL_IAS_WD_LEVEL_LOW Low level sound
ZCL_IAS_WD_LEVEL_MEDIUM Medium level sound
ZCL_IAS_WD_LEVEL_HIGH High level sound
ZCL_IAS_WD_LEVEL_VERY_HIGH Very high level sound

ZbZclIasWdSquawkModeT

IAS Warning Device Squawk Mode Field

ZCL_IAS_WD_SQUAWK_MODE_ARMED Notification sound for “System is armed”
ZCL_IAS_WD_SQUAWK_MODE_DISARMED Notification sound for "System is disarmed"

ZbZclIasWdStrobeT

IAS Warning Device Strobe Field

ZCL_IAS_WD_STROBE_OFF No strobe
ZCL_IAS_WD_STROBE_ON Use strobe in parallel to warning

ZbZclIasWdSvrAttrT

IAS Warning Device Server Attribute IDs

ZCL_IAS_WD_SVR_ATTR_MAX_DURATION MaxDuration

ZbZclIasWdWarningModeT

IAS Warning Device Warning Modes

ZCL_IAS_WD_WARNING_MODE_STOP Stop (no warning)
ZCL_IAS_WD_WARNING_MODE_BURGLAR Burglar
ZCL_IAS_WD_WARNING_MODE_FIRE Fire
ZCL_IAS_WD_WARNING_MODE_EMERGENCY Emergency
ZCL_IAS_WD_WARNING_MODE_POLICE_PANIC Police panic
ZCL_IAS_WD_WARNING_MODE_FIRE_PANIC Fire panic
ZCL_IAS_WD_WARNING_MODE_EMERGENCY_PANIC Emergency Panic (i.e., medical issue)

Structures

ZbZclIasWdClientSquawkReqT

IAS Warning Device Client Squawk command structure

Parameters

enum ZbZclIasWdSquawkModeT

squawk_mode

Squawk mode
enum ZbZclIasWdStrobeT strobe Strobe
enum ZbZclIasWdLevelT squawk_level Squawk level

ZbZclIasWdClientStartWarningReqT

IAS Warning Device Client Start Warning command structure

Parameters

enum ZbZclIasWdWarningModeT

warning_mode

Warning Mode
enum ZbZclIasWdStrobeT strobe Strobe
enum ZbZclIasWdLevelT siren_level Siren Level
uint16_t warning_duration Warning Duration
uint8_t strobe_dutycycle Strobe Duty Cycle
enum ZbZclIasWdLevelT strobe_level Strobe Level

ZbZclIasWdServerCallbacksT

IAS Warning Server callbacks configuration

Parameters

start_warning

(callback function pointer)

enum ZclStatusCodeT (*start_warning)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclIasWdClientStartWarningReqT *warn_req)

Callback to handle Start Warning command. ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.

squawk

(callback function pointer)

enum ZclStatusCodeT (*squawk)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclIasWdClientSquawkReqT *squawk_req)

Callback to handle Squawk command. ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error.

6.3.3. IAS Zone

#include "zcl/security/zcl.ias_zone.h"

Functions

ZbZclIasZoneClientAlloc

struct ZbZclClusterT * ZbZclIasZoneClientAlloc(struct ZigBeeT *zb, uint8_t endpoint, struct ZbZclIasZoneClientCallbacksT *callbacks, void *arg);

Create a new instance of the IAS Zone Client cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIasZoneClientInitiateAutoEnroll

enum ZclStatusCodeT ZbZclIasZoneClientInitiateAutoEnroll(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
void (*callback)(const struct ZbZclWriteRspT *, void *), void *arg);

Send a Zone Auto-Enroll request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasZoneClientInitiateNormalMode

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

Send a Initiate Normal Operation Mode request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasZoneClientInitiateTestMode

enum ZclStatusCodeT ZbZclIasZoneClientInitiateTestMode(struct ZbZclClusterT *cluster, const struct ZbApsAddrT *dst,
struct ZbZclIasZoneClientTestModeReqT *req, void (*callback)(struct ZbZclCommandRspT *zcl_rsp, void *arg), void *arg);

Send a Initiate Test Mode request command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
req Initiate Test Mode request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasZoneClientSendAutoEnrollResponse

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

Send a Zone Auto-Enroll response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for request
zone_id Zone ID
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclIasZoneServerAlloc

struct ZbZclClusterT * ZbZclIasZoneServerAlloc(struct ZigBeeT *zb, uint8_t endpoint, uint16_t zone_type, uint16_t manuf_code, bool use_trip_pair,
struct ZbZclIasZoneServerCallbacksT *callbacks, void *arg);

Create a new instance of the IAS Zone Server cluster

Parameters

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
zone_type Zone Type
manuf_code Manufacturer Code
use_trip_pair If true, use 'trip-to-pair' application must call ZbZclIasZoneServerEnrollRequest to perform the 'trip-to-pair' process, unless the IAS CIE has sent us an unsolicited Auto-Enroll-Response
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclIasZoneServerEnrollRequest

enum ZclStatusCodeT ZbZclIasZoneServerEnrollRequest(struct ZbZclClusterT *cluster,
void (*callback)(struct ZbZclIasZoneClientEnrollResponseT *enrl_rsp, void *arg), void *arg);

Send a Zone Enroll request command Used with 'trip-to-pair'. Before sending a Zone Enroll Request, the IAS CIE must write to the IAS_CIE_Address attribute with its IEEE address.

Parameters

cluster Cluster instance from which to send this command
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclIasZoneClientResponseCodeT

IAS Zone Enroll Response Code

ZCL_IAS_ZONE_CLI_RESP_SUCCESS Success
ZCL_IAS_ZONE_CLI_RESP_NOT_SUPPORTED Not supported
ZCL_IAS_ZONE_CLI_RESP_NO_ENROLL_PERMIT No enroll permit
ZCL_IAS_ZONE_CLI_RESP_TOO_MANY_ZONES Too many zones

ZbZclIasZoneServerAttrT

IAS Zone Server Attribute IDs

ZCL_IAS_ZONE_SVR_ATTR_ZONE_STATE ZoneState
ZCL_IAS_ZONE_SVR_ATTR_ZONE_TYPE ZoneType
ZCL_IAS_ZONE_SVR_ATTR_ZONE_STATUS ZoneStatus
ZCL_IAS_ZONE_SVR_ATTR_CIE_ADDR IAS_CIE_Address
ZCL_IAS_ZONE_SVR_ATTR_ZONE_ID ZoneID
ZCL_IAS_ZONE_SVR_ATTR_NUM_ZONE_SENSITIVITY_SUP PORTED NumberOfZoneSensitivityLevelsSupported (Optional)
ZCL_IAS_ZONE_SVR_ATTR_CURRENT_ZONE_SENSITIVITY_LEVEL CurrentZoneSensitivityLevel (Optional)
ZCL_IAS_ZONE_SVR_ATTR_CIE_ENDPOINT Exegin internal (Optional)

ZbZclIasZoneServerModeT

IAS Zone ZoneStatus Attribute Bit Test Value

ZCL_IAS_ZONE_SVR_MODE_NORMAL Normal
ZCL_IAS_ZONE_SVR_MODE_TEST Set

ZbZclIasZoneServerZoneStateT

IAS Zone ZoneState Attribute

ZCL_IAS_ZONE_SVR_STATE_NOT_ENROLLED Not enrolled
ZCL_IAS_ZONE_SVR_STATE_ENROLLED Enrolled (the client will react to Zone State Change Notification commands from the server)

ZbZclIasZoneServerZoneStatusT

IAS Zone ZoneStatus Attribute

ZCL_IAS_ZONE_SVR_ZONE_STATUS_NONE Alarm1
ZCL_IAS_ZONE_SVR_ZONE_STATUS_ALARM2 Alarm2
ZCL_IAS_ZONE_SVR_ZONE_STATUS_TAMPER Tamper
ZCL_IAS_ZONE_SVR_ZONE_STATUS_BATTERY Battery
ZCL_IAS_ZONE_SVR_ZONE_STATUS_SUPERVISION_REPO RTS Supervision Notify
ZCL_IAS_ZONE_SVR_ZONE_STATUS_RESTORE_REPORTS Restore Notify
ZCL_IAS_ZONE_SVR_ZONE_STATUS_TROUBLE Trouble
ZCL_IAS_ZONE_SVR_ZONE_STATUS_AC_MAINS AC (mains)
ZCL_IAS_ZONE_SVR_ZONE_STATUS_TEST Test
ZCL_IAS_ZONE_SVR_ZONE_STATUS_BATTERY_DEFECT Battery Defect

ZbZclIasZoneServerZoneTypeT

IAS Zone ZoneType Attribute

ZCL_IAS_ZONE_SVR_ZONE_TYPE_STANDARD_CIE Standard CIE
ZCL_IAS_ZONE_SVR_ZONE_TYPE_MOTION_SENSOR Motion sensor
ZCL_IAS_ZONE_SVR_ZONE_TYPE_CONTACT_SWITCH Contact switch
ZCL_IAS_ZONE_SVR_ZONE_TYPE_DOOR_WINDOW Door/Window handle
ZCL_IAS_ZONE_SVR_ZONE_TYPE_FIRE_SENSOR Fire sensor
ZCL_IAS_ZONE_SVR_ZONE_TYPE_WATER_SENSOR Water sensor
ZCL_IAS_ZONE_SVR_ZONE_TYPE_CO_SENSOR Carbon Monoxide (CO) sensor
ZCL_IAS_ZONE_SVR_ZONE_TYPE_PERSONAL_EMERG_D EVICE Personal emergency device
ZCL_IAS_ZONE_SVR_ZONE_TYPE_MOVEMENT_SENSOR Vibration/Movement sensor
ZCL_IAS_ZONE_SVR_ZONE_TYPE_REMOTE_CONTROL Remote Control
ZCL_IAS_ZONE_SVR_ZONE_TYPE_KEY_FOB Key fob
ZCL_IAS_ZONE_SVR_ZONE_TYPE_KEYPAD Keypad
ZCL_IAS_ZONE_SVR_ZONE_TYPE_STANDARD_WARNING_ DEVICE Standard Warning Device (see [N1] part 4)
ZCL_IAS_ZONE_SVR_ZONE_TYPE_GLASS_SENSOR Glass break sensor
ZCL_IAS_ZONE_SVR_ZONE_TYPE_SECURITY_REPEATER Security repeater
ZCL_IAS_ZONE_SVR_ZONE_TYPE_INVALID Invalid Zone Type

Structures

ZbZclIasZoneClientCallbacksT

IAS Zone Client callbacks configuration

Parameters

zone_status_change

(callback function pointer)

void (*zone_status_change)( struct ZbZclClusterT *cluster, void *arg, struct ZbZclIasZoneServerStatusChangeNotifyT *notify, const struct ZbApsAddrT *src)

Callback to application, invoked on receipt of Zone Status Change Notification command

zone_enroll_req

(callback function pointer)

enum ZclStatusCodeT (*zone_enroll_req)( struct ZbZclClusterT *cluster, void *arg, struct ZbZclIasZoneServerEnrollRequestT *req, uint64_t ext_src_addr, enum ZbZclIasZoneClientResponseCodeT *rsp_code, uint8_t *zone_id)

Callback to application, invoked on receipt of Zone Enroll command

ZbZclIasZoneClientEnrollResponseT

Zone Enroll response structure

Parameters

enum ZclStatusCodeT zcl_status Response status
enum ZbZclIasZoneClientResponseCodeT enroll_status Enroll response code
uint8_t zone_id Zone ID

ZbZclIasZoneClientTestModeReqT

Initiate Test Mode request structure

Parameters

uint8_t test_duration Test Mode Duration
uint8_t current_zone_sensitivity Current Zone Sensitivity Level

ZbZclIasZoneServerCallbacksT

IAS Zone Server callbacks configuration

Parameters

mode_change

(callback function pointer)

enum ZclStatusCodeT (*mode_change)(struct ZbZclClusterT
  • cluster, void *arg, enum ZbZclIasZoneServerModeT mode, struct ZbZclIasZoneClientTestModeReqT *req)

Callback to application, invoked on receipt of Initiate Normal Operation Mode or Initiate Test Mode command

ZbZclIasZoneServerEnrollRequestT

Zone Enroll request structure

Parameters

enum ZbZclIasZoneServerZoneTypeT

zone_type

Zone Type
uint16_t manuf_code Manufacturer Code

ZbZclIasZoneServerStatusChangeNotifyT

Zone State Change Notification request structure

Parameters

enum ZbZclIasZoneServerZoneStatusT

zone_status

Zone Status
uint8_t ext_status Extended Status
uint8_t zone_id Zone ID
uint16_t delay Delay

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Calendar command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Day Profiles command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Seasons command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Special Days command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Week Profile command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclCalParseCancelCalendar

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

Parse a Cancel Calendar command

Parameters

buf Buffer containing response information
len Length of response information in bytes
rsp Cancel Calendar command structure

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

buf Buffer containing response information
len Length of response information in bytes
rsp Publish Calendar command structure

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

buf Buffer containing response information
len Length of response information in bytes
rsp Publish Day Profile command structure

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

buf Buffer containing response information

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

buf Buffer containing response information
len Length of response information in bytes
rsp Publish Special Days command structure

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

buf Buffer containing response information
len Length of response information in bytes
rsp Publish Week Profile command structure

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclCalServerPublishCalendarRsp

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

Send a Publish Calendar as a response

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response
info Publish Calendar command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Publish Calendar command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response
info Publish Day Profile command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Publish Day Profile command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Publish Seasons command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Publish Seasons command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response
info Publish Special Days command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Publish Special Days command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Publish Week Profile command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Publish Week Profile command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Cancel Calendar command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response
info Cancel Calendar command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
calendar_server Pointer to Calendar Server cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.
meter_client Pointer to Metering Client cluster. This is used to know the existing notification scheme setup between BOMD & ESI and to determine if the command needs to be queued or only the notification flag needs to be set.

Return

  • Cluster pointer, or NULL if there is an error

Enumerations

ZbZclCalSvrAttrT

Calendar Server Attribute IDs

ZCL_CAL_SVR_ATTR_AuxSwitch1Label AuxSwitch1Label (Optional)
ZCL_CAL_SVR_ATTR_AuxSwitch2Label AuxSwitch2Label (Optional)
ZCL_CAL_SVR_ATTR_AuxSwitch3Label AuxSwitch3Label (Optional)
ZCL_CAL_SVR_ATTR_AuxSwitch4Label AuxSwitch4Label (Optional)
ZCL_CAL_SVR_ATTR_AuxSwitch5Label AuxSwitch5Label (Optional)
ZCL_CAL_SVR_ATTR_AuxSwitch6Label AuxSwitch6Label (Optional)
ZCL_CAL_SVR_ATTR_AuxSwitch7Label AuxSwitch7Label (Optional)
ZCL_CAL_SVR_ATTR_AuxSwitch8Label AuxSwitch8Label (Optional)

Structures

ZbZclCalCancelCalendarT

Cancel Calendar command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_calendar_id Issuer Calendar ID
enum ZbZclCalTypeT calendar_type Calendar Type
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD (in One-Way Mirror).

ZbZclCalClientCallbacksT

Calendar Client callbacks configuration

Parameters

publish_calendar

(callback function pointer)

enum ZclStatusCodeT (*publish_calendar)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalServerPublishCalendarT *notify, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Calendar command

publish_day_profile

(callback function pointer)

enum ZclStatusCodeT (*publish_day_profile)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalServerPublishDayProfileT *notify, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Day Profile command

publish_week_profile

(callback function pointer)

enum ZclStatusCodeT (*publish_week_profile)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalServerPublishWeekProfileT *notify, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Week Profile command

publish_seasons

(callback function pointer)

enum ZclStatusCodeT (*publish_seasons)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalPublishSeasonsT *notify, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Seasons command

publish_special_days

(callback function pointer)

enum ZclStatusCodeT (*publish_special_days)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalPublishSpecialDaysT *notify, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Publish Special Days command

cancel_calendar

(callback function pointer)

enum ZclStatusCodeT (*cancel_calendar)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalCancelCalendarT *notify, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Cancel Calendar command

ZbZclCalGetCalendarT

Get Calendar command structure

Parameters

uint32_t earliest_start_time Earliest Start Time
uint32_t min_issuer_event_id Min. Issuer Even ID
uint8_t num_calendars Number of Calendars
enum ZbZclCalTypeT calendar_type Calendar Type
uint32_t provider_id Provider Id

ZbZclCalGetDayProfilesT

Get Day Profiles command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_calendar_id Issuer Calendar ID
uint8_t start_day_id Start Day Id
uint8_t num_days Number of Days

ZbZclCalGetSeasonsT

Get Seasons command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_calendar_id Issuer Calendar ID

ZbZclCalGetSpecialDaysT

Get Special Days command structure

Parameters

uint32_t start_time Start Time
uint8_t num_events Number of Events
enum ZbZclCalTypeT calendar_type Calendar Type
uint32_t provider_id Provider Id
uint32_t issuer_calendar_id Issuer Calendar ID

ZbZclCalGetWeekProfilesT

Get Week Profiles command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_calendar_id Issuer Calendar ID
uint8_t start_week_id Start Week Id
uint8_t num_weeks Number of Weeks

ZbZclCalPublishSeasonsT

Publish Seasons command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_event_id Issuer Event ID
uint32_t issuer_calendar_id Issuer Calendar ID
uint8_t command_index Command Index
uint8_t num_commands Total Number of Commands
struct ZbZclCalendarSeasonT entry_list Season Entry
uint8_t num_entries Number of Season Entries - maximum is 8, since ZCL_PAYLOAD_UNFRAG_SAFE_SIZE = 54
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD (in One-Way Mirror).

ZbZclCalPublishSpecialDaysT

Publish Special Days command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_event_id Issuer Event ID
uint32_t issuer_calendar_id Issuer Calendar ID
uint32_t start_time Start Time - UTCTime
enum ZbZclCalTypeT calendar_type Calendar Type
uint8_t total_days Total Number of Special Days
uint8_t command_index Command Index
uint8_t num_commands Total Number of Commands
struct ZbZclCalendarSpecialDayT

entry_list

Special Day Entry
uint8_t num_entries Number of Special Day Entries - maximum is 6, since ZCL_PAYLOAD_UNFRAG_SAFE_SIZE = 54
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD (in One-Way Mirror).

ZbZclCalServerCallbacksT

Calendar Server callbacks configuration

Parameters

get_calendar

(callback function pointer)

enum ZclStatusCodeT (*get_calendar)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalGetCalendarT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Calendar command. The ZCL Status return value is included in the Default Response. The application may call ZbZclCalServerPublishCalendarRsp to elicit a PublishCalendar command notification.

get_day_profiles

(callback function pointer)

enum ZclStatusCodeT (*get_day_profiles)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalGetDayProfilesT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Day Profiles command. The ZCL Status return value is included in the Default Response. The application may call ZbZclCalServerPublishDayProfile to elicit a PublishDayProfile command notification.

get_week_profiles

(callback function pointer)

enum ZclStatusCodeT (*get_week_profiles)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalGetWeekProfilesT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Week Profiles command. The ZCL Status return value is included in the Default Response. The application may call ZbZclCalServerPublishWeekProfile to elicit a PublishWeekProfile command notification.

get_seasons

(callback function pointer)

enum ZclStatusCodeT (*get_seasons)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalGetSeasonsT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Seasons command. The ZCL Status return value is included in the Default Response. The application may call ZbZclCalServerPublishSeasons to elicit a PublishSeasons command notification.

get_special_days

(callback function pointer)

enum ZclStatusCodeT (*get_special_days)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclCalGetSpecialDaysT *req, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Special Days command. The ZCL Status return value is included in the Default Response. The application may call ZbZclCalServerPublishSpecialDays to elicit a PublishSpecialDays command notification.

get_calendar_cancellation

(callback function pointer)

enum ZclStatusCodeT (*get_calendar_cancellation)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of a Get Calendar Cancellation command. The ZCL Status return value is included in the Default Response. The application may call ZbZclCalServerSendCancelCalendar to elicit a CancelCalendar command notification.

ZbZclCalServerPublishCalendarT

Publish Calendar command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_event_id Issuer Event ID
uint32_t issuer_calendar_id Issuer Calendar ID
uint32_t start_time Start Time - UTCTime
enum ZbZclCalTypeT calendar_type Calendary Type
uint8_t calendar_time_ref Calendar Time Reference
uint8_t calendar_name Calendar Name (ZCL string char, first byte is length)
uint8_t num_seasons Number of Seasons
uint8_t num_week_profiles Number of Week Profiles
uint8_t num_day_profiles Number of Day Profiles
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD (in One-Way Mirror).

ZbZclCalServerPublishDayProfileT

Publish Day Profile command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_event_id Issuer Event ID
uint32_t issuer_calendar_id Issuer Calendar ID
uint8_t day_id Day ID
uint8_t total_entries Total Number of Schedule Entries
uint8_t command_index Command Index
uint8_t num_commands Total Number of Commands
enum ZbZclCalTypeT calendar_type Calendar Type
struct ZbZclCalendarDayScheduleT

entry_list

Day Schedule Entries
uint8_t num_entries Number of Day Schedule Entries - maximum is 12, since ZCL_PAYLOAD_UNFRAG_SAFE_SIZE = 54
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD (in One-Way Mirror).

ZbZclCalServerPublishWeekProfileT

Publish Week Profile command structure

Parameters

uint32_t provider_id Provider Id
uint32_t issuer_event_id Issuer Event ID
uint32_t issuer_calendar_id Issuer Calendar ID
uint8_t week_id Week ID
uint8_t day_id_ref_mon Day ID Ref Monday
uint8_t day_id_ref_tue Day ID Ref Tuesday
uint8_t day_id_ref_wed Day ID Ref Wednesday
uint8_t day_id_ref_thu Day ID Ref Thursday
uint8_t day_id_ref_fri Day ID Ref Friday
uint8_t day_id_ref_sat Day ID Ref Saturday
uint8_t day_id_ref_sun Day ID Ref Sunday
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD (in One-Way Mirror).

ZbZclCalendarDayScheduleT

Day Schedule Entries structure

Parameters

uint16_t start_time Start Time
uint8_t value_u8 Price Tier - if calendar type is 0x00 – 0x02. Friendly Credit Enable - if calendar type is 0x03. Auxiliary Load Switch State - if calendar type is 0x04.

ZbZclCalendarSeasonT

Season Entry structure

Parameters

uint32_t start_date

ZbZclCalendarSpecialDayT

Season Entry structure

Parameters

uint32_t specialDayDate

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Report Event Configuration command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Request New Password command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
device_mgmt_server Pointer to Device Mgmt Server cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.

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

cluster Cluster instance from which to send this command
dataIndPtr Data Indication structure containing the command payload to be parsed
info Report Event Configuration command structure

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

buf Buffer containing response information
len Length of response information in bytes
rsp Request New Password Response command structure

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

buf Buffer containing response information
len Length of response information in bytes
rsp Update CIN command structure

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

buf Buffer containing response information
len Length of response information in bytes
rsp Update Site ID command structure

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Get Event Configuration command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Supplier command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Supplier command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Tenancy command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Publish Change of Tenancy command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Request New Password Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Request New Password Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Event Configuration command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update CIN command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update CIN command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update SiteID command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Update SiteID command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclDeviceMgmtCliAttrT

Device Management Client Attribute IDs

ZCL_DEVICE_MGMT_CLI_ATTR_ProviderID Provider ID
ZCL_DEVICE_MGMT_CLI_ATTR_ReceivedProviderID ReceivedProvider ID
ZCL_DEVICE_MGMT_CLI_ATTR_PRICE_START Price Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_TOUTariffActivation TOUTariffActivation
ZCL_DEVICE_MGMT_CLI_ATTR_BlockTariffactivated BlockTariffactivated
ZCL_DEVICE_MGMT_CLI_ATTR_BlockTOUTariffActivated BlockTOUTariffActivated
ZCL_DEVICE_MGMT_CLI_ATTR_SingleTariffRateActivated SingleTariffRateActivated
ZCL_DEVICE_MGMT_CLI_ATTR_AsychronousBillingOccurred AsychronousBillingOccurred
ZCL_DEVICE_MGMT_CLI_ATTR_SynchronousBillingOccurred SynchronousBillingOccurred
ZCL_DEVICE_MGMT_CLI_ATTR_TariffNotSupported Tariff NotSupported
ZCL_DEVICE_MGMT_CLI_ATTR_PriceClusterNotFound PriceClusterNotFound
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceReceived PublishPriceReceived
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceActioned PublishPriceActioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceCancelled PublishPriceCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceRejected PublishPriceRejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformation PublishTariffInformation Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationActio ned PublishTariffInformation Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationCanc elled PublishTariffInformation Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishTariffInformationReje cted PublishTariffInformation Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixReceived PublishPriceMatrixReceived
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixActioned PublishPriceMatrixActioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixCancelled PublishPriceMatrixCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishPriceMatrixRejected PublishPriceMatrixRejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsRece ived PublishBlockThresholdsReceived
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsActio ned PublishBlockThresholdsActioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsCanc elled PublishBlockThresholdsCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishBlockThresholdsReje cted PublishBlockThresholdsRejected
ZCL_DEVICE_MGMT_CLI_ATTR_PRICE_GROUP_ID Price cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_METERING_START Metering Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_CheckMeter Check Meter
ZCL_DEVICE_MGMT_CLI_ATTR_LowBattery Low Battery
ZCL_DEVICE_MGMT_CLI_ATTR_TamperDetect Tamper Detect
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyStatus Supply Status
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyQuality Supply Quality
ZCL_DEVICE_MGMT_CLI_ATTR_LeakDetect Leak Detect
ZCL_DEVICE_MGMT_CLI_ATTR_BatteryFailure BatteryFailure
ZCL_DEVICE_MGMT_CLI_ATTR_LowVoltageL1 LowVoltageL1
ZCL_DEVICE_MGMT_CLI_ATTR_HighVoltageL1 HighVoltageL1
ZCL_DEVICE_MGMT_CLI_ATTR_UnderVoltage UnderVoltage
ZCL_DEVICE_MGMT_CLI_ATTR_OverVoltage OverVoltage
ZCL_DEVICE_MGMT_CLI_ATTR_PressureTooLow PressureTooLow
ZCL_DEVICE_MGMT_CLI_ATTR_PressureTooHigh PressureTooHigh
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandReceive d Get Profile Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandActioned Get Profile Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandCancelle d Get Profile Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_GetProfileCommandRejected Get Profile Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandReceived RequestMirrorResponse Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandActioned RequestMirrorResponse Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandCancelled RequestMirrorResponse Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_RequestMirrorResponseCom mandRejected RequestMirrorResponse Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandR eceived MirrorRemoved Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandA ctioned MirrorRemoved Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandC ancelled MirrorRemoved Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_MirrorRemoved0CommandR ejected MirrorRemoved Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandR eceived GetSampledData Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandA ctioned GetSampledData Command Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandC ancelled GetSampledData Command Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_GetSampledDataCommandR ejected GetSampledData Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyON Supply ON
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyARMED Supply ARMED
ZCL_DEVICE_MGMT_CLI_ATTR_SupplyOFF Supply OFF
ZCL_DEVICE_MGMT_CLI_ATTR_METERING_GROUP_ID Metering cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_MESSAGING_START Messaging Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_MessageConfirmationSent Message Confirmation Sent
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageReceived DisplayMessageReceived
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageActioned DisplayMessageActioned
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageCancelled DisplayMessageCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_DisplayMessageRejected DisplayMessageRejected
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageReceived CancelMessageReceived
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageActioned CancelMessageActioned
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageCancelled CancelMessageCancelled
ZCL_DEVICE_MGMT_CLI_ATTR_CancelMessageRejected CancelMessageRejected
ZCL_DEVICE_MGMT_CLI_ATTR_MESSAGING_GROUP_ID Messaging cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_PREPAYMENT_START Prepayment Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_LowCredit Low Credit
ZCL_DEVICE_MGMT_CLI_ATTR_NoCredit No Credit (Zero Credit)
ZCL_DEVICE_MGMT_CLI_ATTR_CreditExhausted Credit Exhausted
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditEnabled Emergency Credit Enabled
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditExhausted Emergency Credit Exhausted
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustment Credit Adjustment
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustFail Credit Adjust Fail
ZCL_DEVICE_MGMT_CLI_ATTR_PrepayClusterNotFound Prepay Cluster Not Found
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editReceived SelectAvailableEmergencyCredit Received
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editActioned SelectAvailableEmergencyCredit Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editCancelled SelectAvailableEmergencyCredit Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SelectAvailableEmergencyCr editRejected SelectAvailableEmergencyCredit Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupRecei ved Emergency Credit Setup Received
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupActio ned Emergency Credit Setup Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupCanc elled Emergency Credit Setup Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_EmergencyCreditSetupRejec ted Emergency Credit Setup Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentReceived Credit Adjustment Received
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentActioned Credit Adjustment Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentCancelled Credit Adjustment Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_CreditAdjustmentRejected Credit Adjustment Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelR eceived Set Low Credit Warning Level Received
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelA ctioned Set Low Credit Warning Level Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelC ancelled Set Low Credit Warning Level Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SetLowCreditWarningLevelR ejected Set Low Credit Warning Level Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitRece ived SetMaximumCreditLimit Received
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitActio ned SetMaximumCreditLimit Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitCanc elled SetMaximumCreditLimit Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SetMaximumCreditLimitReje cted SetMaximumCreditLimit Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PREPAYMENT_GROUP_ID Prepayment cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_CALENDAR_START Calendar Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_CalendarClusterNotFound Calendar Cluster Not Found
ZCL_DEVICE_MGMT_CLI_ATTR_CalendarChangePassiveActi vated Calendar Change Passive Activated
ZCL_DEVICE_MGMT_CLI_ATTR_CalendarChangePassiveUpd ated Calendar Change Passive Updated
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarReceived PublishCalendar Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarActioned PublishCalendar Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarCancelled PublishCalendar Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCalendarRejected PublishCalendar Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileReceived Publish Day Profile Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileActioned Publish Day Profile Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileCancelled Publish Day Profile Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishDayProfileRejected Publish Day Profile Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileReceived Publish Week Profile Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileActioned Publish Week Profile Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileCancelled Publish Week Profile Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishWeekProfileRejected Publish Week Profile Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsReceived Publish Seasons Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsActioned Publish Seasons Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsCancelled Publish Seasons Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSeasonsRejected Publish Seasons Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysReceived Publish Special Days Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysActioned Publish Special Days Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysCancelle d Publish Special Days Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishSpecialDaysRejected Publish Special Days Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_CALENDAR_GROUP_ID Calendar cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_DEVICE_MGMT_START Device Management Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_Password1Change Password1Change
ZCL_DEVICE_MGMT_CLI_ATTR_EventLogCleared EventLogCleared
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTReceived Publish CoT Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTActioned Publish CoT Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTCancelled Publish CoT Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoTRejected Publish CoT Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSReceived Publish CoS Received
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSActioned Publish CoS Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSCancelled Publish CoS Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_PublishCoSRejected Publish CoS Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordReceived Change Password Received
ZCL_DEVICE_MGMT_CLI_ATTR_ChangepasswordActioned Change password Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordCancelled Change Password Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_ChangePasswordRejected Change Password Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationRecei ved SetEventConfiguration Received
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationAction ed SetEventConfiguration Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationCance lled SetEventConfiguration Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_SetEventConfigurationReject ed SetEventConfiguration Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDReceived UpdateSiteID Received
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDActioned UpdateSiteID Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDCancelled UpdateSiteID Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateSiteIDRejected UpdateSiteID Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINReceived UpdateCIN Received
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINActioned UpdateCIN Actioned
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINCancelled UpdateCIN Cancelled
ZCL_DEVICE_MGMT_CLI_ATTR_UpdateCINRejected UpdateCIN Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_DEVICE_MGMT_GROUP_ID Device Management cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_TUNNEL_START Tunnel Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_TunnelingClusterNotFound Tunneling Cluster Not Found
ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandRe ceived RequestTunnel Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandRej ected RequestTunnel Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_RequestTunnelCommandGe nerated RequestTunnel Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandRecei ved CloseTunnel Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandRejec ted CloseTunnel Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_CloseTunnelCommandGener ated CloseTunnel Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandRecei ved TransferData Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandRejec ted TransferData Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataCommandGene rated TransferData Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommand Received TransferDataError Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommand Rejected TransferDataError Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_TransferDataErrorCommand Generated TransferDataError Command Generated
ZCL_DEVICE_MGMT_CLI_ATTR_TUNNEL_GROUP_ID Tunnel cluster Group ID (Last Id)
ZCL_DEVICE_MGMT_CLI_ATTR_OTA_START OTA Event Configuration Attribute Set (First Id)
ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareReadyForActivation FirmwareReadyForActivation
ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareActivated FirmwareActivated
ZCL_DEVICE_MGMT_CLI_ATTR_FirmwareActivationFailure Firmware Activation Failure
ZCL_DEVICE_MGMT_CLI_ATTR_PatchReadyForActivation Patch Ready For Activation
ZCL_DEVICE_MGMT_CLI_ATTR_PatchActivated Patch Activated
ZCL_DEVICE_MGMT_CLI_ATTR_PatchFailure Patch Failure
ZCL_DEVICE_MGMT_CLI_ATTR_ImageNotifyCommandReceiv ed Image Notify Command Received
ZCL_DEVICE_MGMT_CLI_ATTR_ImageNotifyCommandReject ed Image Notify Command Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageRequestGe nerated Query Next Image Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageResponseR eceived Query Next Image Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_QueryNextImageResponseR ejected Query Next Image Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockRequestGenerat ed Image Block Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_ImagePageRequestGenerate d Image Page Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockResponseReceiv ed Image Block Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_ImageBlockResponseReject ed Image Block Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndRequestGenerat ed Upgrade End Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndResponseRecei ved Upgrade End Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_UpgradeEndResponseReject ed Upgrade End Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileRequestGe nerated Query Specific File Request Generated
ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileResponse Received Query Specific File Response Received
ZCL_DEVICE_MGMT_CLI_ATTR_QuerySpecificFileResponse Rejected Query Specific File Response Rejected
ZCL_DEVICE_MGMT_CLI_ATTR_OTA_GROUP_ID OTA cluster Group ID (Last Id)

ZbZclDeviceMgmtSvrAttrT

Device Management Server Attribute IDs

ZCL_DEVICE_MGMT_SVR_ATTR_ProviderID ProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProviderName ProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProviderContactDetails ProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderID ProposedProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderName ProposedProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderChangeD ate ProposedProviderChangeDate/Time (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderChangeC ontrol ProposedProviderChangeControl (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedProviderContactD etails ProposedProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProviderID ReceivedProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProviderName ReceivedProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProviderContactD etails ReceivedProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProviderI D ReceivedProposedProviderID (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider Name ReceivedProposedProviderName (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider ChangeDate ReceivedProposedProviderChangeDate/Time (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider ChangeControl ReceivedProposedProviderChangeControl (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ReceivedProposedProvider ContactDetails ReceivedProposedProviderContactDetails (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ChangeofTenancyUpdateD ate ChangeofTenancyUpdateDate/Time (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_ProposedTenancyChangeC ontrol ProposedTenancyChangeControl (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_WANStatus WAN Status (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_LowMediumThreshold LowMediumThreshold (Optional)
ZCL_DEVICE_MGMT_SVR_ATTR_MediumHighThreshold MediumHighThreshold (Optional)

Structures

ZbZclDeviceMgmtClientCallbacksT

Device Management Client callbacks configuration

Parameters

publish_change_tenancy

(callback function pointer)

enum ZclStatusCodeT (*publish_change_tenancy)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtPublishChangeTenancyT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Publish Change Tenancy' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

publish_change_supplier

(callback function pointer)

enum ZclStatusCodeT (*publish_change_supplier)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtPublishChangeSupplierT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Publish Change Supplier' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

req_new_pass_rsp_unsolic

(callback function pointer)

enum ZclStatusCodeT (*req_new_pass_rsp_unsolic)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtReqNewPassRspT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of an unsolicited 'Request New Password Response' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

update_site_id

(callback function pointer)

enum ZclStatusCodeT (*update_site_id)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtUpdateSiteIdT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Update SiteID' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

set_event_config

(callback function pointer)

enum ZclStatusCodeT (*set_event_config)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtSetEventConfigT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Set Event Configuration' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

get_event_config

(callback function pointer)

enum ZclStatusCodeT (*get_event_config)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtGetEventConfigT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Get Event Configuration' command. The return code (e.g. ZCL_STATUS_SUCCESS) is included in the standard Default Response.

update_cin

(callback function pointer)

enum ZclStatusCodeT (*update_cin)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtUpdateCinT *info, struct ZbZclAddrInfoT *srcInfo)

ZbZclDeviceMgmtEventConfigPayloadT

Event Configuration Payload structure

Parameters

uint16_t event_id Event ID
uint8_t event_config Event Configuration

ZbZclDeviceMgmtGetEventConfigT

Get Event Configuration command structure

Parameters

uint16_t event_id Event ID
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclDeviceMgmtPublishChangeSupplierT

Publish Change of Supplier command structure

Parameters

uint32_t curr_provider_id Current Provider ID
uint32_t issuer_event_id Issuer Event ID
uint8_t tariff_type Tariff Type
uint32_t proposed_provider_id Proposed Provider ID
uint32_t provider_change_impl_time Provider Change Implementation Time
uint32_t provider_change_ctrl Provider Change Control
uint8_t proposed_provider_name Proposed Provider Name
uint8_t proposed_provider_contact Proposed Provider Contact Details

ZbZclDeviceMgmtPublishChangeTenancyT

Publish Change of Tenancy command structure

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_id Issuer Event ID
uint8_t tariff_type Tariff Type
uint32_t implement_time Implementation Date/Time
uint32_t prop_tenancy_change_ctrl Proposed Tenancy Change Control

ZbZclDeviceMgmtReportEvtConfigT

Report Event Configuration command structure

Parameters

uint8_t command_index Command Index
uint8_t total_commands Total Commands
struct ZbZclDeviceMgmtEventConfigPayloadT event_config_payload Event Configuration Payload
uint8_t num_entries Number of Payload Entries

ZbZclDeviceMgmtReqNewPassRspT

Request New Password Response command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Date/Time
uint16_t duration Duration
uint8_t password_type Password Type
uint8_t password Password

ZbZclDeviceMgmtReqNewPassT

Request New Password command structure

Parameters

uint8_t password_type Password Type

ZbZclDeviceMgmtServerCallbacksT

Device Management Server callbacks configuration

Parameters

get_change_tenancy

(callback function pointer)

enum ZclStatusCodeT (*get_change_tenancy)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Get Change of Tenancy' command. The ESI may send a PublishChangeofTenancy command (ZbZclDeviceMgmtServerPublishChangeTenancy). Return ZCL_STATUS_SUCCESS if PublishChangeofTenancy was sent, or ZCL_STATUS_NOT_FOUND otherwise.

get_change_supplier

(callback function pointer)

enum ZclStatusCodeT (*get_change_supplier)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Get Change of Supplier' command. The ESI may send a PublishChangeofSupplier command (ZbZclDeviceMgmtServerPublishChangeSupplier). Return ZCL_STATUS_SUCCESS if PublishChangeofSupplier was sent, or ZCL_STATUS_NOT_FOUND otherwise.

request_new_pass

(callback function pointer)

enum ZclStatusCodeT (*request_new_pass)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclDeviceMgmtReqNewPassT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'Request New Password' command. The ESI may send a RequestNewPasswordResponse command (ZbZclDeviceMgmtServerReqNewPassRsp). Return ZCL_STATUS_SUCCESS if RequestNewPasswordResponse was sent, or ZCL_STATUS_NOT_FOUND otherwise.

get_site_id

(callback function pointer)

enum ZclStatusCodeT (*get_site_id)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'GetSiteID' command. The ESI may send a UpdateSiteID command (ZbZclDeviceMgmtServerUpdateSiteId). Return ZCL_STATUS_SUCCESS if UpdateSiteID was sent, or ZCL_STATUS_NOT_FOUND otherwise.

get_cin

(callback function pointer)

enum ZclStatusCodeT (*get_cin)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of 'GetCIN' command. The ESI may send a UpdateCIN command (ZbZclDeviceMgmtServerUpdateCin). Return ZCL_STATUS_SUCCESS if UpdateCIN was sent, or ZCL_STATUS_NOT_FOUND otherwise.

ZbZclDeviceMgmtSetEventConfigT

Set Event command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Date/Time
uint8_t event_config Event Configuration
enum ZbZclDeviceMgmtEventConfigCtrl

config_ctrl

Configuration Control
union { struct { uint8_t num_events Number of Events
uint16_t event_id_list Event IDs
struct { uint16_t group_id Event Group ID
struct { uint8_t log_id Log ID
struct { uint8_t config_match Configuration Value Match
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclDeviceMgmtUpdateCinT

Update CIN Configuration command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t cin_implement_time CIN Implementation Time
uint32_t provider_id Provider ID
uint8_t customer_id CustomerID Number

ZbZclDeviceMgmtUpdateSiteIdT

Update SiteID command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t site_id_time SiteID Time
uint32_t provider_id Provider ID
uint8_t site_id Site ID

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
time_server Time server cluster instance used to retrieve timing information of events
callbacks Structure containing any callback function pointers for this cluster
cb_arg Pointer to application data that will included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Scheduled Events command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
statusPtr Report Event Status command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclDrlcClientGetEventList

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

Send a Get Event List command

Parameters

cluster Cluster instance from which to send this command
eventList Holds a pointer to the event list if successful
maxEntries Max event list entries

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

cluster Cluster instance from which to send this command
eventList Holds a pointer to the opt-outs list if successful

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

cluster Cluster instance from which to send this command
eventList Holds a pointer to the opt-outs list if successful

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

cluster Cluster instance from which to send this command
eventList Holds a pointer to the opt-outs list if successful

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster Cluster instance from which to send this command
ctrl Cancel control bitmap, used to determine method of cancellation - e.g. ZCL_DRLC_CANCEL_CONTROL_GRACEFUL
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
eventPtr Cancel Load Control Event command request structure
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
eventPtr Load Control Event command request structure
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclDrlcCliAttrT

DRLC Client Attribute IDs

ZCL_DRLC_CLI_ATTR_UTILITY_ENROL_GRP UtilityEnrollmentGroup
ZCL_DRLC_CLI_ATTR_START_RAND_MINS StartRandomizationMinutes
ZCL_DRLC_CLI_ATTR_DURATION_RAND_MINS DurationRandomizationMinutes
ZCL_DRLC_CLI_ATTR_DEVICE_CLASS DeviceClassValue

Structures

ZbZclDrlcCancelT

Cancel Load Control Event command structure

Parameters

uint32_t issuer_id Issuer Event ID
uint16_t device_class Device Class
uint8_t util_enrol_group Utility Enrollment Group
uint8_t cancel_control Cancel Control - e.g. ZCL_DRLC_CANCEL_CONTROL_GRACEFUL

ZbZclDrlcClientCallbacksT

DRLC Client callbacks configuration

Parameters

start

(callback function pointer)

bool (*start)(void *arg, struct ZbZclDrlcEventT *event)

Callback to application, invoked on the start of an event

stop

(callback function pointer)

void (*stop)(void *arg, struct ZbZclDrlcEventT *event)

Callback to application, invoked on the end of an event

ZbZclDrlcEventT

Load Control Event command structure

Parameters

uint32_t issuer_id Issuer Event ID
uint16_t device_class Device Class
uint8_t util_enrol_group Utility Entrollment Group
uint32_t start_time Start Time - UTC, or 0 = now
uint16_t duration Duration in Minutes
enum ZbZclDrlcCriticalityLevelT criticality Criticality Level
uint8_t cool_offset Cooling Temperature Offset (Optional)
uint8_t heat_offset Heating Temperature Offset (Optional)
int16_t cool_setpoint Cooling Temperature Set Point (Optional)
int16_t heat_setpoint Heating Temperature Set Point (Optional)
int8_t avg_load_adj Average Load Adjustment Percentage (Optional)
uint8_t dutycycle Duty Cycle (Optional)
uint8_t event_control Event Control - e.g. ZCL_DRLC_EVENT_CTRL_RAND_START

ZbZclDrlcGetEventsReqT

Get Scheduled Events command structure

Parameters

uint32_t earliest_end_time Earliest End Time
uint8_t num_events Number of Events
uint32_t issuer_id Issuer Event ID

ZbZclDrlcServerCallbacksT

DRLC Server callbacks configuration

Parameters

report_status

(callback function pointer)

void (*report_status)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, struct ZbZclDrlcStatusT *status, void *arg)

Callback to application, invoked on receipt of Report Event Status command

get_events

(callback function pointer)

enum ZclStatusCodeT (*get_events)(struct ZbZclClusterT *cluster, struct ZbZclAddrInfoT *srcInfo, struct ZbZclDrlcGetEventsReqT *req, void *arg)

Callback to application, invoked on receipt of Get Scheduled Events command. The get_events callback handler in the application should return ZCL_STATUS_SUCCESS, or ZCL_STATUS_NOT_FOUND if no events are found.Events are re-issued by calling ZbZclDrlcServerCommandEventReq()

ZbZclDrlcStatusT

Report Event Status command structure

Parameters

uint32_t issuer_id Issuer Event ID
enum ZbZclDrlcEventStatusT status Event Status
uint32_t status_time Event Status Time
enum ZbZclDrlcCriticalityLevelT

crit_level_applied

Criticality Level Applied
uint16_t cool_setpoint_applied Cooling Temperature Set Point Applied (Optional). Set to ZCL_DRLC_COOL_SETPOINT_IGNORED if not used
uint16_t heat_setpoint_applied Heating Temperature Set Point Applied (Optional). Set to ZCL_DRLC_HEAT_SETPOINT_IGNORED if not used
int8_t avg_load_adj_applied Average Load Adjustment Percentage Applied (Optional). Set to ZCL_DRLC_AVG_LOAD_ADJ_IGNORED if not used
uint8_t dutycycle_applied Duty Cycle Applied (Optional). Set to ZCL_DRLC_DUTYCYCLE_IGNORED if not used
uint8_t event_control Event Control
enum ZbZclDrlcSignatureT sig_type Signature Type
uint8_t sig_data Signature (Optional)

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Manage Event command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster
dst
info
callback
arg

Return

  • Undocumented

Enumerations

ZbZclEnergyMgmtSvrAttrT

Energy Management Server Attribute IDs

ZCL_ENERGY_MGMT_SVR_ATTR_LOAD_CONTROL_STATE LoadControlState
ZCL_ENERGY_MGMT_SVR_ATTR_CURR_EVENT_ID CurrentEventID
ZCL_ENERGY_MGMT_SVR_ATTR_CURR_EVENT_STATUS CurrentEventStatus
ZCL_ENERGY_MGMT_SVR_ATTR_CONFORMANCE_LEVEL ConformanceLevel
ZCL_ENERGY_MGMT_SVR_ATTR_MIN_OFF_TIME MinimumOffTime
ZCL_ENERGY_MGMT_SVR_ATTR_MIN_ON_TIME MinimumOnTime
ZCL_ENERGY_MGMT_SVR_ATTR_MIN_CYCLE_PERIOD MinimumCyclePeriod

Structures

ZbZclEnergyMgmtManageEventT

Manage Event (ZCL_ENERGY_MGMT_CLI_CMD_MANAGE_EVENT) command structure

Parameters

uint32_t issuer_id Issuer Event ID
uint16_t device_class Device Class
uint8_t utility_enrol_group Utility Enrollment Group
uint8_t actions_required Action(s) Required

ZbZclEnergyMgmtServerCallbacksT

Energy Management Server callbacks configuration

Parameters

manage_event

(callback function pointer)

enum ZclStatusCodeT (*manage_event)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEnergyMgmtManageEventT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Manage Event command

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster Cluster instance from which to send this command
dst Destination address for command
cmd_req Clear Event Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for command
cmd_req Get Event Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
events_client Pointer to Events Client cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclEventsServerClearEventLogRsp

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

Send a Clear Event Log Response command

Parameters

cluster Cluster instance from which to send this command
dst Destination address for command
rsp Clear Event Log Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for command
event Publish Event command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclEventsClientCallbacksT

Events Client callbacks configuration

Parameters

publish_event

(callback function pointer)

enum ZclStatusCodeT (*publish_event)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsServerPublishEventT *event, const struct ZbApsAddrT *src)

Callback to application, invoked on receipt of Publish Event command.

publish_event_log

(callback function pointer)

enum ZclStatusCodeT (*publish_event_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsServerPublishEventLogT *event_log, const struct ZbApsAddrT *src)

Callback to application, invoked on receipt of Publish Event Log command.

ZbZclEventsClientClearEventLogT

Clear Event Log command structure

Parameters

uint8_t log_id Log ID
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD.

ZbZclEventsClientGetEventLogT

Get Event Log command structure

Parameters

uint8_t event_ctrl_log_id Event Control/Log ID. Event Control is high nibble. Log ID is low nibble.
uint16_t event_id Event ID
uint32_t start_time Start Time - UTC Time
uint32_t end_time End Time - UTC Time
uint8_t number_of_events Number of Events
uint16_t event_offset Event Offset
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD.

ZbZclEventsServerCallbacksT

Events Server callbacks configuration

Parameters

get_event_log

(callback function pointer)

enum ZclStatusCodeT (*get_event_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsClientGetEventLogT *get_log, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Event Log command. Application should call ZbZclEventsServerPublishEventLogRsp for any matching event log, or return ZCL_STATUS_NOT_FOUND otherwise to return a Default Response.

clear_event_log

(callback function pointer)

enum ZclStatusCodeT (*clear_event_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclEventsClientClearEventLogT *clear_log, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Clear Event Log Request command. Application calls ZbZclEventsServerClearEventLogRsp to send the response. Application should always return ZCL_STATUS_SUCCESS.

ZbZclEventsServerClearEventLogResponseT

Clear Event Log Response command structure

Parameters

uint8_t cleared_events_logs ClearedEventsLogs

ZbZclEventsServerEventLogPayloadT

Publish Event Log Payload structure

Parameters

uint8_t num_events Number of Events
uint8_t control Log Payload Control
struct ZbZclEventsServerPublishEventT

event_list

Publish Event Response Payload

ZbZclEventsServerPublishEventLogT

Publish Event Log command structure

Parameters

uint16_t total_matching_events Total Number of Matching Events
uint8_t command_index Command Index
uint8_t total_commands Total Commands
struct ZbZclEventsServerEventLogPayloadT log_payload Log Payload

ZbZclEventsServerPublishEventT

Publish Event command structure

Parameters

uint8_t log_id Log ID
uint16_t event_id Event ID
uint32_t event_time Event Time - UTC time
uint8_t event_control Event Control
uint8_t *event_data Event Data - max length = ZCL_EVENTS_SVR_EVENT_DATA_MAX_LEN
uint8_t event_data_len Event Data length

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

msg Structure to parse message into
payload ZCL payload of ZCL_MESSAGE_SVR_CMD_DISPLAY_MESSAGE packet
len Length of payload

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster Cluster instance from which to send this command
dst Destination address for request
msg_conf_enh Enhanced Message Confirmation command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
msg_conf Message Confirmation command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
earliestTime UTC Timestamp indicating the earliest implementation time of a Cancel All Messages command to be returned
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
msg_server Pointer to Messaging Server cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.
meter_client Pointer to Metering Client cluster. This is used to know the existing notification scheme setup between BOMD & ESI and to determine if the command needs to be queued or only the notification flag needs to be set.

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclMsgServerCancelAllRsp

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

Send a Cancel All Messages command as a response

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for response
cancel_all Cancel All Messages command structure

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

cluster Cluster instance from which to send this command
dst Destination address for request
cancel_all Cancel All Messages command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cancel Cancel Message command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

ZbZclMsgServerDisplayMessageRsp

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

Send a Display or Display Protected Message as response

Parameters

cluster Cluster instance from which to send this command
dstInfo Destination address for command, including sequence number and tx options
msg Display Message command structure

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

cluster Cluster instance from which to send this command
dst Destination address for request
msg Display Message command request structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclMsgClientCallbacksT

Messaging Client callbacks configuration

Parameters

display_message

(callback function pointer)

enum ZclStatusCodeT (*display_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageT *msg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Display Message command

cancel_message

(callback function pointer)

enum ZclStatusCodeT (*cancel_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageCancelT *cancel, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Cancel Message command

cancel_all_messages

(callback function pointer)

enum ZclStatusCodeT (*cancel_all_messages)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageCancelAllT *cancel_all, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Cancel All Messages command

display_protected_message

(callback function pointer)

enum ZclStatusCodeT (*display_protected_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageT *msg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Display Protected Message command

ZbZclMsgConfirmEnhT

Enhanced Message Confirmation command structure

Parameters

uint32_t message_id Message ID
uint32_t confirm_time Confirmation Time
uint8_t confirm_control Message Confirmation Control
char confirm_response Message Confirmation Response

ZbZclMsgConfirmT

Message Confirmation command structure

Parameters

uint32_t message_id Message ID
uint32_t confirm_time Confirmation Time

ZbZclMsgGetMsgCancellationT

Get Messsage Cancellation command structure

Parameters

uint32_t earliest_impl_time Earliest Implementation Time

ZbZclMsgMessageCancelAllT

Cancel All Messages command structure

Parameters

uint32_t implementation_time Implementation Date/Time
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclMsgMessageCancelT

Cancel Message command structure

Parameters

uint32_t message_id Message ID
uint8_t control Message Control
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclMsgMessageConfT

Message Confirmation callback structure

Parameters

uint32_t message_id Message ID
uint32_t confirm_time Confirmation Time
bool has_confirm_control Has Message Confirmation Control
uint8_t confirm_control Message Confirmation Control
bool has_confirm_response Has Message Confirmation Response
uint8_t confirm_response Message Confirmation Response

ZbZclMsgMessageT

Display Message/Display Protected Message command structure

Parameters

uint32_t message_id Message ID
uint32_t start_time Start Time - UTC Seconds
uint16_t duration Duration In Minutes
uint8_t message_control Message Control
uint8_t message_len Message Length
uint8_t *message_str Message - UTF-8
uint8_t extended_control Extended Message Control
bool protected_msg If true, indicates display message is protected.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclMsgServerCallbacksT

Messaging Server callbacks configuration

Parameters

get_last_message

(callback function pointer)

enum ZclStatusCodeT (*get_last_message)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Last Message command

message_confirmation

(callback function pointer)

enum ZclStatusCodeT (*message_confirmation)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgMessageConfT *conf, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Message Confirmation command

get_message_cancellation

(callback function pointer)

enum ZclStatusCodeT (*get_message_cancellation)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclMsgGetMsgCancellationT *req, struct ZbZclAddrInfoT *source)

Callback to application, invoked on receipt of Get Message Cancellation command

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster EXEGIN
mirror_server Pointer to the Mirror Server cluster.
rmt_addr EUI64 address of the remote Meter Server.
rmt_endpoint Endpoint on the remote Meter Server.

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

cluster Metering client cluster instance.
attr_id Notification flag attribute id.
notif_flag Notification flag(s) to be cleared.

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Change Supply payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Request Fast Poll Mode command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Profile command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Sampled Data command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Snapshot command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Profile command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Reset Load Limit Counter command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Schedule Snapshot Request command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Set Supply Status command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Set Uncontrolled Flow Threshold command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Start Sampling command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Take Snapshot command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Metering client cluster instance.
attr_id Notification flag attribute id.
notif_flag Notification(s) flag to be set.

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

sample_data Converted data for Zigbee frame
max_len Maximum length
samples Array of 24-bit integers to convert
num_samples Number of integers to convert

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

profile_interval_id Zigbee stack instance

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

zb
client Meter Client being used to manage this Mirror Server
endpoint
meter_extaddr The EUI64 of the remote Meter Server
meter_endpoint The endpoint on the remote Meter Server

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

meter_mirror Metering Mirror cluster
client Client cluster originating this request
req ZCL Read Request struct
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

meter_mirror Metering Mirror cluster
client Client cluster originating this request
req ZCL Write Request struct
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callbacks when invoked.

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
rsp Publish Snapshot Response command structure

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

cluster Cluster instance from which to send this command
dst Destination of command.
req Publish Snapshot command structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
req ConfigureMirror parameters
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
req Configure Notification Flags payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
req Configure Notification Scheme payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
rsp Request Fast Poll Mode Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
req Get Notified Message payload information structure.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Profile Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Get Sampled Data Response command structure

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

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination of command. Should be the Coordinator / TC / Comms Hub in this case.
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error. 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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Schedule Snapshot Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Start Sampling Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Supply Status Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
rsp Take Snapshot Response command structure

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Structures

ZbZclMeterClientMirrorReportAttrRspT

MirrorReportAttributeResponse Command

Parameters

enum ZbZclMeterNotifSchemesT

notif_scheme

Notification Scheme
uint8_t num_flags Notification Flags

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Change Debt command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Change Payment Mode command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Consumer Top Up command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Prepayment client cluster instance
endpoint Endpoint on which to create the mirror cluster
meter_mirror_client Metering Mirror Client cluster. This is used to manage the Mirror.
meter_mirror_server Metering Mirror Server cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.
rmt_addr Extended address of the remote Metering device being mirrored.
rmt_endpoint Endpoint on the remote Metering device being mirrored.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Credit Adjustment command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Emergency Credit Setup command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Get Debt Repayment Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Get Prepay Snapshot command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Get TopUp Log command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Select Available Emergency Credit command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Low Credit Warning Level command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Max Credit Limit command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
info Set Overall Debt Cap command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be included in the callback when invoked.

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
time_server Pointer to time server cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance for Prepayment server.
info Attribute information structure.

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Change Payment Mode Response command structure

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

cluster Cluster instance from which to send this command
dst Destination address for response, including sequence number and tx options
info Consumer Top Up Response command structure

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Debt Log command structure

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

cluster Cluster instance from which to send this command
dst Destination address for this unsolicted command.
info Publish Debt Log command structure.
callback Callback function that will be invoked when the Default Response is received, or times-out.
arg Pointer to application data that will be included in the callback when invoked.

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Prepay Snapshot command structure

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Prepay Snapshot command structure

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options

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

cluster Cluster instance from which to send this command
dstInfo Destination address for response, including sequence number and tx options
info Publish Top Up Log command structure

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

cluster Cluster instance for Prepayment server.
flag Alarm status flags e.g, ZCL_PREPAY_ALARM_LOW_CREDIT_WARN
set if true, sets the input flags. Otherwise, clears the flags.

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

cluster Cluster instance for Prepayment server.
flag Credit status flags e.g, ZCL_PREPAY_CREDIT_OK

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

cluster Cluster instance to get the topup record.
payload Pointer to TopUp record payload.
attr_idx Attribute index to the TopUp attribute set

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

cluster Cluster instance from which to send this command
topup_code Pointer to topup_code received as part of comsumer topup command.

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

cluster Cluster instance to check the topup attributes.
origin_device Origin device of the consumer topup command.
topup_code Pointer to topup code received as part of consumer topup command.
topup_value topup amount derived from the topup code.

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

ZCL_PREPAY_SVR_ATTR_PAYMENT_CONTROL_CONFIG Payment Control Configuration
ZCL_PREPAY_SVR_ATTR_CREDIT_REMAINING Credit Remaining (Optional)
ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_REMAINING Emergency Credit Remaining (Optional)
ZCL_PREPAY_SVR_ATTR_CREDIT_STATUS Credit Status (Optional)
ZCL_PREPAY_SVR_ATTR_CREDIT_REMAIN_TIMESTAMP CreditRemaining TimeStamp (Optional)
ZCL_PREPAY_SVR_ATTR_ACCUMULATED_DEBT Accumulated Debt (Optional)
ZCL_PREPAY_SVR_ATTR_OVERALL_DEBT_CAP OverallDebtCap (Optional)
ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_ALLOWANCE EmergencyCredit Limit/Allowance (Optional)
ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_THRESHOLD EmergencyCredit Threshold (Optional)
ZCL_PREPAY_SVR_ATTR_TOTAL_CREDIT_ADDED TotalCreditAdded (Optional)
ZCL_PREPAY_SVR_ATTR_MAX_CRED_LIMIT MaxCreditLimit (Optional)
ZCL_PREPAY_SVR_ATTR_MAX_CRED_PER_TOPUP MaxCreditPerTopUp (Optional)
ZCL_PREPAY_SVR_ATTR_FRIENDLY_CREDIT_WARNING FriendlyCredit Warning (Optional)
ZCL_PREPAY_SVR_ATTR_LOW_CREDIT_WARNING LowCredit Warning (Optional)
ZCL_PREPAY_SVR_ATTR_IHD_LOW_CREDIT_WARNING IHDLow CreditWarning (Optional)
ZCL_PREPAY_SVR_ATTR_INTERRUPT_SUSPEND_TIME InterruptSuspend Time (Optional)
ZCL_PREPAY_SVR_ATTR_REMAINING_FRIENDLY_CREDIT

_TIME

RemainingFriendlyCreditTime (Optional)
ZCL_PREPAY_SVR_ATTR_NEXT_FRIENDLY_CREDIT_TIME NextFriendly CreditPeriod (Optional)
ZCL_PREPAY_SVR_ATTR_CUT_OFF_VALUE CutOffValue (Optional)
ZCL_PREPAY_SVR_ATTR_TOKEN_CARRIER_ID TokenCarrierID (Optional)
ZCL_PREPAY_SVR_ATTR_TOPUP_DATE_TIME_1 Top up Date/Time #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_DATE_TIME_N(1) For the

remaining Top up Date/Time attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_DATE_TIME_N macro.

ZCL_PREPAY_SVR_ATTR_TOPUP_AMOUNT_1 Top up Amount #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_AMOUNT_N(1) For the remaining Top up Amount attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_AMOUNT_N macro.
ZCL_PREPAY_SVR_ATTR_TOPUP_ORIGINATOR Originating Device #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_ORIGINATOR_N(1) For the remaining Orginating Device attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_ORIGINATOR_N macro.
ZCL_PREPAY_SVR_ATTR_TOPUP_CODE Top up Code #1 (Optional) ZCL_PREPAY_SVR_ATTR_TOPUP_CODE_N(1) For the remaining Top up Code attributes, use the ZCL_PREPAY_SVR_ATTR_TOPUP_CODE_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_1 DebtLabel#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_N(1) For the remaining DebtLabel attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_AMOUNT_1 DebtAmount#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_AMOUNT_N(1) For the remaining DebtAmount attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_AMOUNT_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_REC_METHOD_1 DebtRecovery Method#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_METHOD_N(1) For the remaining DebtRecovery Method attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_METHOD_N macro.
ZCL_PREPAY_SVR_ATTR_DEBT_REC_START_TIME_1 DebtRecovery StartTime#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_START_TIME_N(1)

For the remaining DebtRecovery StartTime attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_START_TIME_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_COLLECT_TIME_1 DebtRecovery CollectionTime#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_COLLECT_TIME_N(1)

For the remaining DebtRecovery CollectionTime attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_COLLECT_TIME_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_FREQ_1 DebtRecovery Frequency#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_FREQ_N(1) For the

remaining DebtRecovery Frequency attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_FREQ_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_AMOUNT_1 DebtRecovery Amount#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_AMOUNT_N(1) For

the remaining DebtRecovery Amount attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_AMOUNT_N macro.

ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_1 DebtRecovery TopUpPercentage#1 (Optional) ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_

N(1) For the remaining DebtRecovery TopUpPercentage attributes, use the ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_N

macro.

ZCL_PREPAY_SVR_ATTR_ALARM_STATUS PrepaymentAlarmStatus (Optional)
ZCL_PREPAY_SVR_ATTR_GENERIC_ALARM_MASK PrepayGenericAlarmMask (Optional)
ZCL_PREPAY_SVR_ATTR_SWITCH_ALARM_MASK PrepaySwitchAlarmMask (Optional)
ZCL_PREPAY_SVR_ATTR_EVENT_ALARM_MASK PrepayEventAlarmMask (Optional)
ZCL_PREPAY_SVR_ATTR_HIST_CCTION_FORMAT HistoricalCostConsumption Formatting (Optional)
ZCL_PREPAY_SVR_ATTR_CONSUMPTION_UNIT_OF_MEAS URE ConsumptionUnitofMeasurement (Optional)
ZCL_PREPAY_SVR_ATTR_CURRENCY_SCALING_FACTOR CurrencyScalingFactor (Optional)
ZCL_PREPAY_SVR_ATTR_CURRENCY Currency (Optional)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_0 CurrentDay CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_0 CurrentDay CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_1 PreviousDay CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_1 PreviousDay CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_2 PreviousDay2 CostConsumptionDelivered (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(2) For

the remaining days, use the ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_DAY_N(prev_d

ay) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_2 PreviousDay2 CostConsumptionReceived (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(2)

For the remaining days, use the ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_DAY_N(pr

ev_day) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_0 CurrentWeek CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_0 CurrentWeek CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N( 0)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_1 PreviousWeek CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_1 PreviousWeek CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N( 1)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_2 PreviousWeek2 CostConsumptionDelivered (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(2)

For the remaining weeks, use the ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_WEEK_N(prev

_week) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_2 PreviousWeek2 CostConsumptionReceived (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N(

2) For the remaining weeks, use the ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_WEEK_N(

prev_week) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_0 CurrentMonth CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_0 CurrentMonth CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_ N(0)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_1 PreviousMonth CostConsumptionDelivered (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_1 PreviousMonth CostConsumptionReceived (Optional) - ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_ N(1)
ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_2 PreviousMonth2 CostConsumptionDelivered (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(2)

For the remaining months, use the ZCL_PREPAY_SVR_ATTR_COSTCON_DELIV_MONTH_N(pre

v_month) macro.

ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_2 PreviousMonth2 CostConsumptionReceived (Optional) ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_

N(2) For the remaining months, use the ZCL_PREPAY_SVR_ATTR_COSTCON_RECEIVED_MONTH_

N(prev_month) macro.

ZCL_PREPAY_SVR_ATTR_HIST_FREEZE_TIME Historical Freeze Time (Optional)

ZbZclPrepayCreditTypeT

Credit Type Field enumerations

ZCL_PREPAY_CREDIT_TYPE_INCREMENTAL Credit Incremental
ZCL_PREPAY_CREDIT_TYPE_ABSOLUTE Credit Absolute

ZbZclPrepayDebtRecMethodT

Debt Recovery Method enumerations

ZCL_PREPAY_REC_METHOD_TIME Time Based
ZCL_PREPAY_REC_METHOD_PERCENTAGE Percentage Based
ZCL_PREPAY_REC_METHOD_CATCH_UP Catch-up Based
/**< 0x03 -0xff Reserved

ZbZclPrepayDebtTypeT

Debt Type Field enumerations

ZCL_PREPAY_DEBT_TYPE_1_ABSOLUTE Debt Type 1 Absolute
ZCL_PREPAY_DEBT_TYPE_1_INCREMENTAL Debt Type 1 Incremental
ZCL_PREPAY_DEBT_TYPE_2_ABSOLUTE Debt Type 2 Absolute
ZCL_PREPAY_DEBT_TYPE_2_INCREMENTAL Debt Type 2 Incremental
ZCL_PREPAY_DEBT_TYPE_3_ABSOLUTE Debt Type 3 Absolute
ZCL_PREPAY_DEBT_TYPE_3_INCREMENTAL Debt Type 3 Incremental
/**< 0x06 - 0xff Reserved.

ZbZclPrepayOriginDeviceT

Originating Device Field enumerations

ZCL_PREPAY_ORIGIN_DEVICE_ESI Energy Service Interface
ZCL_PREPAY_ORIGIN_DEVICE_METER Meter
ZCL_PREPAY_ORIGIN_DEVICE_IHD In-Home Display Device

ZbZclPrepaySnapshotPayloadTypeT

Prepayment Snapshot Payload type.

ZCL_PREPAY_SNAPSHOT_PAYLOAD_TYPE_DEBT_STATUS Debt/Credit Status

ZbZclPrepayTopUpResultT

Result Type Field enumerations

ZCL_PREPAY_TOPUP_RSLT_ACCEPTED Accepted
ZCL_PREPAY_TOPUP_RSLT_RJCTD_INVALID Rejected-Invalid Top Up
ZCL_PREPAY_TOPUP_RSLT_RJCTD_DUPLICATE Rejected-Duplicate Top Up
ZCL_PREPAY_TOPUP_RSLT_RJCTD_ERROR Rejected-Error
ZCL_PREPAY_TOPUP_RSLT_RJCTD_MAX_CREDIT Rejected-Max Credit Reached
ZCL_PREPAY_TOPUP_RSLT_RJCTD_KEYPAD_LOCK Rejected-Keypad Lock
ZCL_PREPAY_TOPUP_RSLT_RJCTD_TOO_LARGE Rejected-Top Up Value Too Large
ZCL_PREPAY_TOPUP_RSLT_ACCPD_SUPPLY_ENABLED Accepted – Supply Enabled
ZCL_PREPAY_TOPUP_RSLT_ACCPD_SUPPLY_DISABLED Accepted – Supply Disabled
ZCL_PREPAY_TOPUP_RSLT_ACCPD_SUPPLY_ARMED Accepted – Supply Armed

Structures

ZbZclPrepayChangeDebtReqT

Change Debt command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
char debt_label Debt Label, first byte is length.
int32_t debt_amount Debt Amount
enum ZbZclPrepayDebtRecMethodT

rec_method

Debt Recovery Method.
enum ZbZclPrepayDebtTypeT debt_type Debt Amount Type.
uint32_t rec_start_time Debt Recovery Start Time.
uint16_t rec_collect_time Debt Recovery Collection Time.
uint8_t rec_freq Debt Recovery Frequency.
int32_t rec_amount Debt Recovery Amount.
uint16_t rec_bal_percent Debt Recovery Balance Percentage.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayChangePaymentModeReqT

Change Payment Mode command structure (ZCL_PREPAY_CLI_CMD_CHANGE_PAYMENT_MODE)

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Date/Time
uint16_t ctrl_config Proposed Payment Control Configuration
int32_t cutoff_value Cut Off Value
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayChangePaymentModeRspT

Consumer Change Supply Mode Response command structure

Parameters

uint8_t friendly_credit Friendly Credit Bitmap
uint32_t friendly_calendar_id Friendly Credit Calendar Id
uint32_t emerg_credit_limit Emergency Credit Limit
uint32_t emerg_credit_thresh Emergency Credit Threshold

ZbZclPrepayConsumerTopUpReqT

Consumer Top Up command structure

Parameters

enum ZbZclPrepayOriginDeviceT

origin_device

Originating Device
uint8_t topup_code TopUp Code (ZCL octet string, first byte is length)
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayConsumerTopUpRspT

Consumer Top Up Response command structure

Parameters

enum ZbZclPrepayTopUpResultT result Result Type Field enumeration
int32_t value Top Up Value
enum ZbZclPrepayOriginDeviceT source Originating Device Field enumeration
int32_t credit_remain Credit Remaining

ZbZclPrepayCreditAdjustReqT

Credit Adjustment command structure (ZCL_PREPAY_CLI_CMD_CREDIT_ADJUST)

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time
enum ZbZclPrepayCreditTypeT

credit_adjust_type

Credit Adjustment Type
int32_t credit_adjust_value Credit Adjustment Value
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayDebtRecordT

Debt Payload structure

Parameters

uint32_t collect_time Collection Time - UTC Time
uint32_t amount_collect Amount Collected
enum ZbZclPrepayDebtTypeT debt_type Debt Type
uint32_t outstand_debt Outstanding Debt

ZbZclPrepayEmergCreditSetupReqT

Emergency Credit Setup command structure

Parameters

uint32_t issuer_event_id Issuer Event ID
uint32_t start_time Start Time
uint32_t emerg_credit_limit Emergency Credit Limit
uint32_t emerg_credit_thresh Emergency Credit Threshold
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayGetDebtRepayLogReqT

Get Debt Repayment Log command structure

Parameters

uint32_t latest_end_time Latest EndTime - UTC Time
uint8_t number_of_debts Number of Debts
enum ZbZclPrepayDebtTypeT debt_type Debt Type
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayGetPrepaySnapshotReqT

Get Prepay Snapshot command structure (ZCL_PREPAY_CLI_CMD_GET_PREPAY_SNAPSHOT)

Parameters

uint32_t start_time Earliest Start Time - UTC Time
uint32_t latest_end_time Latest End Time - UTC Time
uint8_t snapshot_offset Snapshot offset.
uint32_t snapshot_cause Snapshot cause.
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayGetTopUpLogReqT

Get TopUp Log command structure

Parameters

uint32_t latest_end_time Latest EndTime - UTC Time
uint8_t number_of_records Number of Records
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayPublishDebtLogT

Publish Debt Log command structure

Parameters

uint8_t command_index Command Index
uint8_t total_commands Total Number of Commands
struct ZbZclPrepayDebtRecordT

debt_records

Debt Payload
uint8_t num_records Number of records in 'debt_records'

ZbZclPrepaySelectAvailEmergCreditReqT

Select Available Emergency Credit command structure

Parameters

uint32_t issue_time Command Issue Date/Time
enum ZbZclPrepayOriginDeviceT

origin_device

Originating Device
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepayServerCallbacksT

Prepayment Server callbacks configuration

Parameters

select_avail_emerg_credit

(callback function pointer)

enum ZclStatusCodeT (*select_avail_emerg_credit)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySelectAvailEmergCreditReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Select Available Emergency Credit command (ZCL_PREPAY_CLI_CMD_SELECT_AVAIL_EMERG_CREDIT). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates ZCL_PREPAY_SVR_ATTR_CREDIT_STATUS attribute as per the command.

change_debt

(callback function pointer)

enum ZclStatusCodeT (*change_debt)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayChangeDebtReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Change Debt command (ZCL_PREPAY_CLI_CMD_CHANGE_DEBT). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates attributes ZCL_PREPAY_SVR_ATTR_DEBT_LABEL_N(n) to

ZCL_PREPAY_SVR_ATTR_DEBT_REC_TOPUP_PERCENT_N(n) as per the command.

emerg_credit_setup

(callback function pointer)

enum ZclStatusCodeT (*emerg_credit_setup)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayEmergCreditSetupReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Emergency Credit Setup command (ZCL_PREPAY_CLI_CMD_EMERG_CREDIT_SETUP). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attributes ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_ALLOWANCE and ZCL_PREPAY_SVR_ATTR_EMERG_CREDIT_THRESHOLD, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned emerg_credit_setup requests with matching 'IssuerEvent ID' will be cancelled.

consumer_topup

(callback function pointer)

enum ZclStatusCodeT (*consumer_topup)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayConsumerTopUpReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Consumer Top Up command. Return ZCL_STATUS_SUCCESS if log(s) found and Consumer Top Up Response sent (ZbZclPrepayServerConsumerTopUpRsp), or ZCL_STATUS_NOT_FOUND otherwise.

credit_adjust

(callback function pointer)

enum ZclStatusCodeT (*credit_adjust)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayCreditAdjustReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Credit Adjustment command (ZCL_PREPAY_CLI_CMD_CREDIT_ADJUST). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attribute ZCL_PREPAY_SVR_ATTR_CREDIT_REMAINING, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned credit_adjust requests with matching 'IssuerEvent ID' will be cancelled.

change_payment_mode

(callback function pointer)

enum ZclStatusCodeT (*change_payment_mode)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayChangePaymentModeReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Change Payment Mode command (ZCL_PREPAY_CLI_CMD_CHANGE_PAYMENT_MODE). Returns ZCL status code from sending ZbZclPrepayServerChangePaymentModeRsp() (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attribute ZCL_PREPAY_SVR_ATTR_PAYMENT_CONTROL_CONFIG, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned change_payment_mode requests with matching 'Provider ID' and 'IssuerEvent ID' will be cancelled.

get_prepay_snapshot

(callback function pointer)

enum ZclStatusCodeT (*get_prepay_snapshot)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayGetPrepaySnapshotReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Prepay Snapshot command. Return ZCL_STATUS_SUCCESS if snapshot(s) found and Publish Snapshot command sent (ZbZclPrepayServerPublishPrepaySnapshotRsp), or ZCL_STATUS_NOT_FOUND otherwise.

get_debt_repay_log

(callback function pointer)

enum ZclStatusCodeT (*get_debt_repay_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayGetDebtRepayLogReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get Debt Repayment Log command. Return ZCL_STATUS_SUCCESS if log(s) found and Publish Debt Log command(s) sent (ZbZclPrepayServerPublishDebtLogRsp), or ZCL_STATUS_NOT_FOUND otherwise.

get_topup_log

(callback function pointer)

enum ZclStatusCodeT (*get_topup_log)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepayGetTopUpLogReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Get TopUp Log command. Return ZCL_STATUS_SUCCESS if log(s) found and Publish TopUp Log command(s) sent (ZbZclPrepayServerPublishTopUpLogRsp), or ZCL_STATUS_NOT_FOUND otherwise.

set_low_credit_warn_level

(callback function pointer)

enum ZclStatusCodeT (*set_low_credit_warn_level)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySetLowCreditWarnLevelReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Set Low Credit Warning Level command (ZCL_PREPAY_CLI_CMD_SET_LOW_CREDIT_WARN_LEVEL). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attributes ZCL_PREPAY_SVR_ATTR_LOW_CREDIT_WARNING and ZCL_PREPAY_SVR_ATTR_CREDIT_REMAINING.

set_max_credit_limit

(callback function pointer)

enum ZclStatusCodeT (*set_max_credit_limit)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySetMaxCreditLimitReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Set Max Credit Limit command (ZCL_PREPAY_CLI_CMD_SET_MAX_CREDIT_LIMIT). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attributes ZCL_PREPAY_SVR_ATTR_MAX_CRED_LIMIT and ZCL_PREPAY_SVR_ATTR_MAX_CRED_PER_TOPUP, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned set_max_credit_limit requests with matching 'Provider ID' and 'IssuerEvent ID' will be cancelled.

set_overall_debt_cap

(callback function pointer)

enum ZclStatusCodeT (*set_overall_debt_cap)(struct ZbZclClusterT *cluster, void *arg, struct ZbZclPrepaySetOverallDebtCapReqT *info, struct ZbZclAddrInfoT *srcInfo)

Callback to application, invoked on receipt of Set Overall Debt Cap command (ZCL_PREPAY_CLI_CMD_SET_OVERALL_DEBT_CAP). Return ZCL status code (e.g. ZCL_STATUS_SUCCESS) to include in Default Response. If the application callback returns ZCL status of ZCL_STATUS_SUCCESS, then the stack updates the attribute ZCL_PREPAY_SVR_ATTR_OVERALL_DEBT_CAP, provided start_time is != 0xffffffff. If start_time is 0xffffffff then previous scheduled & unactioned set_overall_debt_cap requests with matching 'Provider ID' and 'IssuerEvent ID' will be cancelled.

ZbZclPrepaySetLowCreditWarnLevelReqT

Set Low Credit Warning Level

Parameters

uint32_t warn_level Low Credit Warning Level
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepaySetMaxCreditLimitReqT

Set Maximum Credit Limit

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Data/Time
uint32_t max_credit_level Maximum Credit Level
uint32_t max_credit_per_topup Maximum Credit Per Top Up
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

ZbZclPrepaySetOverallDebtCapReqT

Set Overall Debt Cap

Parameters

uint32_t provider_id Provider ID
uint32_t issuer_event_id Issuer Event ID
uint32_t implement_time Implementation Data/Time
int32_t overall_debt_cap Overall Debt Cap
bool to_bomd If true, the timeout for this command is extended since it’s being sent to a BOMD via a Mirror device.

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Billing Period command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Block Period(s) command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Block Thresholds command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get CO2 Value command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Calorific Value command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Consolidated Bill command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be provided back to the callback function when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Conversion Factor command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will be provided back to the callback function when invoked.

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

cluster Cluster instance from which to send this command
dst Destination address for request
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Price Matrix command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Scheduled Prices command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Get Tariff Information command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

cluster Cluster instance from which to send this command
dst Destination address for request
cmd_req Price Acknowledge command structure
callback Callback function that will be invoked when the response is received.
arg Pointer to application data that will included in the callback when invoked.

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
price_server Pointer to Price Server cluster. This is used by the Metering Mirror to send mirrored commands to the BOMD.
meter_mirror Pointer to Metering Mirror cluster. This is used to queue any commands that need to be forwarded to the BOMD when it wakes up.
meter_client Pointer to Metering Client cluster. This is used to know the existing notification scheme setup between BOMD & ESI and to determine if the command needs to be queued or only the notification flag needs to be set.

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

zb Zigbee stack instance
endpoint Endpoint on which to create cluster
callbacks Structure containing any callback function pointers for this cluster
arg Pointer to application data that will included in the callback when invoked.

Return

  • Cluster pointer, or NULL if there is an error

ZbZclPriceServerPublishPriceInit

void ZbZclPriceServerPublishPriceInit(struct ZbZclPriceServerPublishPriceT *rsp);

Initialize Publish Price information

Parameters

rsp Publish Price command structure

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Billing Period command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Billing Period command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Block Period command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Block Period command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Block Thresholds command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Block Thresholds command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish CO2 Value command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish CO2 Value command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Calorific Value command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Calorific Value command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Consolidated Bill command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Consolidated Bill command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected.
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Conversion Factor command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Conversion Factor command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Currency Conversion command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Currency Conversion command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected.
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Price Matrix command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command, including sequence number and tx options
info Publish Price command structure
callback Callback function for an APSDE-DATA.confirm
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Price command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

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

cluster Cluster instance from which to send this command
dst Destination address for command
info Publish Tariff Info command structure
callback Callback function that will be invoked when response is received, if one is expected. If broadcasting, then this should be set to NULL since no response is expected
arg Pointer to application data that will later be provided back to the callback function when invoked

Return

  • ZCL_STATUS_SUCCESS if successful, or other ZclStatusCodeT value on error

Enumerations

ZbZclPriceSvrAttrT

Price Server Attribute IDs

ZCL_PRICE_SVR_ATTR_TIER1_LABEL Tier1PriceLabel (Optional)

ZCL_PRICE_SVR_ATTR_TIERN_LABEL(1) For all the tiers, use the ZCL_PRICE_SVR_ATTR_TIERN_LABEL(tier) macro.

ZCL_PRICE_SVR_ATTR_BLOCK1_THRESHOLD Block1Threshold (Optional)

ZCL_PRICE_SVR_ATTR_BLOCKN_THRESHOLD(1) For all the blocks, use the ZCL_PRICE_SVR_ATTR_BLOCKN_THRESHOLD(block) macro. For all tiers and blocks, use the ZCL_PRICE_SVR_ATTR_TIERN_BLOCKN_THRESHOLD(tier, block) macro

ZCL_PRICE_SVR_ATTR_BLOCK_THRESHOLD_COUNT BlockThresholdCount (Optional) ZCL_PRICE_SVR_ATTR_TIERN_BLOCK_THRESHOLD_COUNT(0) For all the tiers, use the ZCL_PRICE_SVR_ATTR_TIERN_BLOCK_THRESHOLD_COUNT(tier) macro.
ZCL_PRICE_SVR_ATTR_START_OF_BLOCK_PERIOD StartofBlockPeriod (Optional)
ZCL_PRICE_SVR_ATTR_BLOCK_PERIOD_DURATION BlockPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_THRESHOLD_MULTIPLIER ThresholdMultiplier (Optional)
ZCL_PRICE_SVR_ATTR_THRESHOLD_DIVISOR ThresholdDivisor (Optional)
ZCL_PRICE_SVR_ATTR_BLOCK_PERIOD_DURATION_TYPE BlockPeriodDurationType (Optional)
ZCL_PRICE_SVR_ATTR_COMMODITY_TYPE CommodityType (Optional)
ZCL_PRICE_SVR_ATTR_STANDING_CHARGE StandingCharge (Optional)
ZCL_PRICE_SVR_ATTR_CONVERSION_FACTOR ConversionFactor (Optional)
ZCL_PRICE_SVR_ATTR_CONVERSION_FACTOR_TRAILING_DIGIT ConversionFactorTrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_CALORIFIC_VALUE CalorificValue (Optional)
ZCL_PRICE_SVR_ATTR_CALORIFIC_VALUE_UNIT CalorificValueUnit (Optional)
ZCL_PRICE_SVR_ATTR_CALORIFIC_VALUE_TRAILING_DIG IT CalorificValueTrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_NO_TIER_BLOCK1_PRICE NoTierBlock1Price (Optional) ZCL_PRICE_SVR_ATTR_NO_TIER_BLOCKN_PRICE(1) For all the blocks, use the ZCL_PRICE_SVR_ATTR_NO_TIER_BLOCKN_PRICE(block) macro.
ZCL_PRICE_SVR_ATTR_TIER1_BLOCK1_PRICE Tier1Block1Price (Optional) ZCL_PRICE_SVR_ATTR_TIERN_BLOCKN_PRICE(1,1) For all the tiers and blocks, use the ZCL_PRICE_SVR_ATTR_TIERN_BLOCKN_PRICE(tier, block) macro.
ZCL_PRICE_SVR_ATTR_PRICE_TIER16 PriceTier16 (Optional) ZCL_PRICE_SVR_ATTR_PRICE_TIERN(16) For all the tiers, use the ZCL_PRICE_SVR_ATTR_PRICE_TIERN(tier) macro.
ZCL_PRICE_SVR_ATTR_CPP1_PRICE CPP1 Price (Optional)
ZCL_PRICE_SVR_ATTR_CPP2_PRICE CPP2 Price (Optional)
ZCL_PRICE_SVR_ATTR_TARIFF_LABEL TariffLabel (Optional)
ZCL_PRICE_SVR_ATTR_NO_PRICE_TIERS_IN_USE NumberOfPriceTiersInUse (Optional)
ZCL_PRICE_SVR_ATTR_NO_BLOCK_THRESH_IN_USE NumberOfBlockThresholdsInUse (Optional)
ZCL_PRICE_SVR_ATTR_TIER_BLOCK_MODE TierBlockMode (Optional)
ZCL_PRICE_SVR_ATTR_UNIT_OF_MEASURE UnitOfMeasure (Optional)
ZCL_PRICE_SVR_ATTR_CURRENCY Currency (Optional)
ZCL_PRICE_SVR_ATTR_PRICE_TRAILING_DIGIT PriceTrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_TARIFF_RESLTN_PERIOD TariffResolutionPeriod (Optional)
ZCL_PRICE_SVR_ATTR_CO2 CO2Value (Optional)
ZCL_PRICE_SVR_ATTR_CO2_UNIT CO2ValueUnit (Optional)
ZCL_PRICE_SVR_ATTR_CO2_TRAILING_DIGIT CO2TrailingDigit (Optional)
ZCL_PRICE_SVR_ATTR_CBP_START CurrentBillingPeriodStart (Optional)
ZCL_PRICE_SVR_ATTR_CBP_DURATION CurrentBillingPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_LBP_START LastBillingPeriodStart (Optional)
ZCL_PRICE_SVR_ATTR_LBP_DURATION LastBillingPeriodDuration (Optional)
ZCL_PRICE_SVR_ATTR_LBP_CONSOLIDATED_BILL LastBillingPeriodConsolidatedBill (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DUE_DATE CreditPaymentDueDate (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_STATUS CreditPaymentStatus (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_OVERDUE_AMT CreditPaymentOverdueAmount (Optional)
ZCL_PRICE_SVR_ATTR_PAYMENT_DISCOUNT PaymentDiscount (Optional)
ZCL_PRICE_SVR_ATTR_PAYMENT_DISCOUNT_PERIOD PaymentDiscountPeriod (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_1 CreditPayment#1 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_DATE_1 CreditPaymentDate#1 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_REF_1 CreditPaymentRef#1 (Optional)
ZCL_PRICE_SVR_ATTR_CRDT_PAYMENT_2 CreditPayment#2 (Op