TI中文支持网
TI专业的中文技术问题搜集分享网站

关于“Configure Reporting Command ”配置上报的问题

各位TI工程师:

       大家好!最近在做一个可配置的电池电量上报周期的功能,在“ZCL”文档中也看了相关配置的功能。但是对“minimum reporting interval ”,“maximum reporting interval ”和“reportable change ”这几个参数,怎么确定“reporting”上报的间隔时间还是存在疑问。“ZCL”文档也没有说具体。请指导一下!谢谢!

Alvin Chen:

这个可以对应bdb  report 的设置去看一下。

#ifdef BDB_REPORTING//Adds the default configuration values for the temperature attribute of the ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT cluster, for endpoint SAMPLETEMPERATURESENSOR_ENDPOINT//Default maxReportingInterval value is 10 seconds//Default minReportingInterval value is 3 seconds//Default reportChange value is 300 (3 degrees)Req.attrID = ATTRID_MS_TEMPERATURE_MEASURED_VALUE;Req.cluster = ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT;Req.endpoint = SAMPLETEMPERATURESENSOR_ENDPOINT;Req.maxReportInt = 10;Req.minReportInt = 3;memcpy(Req.reportableChange,reportableChange,BDBREPORTING_MAX_ANALOG_ATTR_SIZE);Zstackapi_bdbRepAddAttrCfgRecordDefaultToListReq(appServiceTaskId,&Req);

Alvin Chen:

如果你想解析这个command 我们有专门的函数: * @fnzclParseInConfigReportCmd** @briefParse the "Profile" Configure Reporting Command**NOTE: THIS FUNCTION ALLOCATES THE RETURN BUFFER, SO THE CALLING*FUNCTION IS RESPONSIBLE TO FREE THE MEMORY.** @parampCmd - pointer to incoming data to parse** @returnpointer to the parsed command structure*/
void *zclParseInConfigReportCmd( zclParseCmd_t *pCmd )
Alvin Chen:

回复 Alvin Chen:

这三个参数分别是:uint16 minReportInt;//!< minimum reporting intervaluint16 maxReportInt;//!< maximum reporting interval, 0xFFFF=off
uint8*reportableChange;//!< reportable change (only applicable to analog data type)//!< – the size depends on the attribute data type

xuezheng su:

回复 Alvin Chen:

谢谢!那我需要用“ZStatus_t zcl_SendConfigReportCmd( uint8 srcEP, afAddrType_t *dstAddr,uint16 clusterID, zclCfgReportCmd_t *cfgReportCmd,uint8 direction, uint8 disableDefaultRsp, uint8 seqNum )”函数去设置这些参数的时候,*reportableChange的值该是多少?

Alvin Chen:

回复 xuezheng su:

zcl_SendConfigReportCmd中的reportableChange你只改变间隔不需要去填写,除非你要改变。
如果你要填写就去炒一下sensor 那个demo里面的写法。

赞(0)
未经允许不得转载:TI中文支持网 » 关于“Configure Reporting Command ”配置上报的问题
分享到: 更多 (0)