23 lines
439 B
C++
23 lines
439 B
C++
#ifndef MQTTManager_h
|
|
#define MQTTManager_h
|
|
|
|
#include <Arduino.h>
|
|
|
|
class MQTTManager_
|
|
{
|
|
private:
|
|
MQTTManager_() = default;
|
|
|
|
public:
|
|
static MQTTManager_ &getInstance();
|
|
void setup();
|
|
void tick();
|
|
void publish(const char *topic, const char *payload);
|
|
void setCurrentApp(String value);
|
|
void sendStats();
|
|
void sendButton(byte btn, bool state);
|
|
};
|
|
|
|
extern MQTTManager_ &MQTTManager;
|
|
|
|
#endif |