Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: CC3220SF
I am using CC3220SF_launchpad an HTTP server to get the data from the field.
Ex. current sensor
Uint16_t sensorData[64]={645,745,842,931,1011,1080,1138,1185,1222,1250,1270,1283,1290,1290,1283,1269,1247,1220,1188,1152,1114,1077,1041,1006,973,941,908,874,835,793,747,697,645,594,544,498,456,417,382,350,318,285,250,214,176,139,103,71,43,22,8,1,1,8,21,41,69,106,153,211,280,360,449,546}
I am trying to send these data directly as the response of the request as below–
int32_t dataGetCallback(uint8_t requestIdx, uint8_t *argcCallback, uint8_t **argvCallback, SlNetAppRequest_t *netAppRequest)
{
char *pPayload;
uint16_t metadataLen;
int32_t retVal;
metadataLen = prepareGetMetadata(0, 128, HttpContentTypeList_ApplicationOctecStream);
sl_NetAppSend (netAppRequest->Handle, metadataLen, gMetadataBuffer, (SL_NETAPP_REQUEST_RESPONSE_FLAGS_CONTINUATION | SL_NETAPP_REQUEST_RESPONSE_FLAGS_METADATA));
pPayload = (char *)&sensorData;
sl_NetAppSend (netAppRequest->Handle,128,(unsigned char*)pPayload, 0); /* mark as last segment */
return 0;
}
(above sample is at server in c program)
Data received as the response of ajax call (javascript) is then stored in an variable at the HTTP Client (Any Desktop or Laptop). When I see the response body the data are as below which I am not able to interpret --


I want to plot these data in web browser and also save in a file as comma (,) separated integer values. Can anyone suggest how to convert/process these data to get the integer format array and save in javascript and HTML?