/* * DeviceData.hh * * Created on: Nov 7, 2010 * Author: lamikr */ #ifndef W1DATALIST_H_ #define W1DATALIST_H_ #include #include #include "Data.hh" #include "Date.hh" #include "DeviceConfig.hh" #include namespace w1 { class DeviceData { public: DeviceData(std::string device_id); virtual ~DeviceData(); DataRange *get_data_range(); /** * Get summary data calculated from the daily data items that is meaning full. * Depending from the device type, it may be daily mean value, daily delta, highest value, etc... */ Data *get_day_summary(plp::Date *date); DataRange *get_daily_summary(plp::Date *start_date, plp::Date *end_date); std::vector get_hourly_summary(plp::Date *date); DataRange *get_hourly_summary(plp::Date *start_date, plp::Date *end_date); DataRange *get_data(plp::Date *start_date, plp::Date *end_date); protected: std::string device_id; std::string device_dir; std::string device_ch_dir; w1::DeviceConfig *device_config; enum_summary_calculation summary_calc_type; Data *find_oldest_data(std::vector year_vector); Data *find_newest_data(std::vector year_vector); }; } #endif /* W1DATALIST_H_ */