|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
Linux Wi-Fi 客户端实现 / Linux Wi-Fi client implementation. More...
#include <linux_wifi_client.hpp>
Public Member Functions | |
| LinuxWifiClient (const char *ifname=nullptr) | |
| 构造客户端对象 / Construct client object | |
| ~LinuxWifiClient () override | |
| 析构函数 / Destructor | |
| bool | Enable () override |
| 启用网络接口(WiFi) / Enable the network interface | |
| void | Disable () override |
| 禁用网络接口(WiFi) / Disable the network interface | |
| bool | IsConnected () const override |
| 检查是否已连接 / Check if currently connected | |
| IPAddressRaw | GetIPAddress () const override |
| 获取当前 IP 地址 / Get current IP address | |
| MACAddressRaw | GetMACAddress () const override |
| 获取当前 MAC 地址 / Get MAC address | |
| WifiError | Connect (const Config &config) override |
| 连接到指定 WiFi 网络 / Connect to a WiFi network | |
| WifiError | Disconnect () override |
| 断开当前 WiFi 连接 / Disconnect from the WiFi network | |
| WifiError | Scan (ScanResult *out_list, size_t max_count, size_t &out_found) override |
| 扫描可用网络 / Scan for available WiFi networks | |
| int | GetRSSI () const override |
| 获取当前 WiFi 信号强度(RSSI) / Get current signal strength | |
Public Member Functions inherited from LibXR::WifiClient | |
| virtual | ~WifiClient ()=default |
| 析构函数 / Destructor | |
Public Member Functions inherited from LibXR::NetworkInterface | |
Additional Inherited Members | |
Public Types inherited from LibXR::WifiClient | |
| 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. | |
Linux Wi-Fi 客户端实现 / Linux Wi-Fi client implementation.
Definition at line 25 of file linux_wifi_client.hpp.
|
inline |
构造客户端对象 / Construct client object
| ifname | 网卡名,空则自动探测 / Interface name, auto-detect when null |
Definition at line 32 of file linux_wifi_client.hpp.
|
inlineoverride |
析构函数 / Destructor
Definition at line 58 of file linux_wifi_client.hpp.
连接到指定 WiFi 网络 / Connect to a WiFi network
| [in] | config | WiFi 连接配置 / Configuration parameters |
Implements LibXR::WifiClient.
Definition at line 151 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
禁用网络接口(WiFi) / Disable the network interface
Implements LibXR::WifiClient.
Definition at line 83 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
断开当前 WiFi 连接 / Disconnect from the WiFi network
Implements LibXR::WifiClient.
Definition at line 230 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
启用网络接口(WiFi) / Enable the network interface
Implements LibXR::WifiClient.
Definition at line 67 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
获取当前 IP 地址 / Get current IP address
Implements LibXR::WifiClient.
Definition at line 103 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
获取当前 MAC 地址 / Get MAC address
Implements LibXR::WifiClient.
Definition at line 127 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
获取当前 WiFi 信号强度(RSSI) / Get current signal strength
Implements LibXR::WifiClient.
Definition at line 274 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
检查是否已连接 / Check if currently connected
Implements LibXR::WifiClient.
Definition at line 93 of file linux_wifi_client.hpp.
|
inlineoverridevirtual |
扫描可用网络 / Scan for available WiFi networks
| [out] | out_list | 扫描结果数组 / Output list buffer |
| [in] | max_count | 最大可填入数量 / Max result count |
| [out] | out_found | 实际找到数量 / Number found |
Implements LibXR::WifiClient.
Definition at line 242 of file linux_wifi_client.hpp.