管理器 Helper

[English]

  • 公共头文件: #include "brookesia/agent_helper/manager.hpp"

概述

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

API 参考

Header File

Classes

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

Helper schema definitions for the agent-manager service.

Public Types

enum class AgentGeneralFunction : uint8_t

Optional per-agent functions surfaced by the manager.

Values:

enumerator InterruptSpeaking
enumerator Max
enum class AgentGeneralEvent : uint8_t

Optional per-agent events surfaced by the manager.

Values:

enumerator SpeakingStatusChanged
enumerator ListeningStatusChanged
enumerator AgentSpeakingTextGot
enumerator UserSpeakingTextGot
enumerator EmoteGot
enumerator Max
enum class ChatMode : uint8_t

Conversation mode used by the active agent.

Values:

enumerator RealTime
enumerator Manual
enumerator Max
enum class GeneralAction : uint8_t

High-level actions accepted by the agent manager.

Values:

enumerator TimeSync
enumerator Activate
enumerator Start
enumerator Sleep
enumerator WakeUp
enumerator Stop
enumerator Max
enum class GeneralEvent : uint8_t

High-level completion events emitted by managed agents.

Values:

enumerator TimeSynced
enumerator Activated
enumerator Started
enumerator Slept
enumerator Awake
enumerator Stopped
enumerator Max
enum class GeneralState : uint8_t

State-machine states used by the agent manager.

Values:

enumerator TimeSyncing
enumerator Ready
enumerator Activating
enumerator Activated
enumerator Starting
enumerator Started
enumerator Sleeping
enumerator Slept
enumerator WakingUp
enumerator Stopping
enumerator Max

Public Static Functions

static inline constexpr std::string_view get_name()

Name of the agent-manager service.

返回

std::string_view Stable service name.

struct AgentAttributes

Public metadata describing one agent implementation.

Public Functions

inline std::string get_name() const

Get the agent name stored in the attributes.

返回

std::string Agent name.

inline bool is_general_functions_supported(AgentGeneralFunction function) const

Check whether an optional general function is supported.

参数

function[in] Function to check.

返回

true if the function is listed in support_general_functions.

inline bool is_general_events_supported(AgentGeneralEvent event) const

Check whether an optional general event is supported.

参数

event[in] Event to check.

返回

true if the event is listed in support_general_events.

Public Members

std::string name

Agent name exposed to the manager.

AgentOperationTimeout operation_timeout = {}

Timeout configuration for lifecycle actions.

std::vector<AgentGeneralFunction> support_general_functions = {}

Optional functions supported by the agent.

std::vector<AgentGeneralEvent> support_general_events = {}

Optional events emitted by the agent.

bool require_time_sync = false

Whether activation requires SNTP synchronization first.

struct AgentOperationTimeout

Timeout budget for the major lifecycle operations of an agent.

Public Members

uint32_t activate = 1000

Timeout for activation.

uint32_t start = 1000

Timeout for startup.

uint32_t sleep = 1000

Timeout for sleep.

uint32_t wake_up = 1000

Timeout for wake-up.

uint32_t stop = 1000

Timeout for shutdown.