#ifndef WLAN_H #define WLAN_H #include "config.h" #include #include #include static AsyncMqttClient mqtt_client; static Ticker mqtt_connection_timer, wlan_connection_timer; static WiFiEventHandler connection_handler, disconnection_handler; extern Config *config; void initialize_wlan(); void initialize_mqtt(); void connect_wlan(); void connect_mqtt(); void on_wlan_connection(const WiFiEventStationModeGotIP &event); void on_wlan_disconnection(const WiFiEventStationModeDisconnected &event); void on_mqtt_connection(bool session); void on_mqtt_disconnection(AsyncMqttClientDisconnectReason reason); size_t construct_json(float *data, char *buffer, int buffer_size); void mqtt_transfer(float *data); #endif /* WLAN_H */