Wi-Fi Helper

[English]

  • 公共头文件: #include "brookesia/service_helper/network/wifi.hpp"

概述

本页用于查看 Wi-Fi helper 的原始 Doxygen API,包括公共类型、枚举、方法与相关宏定义。

API 参考

Header File

Classes

class Wifi : public esp_brookesia::service::helper::Base<Wifi>

Helper schema definitions for the Wi-Fi service.

Public Types

enum class GeneralState

General state for WiFi state machine.

Stable states: Idle, Inited, Started, Connected Transient states: Initing, Deiniting, Starting, Stopping, Connecting, Disconnecting

Values:

enumerator Idle

Stable: Wi-Fi is not initialized.

enumerator Initing

Transient: Wi-Fi is initializing.

enumerator Inited

Stable: Wi-Fi initialized but not started.

enumerator Deiniting

Transient: Wi-Fi is deinitializing.

enumerator Starting

Transient: Wi-Fi is starting.

enumerator Started

Stable: Wi-Fi started but not connected.

enumerator Stopping

Transient: Wi-Fi is stopping.

enumerator Connecting

Transient: Wi-Fi is connecting.

enumerator Connected

Stable: Wi-Fi is connected.

enumerator Disconnecting

Transient: Wi-Fi is disconnecting.

enumerator Max

Sentinel value.

enum class FunctionId

Wi-Fi service function identifiers.

Values:

enumerator TriggerGeneralAction
enumerator GetGeneralState
enumerator SetConnectAp
enumerator GetConnectAp
enumerator GetConnectedAps
enumerator RemoveConnectedAp
enumerator SetScanParams
enumerator TriggerScanStart
enumerator TriggerScanStop
enumerator SetSoftApParams
enumerator GetSoftApParams
enumerator TriggerSoftApStart
enumerator TriggerSoftApStop
enumerator TriggerSoftApProvisionStart
enumerator TriggerSoftApProvisionStop
enumerator LoadData
enumerator ResetData
enumerator Max
enum class EventId

Wi-Fi service event identifiers.

Values:

enumerator GeneralActionTriggered
enumerator GeneralEventHappened
enumerator ScanStateChanged
enumerator ScanApInfosUpdated
enumerator SoftApEventHappened
enumerator Max
enum class FunctionTriggerGeneralActionParam

Parameter keys for FunctionId::TriggerGeneralAction.

Values:

enumerator Action
enum class FunctionSetConnectApParam

Parameter keys for FunctionId::SetConnectAp.

Values:

enumerator SSID
enumerator Password
enum class FunctionRemoveConnectedApParam

Parameter keys for FunctionId::RemoveConnectedAp.

Values:

enumerator SSID
enum class FunctionSetScanParamsParam

Parameter keys for FunctionId::SetScanParams.

Values:

enumerator Param
enum class FunctionSetSoftApParamsParam

Parameter keys for FunctionId::SetSoftApParams.

Values:

enumerator Param
enum class EventGeneralActionTriggeredParam

Item keys for EventId::GeneralActionTriggered.

Values:

enumerator Action
enum class EventGeneralEventHappenedParam

Item keys for EventId::GeneralEventHappened.

Values:

enumerator Event
enumerator IsUnexpected
enum class EventScanStateChangedParam

Item keys for EventId::ScanStateChanged.

Values:

enumerator IsRunning
enum class EventScanApInfosUpdatedParam

Item keys for EventId::ScanApInfosUpdated.

Values:

enumerator ApInfos
enum class EventSoftApEventHappenedParam

Item keys for EventId::SoftApEventHappened.

Values:

enumerator Event

Public Static Functions

static inline constexpr std::string_view get_name()

Get helper contract name.

返回

Constant service name string.

static inline std::span<const FunctionSchema> get_function_schemas()

Get all function schemas exposed by this helper.

返回

Read-only span of function schemas.

static inline std::span<const EventSchema> get_event_schemas()

Get all event schemas exposed by this helper.

返回

Read-only span of event schemas.