remote variable set

This commit is contained in:
Siwat Sirichai 2024-01-16 12:48:06 +07:00
parent dbdb8eefbe
commit 9988075791
2 changed files with 36 additions and 2 deletions

View file

@ -6,12 +6,20 @@ class RemoteVariable
RemoteVariable();
~RemoteVariable();
void begin(size_t size, char* topic, ESPMegaIoT* iot);
void begin(size_t size, char* topic, ESPMegaIoT* iot, bool useValueRequest, char* valueRequestTopic);
void setValue(char* value);
void enableSetValue(char* setValueTopic);
void subscribe();
void requestValue();
char* getValue();
void mqtt_callback(char* topic, char* payload);
private:
void mqtt_callback(char* topic, char* payload);
ESPMegaIoT* iot;
char* topic;
char* value;
size_t size;
bool useValueRequest;
char* valueRequestTopic;
bool useSetValue;
char* setValueTopic;
};