-vector<Data *> *DeviceData::get_hourly_summary(Date *date,
- int calc_type) {
- vector<Data *> *ret_val;
- Store *store;
-
- ret_val = NULL;
- store = new Store(device_id, date);
- store->load();
- switch(calc_type) {
- case SUM:
- ret_val = store->get_sum(3600);
- break;
- case DELTA:
- ret_val = store->get_delta(3600);
- break;
- case MEAN:
- default:
- ret_val = store->get_mean(3600);
- break;
- case MAX:
- ret_val = store->get_max(3600);
- break;
- case MIN:
- ret_val = store->get_min(3600);
- break;
- }
- delete(store);
- return ret_val;
+DataRange *DeviceData::get_hourly_summary(Date *date,
+ EnumSummaryCalculationType calc_type_param) {
+ return get_summary(date, calc_type_param, PERIOD_HOURLY);