Leakage sensor
Loading...
Searching...
No Matches
WifiConnection Class Reference

A controller for a WiFi connection. More...

#include <wifi-connection.hpp>

Public Member Functions

auto isConnected () -> bool
 
void init (std::list< WifiDependent * > dependents)
 

Static Public Member Functions

static auto getInstance () -> WifiConnection &
 

Detailed Description

A controller for a WiFi connection.

A singleton that will take care of your WiFi connection. It will try to establish a connection, attempt reconnects in case of a connection loss and inform registered WifiDependent s about successful connects as well as connection losses by calling their WifiDependent::onWifiConnectionEstablished() or WifiDependent::onWifiConnectionLost() callback respectively.

Member Function Documentation

◆ getInstance()

static auto WifiConnection::getInstance ( ) -> WifiConnection &
inlinestatic

Gets the Singleton instance.

◆ init()

void WifiConnection::init ( std::list< WifiDependent * > dependentsList)

Initializes the controller while registering a collection of WifiDependent s.

Parameters
dependentsA collection of instances that depend on a WiFi connection. The dependents will be informed about changes in the connection's status.

◆ isConnected()

bool WifiConnection::isConnected ( ) -> bool

Returns the WiFi connection status.

Returns
true in case the WiFi connection is established or false otherwise.

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