X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FDeviceData.hh;h=a85bf1476c739f7db65e7ca147be6668b7050401;hb=3d2ca40bf3d475f7e2d7e67bd888bd33a94ca978;hp=367e00f0b1195ba484e7c4b1c78c67268d22c4c3;hpb=af26b84b20b6d9d0e0ce690e8011a037e87dc5c8;p=lib1wire.git diff --git a/src/DeviceData.hh b/src/DeviceData.hh index 367e00f..a85bf14 100644 --- a/src/DeviceData.hh +++ b/src/DeviceData.hh @@ -17,30 +17,39 @@ #include -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;