Zigbee Cluster Library Overview 3

1. 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

2. 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)

3. 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.

4. 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

5. 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. 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.

7. IAS Security Clusters

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

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

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

8. Smart Energy Clusters

8.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



Previous step Arrow left.png Arrow right.png Next step