/// © MiroZ 2024

#ifndef __APP_H__
#define __APP_H__

#include <stdint.h>

#include "Settings.h"
#include "Led.h"
#include "Wifi.h"
#include "Mqtt.h"
#include "Ble.h"
#include "Buffers.h"
#include "sensors/Sensors.h"
#include "AppIF.h"

class App : AppIF
{
protected:
	Wifi * m_wifi = nullptr;
	Mqtt * m_mqtt = nullptr;
	Ble * m_ble = nullptr;
	Sensors * m_sensors = nullptr;
	CircBuffer m_circ_buffer;
	Led * m_led = nullptr;

public:
	Led * getLed() override;
	CircBuffer * getBuffer() override;

public:
	App();
	
	void otaCheck();
	void init();
	void start();
	void readSensors();
	void reportSensors();
};

#endif /* __APP_H__ */