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

Method handle_controller_status

source/MaaAgentClient/Client/AgentClient.cpp:2248–2266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2246}
2247
2248bool AgentClient::handle_controller_status(const json::value& j)
2249{
2250 if (!j.is<ControllerStatusReverseRequest>()) {
2251 return false;
2252 }
2253 const ControllerStatusReverseRequest& req = j.as<ControllerStatusReverseRequest>();
2254 LogFunc << VAR(req) << VAR(ipc_addr_);
2255 MaaController* controller = query_controller(req.controller_id);
2256 if (!controller) {
2257 LogError << "controller not found" << VAR(req.controller_id);
2258 return false;
2259 }
2260 MaaStatus status = controller->status(req.ctrl_id);
2261 ControllerStatusReverseResponse resp {
2262 .status = status,
2263 };
2264 send(resp);
2265 return true;
2266}
2267
2268bool AgentClient::handle_controller_wait(const json::value& j)
2269{

Callers

nothing calls this directly

Calls 1

statusMethod · 0.65

Tested by

no test coverage detected