4 * Created on: Oct 20, 2010
19 #ifndef W1_SCAN_ROOTDIR
20 #define W1_SCAN_ROOTDIR "/sys/bus/w1/devices"
24 #define W1_SLAVE_FILE "w1_slave";
30 W1Device(int family_code_param,
31 std::string device_id_param,
32 dirent *direntry_param);
34 int get_w1_family_code();
36 std::string get_name();
37 void set_name(std::string name_param);
38 virtual std::string get_unit() = 0;
39 virtual std::string get_device_type() = 0;
40 plp::Data *get_and_collect_data();
41 virtual void save_data();
42 virtual void printout();
44 virtual std::vector<double> *get_raw_data() = 0;
45 virtual unsigned int get_data_decimal_precision() = 0;
46 void collect_data(plp::Data *data);
47 std::string to_string(double val, int digit_count);
48 //Data *get_formatted_data(Data *data);
49 virtual bool is_supported_w1_family_code(int family_code) = 0;
54 std::string slave_file;
55 std::list<plp::Data *> memory_cache;
59 #endif /* W1DEVICE_HH_ */