|
发表于 2024-12-24 15:59:59
|
显示全部楼层
本帖最后由 wes58 于 2024-12-24 16:03 编辑
Here is the function from zcl_reporting.c
- _CODE_ZCL_ void reportAttr(reportCfgInfo_t *pEntry)
- {
- if(!zb_bindingTblSearched(pEntry->clusterID, pEntry->endPoint)){
- return;
- }
- epInfo_t dstEpInfo;
- TL_SETSTRUCTCONTENT(dstEpInfo, 0);
- dstEpInfo.dstAddrMode = APS_DSTADDR_EP_NOTPRESETNT;
- dstEpInfo.profileId = pEntry->profileID;
- zclAttrInfo_t *pAttrEntry = zcl_findAttribute(pEntry->endPoint, pEntry->clusterID, pEntry->attrID);
- if(!pAttrEntry){
- //should not happen.
- ZB_EXCEPTION_POST(SYS_EXCEPTTION_ZB_ZCL_ENTRY);
- return;
- }
- u16 len = zcl_getAttrSize(pAttrEntry->type, pAttrEntry->data);
- len = (len>8) ? (8):(len);
- //store for next compare
- memcpy(pEntry->prevData, pAttrEntry->data, len);
- zcl_sendReportCmd(pEntry->endPoint, &dstEpInfo, TRUE, ZCL_FRAME_SERVER_CLIENT_DIR,
- pEntry->clusterID, pAttrEntry->id, pAttrEntry->type, pAttrEntry->data);
- }
复制代码
As you can see at the beginning of this function:
- if(!zb_bindingTblSearched(pEntry->clusterID, pEntry->endPoint)){
- return;
- }
复制代码
If the entry for the device (for example gateway) and for a specified cluster is not in the binding table of the device that is sending the report won't be sent.
And this is from the Zigbee SDK Developer manual
5.2.6 bdb_defaultReportingCfg()
Configure the default reporting message, which takes effect after binding.
Prototype
status_t bdb_defaultReportingCfg(u8 endpoint, u16 profileID,
u16 clusterID, u16 attrID,
u16 minReportInt, u16 maxReportInt,
u8 *reportableChange)
|
|