Library for my home monitoring classes and serial communication protocol. It monitors temperature and movement on the mbed application board.
Temperature/Temperature.h@0:3f846fc933a2, 2013-09-01 (annotated)
- Committer:
- groletter
- Date:
- Sun Sep 01 23:35:18 2013 +0000
- Revision:
- 0:3f846fc933a2
- Child:
- 2:84432add9142
My library for temperature and motion monitoring and communication over a USB Serial device. Requires host-side code.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
groletter | 0:3f846fc933a2 | 1 | #ifndef TEMPERATURE_H |
groletter | 0:3f846fc933a2 | 2 | #define TEMPERATURE_H |
groletter | 0:3f846fc933a2 | 3 | |
groletter | 0:3f846fc933a2 | 4 | #include <vector> |
groletter | 0:3f846fc933a2 | 5 | #include <string> |
groletter | 0:3f846fc933a2 | 6 | |
groletter | 0:3f846fc933a2 | 7 | class Temperature { |
groletter | 0:3f846fc933a2 | 8 | private: |
groletter | 0:3f846fc933a2 | 9 | double max_temp_limit, min_temp_limit, period_limit, max_samples_limit; |
groletter | 0:3f846fc933a2 | 10 | double min_temp; |
groletter | 0:3f846fc933a2 | 11 | double max_temp; |
groletter | 0:3f846fc933a2 | 12 | double temp_sample_period; |
groletter | 0:3f846fc933a2 | 13 | int max_samples; |
groletter | 0:3f846fc933a2 | 14 | int sample_ptr; |
groletter | 0:3f846fc933a2 | 15 | bool wrapped_once; |
groletter | 0:3f846fc933a2 | 16 | std::vector<std::string> temp_samples; |
groletter | 0:3f846fc933a2 | 17 | |
groletter | 0:3f846fc933a2 | 18 | public: |
groletter | 0:3f846fc933a2 | 19 | Temperature(); |
groletter | 0:3f846fc933a2 | 20 | double get_min(); |
groletter | 0:3f846fc933a2 | 21 | double get_max(); |
groletter | 0:3f846fc933a2 | 22 | double get_period(); |
groletter | 0:3f846fc933a2 | 23 | bool set_min(double); |
groletter | 0:3f846fc933a2 | 24 | bool set_max(double); |
groletter | 0:3f846fc933a2 | 25 | bool set_period(double); |
groletter | 0:3f846fc933a2 | 26 | void add_sample(double temp_sample); |
groletter | 0:3f846fc933a2 | 27 | bool change_max_samples(int); |
groletter | 0:3f846fc933a2 | 28 | int get_max_samples(); |
groletter | 0:3f846fc933a2 | 29 | const std::vector<std::string> &get_samples(); |
groletter | 0:3f846fc933a2 | 30 | |
groletter | 0:3f846fc933a2 | 31 | }; |
groletter | 0:3f846fc933a2 | 32 | |
groletter | 0:3f846fc933a2 | 33 | #endif |