#include <time.h>
-namespace w1 {
+namespace plp {
class DeviceData {
public:
DeviceData(std::string device_id);
virtual ~DeviceData();
plp::DataRange *get_data_range();
- plp::DataRange *get_monthly_summary(plp::Date *date, EnumSummaryCalculationType calc_type);
/**
- * Get summary data calculated from the daily data items that is meaning full.
+ * Get monthly summary data.
+ * Depending from the device type, it may be daily mean value, daily delta, highest value, etc...
+ */
+ plp::DataRange *get_yearly_summary(plp::Date *date, EnumSummaryCalculationType calc_type);
+ plp::DataRange *get_yearly_summary(plp::Date *date);
+ plp::DataRange *get_yearly_summary(plp::Date *start_date, plp::Date *end_date);
+ /**
+ * Get monthly summary data.
* Depending from the device type, it may be daily mean value, daily delta, highest value, etc...
*/
+ plp::DataRange *get_monthly_summary(plp::Date *date, EnumSummaryCalculationType calc_type);
plp::DataRange *get_monthly_summary(plp::Date *date);
plp::DataRange *get_monthly_summary(plp::Date *start_date, plp::Date *end_date);
- plp::DataRange *get_daily_summary(plp::Date *date, EnumSummaryCalculationType calc_type);
/**
- * Get summary data calculated from the daily data items that is meaning full.
+ * Get daily summary data calculated from the daily data items.
* Depending from the device type, it may be daily mean value, daily delta, highest value, etc...
*/
+ plp::DataRange *get_daily_summary(plp::Date *date, EnumSummaryCalculationType calc_type);
plp::DataRange *get_daily_summary(plp::Date *date);
plp::DataRange *get_daily_summary(plp::Date *start_date, plp::Date *end_date);
plp::DataRange *get_hourly_summary(plp::Date *date, EnumSummaryCalculationType calc_type);
plp::DataRange *get_hourly_summary(plp::Date *date);
plp::DataRange *get_hourly_summary(plp::Date *start_date, plp::Date *end_date);
plp::DataRange *get_data(plp::Date *start_date, plp::Date *end_date);
+ plp::Data *find_newest_data(std::string year_name_param);
+ plp::Data *find_oldest_data(std::string year_name_param);
protected:
std::string device_id;
std::string device_dir;