Z-Stack API Reference  6.30.00.23
zcl.h File Reference

Detailed Description

Top level ZCL header.

#include "af.h"
#include "aps_groups.h"
#include "ti_zstack_config.h"

Data Structures

struct  zclFrameControl_t
 
struct  zclFrameHdr_t
 The ZCL frame format is composed of a ZCL header and a ZCL payload. More...
 
struct  zclIncoming_t
 
struct  zclIncomingMsg_t
 Incoming ZCL message passed to the Application. More...
 
struct  zclCommandRec_t
 Command record. More...
 
struct  zclAttribute_t
 ZCL Attribute definition. More...
 
struct  zclAttrRec_t
 Attribute record. More...
 
struct  zclOptionRec_t
 ZCL cluster options. More...
 
struct  zclParseCmd_t
 Parse received command. More...
 
struct  zclAttrRecsList
 Attribute record list item. More...
 

Macros

#define ZCL_CLUSTER_ID_GENERAL_BASIC   0x0000
 
#define ZCL_CLUSTER_ID_GENERAL_POWER_CFG   0x0001
 
#define ZCL_CLUSTER_ID_GENERAL_DEVICE_TEMP_CONFIG   0x0002
 
#define ZCL_CLUSTER_ID_GENERAL_IDENTIFY   0x0003
 
#define ZCL_CLUSTER_ID_GENERAL_GROUPS   0x0004
 
#define ZCL_CLUSTER_ID_GENERAL_SCENES   0x0005
 
#define ZCL_CLUSTER_ID_GENERAL_ON_OFF   0x0006
 
#define ZCL_CLUSTER_ID_GENERAL_ON_OFF_SWITCH_CONFIGURATION   0x0007
 
#define ZCL_CLUSTER_ID_GENERAL_LEVEL_CONTROL   0x0008
 
#define ZCL_CLUSTER_ID_GENERAL_ALARMS   0x0009
 
#define ZCL_CLUSTER_ID_GENERAL_TIME   0x000A
 
#define ZCL_CLUSTER_ID_GENERAL_LOCATION   0x000B
 
#define ZCL_CLUSTER_ID_HA_DIAGNOSTIC   0x0B05
 
#define ZCL_CLUSTER_ID_GENERAL_POLL_CONTROL   0x0020
 
#define ZCL_CLUSTER_ID_GENERAL_POWER_PROFILE   0x001A
 
#define ZCL_CLUSTER_ID_HA_METER_IDENTIFICATION   0x0B01
 
#define ZCL_CLUSTER_ID_GENERAL_ANALOG_INPUT_BASIC   0x000C
 
#define ZCL_CLUSTER_ID_GENERAL_ANALOG_OUTPUT_BASIC   0x000D
 
#define ZCL_CLUSTER_ID_GENERAL_ANALOG_VALUE_BASIC   0x000E
 
#define ZCL_CLUSTER_ID_GENERAL_BINARY_INPUT_BASIC   0x000F
 
#define ZCL_CLUSTER_ID_GENERAL_BINARY_OUTPUT_BASIC   0x0010
 
#define ZCL_CLUSTER_ID_GENERAL_BINARY_VALUE_BASIC   0x0011
 
#define ZCL_CLUSTER_ID_GENERAL_MULTISTATE_INPUT_BASIC   0x0012
 
#define ZCL_CLUSTER_ID_GENERAL_MULTISTATE_OUTPUT_BASIC   0x0013
 
#define ZCL_CLUSTER_ID_GENERAL_MULTISTATE_VALUE_BASIC   0x0014
 
#define ZCL_CLUSTER_ID_MS_ILLUMINANCE_MEASUREMENT   0x0400
 
#define ZCL_CLUSTER_ID_MS_ILLUMINANCE_LEVEL_SENSING_CONFIG   0x0401
 
#define ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT   0x0402
 
#define ZCL_CLUSTER_ID_MS_PRESSURE_MEASUREMENT   0x0403
 
#define ZCL_CLUSTER_ID_MS_FLOW_MEASUREMENT   0x0404
 
#define ZCL_CLUSTER_ID_MS_RELATIVE_HUMIDITY   0x0405
 
#define ZCL_CLUSTER_ID_MS_OCCUPANCY_SENSING   0x0406
 
#define ZCL_CLUSTER_ID_MS_ELECTRICAL_MEASUREMENT   0x0B04
 Electrical Measurement Cluster. Attributes and commands for measuring electrical usage.
 
#define ZCL_CLUSTER_ID_LIGHTING_COLOR_CONTROL   0x0300
 Color Control Cluster. Attributes and commands for changing the color of a light.
 
#define ZCL_CLUSTER_ID_LIGHTING_BALLAST_CONFIG   0x0301
 Ballast Configuration Cluster. Attributes and commands for configuring a lighting ballast.
 
#define ZCL_CLUSTER_ID_HVAC_PUMP_CONFIG_CONTROL   0x0200
 
#define ZCL_CLUSTER_ID_HVAC_THERMOSTAT   0x0201
 Thermostat Cluster. Attributes and commands for functionality of a thermostat.
 
#define ZCL_CLUSTER_ID_HVAC_FAN_CONTROL   0x0202
 
#define ZCL_CLUSTER_ID_HVAC_DIHUMIDIFICATION_CONTROL   0x0203
 
#define ZCL_CLUSTER_ID_HVAC_USER_INTERFACE_CONFIG   0x0204
 
#define ZCL_CLUSTER_ID_CLOSURES_SHADE_CONFIG   0x0100
 
#define ZCL_CLUSTER_ID_CLOSURES_DOOR_LOCK   0x0101
 Door Lock Cluster. Attributes and commands for generic way to secure a door.
 
#define ZCL_CLUSTER_ID_CLOSURES_WINDOW_COVERING   0x0102
 
#define ZCL_CLUSTER_ID_SS_IAS_ZONE   0x0500
 
#define ZCL_CLUSTER_ID_SS_IAS_ACE   0x0501
 
#define ZCL_CLUSTER_ID_SS_IAS_WD   0x0502
 
#define ZCL_CLUSTER_ID_GENERAL_PARTITION   0x0016
 
#define ZCL_CLUSTER_ID_PI_GENERIC_TUNNEL   0x0600
 
#define ZCL_CLUSTER_ID_PI_BACNET_PROTOCOL_TUNNEL   0x0601
 
#define ZCL_CLUSTER_ID_PI_ANALOG_INPUT_BACNET_REG   0x0602
 
#define ZCL_CLUSTER_ID_PI_ANALOG_INPUT_BACNET_EXT   0x0603
 
#define ZCL_CLUSTER_ID_PI_ANALOG_OUTPUT_BACNET_REG   0x0604
 
#define ZCL_CLUSTER_ID_PI_ANALOG_OUTPUT_BACNET_EXT   0x0605
 
#define ZCL_CLUSTER_ID_PI_ANALOG_VALUE_BACNET_REG   0x0606
 
#define ZCL_CLUSTER_ID_PI_ANALOG_VALUE_BACNET_EXT   0x0607
 
#define ZCL_CLUSTER_ID_PI_BINARY_INPUT_BACNET_REG   0x0608
 
#define ZCL_CLUSTER_ID_PI_BINARY_INPUT_BACNET_EXT   0x0609
 
#define ZCL_CLUSTER_ID_PI_BINARY_OUTPUT_BACNET_REG   0x060A
 
#define ZCL_CLUSTER_ID_PI_BINARY_OUTPUT_BACNET_EXT   0x060B
 
#define ZCL_CLUSTER_ID_PI_BINARY_VALUE_BACNET_REG   0x060C
 
#define ZCL_CLUSTER_ID_PI_BINARY_VALUE_BACNET_EXT   0x060D
 
#define ZCL_CLUSTER_ID_PI_MULTISTATE_INPUT_BACNET_REG   0x060E
 
#define ZCL_CLUSTER_ID_PI_MULTISTATE_INPUT_BACNET_EXT   0x060F
 
#define ZCL_CLUSTER_ID_PI_MULTISTATE_OUTPUT_BACNET_REG   0x0610
 
#define ZCL_CLUSTER_ID_PI_MULTISTATE_OUTPUT_BACNET_EXT   0x0611
 
#define ZCL_CLUSTER_ID_PI_MULTISTATE_VALUE_BACNET_REG   0x0612
 
#define ZCL_CLUSTER_ID_PI_MULTISTATE_VALUE_BACNET_EXT   0x0613
 
#define ZCL_CLUSTER_ID_PI_11073_PROTOCOL_TUNNEL   0x0614
 
#define ZCL_CLUSTER_ID_PI_ISO7818_PROTOCOL_TUNNEL   0x0615
 
#define ZCL_CLUSTER_ID_SE_PRICE   0x0700
 Price Cluster. Commands and attributes for reporting price.
 
#define ZCL_CLUSTER_ID_SE_DRLC   0x0701
 
#define ZCL_CLUSTER_ID_SE_METERING   0x0702
 Metering Cluster. Commands and attributes for reporting metering data.
 
#define ZCL_CLUSTER_ID_SE_MESSAGING   0x0703
 Messaging Cluster. Commands and attributes for sending messages to devices.
 
#define ZCL_CLUSTER_ID_SE_TUNNELING   0x0704
 
#define ZCL_CLUSTER_ID_SE_PREPAYMENT   0x0705
 Tunnel Cluster. Commands and attributes for mobile office solutions using devices.
 
#define ZCL_CLUSTER_ID_SE_ENERGY_MGMT   0x0706
 ISO7816 Tunnel Cluster. Commands and attributes for mobile office solutions using devices.
 
#define ZCL_CLUSTER_ID_SE_CALENDAR   0x0707
 ISO7816 Tunnel Cluster. Commands and attributes for mobile office solutions using devices.
 
#define ZCL_CLUSTER_ID_SE_DEVICE_MGMT   0x0708
 ISO7816 Tunnel Cluster. Commands and attributes for mobile office solutions using devices.
 
#define ZCL_CLUSTER_ID_SE_EVENTS   0x0709
 ISO7816 Tunnel Cluster. Commands and attributes for mobile office solutions using devices.
 
#define ZCL_CLUSTER_ID_SE_MDU_PAIRING   0x070A
 ISO7816 Tunnel Cluster. Commands and attributes for mobile office solutions using devices.
 
#define ZCL_CLUSTER_ID_SE_KEY_ESTABLISHMENT   0x0800
 
#define ZCL_CLUSTER_ID_OTA   0x0019
 
#define ZCL_CLUSTER_ID_TELECOMMUNICATIONS_INFORMATION   0x0900
 Information Cluster. Commands and attributes for information delivery.
 
#define ZCL_CLUSTER_ID_TELECOMMUNICATIONS_VOICE_OVER_ZIGBEE   0x0904
 
#define ZCL_CLUSTER_ID_TELECOMMUNICATIONS_CHATTING   0x0905
 Chatting Cluster. Commands and attributes for sending chat messages.
 
#define ZCL_CLUSTER_ID_GENERAL_COMMISSIONING   0x0015
 
#define ZCL_CLUSTER_ID_TOUCHLINK   0x1000
 
#define ZCL_CLUSTER_ID_PI_RETAIL_TUNNEL   0x0617
 
#define ZCL_CLUSTER_ID_MOBILE_DEVICE_CONFIGURATION   0x0022
 
#define ZCL_CLUSTER_ID_NEIGHBOR_CLEANING   0x0023
 Neighbor Cleaning Cluster.Interface to manage mobile devices in a network.
 
#define ZCL_CLUSTER_ID_NEAREST_GATEWAY   0x0024
 
#define ZCL_CLUSTER_ID_GENERAL_APPLIANCE_CONTROL   0x001B
 
#define ZCL_CLUSTER_ID_HA_APPLIANCE_IDENTIFICATION   0x0B00
 
#define ZCL_CLUSTER_ID_HA_APPLIANCE_EVENTS_ALERTS   0x0B02
 
#define ZCL_CLUSTER_ID_HA_APPLIANCE_STATISTICS   0x0B03
 
#define ZCL_CLUSTER_ID_GREEN_POWER   0x0021
 Green Power Cluster. The commands and attributes for Green Power functionality.
 
#define ZCL_FRAME_CONTROL_TYPE   0x03
 
#define ZCL_FRAME_CONTROL_MANU_SPECIFIC   0x04
 
#define ZCL_FRAME_CONTROL_DIRECTION   0x08
 
#define ZCL_FRAME_CONTROL_DISABLE_DEFAULT_RSP   0x10
 
#define ZCL_FRAME_TYPE_PROFILE_CMD   0x00
 
#define ZCL_FRAME_TYPE_SPECIFIC_CMD   0x01
 
#define ZCL_FRAME_CLIENT_SERVER_DIR   0x00
 
#define ZCL_FRAME_SERVER_CLIENT_DIR   0x01
 
#define CC_MANUFACTURER_CODE   0x1001
 
#define ZCL_CMD_READ   0x00
 
#define ZCL_CMD_READ_RSP   0x01
 
#define ZCL_CMD_WRITE   0x02
 
#define ZCL_CMD_WRITE_UNDIVIDED   0x03
 
#define ZCL_CMD_WRITE_RSP   0x04
 
#define ZCL_CMD_WRITE_NO_RSP   0x05
 
#define ZCL_CMD_CONFIG_REPORT   0x06
 
#define ZCL_CMD_CONFIG_REPORT_RSP   0x07
 
#define ZCL_CMD_READ_REPORT_CFG   0x08
 
#define ZCL_CMD_READ_REPORT_CFG_RSP   0x09
 
#define ZCL_CMD_REPORT   0x0a
 
#define ZCL_CMD_DEFAULT_RSP   0x0b
 
#define ZCL_CMD_DISCOVER_ATTRS   0x0c
 
#define ZCL_CMD_DISCOVER_ATTRS_RSP   0x0d
 
#define ZCL_CMD_DISCOVER_CMDS_RECEIVED   0x11
 
#define ZCL_CMD_DISCOVER_CMDS_RECEIVED_RSP   0x12
 
#define ZCL_CMD_DISCOVER_CMDS_GEN   0x13
 
#define ZCL_CMD_DISCOVER_CMDS_GEN_RSP   0x14
 
#define ZCL_CMD_DISCOVER_ATTRS_EXT   0x15
 
#define ZCL_CMD_DISCOVER_ATTRS_EXT_RSP   0x16
 
#define ZCL_CMD_MAX   ZCL_CMD_DISCOVER_ATTRS_EXT_RSP
 
#define ZCL_DATABUF_SEND   0x0020
 
#define ZCL_REPORTING_OFF   0xFFFF
 
#define CMD_DIR_SERVER_GENERATED   0x01
 
#define CMD_DIR_CLIENT_GENERATED   0x02
 
#define CMD_DIR_SERVER_RECEIVED   0x04
 
#define CMD_DIR_CLIENT_RECEIVED   0x08
 
#define ZCL_DATATYPE_NO_DATA   0x00
 
#define ZCL_DATATYPE_DATA8   0x08
 
#define ZCL_DATATYPE_DATA16   0x09
 
#define ZCL_DATATYPE_DATA24   0x0a
 
#define ZCL_DATATYPE_DATA32   0x0b
 
#define ZCL_DATATYPE_DATA40   0x0c
 
#define ZCL_DATATYPE_DATA48   0x0d
 
#define ZCL_DATATYPE_DATA56   0x0e
 
#define ZCL_DATATYPE_DATA64   0x0f
 
#define ZCL_DATATYPE_BOOLEAN   0x10
 
#define ZCL_DATATYPE_BITMAP8   0x18
 
#define ZCL_DATATYPE_BITMAP16   0x19
 
#define ZCL_DATATYPE_BITMAP24   0x1a
 
#define ZCL_DATATYPE_BITMAP32   0x1b
 
#define ZCL_DATATYPE_BITMAP40   0x1c
 
#define ZCL_DATATYPE_BITMAP48   0x1d
 
#define ZCL_DATATYPE_BITMAP56   0x1e
 
#define ZCL_DATATYPE_BITMAP64   0x1f
 
#define ZCL_DATATYPE_UINT8   0x20
 
#define ZCL_DATATYPE_UINT16   0x21
 
#define ZCL_DATATYPE_UINT24   0x22
 
#define ZCL_DATATYPE_UINT32   0x23
 
#define ZCL_DATATYPE_UINT40   0x24
 
#define ZCL_DATATYPE_UINT48   0x25
 
#define ZCL_DATATYPE_UINT56   0x26
 
#define ZCL_DATATYPE_UINT64   0x27
 
#define ZCL_DATATYPE_INT8   0x28
 
#define ZCL_DATATYPE_INT16   0x29
 
#define ZCL_DATATYPE_INT24   0x2a
 
#define ZCL_DATATYPE_INT32   0x2b
 
#define ZCL_DATATYPE_INT40   0x2c
 
#define ZCL_DATATYPE_INT48   0x2d
 
#define ZCL_DATATYPE_INT56   0x2e
 
#define ZCL_DATATYPE_INT64   0x2f
 
#define ZCL_DATATYPE_ENUM8   0x30
 
#define ZCL_DATATYPE_ENUM16   0x31
 
#define ZCL_DATATYPE_SEMI_PREC   0x38
 
#define ZCL_DATATYPE_SINGLE_PREC   0x39
 
#define ZCL_DATATYPE_DOUBLE_PREC   0x3a
 
#define ZCL_DATATYPE_OCTET_STR   0x41
 
#define ZCL_DATATYPE_CHAR_STR   0x42
 
#define ZCL_DATATYPE_LONG_OCTET_STR   0x43
 
#define ZCL_DATATYPE_LONG_CHAR_STR   0x44
 
#define ZCL_DATATYPE_ARRAY   0x48
 
#define ZCL_DATATYPE_STRUCT   0x4c
 
#define ZCL_DATATYPE_SET   0x50
 
#define ZCL_DATATYPE_BAG   0x51
 
#define ZCL_DATATYPE_TOD   0xe0
 
#define ZCL_DATATYPE_DATE   0xe1
 
#define ZCL_DATATYPE_UTC   0xe2
 
#define ZCL_DATATYPE_CLUSTER_ID   0xe8
 
#define ZCL_DATATYPE_ATTR_ID   0xe9
 
#define ZCL_DATATYPE_BAC_OID   0xea
 
#define ZCL_DATATYPE_IEEE_ADDR   0xf0
 
#define ZCL_DATATYPE_128_BIT_SEC_KEY   0xf1
 
#define ZCL_DATATYPE_UNKNOWN   0xff
 
#define ZCL_STATUS_SUCCESS   0x00
 
#define ZCL_STATUS_FAILURE   0x01
 
#define ZCL_STATUS_NOT_AUTHORIZED   0x7E
 
#define ZCL_STATUS_MALFORMED_COMMAND   0x80
 
#define ZCL_STATUS_UNSUP_CLUSTER_COMMAND   0x81
 
#define ZCL_STATUS_UNSUP_GENERAL_COMMAND   0x82
 
#define ZCL_STATUS_UNSUP_MANU_CLUSTER_COMMAND   0x83
 
#define ZCL_STATUS_UNSUP_MANU_GENERAL_COMMAND   0x84
 
#define ZCL_STATUS_INVALID_FIELD   0x85
 
#define ZCL_STATUS_UNSUPPORTED_ATTRIBUTE   0x86
 
#define ZCL_STATUS_INVALID_VALUE   0x87
 
#define ZCL_STATUS_READ_ONLY   0x88
 
#define ZCL_STATUS_INSUFFICIENT_SPACE   0x89
 
#define ZCL_STATUS_DUPLICATE_EXISTS   0x8a
 
#define ZCL_STATUS_NOT_FOUND   0x8b
 
#define ZCL_STATUS_UNREPORTABLE_ATTRIBUTE   0x8c
 
#define ZCL_STATUS_INVALID_DATA_TYPE   0x8d
 
#define ZCL_STATUS_INVALID_SELECTOR   0x8e
 
#define ZCL_STATUS_WRITE_ONLY   0x8f
 
#define ZCL_STATUS_INCONSISTENT_STARTUP_STATE   0x90
 
#define ZCL_STATUS_DEFINED_OUT_OF_BAND   0x91
 
#define ZCL_STATUS_INCONSISTENT   0x92
 
#define ZCL_STATUS_ACTION_DENIED   0x93
 
#define ZCL_STATUS_TIMEOUT   0x94
 
#define ZCL_STATUS_ABORT   0x95
 
#define ZCL_STATUS_INVALID_IMAGE   0x96
 
#define ZCL_STATUS_WAIT_FOR_DATA   0x97
 
#define ZCL_STATUS_NO_IMAGE_AVAILABLE   0x98
 
#define ZCL_STATUS_REQUIRE_MORE_IMAGE   0x99
 
#define ZCL_STATUS_HARDWARE_FAILURE   0xc0
 
#define ZCL_STATUS_SOFTWARE_FAILURE   0xc1
 
#define ZCL_STATUS_CALIBRATION_ERROR   0xc2
 
#define ZCL_STATUS_CMD_HAS_RSP   0xFF
 
#define ACCESS_CONTROL_NONE   0x00
 
#define ACCESS_CONTROL_READ   0x01
 
#define ACCESS_CONTROL_WRITE   0x02
 
#define ACCESS_REPORTABLE   0x04
 
#define ACCESS_CONTROL_COMMAND   0x08
 
#define ACCESS_CONTROL_AUTH_READ   0x10
 
#define ACCESS_CONTROL_AUTH_WRITE   0x20
 
#define ACCESS_GLOBAL   0x40
 
#define ACCESS_CLIENT   0x80
 
#define ACCESS_CONTROL_MASK   0x07
 
#define ACCESS_CONTROLEXT_MASK   0x07
 
#define ZCL_ATTR_ID_MAX   0xFFFF
 
#define ZCL_SEND_ATTR_REPORTS   0x00
 
#define ZCL_EXPECT_ATTR_REPORTS   0x01
 
#define MAX_UTF8_STRING_LEN   50
 
#define ZCL_OPER_LEN   0x00
 
#define ZCL_OPER_READ   0x01
 
#define ZCL_OPER_WRITE   0x02
 
#define ATTRID_CLUSTER_REVISION   0xFFFD
 
#define ATTRID_ATTRIBUTE_REPORTING_STATUS   0xFFFE
 
#define zcl_ProfileCmd(a)   ( (a) == ZCL_FRAME_TYPE_PROFILE_CMD )
 
#define zcl_ClusterCmd(a)   ( (a) == ZCL_FRAME_TYPE_SPECIFIC_CMD )
 
#define zcl_ServerCmd(a)   ( (a) == ZCL_FRAME_CLIENT_SERVER_DIR )
 
#define zcl_ClientCmd(a)   ( (a) == ZCL_FRAME_SERVER_CLIENT_DIR )
 
#define UNICAST_MSG(msg)   ( (msg)->wasBroadcast == false && (msg)->groupId == 0 )
 
#define ZCL_CLUSTER_ID_GEN(id)
 
#define ZCL_CLUSTER_ID_CLOSURES(id)
 
#define ZCL_CLUSTER_ID_HVAC(id)
 
#define ZCL_CLUSTER_ID_LIGHTING(id)
 
#define ZCL_CLUSTER_ID_MS(id)
 
#define ZCL_CLUSTER_ID_SS(id)
 
#define ZCL_CLUSTER_ID_KEY(id)   ( (id) == ZCL_CLUSTER_ID_GENERAL_KEY_ESTABLISHMENT )
 
#define ZCL_CLUSTER_ID_SE(id)
 
#define ZCL_CLUSTER_ID_PI(id)
 
#define ZCL_CLUSTER_ID_PI_RETAIL_T(id)   ( (id) == ZCL_CLUSTER_ID_PI_RETAIL_TUNNEL )
 
#define ZCL_CLUSTER_ID_PI_RETAIL(id)
 
#define ZCL_CLUSTER_ID_LL(id)   ( (id) == ZCL_CLUSTER_ID_TOUCHLINK )
 
#define ZCL_CLUSTER_ID_PART(id)   ( (id) == ZCL_CLUSTER_ID_GENERAL_PARTITION )
 
#define ZCL_CLUSTER_ID_PC(id)   ( (id) == ZCL_CLUSTER_ID_GENERAL_POLL_CONTROL )
 
#define ZCL_CLUSTER_ID_EM(id)   ( (id) == ZCL_CLUSTER_ID_MS_ELECTRICAL_MEASUREMENT )
 
#define ZCL_CLUSTER_ID_DIAG(id)   ( (id) == ZCL_CLUSTER_ID_HA_DIAGNOSTIC )
 
#define ZCL_CLUSTER_ID_MI(id)   ( (id) == ZCL_CLUSTER_ID_HA_METER_IDENTIFICATION )
 
#define ZCL_CLUSTER_ID_APPL_C(id)   ( (id) == ZCL_CLUSTER_ID_GENERAL_APPLIANCE_CONTROL )
 
#define ZCL_CLUSTER_ID_APPL_I(id)   ( (id) == ZCL_CLUSTER_ID_HA_APPLIANCE_IDENTIFICATION )
 
#define ZCL_CLUSTER_ID_APPL_STAT(id)   ( (id) == ZCL_CLUSTER_ID_HA_APPLIANCE_STATISTICS )
 
#define ZCL_CLUSTER_ID_APPL_E_A(id)   ( (id) == ZCL_CLUSTER_ID_HA_APPLIANCE_EVENTS_ALERTS )
 
#define ZCL_CLUSTER_ID_APPL_S(id)   ( (id) == ZCL_CLUSTER_ID_HA_APPLIANCE_STATISTICS )
 
#define ZCL_CLUSTER_ID_PP(id)   ( (id) == ZCL_CLUSTER_ID_GENERAL_POWER_PROFILE )
 
#define ZCL_CLUSTER_ID_DL(id)   ( (id) == ZCL_CLUSTER_ID_CLOSURES_DOOR_LOCK )
 
#define ZCL_CLUSTER_ID_TEL(id)
 
#define ZCL_CLUSTER_ID_TL(id)   ( (id) == ZCL_CLUSTER_ID_TOUCHLINK )
 
#define zcl_SendWrite(a, b, c, d, e, f, g)   (zcl_SendWriteRequest( (a), (b), (c), (d), ZCL_CMD_WRITE, (e), (f), (g) ))
 
#define zcl_SendWriteUndivided(a, b, c, d, e, f, g)   (zcl_SendWriteRequest( (a), (b), (c), (d), ZCL_CMD_WRITE_UNDIVIDED, (e), (f), (g) ))
 
#define zcl_SendWriteNoRsp(a, b, c, d, e, f, g)   (zcl_SendWriteRequest( (a), (b), (c), (d), ZCL_CMD_WRITE_NO_RSP, (e), (f), (g) ))
 
#define zcl_SendCommand(a, b, c, d, e, f, g, h, i, j, k)   (zcl_SendCommandEx(a,b,c,d,e,f,g,h,i,j,k,TRUE))
 
#define zcl_StackSendCommand(a, b, c, d, e, f, g, h, i, j, k)   (zcl_SendCommandEx(a,b,c,d,e,f,g,h,i,j,k,FALSE))
 
#define zcl_SendConfigReportRspCmd(a, b, c, d, e, f, g)   (zcl_SendConfigReportRspCmdEx(a,b,c,d,e,f,g,TRUE))
 
#define zcl_StackSendConfigReportRspCmd(a, b, c, d, e, f, g)   (zcl_SendConfigReportRspCmdEx(a,b,c,d,e,f,g,FALSE))
 
#define zcl_SendReadReportCfgRspCmd(a, b, c, d, e, f, g)   (zcl_SendReadReportCfgRspCmdEx(a,b,c,d,e,f,g,TRUE))
 
#define zcl_StackSendReadReportCfgRspCmd(a, b, c, d, e, f, g)   (zcl_SendReadReportCfgRspCmdEx(a,b,c,d,e,f,g,FALSE))
 
#define zcl_SendReportCmd(a, b, c, d, e, f, g)   (zcl_SendReportCmdEx(a,b,c,d,e,f,g,TRUE))
 
#define zcl_StackSendReportCmd(a, b, c, d, e, f, g)   (zcl_SendReportCmdEx(a,b,c,d,e,f,g,FALSE))
 

Typedefs

typedef ZStatus_t(* zclInHdlr_t) (zclIncoming_t *pInHdlrMsg)
 Function pointer type to handle incoming messages. More...
 
typedef ZStatus_t(* zclInWrtHdlr_t) (zclIncoming_t *msg, uint16_t logicalClusterID, zclWriteRec_t *writeRec)
 Function pointer type to handle incoming write commands. More...
 
typedef uint8_t(* zclValidateAttrData_t) (zclAttrRec_t *pAttr, zclWriteRec_t *pAttrInfo)
 Function pointer type to validate attribute data. More...
 
typedef ZStatus_t(* zclReadWriteCB_t) (uint16_t clusterId, uint16_t attrId, uint8_t oper, uint8_t *pValue, uint16_t *pLen)
 Function pointer type to read/write attribute data. More...
 
typedef ZStatus_t(* zclAuthorizeCB_t) (afAddrType_t *srcAddr, zclAttrRec_t *pAttr, uint8_t oper)
 Callback function prototype to authorize a Read or Write operation on a given attribute. More...
 
typedef struct zclAttrRecsList zclAttrRecsList
 Attribute record list item.
 

Enumerations

enum  zclProcMsgStatus_t {
  ZCL_PROC_SUCCESS = 0, ZCL_PROC_INVALID, ZCL_PROC_EP_NOT_FOUND, ZCL_PROC_NOT_OPERATIONAL,
  ZCL_PROC_INTERPAN_FOUNDATION_CMD, ZCL_PROC_NOT_SECURE, ZCL_PROC_MANUFACTURER_SPECIFIC, ZCL_PROC_MANUFACTURER_SPECIFIC_DR,
  ZCL_PROC_NOT_HANDLED, ZCL_PROC_NOT_HANDLED_DR
}
 zcl_ProcessMessageMSG() return codes More...
 

Functions

void * zcl_mem_alloc (uint16_t size)
 
void * zcl_memset (void *dest, uint8_t value, int len)
 
void * zcl_memcpy (void *dst, void *src, unsigned int len)
 
uint8_t zcl_memcmp (const void *src1, const void *src2, unsigned int len)
 
void zcl_mem_free (void *ptr)
 
uint8_t * zcl_buffer_uint32 (uint8_t *buf, uint32_t val)
 
uint8_t zcl_nv_item_init (uint16_t id, uint16_t len, void *buf)
 
uint8_t zcl_nv_write (uint16_t id, uint16_t ndx, uint16_t len, void *buf)
 
uint8_t zcl_nv_read (uint16_t id, uint16_t ndx, uint16_t len, void *buf)
 
uint32_t zcl_build_uint32 (uint8_t *swapped, uint8_t len)
 
void * zcl_cpyExtAddr (uint8_t *pDest, const uint8_t *pSrc)
 
uint8_t zcl_HandleExternal (zclIncoming_t *pInMsg)
 
ZStatus_t zcl_registerPlugin (uint16_t startLogCluster, uint16_t endLogCluster, zclInHdlr_t pfnIncomingHdlr)
 
ZStatus_t zcl_registerCmdList (uint8_t endpoint, CONST uint8_t cmdListSize, CONST zclCommandRec_t newCmdList[])
 
ZStatus_t zcl_registerAttrList (uint8_t endpoint, uint8_t numAttr, CONST zclAttrRec_t newAttrList[])
 
ZStatus_t zcl_registerClusterOptionList (uint8_t endpoint, uint8_t numOption, zclOptionRec_t optionList[])
 
ZStatus_t zcl_registerValidateAttrData (zclValidateAttrData_t pfnValidateAttrData)
 
ZStatus_t zcl_registerReadWriteCB (uint8_t endpoint, zclReadWriteCB_t pfnReadWriteCB, zclAuthorizeCB_t pfnAuthorizeCB)
 
zclProcMsgStatus_t zcl_ProcessMessageMSG (afIncomingMSGPacket_t *pkt)
 
ZStatus_t zcl_SendCommandEx (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t clusterID, uint8_t cmd, uint8_t specific, uint8_t direction, uint8_t disableDefaultRsp, uint16_t manuCode, uint8_t seqNum, uint16_t cmdFormatLen, uint8_t *cmdFormat, uint8_t isReqFromApp)
 
ZStatus_t zcl_SendRead (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclReadCmd_t *readCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendReadRsp (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclReadRspCmd_t *readRspCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_ReadAttrData (uint8_t endpoint, uint16_t clusterId, uint16_t attrId, uint8_t *pAttrData, uint16_t *pDataLen)
 
ZStatus_t zcl_SendWriteRequest (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclWriteCmd_t *writeCmd, uint8_t cmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendWriteRsp (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclWriteRspCmd_t *writeRspCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendConfigReportCmd (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclCfgReportCmd_t *cfgReportCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendConfigReportRspCmdEx (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclCfgReportRspCmd_t *cfgReportRspCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum, uint8_t isReqFromApp)
 
ZStatus_t zcl_SendReadReportCfgCmd (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclReadReportCfgCmd_t *readReportCfgCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendReadReportCfgRspCmdEx (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclReadReportCfgRspCmd_t *readReportCfgRspCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum, uint8_t isReqFromApp)
 
ZStatus_t zcl_SendReportCmdEx (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclReportCmd_t *reportCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum, uint8_t isReqFromApp)
 
ZStatus_t zcl_SendDefaultRspCmd (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclDefaultRspCmd_t *defaultRspCmd, uint8_t direction, uint8_t disableDefaultRsp, uint16_t manuCode, uint8_t seqNum)
 
ZStatus_t zcl_SendDiscoverCmdsCmd (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t clusterID, uint8_t cmdType, zclDiscoverCmdsCmd_t *pDiscoverCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendDiscoverCmdsRspCmd (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t clusterID, zclDiscoverCmdsCmdRsp_t *pDiscoverRspCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendDiscoverAttrsCmd (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclDiscoverAttrsCmd_t *pDiscoverCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendDiscoverAttrsRspCmd (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclDiscoverAttrsRspCmd_t *pDiscoverRspCmd, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendDiscoverAttrsExt (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclDiscoverAttrsCmd_t *pDiscoverAttrsExt, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
ZStatus_t zcl_SendDiscoverAttrsExtRsp (uint8_t srcEP, afAddrType_t *dstAddr, uint16_t realClusterID, zclDiscoverAttrsExtRsp_t *pDiscoverAttrsExtRsp, uint8_t direction, uint8_t disableDefaultRsp, uint8_t seqNum)
 
void * zclParseInReadCmd (zclParseCmd_t *pCmd)
 
void * zclParseInWriteCmd (zclParseCmd_t *pCmd)
 
void * zclParseInConfigReportCmd (zclParseCmd_t *pCmd)
 
void * zclParseInReadReportCfgCmd (zclParseCmd_t *pCmd)
 
uint8_t zclAnalogDataType (uint8_t dataType)
 
void * zclParseInReportCmd (zclParseCmd_t *pCmd)
 
void * zclParseInDiscCmdsCmd (zclParseCmd_t *pCmd)
 
void * zclParseInDiscAttrsCmd (zclParseCmd_t *pCmd)
 
uint8_t zclFindCmdRec (uint8_t endpoint, uint16_t clusterID, uint8_t cmdID, zclCommandRec_t *pCmd)
 
uint8_t * zclParseHdr (zclFrameHdr_t *hdr, uint8_t *pData)
 
uint8_t zclFindAttrRec (uint8_t endpoint, uint16_t realClusterID, uint16_t attrId, zclAttrRec_t *pAttr)
 
uint8_t zclSetAttrRecList (uint8_t endpoint, uint8_t numAttr, CONST zclAttrRec_t attrList[])
 
ZStatus_t zclReadAttrData (uint8_t *pAttrData, zclAttrRec_t *pAttr, uint16_t *pDataLen)
 
uint8_t zclGetDataTypeLength (uint8_t dataType)
 
uint8_t * zclSerializeData (uint8_t dataType, void *attrData, uint8_t *buf)
 
uint16_t zclGetAttrDataLength (uint8_t dataType, uint8_t *pData)
 
afIncomingMSGPacket_t * zcl_getRawAFMsg (void)
 
uint8_t zcl_getFrameCounter (void)
 

Variables

 PACKED_TYPEDEF_STRUCT
 Read Attribute Command format. More...
 
uint16_t attrID []
 attribute ID More...
 
 zclReadCmd_t
 
uint8_t status
 should be ZCL_STATUS_SUCCESS or error
 
uint8_t dataType
 attribute data type More...
 
uint8_t * data
 
 zclReadRspStatus_t
 
zclReadRspStatus_t attrList []
 attribute status list More...
 
 zclReadRspCmd_t
 
uint8_t * attrData
 
 zclWriteRec_t
 
 zclWriteCmd_t
 
 zclWriteRspStatus_t
 
 zclWriteRspCmd_t
 
uint16_t minReportInt
 minimum reporting interval
 
uint16_t maxReportInt
 maximum reporting interval, 0xFFFF=off More...
 
uint16_t timeoutPeriod
 timeout period
 
uint8_t * reportableChange
 
 zclCfgReportRec_t
 
 zclCfgReportCmd_t
 
uint8_t direction
 whether attributes are reported or reports of attributes are received More...
 
 zclCfgReportStatus_t
 
 zclCfgReportRspCmd_t
 
 zclReadReportCfgRec_t
 
 zclReadReportCfgCmd_t
 
 zclReportCfgRspRec_t
 
 zclReadReportCfgRspCmd_t
 
 zclReport_t
 
 zclReportCmd_t
 
uint8_t statusCode
 
 zclDefaultRspCmd_t
 
uint8_t maxAttrIDs
 returned in the resulting response command. More...
 
 zclDiscoverAttrsCmd_t
 
 zclDiscoverAttrInfo_t
 
uint8_t numAttr
 number of attributes in the list More...
 
 zclDiscoverAttrsRspCmd_t
 
uint8_t * pStr
 Pointer to string buffer.
 
 UTF8String_t
 
uint8_t maxCmdID
 Maximum command ID to discover.
 
 zclDiscoverCmdsCmd_t
 
uint8_t cmdType
 either ZCL_CMD_DISCOVER_CMDS_GEN or ZCL_CMD_DISCOVER_CMDS_RECEIVED
 
uint8_t numCmd
 number of provided commands
 
uint8_t pCmdID []
 variable length array
 
 zclDiscoverCmdsCmdRsp_t
 
uint8_t attrDataType
 Data Type.
 
uint8_t attrAccessControl
 Access control for attribute.
 
 zclExtAttrInfo_t
 
zclExtAttrInfo_t aExtAttrInfo []
 variable length array
 
 zclDiscoverAttrsExtRsp_t
 
uint8_t zcl_InSeqNum
 
uint8_t zcl_radius