Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
WeatherStation.h@4:bfe306335065, 2019-03-05 (annotated)
- Committer:
- loicguibert
- Date:
- Tue Mar 05 10:27:40 2019 +0000
- Revision:
- 4:bfe306335065
- Child:
- 5:0d9e292a9d06
Mesurements ok, lib ok
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| loicguibert | 4:bfe306335065 | 1 | #pragma once |
| loicguibert | 4:bfe306335065 | 2 | |
| loicguibert | 4:bfe306335065 | 3 | #include "Logger.h" |
| loicguibert | 4:bfe306335065 | 4 | #include "NRFDevKit.h" |
| loicguibert | 4:bfe306335065 | 5 | #include "LPS25HBDevice.h" |
| loicguibert | 4:bfe306335065 | 6 | #include "HDC1000Device.h" |
| loicguibert | 4:bfe306335065 | 7 | |
| loicguibert | 4:bfe306335065 | 8 | class WeatherStation |
| loicguibert | 4:bfe306335065 | 9 | { |
| loicguibert | 4:bfe306335065 | 10 | public: |
| loicguibert | 4:bfe306335065 | 11 | // constructor |
| loicguibert | 4:bfe306335065 | 12 | WeatherStation(NRFDevKit& nrfDevKit, Logger& logger); |
| loicguibert | 4:bfe306335065 | 13 | |
| loicguibert | 4:bfe306335065 | 14 | // called for starting the weather station |
| loicguibert | 4:bfe306335065 | 15 | // it will start getting measurements and advertise with data measurements |
| loicguibert | 4:bfe306335065 | 16 | void start(); |
| loicguibert | 4:bfe306335065 | 17 | |
| loicguibert | 4:bfe306335065 | 18 | // called by timer |
| loicguibert | 4:bfe306335065 | 19 | void performMeasurements(void); |
| loicguibert | 4:bfe306335065 | 20 | |
| loicguibert | 4:bfe306335065 | 21 | private: |
| loicguibert | 4:bfe306335065 | 22 | // data members |
| loicguibert | 4:bfe306335065 | 23 | |
| loicguibert | 4:bfe306335065 | 24 | // event queue for handling all events (including timers) |
| loicguibert | 4:bfe306335065 | 25 | events::EventQueue m_eventQueue; |
| loicguibert | 4:bfe306335065 | 26 | |
| loicguibert | 4:bfe306335065 | 27 | // measurement interval |
| loicguibert | 4:bfe306335065 | 28 | static const int m_measurementInterval; |
| loicguibert | 4:bfe306335065 | 29 | |
| loicguibert | 4:bfe306335065 | 30 | // blink interval |
| loicguibert | 4:bfe306335065 | 31 | static const int m_blinkInterval; |
| loicguibert | 4:bfe306335065 | 32 | |
| loicguibert | 4:bfe306335065 | 33 | // reference to dev kit |
| loicguibert | 4:bfe306335065 | 34 | NRFDevKit& m_nrfDevKit; |
| loicguibert | 4:bfe306335065 | 35 | |
| loicguibert | 4:bfe306335065 | 36 | // reference to logger |
| loicguibert | 4:bfe306335065 | 37 | Logger& m_logger; |
| loicguibert | 4:bfe306335065 | 38 | |
| loicguibert | 4:bfe306335065 | 39 | LPS25HBDevice m_lps25hb; |
| loicguibert | 4:bfe306335065 | 40 | |
| loicguibert | 4:bfe306335065 | 41 | HDC1000Device m_hdc1000; |
| loicguibert | 4:bfe306335065 | 42 | }; |