Dears,
You can refer to the following code to report temperature, which is derive from zcl_SendReportCmd and home automation profile spec.
uint8 *pReportCmdBuf=NULL;
uint8 *pReportCmdData=NULL;
zclReportCmd_t *reportCmd=NULL;
pReportCmdBuf = (uint8 *)osal_mem_alloc( sizeof(uint8)*1 + sizeof(zclReport_t) );
pReportCmdData = (uint8 *)osal_mem_alloc( sizeof(uint16) );
reportCmd = (zclReportCmd_t *)pReportCmdBuf;
reportCmd->numAttr=1;
reportCmd->attrList->attrID = ATTRID_MS_TEMPERATURE_MEASURED_VALUE;
reportCmd->attrList->dataType = ZCL_DATATYPE_INT16;
reportCmd->attrList->attrData = (uint8*)pReportCmdData; // fill temperature data here.
zcl_SendReportCmd( TS_ENDPOINT, &TS_DstAddr,
ZCL_CLUSTER_ID_MS_TEMPERATURE_MEASUREMENT, reportCmd,
ZCL_FRAME_CLIENT_SERVER_DIR, TRUE, transNum++ );
uint8 *pReportCmdBuf=NULL;
uint8 *pReportCmdData=NULL;
zclReportCmd_t *reportCmd=NULL;
pReportCmdBuf = (uint8 *)osal_mem_alloc( sizeof(uint8)*1 + sizeof(zclReport_t) );
pReportCmdData = (uint8 *)osal_mem_alloc( sizeof(uint16) );
reportCmd = (zclReportCmd_t *)pReportCmdBuf;
reportCmd->numAttr=1;
reportCmd->attrList->attrID = ATTRID_MS_TEMPERATURE_MEASURED_VALUE;
reportCmd->attrList->dataType = ZCL_DATATYPE_INT16;