|
TinyMaterialDesign
|
WiFi without hardware, for the desktop and tests: a fixed list of networks; connecting succeeds after connectMs if the network is open or the password is password ("demo").
More...
#include <WifiControl.h>


Public Member Functions | |
| SimulatedWifi () | |
| void | setConnected (const char *ssid) |
| Starts connected (with stored credentials). | |
| bool | startScan () override |
| Starts a scan in the background. | |
| bool | scanDone (std::vector< WifiNetwork > &out) override |
| void | connect (const char *ssid, const char *pw) override |
| Connects in the background; the credentials are stored when it works. | |
| void | disconnect () override |
| State | state () override |
| std::string | ssid () override |
| The network that is connected or that is being connected to. | |
| std::string | ip () override |
| The IP address while connected. | |
| bool | hasCredentials () override |
| Credentials are stored (they are used at the start). | |
| void | forget () override |
| Removes the stored credentials. | |
Public Member Functions inherited from WifiControl | |
| 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. | |
Public Attributes | |
| std::vector< WifiNetwork > | networks |
| std::string | password = "demo" |
| The password that works for the secure networks. | |
| uint32_t | scanMs = 800 |
| uint32_t | connectMs = 1500 |
Additional Inherited Members | |
Public Types inherited from WifiControl | |
| enum class | State { kDisconnected , kConnecting , kConnected , kFailed } |
WiFi without hardware, for the desktop and tests: a fixed list of networks; connecting succeeds after connectMs if the network is open or the password is password ("demo").
|
inline |
|
inlineoverridevirtual |
Connects in the background; the credentials are stored when it works.
Implements WifiControl.
|
inlineoverridevirtual |
Implements WifiControl.
|
inlineoverridevirtual |
Removes the stored credentials.
Reimplemented from WifiControl.
|
inlineoverridevirtual |
Credentials are stored (they are used at the start).
Implements WifiControl.
|
inlineoverridevirtual |
The IP address while connected.
Reimplemented from WifiControl.
|
inlineoverridevirtual |
True when the scan has finished; out then holds the networks (strongest first, each SSID once - see normalizeNetworks()).
Implements WifiControl.
|
inline |
Starts connected (with stored credentials).
|
inlineoverridevirtual |
The network that is connected or that is being connected to.
Implements WifiControl.
|
inlineoverridevirtual |
Starts a scan in the background.
Implements WifiControl.
|
inlineoverridevirtual |
Implements WifiControl.
| uint32_t connectMs = 1500 |
| std::vector<WifiNetwork> networks |
| std::string password = "demo" |
The password that works for the secure networks.
| uint32_t scanMs = 800 |