Z-Stack API Reference  8.31.00.00
ZCL Typedefs

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

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

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
 

Detailed Description

Typedef Documentation

§ zclAuthorizeCB_t

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.

Parameters
srcAddr- source Address
pAttr- pointer to attribute
oper- ZCL_OPER_LEN, ZCL_OPER_READ, or ZCL_OPER_WRITE
Returns
ZCL_STATUS_SUCCESS: Operation successful, ZCL_STATUS_NOT_AUTHORIZED: Operation not authorized

§ zclInHdlr_t

typedef ZStatus_t(* zclInHdlr_t) (zclIncoming_t *pInHdlrMsg)

Function pointer type to handle incoming messages.

Parameters
pInHdlrMsg- incomming message buffer
Returns
ZStatus_t

§ zclInWrtHdlr_t

typedef ZStatus_t(* zclInWrtHdlr_t) (zclIncoming_t *msg, uint16_t logicalClusterID, zclWriteRec_t *writeRec)

Function pointer type to handle incoming write commands.

Parameters
msg- incoming message
logicalClusterID- logical cluster ID
writeRec- received data to be written
Returns
ZStatus_t

§ zclReadWriteCB_t

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.

Parameters
clusterId- cluster that attribute belongs to
attributeto be read or written
oper- ZCL_OPER_LEN, ZCL_OPER_READ, or ZCL_OPER_WRITE
pValue- pointer to attribute (length) value
pLen- length of attribute value read
Returns
ZCL_STATUS_SUCCESS: Operation successful, ZCL Error Status: Operation not successful

§ zclValidateAttrData_t

typedef uint8_t(* zclValidateAttrData_t) (zclAttrRec_t *pAttr, zclWriteRec_t *pAttrInfo)

Function pointer type to validate attribute data.

Parameters
pAttr- where data to be written
pAttrInfo- pointer to attribute info
Returns
uint8_t

Enumeration Type Documentation

§ zclProcMsgStatus_t

zcl_ProcessMessageMSG() return codes

Enumerator
ZCL_PROC_SUCCESS 

Message was processed.

ZCL_PROC_INVALID 

Format or parameter was wrong.

ZCL_PROC_EP_NOT_FOUND 

Endpoint descriptor not found.

ZCL_PROC_NOT_OPERATIONAL 

Can't respond to this command.

ZCL_PROC_INTERPAN_FOUNDATION_CMD 

INTER-PAN and Foundation Command (not allowed)

ZCL_PROC_NOT_SECURE 

Security was required but the message is not secure.

ZCL_PROC_MANUFACTURER_SPECIFIC 

Manufacturer Specific command - not handled.

ZCL_PROC_MANUFACTURER_SPECIFIC_DR 

Manufacturer Specific command - not handled, but default response sent.

ZCL_PROC_NOT_HANDLED 

No default response was sent and the message was not handled.

ZCL_PROC_NOT_HANDLED_DR 

default response was sent and the message was not handled

Variable Documentation

§ attrData

uint8_t * attrData

this structure is allocated, so the data is HERE- the size depends on the attribute data type

this structure is allocated, so the data is HERE- the size depends on the data type of attrID

§ attrID

uint16_t attrID

attribute ID

supported attributes list - this structure should be allocated with the appropriate number of attributes.

§ attrList

zclDiscoverAttrInfo_t attrList

attribute status list

supported attributes list

attribute report list

attribute reporting configuration list

attribute ID list

attribute status records

attribute records

§ data

uint8_t* data

this structure is allocated, so the data is HERE

  • the size depends on the attribute data type

§ dataType

uint8_t dataType

attribute data type

attribute data type (see Table 17 in Spec)

§ direction

uint8_t direction

whether attributes are reported or reports of attributes are received

to send or receive reports of the attribute

§ maxAttrIDs

uint8_t maxAttrIDs

returned in the resulting response command.

maximum number of attribute IDs that are to be

§ maxReportInt

uint16_t maxReportInt

maximum reporting interval, 0xFFFF=off

maximum reporting interval

§ numAttr

uint8_t numAttr

number of attributes in the list

number of attributes provided

§ PACKED_TYPEDEF_STRUCT

PACKED_TYPEDEF_STRUCT
Initial value:
{
uint8_t numAttr
uint8_t numAttr
number of attributes in the list
Definition: zcl.h:1014

Read Attribute Command format.

Discover Attributes Extended Response Command format.

Attribute info.

Discover Commands Received Response Command, Discover Commands Generated Response.

Discover Commands Received, Discover Commands Generated.

String Data Type.

Discover Attributes Response Command format.

Attribute Report info.

Discover Attributes and Attributes Extended Command format.

Default Response Command format.

Report Attributes Command format.

Attribute Report.

Read Reporting Configuration Response Command format.

Attribute Reporting Configuration record.

Read Report Configuration Command format.

Read Reporting Configuration Command format.

Configure Reporting Response Command format.

Attribute Status record.

Configure report attribute list.

Configure Reporting Command format.

Write Attribute Response Command format.

Write Attribute Status record.

Write Attribute Command format.

Write Attribute record.

Read Attribute Response Command format.

Read Attribute Response Status record.

number of attributes in the list

attribute ID

number of attribute records in the list

should be ZCL_STATUS_SUCCESS or error

number of attribute status in the list

to send or receive reports of the attribute

number of attribute IDs in the list

status field

number of records in the list

atrribute ID

number of reports in the list

specifies the minimum value of the identifier to begin attribute discovery.

whether or not there're more attributes to be discovered

String length

Start command ID to discover

Attribute ID

§ reportableChange

uint8_t * reportableChange

reportable change (only applicable to analog data type)- the size depends on the attribute data type