bool testRetrieveData() { RetrieveData *retrieveObj; char *response = NULL; retrieveObj = createRetrieveDataObject(1410387088000, 1415301870434); addDeviceId(retrieveObj, "02-00-a7-81-77-ff"); addDeviceId(retrieveObj, "c0-3f-d5-60-d0-74"); addSensorId(retrieveObj, "madras7"); addSensorId(retrieveObj, "madras9"); response = retrieveData(retrieveObj); printf("Response Received :%s\n", response); return true; }
/** * add sensor name. This API will replace the sensor name with its corresponding ID. * If sensor ID is already known, then please use addSensorId(). * Can be called multiple times to add different sensor IDs * * @param retrieveObj the object created using createRetrieveDataObject() * @param sensorName specifies the sensor name */ RetrieveData *addSensorName(RetrieveData *retrieveObj, char *sensorName) { char *cid = NULL; StringList *addId; cid = getSensorComponentId(sensorName); return addSensorId(retrieveObj, cid); }