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.

zclGeneral_SendGroupAdd组播函数

协调器源发送添加组播命令源码如下: 

 static uint8 addgroupnum =0;
 afAddrType_t DstAddr;
 aps_Group_t Groupsimg;
 Groupsimg.ID = 0x0001;
 osal_memcpy(Groupsimg.name,"group_1",7);

 DstAddr.addrMode = (afAddrMode_t)Addr16Bit;
 DstAddr.endPoint = 8;
 DstAddr.addr.shortAddr = DevShortAdd;

zclGeneral_SendGroupAdd(8, &DstAddr,Groupsimg.ID,Groupsimg.name,false, addgroupnum++);

协调器单播发送添加组的命令到路由设备。抓包发现add group命令发送出去了,而且路由也有默认的响应函数,现在的问题是,路由进不到自己写的group回调函数中。调试发现路由接收到命令后执行到

if ( zcl_ServerCmd( pInMsg->hdr.fc.direction ) )

stat = zclGeneral_ProcessInGroupsServer( pInMsg );  

else

stat = zclGeneral_ProcessInGroupsClient( pInMsg, pCBs );

断点显示执行了if后的函数zclGeneral_ProcessInGroupsServer( pInMsg );  

后将if else的内容反了一下,才能进入到group的回调函数中static void zcl_FXSamplelightGroupRspCB( zclGroupRsp_t *pRsp )(自己定义的)。

是什么原因导致这个情况的呢?另外有这方面的例程么?