PR343
This commit is contained in:
45
src/networkDevices/WifiDevice.h
Normal file
45
src/networkDevices/WifiDevice.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include <WiFiClient.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
#include <Preferences.h>
|
||||
#include "NetworkDevice.h"
|
||||
#include "WiFiManager.h"
|
||||
#include "espMqttClient.h"
|
||||
#include "IPConfiguration.h"
|
||||
|
||||
class WifiDevice : public NetworkDevice
|
||||
{
|
||||
public:
|
||||
WifiDevice(const String& hostname, Preferences* preferences, const IPConfiguration* ipConfiguration);
|
||||
|
||||
const String deviceName() const override;
|
||||
|
||||
virtual void initialize();
|
||||
virtual void reconfigure();
|
||||
virtual ReconnectStatus reconnect();
|
||||
bool supportsEncryption() override;
|
||||
|
||||
virtual bool isConnected();
|
||||
|
||||
int8_t signalStrength() override;
|
||||
|
||||
String localIP() override;
|
||||
String BSSIDstr() override;
|
||||
|
||||
private:
|
||||
static void clearRtcInitVar(WiFiManager*);
|
||||
|
||||
void onDisconnected();
|
||||
|
||||
WiFiManager _wm;
|
||||
Preferences* _preferences = nullptr;
|
||||
|
||||
bool _restartOnDisconnect = false;
|
||||
bool _startAp = false;
|
||||
char* _path;
|
||||
|
||||
char _ca[TLS_CA_MAX_SIZE] = {0};
|
||||
char _cert[TLS_CERT_MAX_SIZE] = {0};
|
||||
char _key[TLS_KEY_MAX_SIZE] = {0};
|
||||
};
|
||||
Reference in New Issue
Block a user