mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-25 11:56:04 +00:00
Improved ethernet connection
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @copyright Utilitech AS 2023
|
||||
* License: Fair Source
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WIFIACCESSPOINTCONNECTIONHANDLER_H
|
||||
#define _WIFIACCESSPOINTCONNECTIONHANDLER_H
|
||||
|
||||
#include "ConnectionHandler.h"
|
||||
#include <Arduino.h>
|
||||
#include "RemoteDebug.h"
|
||||
#include <DNSServer.h>
|
||||
|
||||
class WiFiAccessPointConnectionHandler : public ConnectionHandler {
|
||||
public:
|
||||
WiFiAccessPointConnectionHandler(RemoteDebug* debugger);
|
||||
|
||||
bool connect(NetworkConfig config, SystemConfig sys);
|
||||
void disconnect(unsigned long reconnectDelay);
|
||||
bool isConnected();
|
||||
bool isConfigChanged();
|
||||
void getCurrentConfig(NetworkConfig& networkConfig);
|
||||
IPAddress getIP();
|
||||
IPAddress getSubnetMask();
|
||||
IPAddress getGateway();
|
||||
IPAddress getDns(uint8_t idx);
|
||||
|
||||
#if defined(ESP32)
|
||||
void eventHandler(WiFiEvent_t event, WiFiEventInfo_t info);
|
||||
#endif
|
||||
|
||||
private:
|
||||
RemoteDebug* debugger;
|
||||
NetworkConfig config;
|
||||
|
||||
DNSServer dnsServer;
|
||||
|
||||
bool connected = false;
|
||||
bool configChanged = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user