string id;
int err_flg;
Data *data;
+ DataRange *dr;
dev_lst = NULL;
controller = new DeviceManagerController();
data = controller->get_latest_data(id, &err_flg);
if ((data != NULL) &&
(err_flg == PLP_OK)) {
- log_info("latest data:\n");
+ log_info("latest data for device: %s\n", id.c_str());
data->printout();
delete(data);
}
else {
log_error("Could not get latest data for device id: %s\n", id.c_str());
}
+ dr = controller->get_data_range(id, &err_flg);
+ if (dr != NULL) {
+ data = dr->get_first();
+ if (data != NULL) {
+ log_debug("first data for device: %s\n", id.c_str());
+ data->printout();
+ delete(data);
+ }
+ data = dr->get_last();
+ if (data != NULL) {
+ log_debug("last data for device: %s\n", id.c_str());
+ data->printout();
+ delete(data);
+ }
+ }
+ delete(dr);
}
}
else {