Wi-Fi Basic Interface
Public header: #include "brookesia/hal_interface/interfaces/wifi/basic.hpp"
Class: WifiBasicIface
WifiBasicIface exposes the shared Wi-Fi control plane: initialization,
deinitialization, start/stop actions, reset, and general action/event callbacks.
Connection policy remains above HAL in the Wi-Fi service.
API Reference
Header File
Classes
-
class BasicIface : public esp_brookesia::hal::Interface
Basic Wi-Fi controller interface for shared lifecycle and runtime context.
Public Functions
-
inline BasicIface()
Construct a basic Wi-Fi interface.
-
virtual ~BasicIface() = default
Virtual destructor for polymorphic interfaces.
-
virtual bool configure(RuntimeContext runtime, Callbacks callbacks) = 0
Configure runtime resources and callbacks.
- Parameters
runtime -- [in] Runtime context shared with the Wi-Fi backend.
callbacks -- [in] Callback hooks used to report basic Wi-Fi state.
- Returns
trueon success; otherwisefalse.
-
virtual void clear_callbacks() = 0
Clear all configured callbacks.
-
virtual bool init() = 0
Initialize Wi-Fi resources.
- Returns
trueon success; otherwisefalse.
-
virtual void deinit() = 0
Deinitialize Wi-Fi resources.
-
virtual bool start() = 0
Start the Wi-Fi subsystem.
- Returns
trueon success; otherwisefalse.
-
virtual void stop() = 0
Stop the Wi-Fi subsystem.
-
virtual void reset_data() = 0
Reset backend runtime data.
-
virtual bool do_action(BasicAction action, bool is_force = false) = 0
Request a basic Wi-Fi action.
- Parameters
action -- [in] Action to execute.
is_force -- [in] Whether to force the action even if state checks would normally skip it.
- Returns
trueon success; otherwisefalse.
-
virtual bool is_action_running(BasicAction action) = 0
Check whether a basic Wi-Fi action is running.
- Parameters
action -- [in] Action to query.
- Returns
trueif the action is running; otherwisefalse.
-
virtual bool is_event_ready(BasicEvent event) = 0
Check whether a basic Wi-Fi event is ready.
- Parameters
event -- [in] Event to query.
- Returns
trueif the event is ready; otherwisefalse.
-
struct Callbacks
-
struct RuntimeContext
Public Members
-
std::shared_ptr<lib_utils::TaskScheduler> task_scheduler
Scheduler used for async Wi-Fi work.
-
lib_utils::TaskScheduler::Group task_group
Scheduler group used by the Wi-Fi service.
-
std::shared_ptr<lib_utils::TaskScheduler> task_scheduler
-
inline BasicIface()