roo_wifi
API Documentation for roo_wifi
Loading...
Searching...
No Matches
roo_wifi::Interface Class Referenceabstract

Abstraction for interacting with the hardware Wi-Fi interface. More...

#include <interface.h>

Inheritance diagram for roo_wifi::Interface:
[legend]

Data Structures

class  EventListener
 Listener for interface events. More...
 

Public Types

enum  EventType {
  EV_UNKNOWN = 0 , EV_SCAN_COMPLETED = 1 , EV_CONNECTED = 2 , EV_GOT_IP = 3 ,
  EV_DISCONNECTED = 4 , EV_CONNECTION_FAILED = 5 , EV_CONNECTION_LOST = 6
}
 Interface event types. More...
 

Public Member Functions

virtual void addEventListener (EventListener *listener)=0
 Registers an interface event listener.
 
virtual void removeEventListener (EventListener *listener)=0
 Unregisters an interface event listener.
 
virtual bool getApInfo (NetworkDetails *info) const =0
 Returns current AP information; false if not connected.
 
virtual bool startScan ()=0
 Starts a scan.
 
virtual bool scanCompleted () const =0
 Returns true if the last scan has completed.
 
virtual void disconnect ()=0
 Disconnects from the current network.
 
virtual bool connect (const std::string &ssid, const std::string &passwd)=0
 Connects to the specified SSID/password.
 
virtual ConnectionStatus getStatus ()=0
 Returns the current connection status.
 
virtual bool getScanResults (std::vector< NetworkDetails > *list, int max_count) const =0
 Returns scan results, up to max_count entries.
 
virtual ~Interface ()
 Virtual destructor.
 

Detailed Description

Abstraction for interacting with the hardware Wi-Fi interface.

Definition at line 70 of file interface.h.

Member Enumeration Documentation

◆ EventType

Interface event types.

Enumerator
EV_UNKNOWN 
EV_SCAN_COMPLETED 
EV_CONNECTED 
EV_GOT_IP 
EV_DISCONNECTED 
EV_CONNECTION_FAILED 
EV_CONNECTION_LOST 

Definition at line 73 of file interface.h.

Constructor & Destructor Documentation

◆ ~Interface()

virtual roo_wifi::Interface::~Interface ( )
inlinevirtual

Virtual destructor.

Definition at line 113 of file interface.h.

Member Function Documentation

◆ addEventListener()

virtual void roo_wifi::Interface::addEventListener ( EventListener listener)
pure virtual

Registers an interface event listener.

Implemented in roo_wifi::Esp32ArduinoInterface.

Referenced by roo_wifi::Controller::begin().

◆ connect()

virtual bool roo_wifi::Interface::connect ( const std::string &  ssid,
const std::string &  passwd 
)
pure virtual

Connects to the specified SSID/password.

Implemented in roo_wifi::Esp32ArduinoInterface.

Referenced by roo_wifi::Controller::connect().

◆ disconnect()

virtual void roo_wifi::Interface::disconnect ( )
pure virtual

Disconnects from the current network.

Implemented in roo_wifi::Esp32ArduinoInterface.

Referenced by roo_wifi::Controller::disconnect(), and roo_wifi::Controller::toggleEnabled().

◆ getApInfo()

virtual bool roo_wifi::Interface::getApInfo ( NetworkDetails info) const
pure virtual

Returns current AP information; false if not connected.

Implemented in roo_wifi::Esp32ArduinoInterface.

◆ getScanResults()

virtual bool roo_wifi::Interface::getScanResults ( std::vector< NetworkDetails > *  list,
int  max_count 
) const
pure virtual

Returns scan results, up to max_count entries.

Implemented in roo_wifi::Esp32ArduinoInterface.

◆ getStatus()

virtual ConnectionStatus roo_wifi::Interface::getStatus ( )
pure virtual

Returns the current connection status.

Implemented in roo_wifi::Esp32ArduinoInterface.

◆ removeEventListener()

virtual void roo_wifi::Interface::removeEventListener ( EventListener listener)
pure virtual

Unregisters an interface event listener.

Implemented in roo_wifi::Esp32ArduinoInterface.

Referenced by roo_wifi::Controller::~Controller().

◆ scanCompleted()

virtual bool roo_wifi::Interface::scanCompleted ( ) const
pure virtual

Returns true if the last scan has completed.

Implemented in roo_wifi::Esp32ArduinoInterface.

Referenced by roo_wifi::Controller::isScanCompleted(), and roo_wifi::Controller::resume().

◆ startScan()

virtual bool roo_wifi::Interface::startScan ( )
pure virtual

Starts a scan.

Implemented in roo_wifi::Esp32ArduinoInterface.

Referenced by roo_wifi::Controller::startScan().


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