Library for my home monitoring classes and serial communication protocol. It monitors temperature and movement on the mbed application board.
Diff: Temperature/Temperature.h
- Revision:
- 0:3f846fc933a2
- Child:
- 2:84432add9142
diff -r 000000000000 -r 3f846fc933a2 Temperature/Temperature.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Temperature/Temperature.h Sun Sep 01 23:35:18 2013 +0000 @@ -0,0 +1,33 @@ +#ifndef TEMPERATURE_H +#define TEMPERATURE_H + +#include <vector> +#include <string> + +class Temperature { + private: + double max_temp_limit, min_temp_limit, period_limit, max_samples_limit; + double min_temp; + double max_temp; + double temp_sample_period; + int max_samples; + int sample_ptr; + bool wrapped_once; + std::vector<std::string> temp_samples; + + public: + Temperature(); + double get_min(); + double get_max(); + double get_period(); + bool set_min(double); + bool set_max(double); + bool set_period(double); + void add_sample(double temp_sample); + bool change_max_samples(int); + int get_max_samples(); + const std::vector<std::string> &get_samples(); + +}; + +#endif \ No newline at end of file