The WiFi of a device as WifiLoginPage uses it: scan, connect and the stored credentials. All calls must return quickly - the scan and the connection run in the background and are polled.
More...
#include <WifiControl.h>
|
| virtual | ~WifiControl ()=default |
| |
| virtual bool | startScan ()=0 |
| | Starts a scan in the background.
|
| |
| virtual bool | scanDone (std::vector< WifiNetwork > &out)=0 |
| |
| virtual void | connect (const char *ssid, const char *password)=0 |
| | Connects in the background; the credentials are stored when it works.
|
| |
| virtual void | disconnect ()=0 |
| |
| virtual State | state ()=0 |
| |
| virtual std::string | ssid ()=0 |
| | The network that is connected or that is being connected to.
|
| |
| virtual std::string | ip () |
| | The IP address while connected.
|
| |
| virtual bool | hasCredentials ()=0 |
| | Credentials are stored (they are used at the start).
|
| |
| virtual void | forget () |
| | Removes the stored credentials.
|
| |
The WiFi of a device as WifiLoginPage uses it: scan, connect and the stored credentials. All calls must return quickly - the scan and the connection run in the background and are polled.
Implementations: Esp32Wifi (TinyMaterialDesign/Wifi/WifiEsp32.h, not included by TinyMaterialDesign.h) and SimulatedWifi (desktop, tests); for another board derive from this class.
◆ State
| Enumerator |
|---|
| kDisconnected | |
| kConnecting | |
| kConnected | |
| kFailed | |
◆ ~WifiControl()
◆ connect()
| virtual void connect |
( |
const char * |
ssid, |
|
|
const char * |
password |
|
) |
| |
|
pure virtual |
Connects in the background; the credentials are stored when it works.
Implemented in Esp32Wifi, and SimulatedWifi.
◆ disconnect()
| virtual void disconnect |
( |
| ) |
|
|
pure virtual |
◆ forget()
◆ hasCredentials()
| virtual bool hasCredentials |
( |
| ) |
|
|
pure virtual |
◆ ip()
| virtual std::string ip |
( |
| ) |
|
|
inlinevirtual |
◆ scanDone()
| virtual bool scanDone |
( |
std::vector< WifiNetwork > & |
out | ) |
|
|
pure virtual |
◆ ssid()
| virtual std::string ssid |
( |
| ) |
|
|
pure virtual |
◆ startScan()
| virtual bool startScan |
( |
| ) |
|
|
pure virtual |
◆ state()
The documentation for this class was generated from the following file: