ESPMegaPRO-v3-SDK/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/RemoteVariable.hpp

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;
};