]> pilppa.org Git - lib1wire.git/blob - src/W1DataList.hh
e401d8eeed32ffeee2371e674aead4d2083d70f9
[lib1wire.git] / src / W1DataList.hh
1 /*
2  * W1DataList.hh
3  *
4  *  Created on: Nov 7, 2010
5  *      Author: lamikr
6  */
7
8 #ifndef W1DATALIST_H_
9 #define W1DATALIST_H_
10
11 #include <string>
12 #include <vector>
13
14 #include "Data.hh"
15 #include "Date.hh"
16
17 #include <time.h>
18
19 namespace w1 {
20         class W1DataList {
21                 public:
22                         W1DataList(std::string device_id);
23                         virtual ~W1DataList();
24                         DataRange *get_data_range();
25                         /**
26                          * Get summary data calculated from the daily data items that is meaning full.
27                          * Depending from the device type, it may be daily mean value, daily delta, highest value, etc...
28                          */
29                         Data *get_daily_summary(plp::Date *date);
30                         DataRange *get_daily_summary(plp::Date *start_date, plp::Date *end_date);
31                         DataRange *get_data(plp::Date *start_date, plp::Date *end_date);
32                 protected:
33                         std::string     device_id;
34                         std::string     device_dir;
35                         std::string     device_ch_dir;
36                         Data *find_oldest_data(std::vector<std::string> year_vector);
37                         Data *find_newest_data(std::vector<std::string> year_vector);
38
39         };
40 }
41
42 #endif /* W1DATALIST_H_ */