libxr 1.0
Want to be the best embedded framework
|
Wifi 客户端接口类 / Interface class for WiFi client management. More...
#include <wifi_client.hpp>
Data Structures | |
struct | Config |
WiFi 连接配置 / WiFi connection configuration. More... | |
struct | EnterpriseConfig |
企业 WiFi 配置 / Enterprise WiFi configuration More... | |
struct | ScanResult |
WiFi 扫描结果 / WiFi scan result. More... | |
struct | StaticIPConfig |
静态 IP 配置 / Static IP configuration More... | |
Public Types | |
enum class | WifiError { NONE , ALREADY_ENABLED , NOT_ENABLED , CONNECTION_TIMEOUT , AUTHENTICATION_FAILED , DHCP_FAILED , SSID_NOT_FOUND , INVALID_CONFIG , HARDWARE_FAILURE , SCAN_FAILED , UNKNOWN } |
WiFi 错误码枚举 / Enumeration of WiFi error codes. More... | |
enum class | Security { OPEN , WPA2_PSK , WPA2_ENTERPRISE , UNKNOWN } |
WiFi 安全类型 / WiFi security types. More... | |
using | WifiCallback = LibXR::Callback< WifiError > |
WiFi 状态回调 / Callback type for WiFi status. | |
Public Member Functions | |
virtual WifiError | Enable ()=0 |
启用 WiFi 模块 / Enable the WiFi module | |
virtual WifiError | Disable ()=0 |
禁用 WiFi 模块 / Disable the WiFi module | |
virtual WifiError | Connect (const Config &config)=0 |
连接到 WiFi 网络 / Connect to a WiFi network | |
virtual WifiError | Disconnect ()=0 |
断开当前 WiFi 连接 / Disconnect from the current WiFi connection | |
virtual bool | IsConnected () const =0 |
检查是否已连接 / Check if currently connected | |
virtual const char * | GetIPAddress () const =0 |
获取当前 IP 地址 / Get the current IP address | |
virtual WifiError | Scan (std::vector< ScanResult > &results)=0 |
扫描可用 WiFi 网络 / Scan for available WiFi networks | |
virtual int | GetRSSI () const =0 |
获取当前 WiFi 信号强度 / Get the current WiFi signal strength | |
Wifi 客户端接口类 / Interface class for WiFi client management.
Definition at line 15 of file wifi_client.hpp.
WiFi 状态回调 / Callback type for WiFi status.
Definition at line 102 of file wifi_client.hpp.
|
strong |
WiFi 安全类型 / WiFi security types.
Enumerator | |
---|---|
OPEN | 开放网络 / Open network |
WPA2_PSK | WPA2-PSK / WPA2-PSK. |
WPA2_ENTERPRISE | WPA2 企业认证 / WPA2 Enterprise. |
UNKNOWN | 未知类型 / Unknown type |
Definition at line 39 of file wifi_client.hpp.
WiFi 错误码枚举 / Enumeration of WiFi error codes.
Definition at line 21 of file wifi_client.hpp.
连接到 WiFi 网络 / Connect to a WiFi network
config | 配置参数 / Configuration parameters |
Implemented in LibXR::ESP32WifiClient.
禁用 WiFi 模块 / Disable the WiFi module
Implemented in LibXR::ESP32WifiClient.
断开当前 WiFi 连接 / Disconnect from the current WiFi connection
Implemented in LibXR::ESP32WifiClient.
启用 WiFi 模块 / Enable the WiFi module
Implemented in LibXR::ESP32WifiClient.
获取当前 IP 地址 / Get the current IP address
Implemented in LibXR::ESP32WifiClient.
获取当前 WiFi 信号强度 / Get the current WiFi signal strength
Implemented in LibXR::ESP32WifiClient.
检查是否已连接 / Check if currently connected
Implemented in LibXR::ESP32WifiClient.
|
pure virtual |
扫描可用 WiFi 网络 / Scan for available WiFi networks
results | 扫描结果列表 / Output list of scan results |
Implemented in LibXR::ESP32WifiClient.