zcl_SendRead发送读属性后,接收端在哪里处理呢?在哪里做zcl_SendReadRsp处理
ZStatus_t zcl_SendRead( uint8 srcEP, afAddrType_t *dstAddr,
uint16 clusterID, zclReadCmd_t *readCmd,
uint8 direction, uint8 disableDefaultRsp, uint8 seqNum)
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
zcl_SendRead发送读属性后,接收端在哪里处理呢?在哪里做zcl_SendReadRsp处理
ZStatus_t zcl_SendRead( uint8 srcEP, afAddrType_t *dstAddr,
uint16 clusterID, zclReadCmd_t *readCmd,
uint8 direction, uint8 disableDefaultRsp, uint8 seqNum)
那么也就是说读取属性的时候在接收端是不需要做什么处理的,协议栈已经实现了发送属性的功能?
但是在客户端做的测试总是发现收到的数据错误,要读的属性如下:
readCmd.attrID[0] = ATTRID_BASIC_HW_VERSION;
readCmd.attrID[1] = ATTRID_BASIC_ZCL_VERSION;
接收端读取属性的代码如下
static uint8 zclHomeAppSw0_ProcessInReadRspCmd( zclIncomingMsg_t *pInMsg )
{
zclReadRspCmd_t *readRspCmd;
uint8 i;
uint16 attrID;
uint8 dataType;
readRspCmd = (zclReadRspCmd_t *)pInMsg->attrCmd;
for (i = 0; i < readRspCmd->numAttr; i++)
{
// Notify the originator of the results of the original read attributes
// attempt and, for each successfull request, the value of the requested
// attribute
attrID = readRspCmd->attrList[i].attrID;
dataType = readRspCmd->attrList[i].dataType;
//a = *(readRspCmd->attrList[i].data);
}
return TRUE;
}
总是第一个属性的数据错误,第二个正确,不知道什么原因,