]> pilppa.org Git - lib1wire.git/blob - src/W1DataList.hh
started adding support for reading average and sum data...
[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                         Data *get_avg_day_data(plp::Date *date);
26                         DataRange *get_avg_day_data(plp::Date *start_date, plp::Date *end_date);
27                         DataRange *get_data(plp::Date *start_date, plp::Date *end_date);
28                 protected:
29                         std::string     device_id;
30                         std::string     device_dir;
31                         std::string     device_ch_dir;
32                         std::string get_day_data(plp::Date *date);
33                         Data *find_first_data(std::vector<std::string> year_vector);
34                         Data *find_last_data(std::vector<std::string> year_vector);
35
36         };
37 }
38
39 #endif /* W1DATALIST_H_ */