一个设备的Attribute使能了ACCESS_REPORTABLE,怎样让它在改变值后上报给已绑定设备?是否需要使用bdb_RepChangedAttrValue函数?为什么SampleLight中没有看到使用bdb_RepChangedAttrValue函数
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.
一个设备的Attribute使能了ACCESS_REPORTABLE,怎样让它在改变值后上报给已绑定设备?是否需要使用bdb_RepChangedAttrValue函数?为什么SampleLight中没有看到使用bdb_RepChangedAttrValue函数
建议你参考lock这个demo: #ifdef BDB_REPORTING //Adds the default configuration values for the temperature attribute of the ZCL_CLUSTER_ID_CLOSURES_DOOR_LOCK cluster, for endpoint SAMPLETEMPERATURESENSOR_ENDPOINT //Default maxReportingInterval value is 10 seconds //Default minReportingInterval value is 3 seconds //Default reportChange value is 0x01 () bdb_RepAddAttrCfgRecordDefaultToList(SAMPLEDOORLOCK_ENDPOINT, ZCL_CLUSTER_ID_CLOSURES_DOOR_LOCK, ATTRID_CLOSURES_LOCK_STATE, 0, 10, reportableChange); #endif
ZCL协议中会存在一些Attribute,可以用profile cmd来修改。同时这些Attribute在设备收到specific cmd并执行命令时,对应的Attribute也要随之发生变化,与执行命令的结果同步。