Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ersa::hal::IWifiRadio Class Referenceabstract

#include <wifi.h>

Inheritance diagram for ersa::hal::IWifiRadio:
Inheritance graph
[legend]

Public Member Functions

virtual ~IWifiRadio ()=default
 
virtual Result< void > init ()=0
 
virtual void enableStation ()=0
 
virtual void connectStation (const char *ssid, const char *password, bool powerSave)=0
 
virtual WifiState state () const =0
 Return the current station/radio state.
 
virtual bool copyLocalAddress (char *output, size_t capacity) const =0
 
virtual Result< void > startAccessPoint (const char *ssid, const char *password)=0
 
virtual void stopAccessPoint ()=0
 Stop access point mode.
 
virtual bool copyAccessPointAddress (char *output, size_t capacity) const =0
 Copy the access point address into a caller-owned buffer.
 
virtual void disconnect (bool powerOff)=0
 

Detailed Description

Wi-Fi station and access-point radio control; networking protocols live above this interface.

This HAL deliberately exposes link control and addresses only. HTTP, NTP, CalDAV, and other sockets belong to services, which lets those protocols be tested without the vendor Wi-Fi stack and prevents board pin details leaking into application code.

Constructor & Destructor Documentation

◆ ~IWifiRadio()

virtual ersa::hal::IWifiRadio::~IWifiRadio ( )
virtualdefault

Member Function Documentation

◆ connectStation()

virtual void ersa::hal::IWifiRadio::connectStation ( const char *  ssid,
const char *  password,
bool  powerSave 
)
pure virtual

Start station association with provided credentials.

Parameters
ssidNull-terminated network name.
passwordNull-terminated passphrase, or empty for an open network.
powerSaveKeep radio modem sleep enabled when coexisting with BLE. Completion is asynchronous; poll state() instead of blocking this call.

Implemented in ersa::test::MockWifi.

◆ copyAccessPointAddress()

virtual bool ersa::hal::IWifiRadio::copyAccessPointAddress ( char *  output,
size_t  capacity 
) const
pure virtual

Copy the access point address into a caller-owned buffer.

Implemented in ersa::test::MockWifi.

◆ copyLocalAddress()

virtual bool ersa::hal::IWifiRadio::copyLocalAddress ( char *  output,
size_t  capacity 
) const
pure virtual

Copy the station IPv4 address to caller storage; false means unavailable or truncated.

Implemented in ersa::test::MockWifi.

◆ disconnect()

virtual void ersa::hal::IWifiRadio::disconnect ( bool  powerOff)
pure virtual

Disconnect the active mode and optionally turn the radio off to save power.

Implemented in ersa::test::MockWifi.

◆ enableStation()

virtual void ersa::hal::IWifiRadio::enableStation ( )
pure virtual

Configure station mode before issuing a connection request.

Implemented in ersa::test::MockWifi.

◆ init()

virtual Result< void > ersa::hal::IWifiRadio::init ( )
pure virtual

Initialize the controller and release it to a known Off/Disconnected state.

Implemented in ersa::test::MockWifi.

◆ startAccessPoint()

virtual Result< void > ersa::hal::IWifiRadio::startAccessPoint ( const char *  ssid,
const char *  password 
)
pure virtual

Start a local configuration AP.

Returns
Error when credentials, radio state, or driver setup prevents AP startup.

Implemented in ersa::test::MockWifi.

◆ state()

virtual WifiState ersa::hal::IWifiRadio::state ( ) const
pure virtual

Return the current station/radio state.

Implemented in ersa::test::MockWifi.

◆ stopAccessPoint()

virtual void ersa::hal::IWifiRadio::stopAccessPoint ( )
pure virtual

Stop access point mode.

Implemented in ersa::test::MockWifi.


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