|
HF Interface Wrapper 0.1.0-dev
Embedded C++ hardware abstraction layer
|
Abstract base class for WiFi functionality. More...
#include <BaseWifi.h>
Public Member Functions | |
| virtual | ~BaseWifi () noexcept=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual hf_wifi_err_t | Initialize (hf_wifi_mode_t mode) noexcept=0 |
| Initialize the WiFi subsystem. | |
| virtual hf_wifi_err_t | Deinitialize () noexcept=0 |
| Deinitialize the WiFi subsystem. | |
| virtual bool | IsInitialized () const noexcept=0 |
| Check if WiFi is initialized. | |
| virtual hf_wifi_err_t | SetMode (hf_wifi_mode_t mode) noexcept=0 |
| Set WiFi operating mode. | |
| virtual hf_wifi_mode_t | GetMode () const noexcept=0 |
| Get current WiFi operating mode. | |
| virtual hf_wifi_err_t | ConfigureStation (const hf_wifi_station_config_t &config) noexcept=0 |
| Configure station parameters. | |
| virtual hf_wifi_err_t | Connect (uint32_t timeout_ms=0) noexcept=0 |
| Connect to a WiFi network (station mode) | |
| virtual hf_wifi_err_t | Disconnect () noexcept=0 |
| Disconnect from WiFi network. | |
| virtual bool | IsConnected () const noexcept=0 |
| Check if connected to a network. | |
| virtual int8_t | GetRssi () const noexcept=0 |
| Get signal strength (RSSI) | |
| virtual hf_wifi_err_t | GetIpInfo (hf_wifi_ip_info_t &ip_info) const noexcept=0 |
| Get current IP information. | |
| virtual hf_wifi_err_t | ConfigureAccessPoint (const hf_wifi_ap_config_t &config) noexcept=0 |
| Configure Access Point parameters. | |
| virtual hf_wifi_err_t | StartAccessPoint () noexcept=0 |
| Start Access Point. | |
| virtual hf_wifi_err_t | StopAccessPoint () noexcept=0 |
| Stop Access Point. | |
| virtual bool | IsAccessPointActive () const noexcept=0 |
| Check if Access Point is running. | |
| virtual int | GetConnectedStationCount () const noexcept=0 |
| Get number of connected stations. | |
| virtual hf_wifi_err_t | StartScan (bool show_hidden=false, bool passive=false, uint32_t max_scan_time_ms=0) noexcept=0 |
| Start network scan. | |
| virtual hf_wifi_err_t | GetScanResults (std::vector< hf_wifi_network_info_t > &networks, uint16_t max_networks=0) noexcept=0 |
| Get scan results. | |
| virtual bool | IsScanning () const noexcept=0 |
| Check if scan is in progress. | |
| virtual hf_wifi_state_t | GetState () const noexcept=0 |
| Get current WiFi state. | |
| virtual std::string | GetConnectedSsid () const noexcept=0 |
| Get connected network SSID. | |
| virtual hf_wifi_err_t | GetConnectedBssid (uint8_t bssid[6]) const noexcept=0 |
| Get connected network BSSID. | |
| virtual hf_wifi_err_t | SetPowerSave (hf_wifi_power_save_t mode) noexcept=0 |
| Set power save mode. | |
| virtual hf_wifi_power_save_t | GetPowerSave () const noexcept=0 |
| Get current power save mode. | |
| virtual hf_wifi_err_t | RegisterEventCallback (hf_wifi_event_callback_t callback) noexcept=0 |
| Register event callback. | |
| virtual hf_wifi_err_t | UnregisterEventCallback () noexcept=0 |
| Unregister event callback. | |
| virtual hf_wifi_err_t | GetMacAddress (uint8_t mac[6], uint8_t interface=0) const noexcept=0 |
| Get MAC address. | |
| virtual hf_wifi_err_t | SetMacAddress (const uint8_t mac[6], uint8_t interface=0) noexcept=0 |
| Set MAC address. | |
| virtual uint8_t | GetChannel () const noexcept=0 |
| Get WiFi channel. | |
| virtual hf_wifi_err_t | SetChannel (uint8_t channel) noexcept=0 |
| Set WiFi channel. | |
Static Public Member Functions | |
| static std::string_view | GetErrorString (hf_wifi_err_t error) |
| Get error description string. | |
Protected Member Functions | |
| BaseWifi ()=default | |
| Protected constructor - only derived classes can instantiate. | |
| BaseWifi (const BaseWifi &)=delete | |
| Copy constructor - deleted to prevent copying. | |
| BaseWifi & | operator= (const BaseWifi &)=delete |
| Assignment operator - deleted to prevent copying. | |
Abstract base class for WiFi functionality.
This class provides the interface for WiFi operations including:
|
virtualdefaultnoexcept |
Virtual destructor for proper cleanup of derived classes.
|
protecteddefault |
Protected constructor - only derived classes can instantiate.
|
protecteddelete |
Copy constructor - deleted to prevent copying.
|
pure virtualnoexcept |
Configure Access Point parameters.
| config | AP configuration |
Implemented in EspWifi.
|
pure virtualnoexcept |
Configure station parameters.
| config | Station configuration |
Implemented in EspWifi.
|
pure virtualnoexcept |
Connect to a WiFi network (station mode)
| timeout_ms | Connection timeout in milliseconds (0 for default) |
Implemented in EspWifi.
|
pure virtualnoexcept |
Deinitialize the WiFi subsystem.
Implemented in EspWifi.
|
pure virtualnoexcept |
Disconnect from WiFi network.
Implemented in EspWifi.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get connected network BSSID.
| bssid | Buffer to store BSSID (6 bytes) |
Implemented in EspWifi.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get number of connected stations.
Implemented in EspWifi.
|
pure virtualnoexcept |
Get current IP information.
| ip_info | Reference to store IP information |
Implemented in EspWifi.
|
pure virtualnoexcept |
Get MAC address.
| mac | Buffer to store MAC address (6 bytes) |
| interface | WiFi interface (0 for station, 1 for AP) |
Implemented in EspWifi.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Get signal strength (RSSI)
Implemented in EspWifi.
|
pure virtualnoexcept |
Get scan results.
| networks | Vector to store found networks |
| max_networks | Maximum number of networks to return (0 for all) |
Implemented in EspWifi.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Initialize the WiFi subsystem.
| mode | WiFi operating mode |
Implemented in EspWifi.
|
pure virtualnoexcept |
Check if Access Point is running.
Implemented in EspWifi.
|
pure virtualnoexcept |
|
pure virtualnoexcept |
|
pure virtualnoexcept |
Assignment operator - deleted to prevent copying.
|
pure virtualnoexcept |
Register event callback.
| callback | Event callback function |
Implemented in EspWifi.
|
pure virtualnoexcept |
Set WiFi channel.
| channel | Channel number (1-14) |
Implemented in EspWifi.
|
pure virtualnoexcept |
Set MAC address.
| mac | MAC address to set (6 bytes) |
| interface | WiFi interface (0 for station, 1 for AP) |
Implemented in EspWifi.
|
pure virtualnoexcept |
Set WiFi operating mode.
| mode | WiFi operating mode |
Implemented in EspWifi.
|
pure virtualnoexcept |
Set power save mode.
| mode | Power save mode |
Implemented in EspWifi.
|
pure virtualnoexcept |
Start Access Point.
Implemented in EspWifi.
|
pure virtualnoexcept |
Start network scan.
| show_hidden | Include hidden networks in scan |
| passive | Use passive scanning |
| max_scan_time_ms | Maximum scan time per channel |
Implemented in EspWifi.
|
pure virtualnoexcept |
Stop Access Point.
Implemented in EspWifi.
|
pure virtualnoexcept |
Unregister event callback.
Implemented in EspWifi.