yes Spada / Mbed OS programme

WeatherStation.h

Committer:
loicguibert
Date:
2019-03-19
Revision:
11:dbc310addbf6
Parent:
5:0d9e292a9d06
Child:
12:856286ad4cdc

File content as of revision 11:dbc310addbf6:

#pragma once

#include "Logger.h"
#include "IDevKit.h"
#include "LPS25HBDevice.h"
#include "HDC1000Device.h"
#include "MeasurementHistory.h"
#include "ble/BLE.h"
#include "GAPPeripheral.h"


class WeatherStation : public GAPPeripheral {
public:
  // constructor
  WeatherStation(IDevKit& iDevKit, Logger& logger, BLE& ble);
  
  // called for starting the weather station
  // it will start getting measurements and advertise with data measurements
  void start();
  
  void advertise(void);
  
  // called by timer
  void performMeasurements(void);
    
private:
  // data members
    
  // event queue for handling all events (including timers)
  events::EventQueue m_eventQueue;
    
  // measurement interval
  static const int m_measurementInterval;
  
  // blink interval
  static const int m_blinkInterval;
  
  // reference to dev kit
  IDevKit& m_iDevKit;
  
  // reference to logger
  Logger& m_logger;
  
  // reference to devices
  LPS25HBDevice m_lps25hb;
  
  HDC1000Device m_hdc1000;
  
  MeasurementHistory m_history;

};