]> pilppa.org Git - lib1wire.git/blobdiff - src/DeviceData.hh
Implemented yearly calculations for min, max, mean, delta and sum
[lib1wire.git] / src / DeviceData.hh
index 367e00f0b1195ba484e7c4b1c78c67268d22c4c3..a85bf1476c739f7db65e7ca147be6668b7050401 100644 (file)
 
 #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;