4 * Created on: Nov 7, 2010
16 #include "DeviceConfig.hh"
23 DataReader(std::string device_id);
24 virtual ~DataReader();
25 DataRange *get_data_range();
27 * Get monthly summary data.
28 * Depending from the device type, it may be daily mean value, daily delta, highest value, etc...
30 DataRange *get_yearly_summary(Date *date, EnumSummaryCalculationType calc_type);
31 DataRange *get_yearly_summary(Date *date);
32 DataRange *get_yearly_summary(Date *start_date, Date *end_date);
34 * Get monthly summary data.
35 * Depending from the device type, it may be daily mean value, daily delta, highest value, etc...
37 DataRange *get_monthly_summary(Date *date, EnumSummaryCalculationType calc_type);
38 DataRange *get_monthly_summary(Date *date);
39 DataRange *get_monthly_summary(Date *start_date, Date *end_date);
42 * Get daily summary data calculated from the daily data items.
43 * Depending from the device type, it may be daily mean value, daily delta, highest value, etc...
46 * Get Daily summary from the latest date
48 DataRange *get_daily_summary();
50 * Get Daily summary specified by the calc_type from the latest date.
52 DataRange *get_daily_summary(EnumSummaryCalculationType calc_type);
53 DataRange *get_daily_summary(Date *date, EnumSummaryCalculationType calc_type);
54 DataRange *get_daily_summary(Date *date);
55 DataRange *get_daily_summary(Date *start_date, Date *end_date);
57 DataRange *get_hourly_summary(Date *date, EnumSummaryCalculationType calc_type);
58 DataRange *get_hourly_summary(Date *date);
59 DataRange *get_hourly_summary(Date *start_date, Date *end_date);
61 DataRange *get_data(Date *start_date, Date *end_date);
62 std::string get_device_id();
63 std::string get_device_type();
64 Data *get_latest_data();
66 std::string device_id;
67 std::string device_dir;
68 std::string device_ch_dir;
69 DeviceConfig *device_config;
70 EnumSummaryCalculationType summary_calc_type;
71 Data *find_oldest_data(std::vector<std::string> year_vector);
72 Data *find_latest_data(std::vector<std::string> year_vector);
73 DataRange *get_summary(Date *date_param,
74 EnumSummaryCalculationType calc_type_param,
75 EnumSummaryPeriod period_type_param);
79 #endif /* DATAREADER_H_ */