zigbee读属性的命令也是由zcl相关的任务处理吗?
关于发送的读的命令
/*********************************************************************
* @fn zcl_SendRead
*
* @brief Send a Read command
*
* @param srcEP - Application's endpoint
* @param dstAddr - destination address
* @param clusterID - cluster ID
* @param readCmd - read command to be sent
* @param direction - direction of the command
* @param seqNum - transaction sequence number
*
* @Return ZSuccess if OK
*/
ZStatus_t zcl_SendRead( uint8 srcEP, afAddrType_t *dstAddr,
uint16 clusterID, zclReadCmd_t *readCmd,
uint8 direction, uint8 disableDefaultRsp, uint8 seqNum)
{
uint16 dataLen;
uint8 *buf;
uint8 *pBuf;
ZStatus_t status;
dataLen = readCmd->numAttr * 2; // Attribute ID
buf = zcl_mem_alloc( dataLen );
if ( buf != NULL )
{
uint8 i;
// Load the buffer - serially
pBuf = buf;
for (i = 0; i < readCmd->numAttr; i++)
{
*pBuf++ = LO_UINT16( readCmd->attrID );
*pBuf++ = HI_UINT16( readCmd->attrID );
}
status = zcl_SendCommand( srcEP, dstAddr, clusterID, ZCL_CMD_READ, FALSE,
direction, disableDefaultRsp, 0, seqNum, dataLen, buf );
zcl_mem_free( buf );
}
else
{
status = ZMemError;
}
return ( status );
}
关于处理读属性的命令
static uint8 zclProcessInReadCmd( zclIncoming_t *pInMsg )