|
@ -81,8 +81,8 @@ void systemStabilityCounter(uint8_t); |
|
|
// API |
|
|
// API |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
using api_get_callback_f = std::function<void(char *, size_t)>; |
|
|
|
|
|
using api_put_callback_f = std::function<void(const char *)> ; |
|
|
|
|
|
|
|
|
using api_get_callback_f = std::function<void(char * buffer, size_t size)>; |
|
|
|
|
|
using api_put_callback_f = std::function<void(const char * payload)> ; |
|
|
|
|
|
|
|
|
#if WEB_SUPPORT |
|
|
#if WEB_SUPPORT |
|
|
void apiRegister(const char * key, api_get_callback_f getFn, api_put_callback_f putFn = NULL); |
|
|
void apiRegister(const char * key, api_get_callback_f getFn, api_put_callback_f putFn = NULL); |
|
@ -192,8 +192,8 @@ void i2c_read_buffer(uint8_t address, uint8_t * buffer, size_t len); |
|
|
#include <PubSubClient.h> |
|
|
#include <PubSubClient.h> |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
using mqtt_callback_f = std::function<void(unsigned int, const char *, char *)>; |
|
|
|
|
|
using mqtt_msg_t = std::pair<String, String>; |
|
|
|
|
|
|
|
|
using mqtt_callback_f = std::function<void(unsigned int type, const char * topic, char * payload)>; |
|
|
|
|
|
using mqtt_msg_t = std::pair<String, String>; // topic, payload |
|
|
|
|
|
|
|
|
void mqttRegister(mqtt_callback_f callback); |
|
|
void mqttRegister(mqtt_callback_f callback); |
|
|
|
|
|
|
|
@ -312,7 +312,7 @@ class AsyncWebServer; |
|
|
class AwsEventType; |
|
|
class AwsEventType; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
using web_body_callback_f = std::function<bool(AsyncWebServerRequest*, uint8_t*, size_t, size_t, size_t)>; |
|
|
|
|
|
|
|
|
using web_body_callback_f = std::function<bool(AsyncWebServerRequest*, uint8_t* data, size_t len, size_t index, size_t total)>; |
|
|
using web_request_callback_f = std::function<bool(AsyncWebServerRequest*)>; |
|
|
using web_request_callback_f = std::function<bool(AsyncWebServerRequest*)>; |
|
|
void webBodyRegister(web_body_callback_f); |
|
|
void webBodyRegister(web_body_callback_f); |
|
|
void webRequestRegister(web_request_callback_f); |
|
|
void webRequestRegister(web_request_callback_f); |
|
@ -399,7 +399,7 @@ bool wifiConnected(); |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// THERMOSTAT |
|
|
// THERMOSTAT |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
using thermostat_callback_f = std::function<void(bool)>; |
|
|
|
|
|
|
|
|
using thermostat_callback_f = std::function<void(bool state)>; |
|
|
#if THERMOSTAT_SUPPORT |
|
|
#if THERMOSTAT_SUPPORT |
|
|
void thermostatRegister(thermostat_callback_f callback); |
|
|
void thermostatRegister(thermostat_callback_f callback); |
|
|
#endif |
|
|
#endif |
|
|