mirror of
https://github.com/BotChain-Robots/control.git
synced 2026-03-10 00:32:26 +01:00
Formatting, add remote calling to c library
This commit is contained in:
23
examples/rpc_call/rpc/RemoteDebugging.cpp
Normal file
23
examples/rpc_call/rpc/RemoteDebugging.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by Johnathon Slightham on 2026-02-16.
|
||||
//
|
||||
|
||||
#include "rpc/RemoteDebugging.h"
|
||||
|
||||
std::string RemoteDebugging::get_task_manager(uint8_t module_id) {
|
||||
const auto maybe = m_robot_controller->remote_call(2, module_id, {});
|
||||
if (maybe) {
|
||||
std::string str((*maybe)->begin(), (*maybe)->end());
|
||||
return str;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string RemoteDebugging::get_logs(uint8_t module_id) {
|
||||
const auto maybe = m_robot_controller->remote_call(3, module_id, {});
|
||||
if (maybe) {
|
||||
std::string str((*maybe)->begin(), (*maybe)->end());
|
||||
return str;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
Reference in New Issue
Block a user