Z-Stack API Reference  8.31.00.00
ZCL Functions

Functions

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)
 

Detailed Description

Function Documentation

§ zcl_getFrameCounter()

uint8_t zcl_getFrameCounter ( void  )
Returns
next ZCL frame counter

§ zcl_getRawAFMsg()

afIncomingMSGPacket_t* zcl_getRawAFMsg ( void  )
Returns
pointer to original AF message, NULL if not processing AF message.

§ zcl_HandleExternal()

uint8_t zcl_HandleExternal ( zclIncoming_t pInMsg)
Parameters
pInMsg- incoming message to process
Returns
TRUE

§ zcl_ProcessMessageMSG()

zclProcMsgStatus_t zcl_ProcessMessageMSG ( afIncomingMSGPacket_t *  pkt)
Parameters
pkt- incoming message
Returns
zclProcMsgStatus_t

§ zcl_ReadAttrData()

ZStatus_t zcl_ReadAttrData ( uint8_t  endpoint,
uint16_t  clusterId,
uint16_t  attrId,
uint8_t *  pAttrData,
uint16_t *  pDataLen 
)
Parameters
endpoint- application's endpoint
clusterId- cluster that attribute belongs to
attrId- attribute id
pAttrData- where to put attribute data
pDataLen- where to put attribute data length
Returns
Successful if data was read

§ zcl_registerAttrList()

ZStatus_t zcl_registerAttrList ( uint8_t  endpoint,
uint8_t  numAttr,
CONST zclAttrRec_t  newAttrList[] 
)
Parameters
endpoint- endpoint the attribute list belongs to
numAttr- number of attributes in list
newAttrList- array of Attribute records. NOTE: THE ATTRIBUTE IDs (FOR A CLUSTER) MUST BE IN ASCENDING ORDER. OTHERWISE, THE DISCOVERY RESPONSE COMMAND WILL NOT HAVE THE RIGHT ATTRIBUTE INFO
Returns
ZSuccess if OK

§ zcl_registerClusterOptionList()

ZStatus_t zcl_registerClusterOptionList ( uint8_t  endpoint,
uint8_t  numOption,
zclOptionRec_t  optionList[] 
)
Parameters
endpoint- endpoint the option list belongs to
numOption- number of options in list
optionList- array of cluster option records.
         NOTE: This API should be called to enable 'Application
               Link Key' security and/or 'APS ACK' for a specific
               Cluster. The 'Application Link Key' is discarded
               if security isn't enabled on the device.
               The default behavior is 'Network Key' when security
               is enabled and no 'APS ACK' for the ZCL messages.
Returns
ZSuccess if OK

§ zcl_registerCmdList()

ZStatus_t zcl_registerCmdList ( uint8_t  endpoint,
CONST uint8_t  cmdListSize,
CONST zclCommandRec_t  newCmdList[] 
)
Parameters
endpoint- endpoint the attribute list belongs to
cmdListSize- size of the command list
newCmdList- array of command records
Returns
ZSuccess if OK

§ zcl_registerPlugin()

ZStatus_t zcl_registerPlugin ( uint16_t  startLogCluster,
uint16_t  endLogCluster,
zclInHdlr_t  pfnIncomingHdlr 
)
Parameters
startLogCluster- starting cluster ID
endLogCluster- ending cluster ID
pfnIncomingHdlr- function pointer to incoming message handler
Returns
ZSuccess if OK

§ zcl_registerReadWriteCB()

ZStatus_t zcl_registerReadWriteCB ( uint8_t  endpoint,
zclReadWriteCB_t  pfnReadWriteCB,
zclAuthorizeCB_t  pfnAuthorizeCB 
)

Note: The pfnReadWriteCB callback function is only required when the attribute data format is unknown to ZCL. The callback function gets called when the pointer 'dataPtr' to the attribute value is NULL in the attribute database registered with the ZCL.

Note: The pfnAuthorizeCB callback function is only required when the Read/Write operation on an attribute requires authorization (i.e., attributes with ACCESS_CONTROL_AUTH_READ or ACCESS_CONTROL_AUTH_WRITE access permissions).

Parameters
endpoint- application's endpoint
pfnReadWriteCB- function pointer to read/write routine
pfnAuthorizeCB- function pointer to authorize read/write operation
Returns
ZSuccess if successful. ZFailure, otherwise.

§ zcl_registerValidateAttrData()

ZStatus_t zcl_registerValidateAttrData ( zclValidateAttrData_t  pfnValidateAttrData)
Parameters
pfnValidateAttrData- function pointer to validate routine
Returns
ZSuccess if OK

§ zcl_SendCommandEx()

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 
)

NOTE: The calling application is responsible for incrementing the Sequence Number.

Parameters
srcEP- source endpoint
dstAddr- destination address
clusterID- cluster ID
cmd- command ID
specific- whether the command is Cluster Specific
direction- client/server direction of the command
disableDefaultRsp- disable Default Response command
manuCode- manufacturer code for proprietary extensions to a profile
seqNum- identification number for the transaction
cmdFormatLen- length of the command to be sent
cmdFormat- command to be sent
isReqFromApp- Indicates where it comes from application thread or stack thread
Returns
ZSuccess if OK

§ zcl_SendConfigReportCmd()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
cfgReportCmd- configure reporting command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendConfigReportRspCmdEx()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
cfgReportRspCmd- configure reporting response command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
isReqFromApp- Indicates where it comes from application thread or stack thread
Returns
ZSuccess if OK

§ zcl_SendDefaultRspCmd()

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 
)

Note: The manufacturer code field should be set if this command is being sent in response to a manufacturer specific command.

Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
defaultRspCmd- default response command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
manuCode- manufacturer code for proprietary extensions to a profile
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendDiscoverAttrsCmd()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
pDiscoverCmd- discover command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendDiscoverAttrsExt()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
pDiscoverAttrsExt
  • startAttrID: the first attribute to be selected
  • maxAttrIDs: maximum number of returned attributes
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendDiscoverAttrsExtRsp()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
pDiscoverAttrsExtRsp
  • discComplete: indicates whether all requested attributes returned
  • attrID: attribute ID
  • attrDataType: data type of the given attribute
  • attrAccessControl: access control of the given attribute
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendDiscoverAttrsRspCmd()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
pDiscoverRspCmd- report response command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendDiscoverCmdsCmd()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
clusterID- cluster ID
cmdType- requesting command ID
pDiscoverCmd- discover command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendDiscoverCmdsRspCmd()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
clusterID- cluster ID
pDiscoverRspCmd- response command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendRead()

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 
)
Parameters
srcEP- Application's endpoint
dstAddr- destination address
realClusterID- cluster ID
readCmd- read command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendReadReportCfgCmd()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
readReportCfgCmd- read reporting configuration command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendReadReportCfgRspCmdEx()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
readReportCfgRspCmd- read reporting configuration response command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
isReqFromApp- Indicates where it comes from application thread or stack thread
Returns
ZSuccess if OK

§ zcl_SendReadRsp()

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 
)
Parameters
srcEP- Application's endpoint
dstAddr- destination address
realClusterID- cluster ID
readRspCmd- read response command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zcl_SendReportCmdEx()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
reportCmd- report command to be sent
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
isReqFromApp- Indicates where it comes from application thread or stack thread
Returns
ZSuccess if OK

§ zcl_SendWriteRsp()

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 
)
Parameters
srcEP- source endpoint
dstAddr- destination address
realClusterID- cluster ID
writeRspCmd- ZCL_CMD_WRITE, ZCL_CMD_WRITE_UNDIVIDED or ZCL_CMD_WRITE_NO_RSP
direction- direction of the command
disableDefaultRsp- disable Default Response command
seqNum- transaction sequence number
Returns
ZSuccess if OK

§ zclAnalogDataType()

uint8_t zclAnalogDataType ( uint8_t  dataType)
Parameters
dataType- data type
Returns
TRUE if data type is analog

§ zclFindAttrRec()

uint8_t zclFindAttrRec ( uint8_t  endpoint,
uint16_t  realClusterID,
uint16_t  attrId,
zclAttrRec_t pAttr 
)
Parameters
endpoint- Application's endpoint
realClusterID- cluster ID
attrId- attribute looking for
pAttr- attribute record to be returned
Returns
TRUE if record found. FALSE, otherwise.

§ zclFindCmdRec()

uint8_t zclFindCmdRec ( uint8_t  endpoint,
uint16_t  clusterID,
uint8_t  cmdID,
zclCommandRec_t pCmd 
)
Parameters
endpoint- Application's endpoint
clusterID- cluster ID
cmdID- command ID
pCmd- attribute record to be returned
Returns
TRUE if record found. FALSE, otherwise.

§ zclGetAttrDataLength()

uint16_t zclGetAttrDataLength ( uint8_t  dataType,
uint8_t *  pData 
)
Parameters
dataType- data type
pData- pointer to data
Returns
returns atrribute length

§ zclGetDataTypeLength()

uint8_t zclGetDataTypeLength ( uint8_t  dataType)

NOTE: Should not be called for ZCL_DATATYPE_OCTECT_STR or ZCL_DATATYPE_CHAR_STR data types.

Parameters
dataType- data type
Returns
length of data

§ zclParseHdr()

uint8_t* zclParseHdr ( zclFrameHdr_t hdr,
uint8_t *  pData 
)
Parameters
hdr- place to put the frame control information
pData- incoming buffer to parse
Returns
pointer past the header

§ zclParseInConfigReportCmd()

void* zclParseInConfigReportCmd ( zclParseCmd_t pCmd)

NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.

Parameters
pCmd- pointer to incoming data to parse
Returns
pointer to the parsed command structure

§ zclParseInDiscAttrsCmd()

void* zclParseInDiscAttrsCmd ( zclParseCmd_t pCmd)

NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.

Parameters
pCmd- pointer to incoming data to parse
Returns
pointer to the parsed command structure

§ zclParseInDiscCmdsCmd()

void* zclParseInDiscCmdsCmd ( zclParseCmd_t pCmd)

NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.

Parameters
pCmd- pointer to incoming data to parse
Returns
pointer to the parsed command structure

§ zclParseInReadCmd()

void* zclParseInReadCmd ( zclParseCmd_t pCmd)

NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.

Parameters
pCmd- pointer to incoming data to parse
Returns
pointer to the parsed command structure

§ zclParseInReadReportCfgCmd()

void* zclParseInReadReportCfgCmd ( zclParseCmd_t pCmd)

NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.

Parameters
pCmd- pointer to incoming data to parse
Returns
pointer to the parsed command structure

§ zclParseInReportCmd()

void* zclParseInReportCmd ( zclParseCmd_t pCmd)

NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.

Parameters
pCmd- pointer to incoming data to parse
Returns
pointer to the parsed command structure

§ zclParseInWriteCmd()

void* zclParseInWriteCmd ( zclParseCmd_t pCmd)

NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.

Parameters
pCmd- pointer to incoming data to parse
Returns
pointer to the parsed command structure

§ zclReadAttrData()

ZStatus_t zclReadAttrData ( uint8_t *  pAttrData,
zclAttrRec_t pAttr,
uint16_t *  pDataLen 
)
Parameters
pAttrData- where to put attribute data
pAttr- pointer to attribute
pDataLen- where to put attribute data length
Returns
Success

§ zclSerializeData()

uint8_t* zclSerializeData ( uint8_t  dataType,
void *  attrData,
uint8_t *  buf 
)
Parameters
dataType- data types defined in zcl.h
attrData- pointer to the attribute data
buf- where to put the serialized data
Returns
pointer to end of destination buffer

§ zclSetAttrRecList()

uint8_t zclSetAttrRecList ( uint8_t  endpoint,
uint8_t  numAttr,
CONST zclAttrRec_t  attrList[] 
)
Parameters
endpoint- endpoint the attribute list belongs to
numAttr- number of attributes in list
attrList- array of attribute records. NOTE: THE ATTRIBUTE IDs (FOR A CLUSTER) MUST BE IN ASCENDING ORDER. OTHERWISE, THE DISCOVERY RESPONSE COMMAND WILL NOT HAVE THE RIGHT ATTRIBUTE INFO
Returns
TRUE if successful, FALSE otherwise.