Lauffähig und aufgeräumt
This commit is contained in:
+18
-12
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file network.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief Some network and MQTT stuff
|
||||
* @brief TODO: write some stuff here too
|
||||
* @version 0.1
|
||||
* @date 2021-12-14
|
||||
*
|
||||
@@ -19,18 +19,24 @@
|
||||
|
||||
#define MQTT_TIME_RECONNECT 2500
|
||||
|
||||
IPAddress local_IP;
|
||||
extern IPAddress gateway;
|
||||
extern IPAddress subnet;
|
||||
extern IPAddress mqtt_server;
|
||||
class Network {
|
||||
public:
|
||||
static void setIps();
|
||||
static void connectWifi();
|
||||
static void setupMQTT();
|
||||
static void checkMQTT();
|
||||
static PubSubClient* getMqtttClient();
|
||||
|
||||
extern WiFiClient wifi_client;
|
||||
PubSubClient mqtt_client(wifi_client);
|
||||
private:
|
||||
static bool connectMQTT();
|
||||
|
||||
void setIps();
|
||||
void connectWifi();
|
||||
void setupMQTT();
|
||||
bool connectMQTT();
|
||||
void checkMQTT();
|
||||
static IPAddress local_IP;
|
||||
static IPAddress gateway;
|
||||
static IPAddress subnet;
|
||||
static IPAddress mqtt_server;
|
||||
|
||||
static WiFiClient wifi_client;
|
||||
static PubSubClient* mqtt_client;
|
||||
};
|
||||
|
||||
#endif // NETWORK_H
|
||||
Reference in New Issue
Block a user