Board Information Interface

[中文]

Public header: #include "brookesia/hal_interface/interfaces/general/board_info.hpp"

Class: BoardInfoIface

BoardInfoIface exposes static board metadata, such as the board name, main chip, hardware version, description, and manufacturer. Upper layers can use it to identify the current board at runtime and adapt displayed device information or board-specific logic.

API Reference

Header File

Classes

class BoardInfoIface : public esp_brookesia::hal::Interface

Board information interface for querying static board metadata.

Public Functions

inline explicit BoardInfoIface(Info info)

Construct a board information interface.

Parameters

info -- [in] Static board information.

virtual ~BoardInfoIface() = default

Virtual destructor for polymorphic board information interfaces.

inline const Info &get_info() const

Get static board information.

Returns

Board information.

Public Static Attributes

static constexpr const char *NAME = "BoardInfo"

Interface registry name.

struct Info

Static board information.

Public Functions

inline bool is_valid() const

Check whether the board information contains useful identity fields.

Returns

true if either board name or chip is non-empty; otherwise false.

Public Members

std::string name

Board name.

std::string chip

Main chip model.

std::string version

Board hardware or BOM version.

std::string description

Human-readable board description.

std::string manufacturer

Board manufacturer.