]> pilppa.org Git - lib1wire.git/blob - src/W1Store.hh
528b19a996503677ae4af2486b2c2058c5d374ed
[lib1wire.git] / src / W1Store.hh
1 /*
2  * W1Store.hh
3  *
4  *  Created on: Oct 31, 2010
5  *      Author: lamikr
6  */
7
8 #ifndef W1STORE_HH_
9 #define W1STORE_HH_
10
11 #include <string>
12 #include <list>
13
14 #include "Data.hh"
15 #include "Date.hh"
16
17 namespace w1 {
18         class W1Store {
19                 public:
20                         W1Store(std::string device_id,
21                                 plp::Date *date_time);
22                         W1Store(std::string file_name_param);
23                         virtual ~W1Store();
24                         static std::string get_store_base_dir();
25                         static void set_store_base_dir(std::string store_param);
26                         static std::string get_store_dir_name(std::string device_id, plp::Date *ltime);
27                         static std::string get_store_file_name(std::string device_id, plp::Date *ltime);
28                         static void store(std::string device_id, std::list<std::string> *string_list);
29                         void load();
30                         Data *get_sum();
31                         Data *get_mean();
32                         w1::Data *load_first_data_row();
33                         w1::Data *load_last_data_row();
34                 protected:
35                         static std::string store_base_dir;
36                         std::string store_file_name;
37                         DataRange *data_range;
38         };
39 }
40
41 #endif /* W1STORE_HH_ */