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