17 lines
401 B
C++
17 lines
401 B
C++
|
#pragma once
|
||
|
#include <ESPMegaIoT.hpp>
|
||
|
class RemoteVariable
|
||
|
{
|
||
|
public:
|
||
|
RemoteVariable();
|
||
|
~RemoteVariable();
|
||
|
void begin(size_t size, char* topic, ESPMegaIoT* iot);
|
||
|
void subscribe();
|
||
|
char* getValue();
|
||
|
void mqtt_callback(char* topic, char* payload);
|
||
|
private:
|
||
|
ESPMegaIoT* iot;
|
||
|
char* topic;
|
||
|
char* value;
|
||
|
size_t size;
|
||
|
};
|