Interface Base

[中文]

Public header: #include "brookesia/hal_interface/interface.hpp"

API Reference

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::AudioCodecPlayerIface, esp_brookesia::hal::AudioCodecRecorderIface, esp_brookesia::hal::DisplayBacklightIface, esp_brookesia::hal::DisplayPanelIface, esp_brookesia::hal::DisplayTouchIface, esp_brookesia::hal::StorageFsIface

Public Functions

inline explicit Interface(std::string_view name)

Construct an interface object with a runtime name.

Parameters

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.

Returns

Interface name.