接口基类

[English]

公共头文件: #include "brookesia/hal_interface/interface.hpp"

API 参考

Header File

Classes

class Interface

Base class for all HAL interfaces exposed by a device.

Each concrete interface derives from this type and provides a stable interface name for runtime lookup via the plugin registry.

Subclassed by esp_brookesia::hal::audio::CodecPlayerIface, esp_brookesia::hal::audio::CodecRecorderIface, esp_brookesia::hal::audio::DecoderIface, esp_brookesia::hal::audio::EncoderIface, esp_brookesia::hal::audio::PlaybackIface, esp_brookesia::hal::display::BacklightIface, esp_brookesia::hal::display::PanelIface, esp_brookesia::hal::display::TouchIface, esp_brookesia::hal::network::ConnectivityIface, esp_brookesia::hal::network::HttpClientIface, esp_brookesia::hal::network::SntpClientIface, esp_brookesia::hal::power::BatteryIface, esp_brookesia::hal::storage::FileSystemIface, esp_brookesia::hal::storage::KeyValueIface, esp_brookesia::hal::system::BoardInfoIface, esp_brookesia::hal::system::OtaUpdaterIface, esp_brookesia::hal::video::CameraIface, esp_brookesia::hal::video::DecoderIface, esp_brookesia::hal::video::EncoderIface, esp_brookesia::hal::wifi::BasicIface, esp_brookesia::hal::wifi::SoftApIface, esp_brookesia::hal::wifi::StationIface

Public Functions

inline explicit Interface(std::string_view name)

Construct an interface object with a runtime name.

参数

name -- [in] Interface name used by the registry.

virtual ~Interface() = default

Virtual destructor for polymorphic interface usage.

inline std::string_view get_name() const noexcept

Get the registered interface name.

返回

Interface name.