Finish documention until someone change something

This commit is contained in:
2022-02-15 20:12:50 +01:00
parent 3a2e51713b
commit c8e3344b27
50 changed files with 991 additions and 223 deletions
+40 -4
View File
@@ -1,7 +1,7 @@
/**
* @file network.h
* @author Alexander Klein (alex@kleiax.de)
* @brief TODO: write some stuff here too
* @brief Contains the Network class.
* @version 0.1
* @date 2021-12-14
*
@@ -18,17 +18,53 @@
#include "networkConfig.h"
#define MQTT_TIME_RECONNECT 2500
/**
* @brief This class handles all network stuff
*
* This class only inherits static functions and members and use
* only the configuration data is given by networkConfig.h
*
*/
class Network {
public:
/**
* @brief Set the all IPs needed by this class
*/
static void setIps();
/**
* @brief Establish a connection to the WiFi.
*/
static void connectWifi();
/**
* @brief Set all general settings to connect to a broker.
*/
static void setupMQTT();
/**
* @brief Checks if mqtt is still connected
*
* If mqtt is not connect, this function try a reconnect
* with the function connectMQTT. This function should be
* called every mainloop.
*/
static void checkMQTT();
static PubSubClient* getMqtttClient();
/**
* @brief Get the Mqtt Client object
*
* @return PubSubClient*
*/
static PubSubClient* getMqttClient();
private:
/**
* @brief Tries a connect to the broker
*
* @return true if the connect attemp was successful
* @return false if the connect attemp was unsuccessful
*/
static bool connectMQTT();
static IPAddress local_IP;