MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / control_unit_

Function control_unit_

source/MaaFramework/Controller/ControllerAgent.cpp:10–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include "Resource/ResourceMgr.h"
9
10MAA_CTRL_NS_BEGIN
11
12ControllerAgent::ControllerAgent(std::shared_ptr<MAA_CTRL_UNIT_NS::ControlUnitAPI> control_unit)
13 : control_unit_(std::move(control_unit))
14{
15 LogFunc << VAR(control_unit_);
16
17 auto& plugin_mgr = MAA_GLOBAL_NS::PluginMgr::get_instance();
18 LogInfo << VAR(plugin_mgr.get_names());
19
20 for (const auto& sink : plugin_mgr.get_ctrl_sinks()) {
21 add_sink(sink, this);
22 }
23
24 action_runner_ =
25 std::make_unique<AsyncRunner<Action>>(std::bind(&ControllerAgent::run_action, this, std::placeholders::_1, std::placeholders::_2));
26}
27
28ControllerAgent::~ControllerAgent()
29{

Callers

nothing calls this directly

Calls 2

get_namesMethod · 0.80
get_ctrl_sinksMethod · 0.80

Tested by

no test coverage detected