How do I use the eZCL_ReportAttribute() function?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How do I use the eZCL_ReportAttribute() function?

710件の閲覧回数
qidongli
Contributor II

When the eZCL_ReportAttribute() function is called, how to change the data type and data value reported by the node.

0 件の賞賛
返信
1 返信

537件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Qidong Li,

You can see an example JN-AN-1189, Light Sensor the vMakeSupportedAttributesReportable. app_reporting.c

The function is calling the  eZCL_CreateLocalReport, you could call in that section.

How to change the value?

Please look at the app_light.c file an inside the vAPP_LightSensorSample, you will see how the struct is modifying the value.

u16ALSResult = u16TSL2550_ReadResult();
DBG_vPrintf(TRACE_LIGHT_SENSOR,"\nResult = %d",u16ALSResult);

    if(u16ALSResult > (LIGHT_SENSOR_MINIMUM_MEASURED_VALUE - 1))
        sSensor.sIlluminanceMeasurementServerCluster.u16MeasuredValue = u16ALSResult;
    else
        sSensor.sIlluminanceMeasurementServerCluster.u16MeasuredValue = 
                       LIGHT_SENSOR_MINIMUM_MEASURED_VALUE;

Regards,

Mario

0 件の賞賛
返信