+/*
+ * Get Daily summary from the latest date
+ */
+DataRange *DataReader::get_daily_summary() {
+ if (device_config == NULL) {
+ device_config = DeviceConfig::get_device_config(device_id);
+ summary_calc_type = device_config->get_summary_calculation_type();
+ }
+ return get_daily_summary(summary_calc_type);
+}
+
+/*
+ * Get Daily summary specified by the calc_type from the latest date.
+ */
+DataRange *DataReader::get_daily_summary(EnumSummaryCalculationType calc_type_param) {
+ Data *data;
+ Date date;
+ DataRange *ret_val;
+
+ ret_val = NULL;
+ data = get_latest_data();
+ if (data != NULL) {
+ date = data->get_date();
+ ret_val = get_daily_summary(&date, calc_type_param);
+ }
+ return ret_val;
+}
+