EmlaLockSafe
configuration::WifiConfigurationServer Class Reference

Class implementing the configuration of the WiFi. More...

#include <WifiConfigurationServer.h>

Inheritance diagram for configuration::WifiConfigurationServer:
configuration::ConfigurationServerBase

Public Member Functions

void loop ()
 Forward of the Arduino loop function. More...
 

Static Public Member Functions

static WifiConfigurationServergetSingletonPointer ()
 Get the Singleton object. More...
 
static void begin (LiquidCrystal_PCF8574 &display)
 Create a new Configuration server. More...
 

Protected Member Functions

void createAp ()
 Create and configures the WiFi in AP mode. More...
 
void configureWebserver ()
 adds the handlers for the different webpages More...
 
void initialLcdMessage ()
 shows the ssid of the AP and the address to which the user should connect More...
 
void scanWiFi ()
 scans the visible wifis and saves them into ssids. Should be continuously called during loop. More...
 

Static Protected Member Functions

static WifiConfigurationServer ** getInstance ()
 Function providing the instance for the singleton. More...
 

Protected Attributes

DNSServer dnsServer
 Instance of the DNS server in access point mode. More...
 
LiquidCrystal_PCF8574 & display
 Reference to the display. More...
 
std::mutex mtx
 mutex for the protection of the data More...
 
std::list< String > ssids
 List with all found ssids. More...
 
IPAddress IP
 IP address in Access Point mode. More...
 
IPAddress netMsk
 Network mask in Access Point mode. More...
 

Private Member Functions

 WifiConfigurationServer (LiquidCrystal_PCF8574 &display)
 Construct a new Configuration Server object. More...
 
- Private Member Functions inherited from configuration::ConfigurationServerBase
 ConfigurationServerBase ()
 Construct a new Configuration Server object. More...
 
void addSpiffsFileToServer (const char *path, String contentType, const char *filename=nullptr)
 Adds the file from the SPIFFS with the filename to the webserver under the given path. More...
 

Additional Inherited Members

- Private Attributes inherited from configuration::ConfigurationServerBase
AsyncWebServer server
 The used asynchronous webserver. More...
 

Detailed Description

Class implementing the configuration of the WiFi.

Constructor & Destructor Documentation

◆ WifiConfigurationServer()

configuration::WifiConfigurationServer::WifiConfigurationServer ( LiquidCrystal_PCF8574 &  display)
inlineprivate

Construct a new Configuration Server object.

Parameters
displayReference to the LCD to display some status information

Member Function Documentation

◆ begin()

static void configuration::WifiConfigurationServer::begin ( LiquidCrystal_PCF8574 &  display)
inlinestatic

Create a new Configuration server.

Parameters
display
Returns
ConfigurationServer&

◆ configureWebserver()

void configuration::WifiConfigurationServer::configureWebserver ( )
inlineprotected

adds the handlers for the different webpages

◆ createAp()

void configuration::WifiConfigurationServer::createAp ( )
inlineprotected

Create and configures the WiFi in AP mode.

◆ getInstance()

static WifiConfigurationServer ** configuration::WifiConfigurationServer::getInstance ( )
inlinestaticprotected

Function providing the instance for the singleton.

◆ getSingletonPointer()

static WifiConfigurationServer * configuration::WifiConfigurationServer::getSingletonPointer ( )
inlinestatic

Get the Singleton object.

◆ initialLcdMessage()

void configuration::WifiConfigurationServer::initialLcdMessage ( )
inlineprotected

shows the ssid of the AP and the address to which the user should connect

◆ loop()

void configuration::WifiConfigurationServer::loop ( )
inline

Forward of the Arduino loop function.

◆ scanWiFi()

void configuration::WifiConfigurationServer::scanWiFi ( )
inlineprotected

scans the visible wifis and saves them into ssids. Should be continuously called during loop.

Member Data Documentation

◆ display

LiquidCrystal_PCF8574& configuration::WifiConfigurationServer::display
protected

Reference to the display.

◆ dnsServer

DNSServer configuration::WifiConfigurationServer::dnsServer
protected

Instance of the DNS server in access point mode.

◆ IP

IPAddress configuration::WifiConfigurationServer::IP
protected

IP address in Access Point mode.

◆ mtx

std::mutex configuration::WifiConfigurationServer::mtx
protected

mutex for the protection of the data

◆ netMsk

IPAddress configuration::WifiConfigurationServer::netMsk
protected

Network mask in Access Point mode.

◆ ssids

std::list<String> configuration::WifiConfigurationServer::ssids
protected

List with all found ssids.


The documentation for this class was generated from the following file: