cmvr-es/third_party/AuboSdk/win/include/aubo/runtime_machine.h

1418 lines
37 KiB
C
Raw Normal View History

2025-11-18 10:07:08 +08:00
/** @file runtime_machine.h
* @brief Script interpreter runtime interface,
* allows pausing the script interpreter and setting/removing breakpoints.
*/
#ifndef AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H
#define AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H
#include <memory>
#include <aubo/global_config.h>
#include <aubo/type_def.h>
namespace arcs {
namespace common_interface {
/**
* The RuntimeMachine class
*/
class ARCS_ABI_EXPORT RuntimeMachine
{
public:
RuntimeMachine();
virtual ~RuntimeMachine();
/**
* \chinese
* task_id
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.newTask","params":[false],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":26}
* \endchinese
* \english
* Returns the task_id
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.newTask","params":[false],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":26}
* \endenglish
*/
int newTask(bool daemon = false);
/**
* \chinese
* task
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.deleteTask","params":[26],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Delete a task, which will terminate any ongoing motion.
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.deleteTask","params":[26],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int deleteTask(int tid);
/**
* \chinese
* task
*
* @param tid
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.detachTask","params":[26],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Wait for the task to finish naturally
*
* @param tid
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.detachTask","params":[26],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int detachTask(int tid);
/**
* \chinese
*
*
* @param tid
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.isTaskAlive","params":[26],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":true}
*
* \endchinese
* \english
* Check if the task is alive
*
* @param tid
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.isTaskAlive","params":[26],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":true}
*
* \endenglish
*/
bool isTaskAlive(int tid);
/**
* \chinese
*
*
* @param tid
* @return
* \endchinese
* \english
* Get the number of cached instructions in the task
*
* @param tid
* @return
* \endenglish
*/
int getTaskQueueSize(int tid);
/**
* \chinese
* 线线
*
* @param tid
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.switchTask","params":[26],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Switch the current thread. After switching, subsequent instructions will be inserted into the switched thread.
*
* @param tid
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.switchTask","params":[26],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int switchTask(int tid);
/**
* \chinese
*
*
* @param lineno
* @param comment
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.setLabel","params":[5,"moveJoint"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Mark the line number and comment of the recorded instruction
*
* @param lineno
* @param comment
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.setLabel","params":[5,"moveJoint"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int setLabel(int lineno, const std::string &comment);
/**
* \chinese
* aubo_control日志中添加注释
* 使 setLabel
*
* @param tid 线ID
* @param lineno
* @param comment
* @return
*
* @par Python函数原型
* setPlanContext(self: pyaubo_sdk.RuntimeMachine, arg0: int, arg1: int,
* arg2: str) -> int
*
* @par Lua函数原型
* setPlanContext(tid: number, lineno: number, comment: string) -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.setPlanContext","params":[26,3,"moveJoint"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Add a comment to the aubo_control log
* Use setLabel instead
*
* @param tid Thread ID of the instruction
* @param lineno Line number
* @param comment Comment
* @return
*
* @par Python function prototype
* setPlanContext(self: pyaubo_sdk.RuntimeMachine, arg0: int, arg1: int,
* arg2: str) -> int
*
* @par Lua function prototype
* setPlanContext(tid: number, lineno: number, comment: string) -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.setPlanContext","params":[26,3,"moveJoint"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
ARCS_DEPRECATED int setPlanContext(int tid, int lineno,
const std::string &comment);
/**
* \chinese
*
*
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.nop","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* No operation
*
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.nop","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int nop();
/**
* \chinese
* (INST), setPersistentParameters
*
* @return ,
* : EXECUTING/FINISHED
*
* @par Python函数原型
* getExecutionStatus(self: pyaubo_sdk.RuntimeMachine) -> Tuple[str, str,
* int]
*
* @par Lua函数原型
* getExecutionStatus() -> string, string, number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getExecutionStatus","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":["confirmSafetyParameters","FINISHED"]}
*
* \endchinese
* \english
* Get the execution status of time-consuming interfaces (INST), such as setPersistentParameters
*
* @return Instruction name, execution status
* Execution status: EXECUTING/FINISHED
*
* @par Python function prototype
* getExecutionStatus(self: pyaubo_sdk.RuntimeMachine) -> Tuple[str, str, int]
*
* @par Lua function prototype
* getExecutionStatus() -> string, string, number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getExecutionStatus","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":["confirmSafetyParameters","FINISHED"]}
*
* \endenglish
*/
std::tuple<std::string, std::string> getExecutionStatus();
std::tuple<std::string, std::string, int> getExecutionStatus1();
/**
* \chinese
*
*
* @param lineno
* @return
*
* @par Python函数原型
* gotoLine(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
*
* @par Lua函数原型
* gotoLine(lineno: number) -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.gotoLine","params":[10],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Jump to the specified line number
*
* @param lineno
* @return
*
* @par Python function prototype
* gotoLine(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
*
* @par Lua function prototype
* gotoLine(lineno: number) -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.gotoLine","params":[10],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int gotoLine(int lineno);
/**
* \chinese
*
*
* @param tid
* (-1)(-1)线
*
* @return
*
* @par Python函数原型
* getPlanContext(self: pyaubo_sdk.RuntimeMachine) -> Tuple[int, int, str]
*
* @par Lua函数原型
* getPlanContext() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getPlanContext","params":[-1],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":[-1,0,""]}
*
* \endchinese
* \english
* Get the current runtime context
*
* @param tid Task ID
* If specified (not -1), returns the runtime context of the corresponding task; if not specified (is -1), returns the runtime context of the currently running thread
*
* @return
*
* @par Python function prototype
* getPlanContext(self: pyaubo_sdk.RuntimeMachine) -> Tuple[int, int, str]
*
* @par Lua function prototype
* getPlanContext() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getPlanContext","params":[-1],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":[-1,0,""]}
*
* \endenglish
*/
std::tuple<int, int, std::string> getPlanContext(int tid = -1);
/**
* \chinese
*
*
* @param tid
* (-1)(-1)线
*
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePlanContext","params":[-1],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":[-1,-1,""]}
*
* \endchinese
* \english
* Get the context information of the advance planner
*
* @param tid Task ID
* If specified (not -1), returns the context information of the advance planner for the corresponding task; if not specified (is -1), returns the context information of the advance planner for the currently running thread
*
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePlanContext","params":[-1],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":[-1,-1,""]}
*
* \endenglish
*/
std::tuple<int, int, std::string> getAdvancePlanContext(int tid = -1);
/**
* \chinese
* AdvanceRun的程序指针
*
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePtr","params":[-1],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":-1}
*
* \endchinese
* \english
* Get the program pointer of AdvanceRun
*
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePtr","params":[-1],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":-1}
*
* \endenglish
*/
int getAdvancePtr(int tid = -1);
/**
* \chinese
*
*
* @param tid
* (-1)(-1)线
*
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getMainPtr","params":[-1],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":-1}
*
* \endchinese
* \english
* Get the program pointer of robot motion
*
* @param tid Task ID
* If specified (not -1), returns the program pointer of the corresponding task; if not specified (is -1), returns the program pointer of the currently running thread
*
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getMainPtr","params":[-1],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":-1}
*
* \endenglish
*/
int getMainPtr(int tid = -1);
/**
* \chinese
*
*
* @param tid
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getInterpPtr","params":[26],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":-1}
*
* \endchinese
* \english
* Get the pointer of the most recently interpreted instruction
*
* @param tid
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getInterpPtr","params":[26],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":-1}
*
* \endenglish
*/
int getInterpPtr(int tid);
/**
* \chinese
*
* Lua ${ARCS_WS}/program
*
*
* @param program
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.loadProgram","params":["demo"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Load a local project file.
* For Lua scripts, only the file name is required (no extension), and it will be searched in the ${ARCS_WS}/program directory.
*
* @param program
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.loadProgram","params":["demo"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int loadProgram(const std::string &program);
/**
* \chinese
*
*
* @param index 0~99
* @param program
* @return
* \endchinese
* \english
* Preload project file
*
* @param index Project index number (0~99)
* @param program Project name
* @return
* \endenglish
*/
int preloadProgram(int index, const std::string &program);
/**
* \chinese
*
*
* @param index 0~99
* @return
* \endchinese
* \english
* Get the name of the preloaded project file. Returns an empty string if not loaded or index is out of range.
*
* @param index Project index number (0~99)
* @return Project file name
* \endenglish
*/
std::string getPreloadProgram(int index);
/**
* \chinese
*
*
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Run the already loaded project file
*
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int runProgram();
/**
* \chinese
*
*
* @return
*
* @par Python函数原型
* start(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua函数原型
* start() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Start the runtime
*
* @return
*
* @par Python function prototype
* start(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua function prototype
* start() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int start();
/**
* \chinese
* Stopped
*
* RuntimeMachine::abort
*
* @return
*
* @par Python函数原型
* stop(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua函数原型
* stop() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Stop the runtime, i.e., stop script execution. Cannot stop robot motion when the runtime state is Stopped.
*
* If you want to stop all robot motion, use the RuntimeMachine::abort interface.
*
* @return
*
* @par Python function prototype
* stop(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua function prototype
* stop() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int stop();
/**
* \chinese
* .
*
* RuntimeMachine::stop
*
* Running Stopped
*
*
* @return
*
* @par Python函数原型
* abort(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua函数原型
* abort() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Abort robot operation.
*
* If you only want to stop the runtime, you can call the RuntimeMachine::stop interface.
*
* If the script runtime is in the Running state, aborts the runtime; if the runtime is Stopped and the robot is moving, stops the robot motion; if force control is enabled, stops force control.
*
* @return
*
* @par Python function prototype
* abort(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua function prototype
* abort() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int abort();
/**
* \chinese
*
*
* @return
*
* @par Python函数原型
* pause(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua函数原型
* pause() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Pause the interpreter
*
* @return
*
* @par Python function prototype
* pause(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua function prototype
* pause() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int pause();
/**
* \chinese
*
*
* @return
*
* @par Python函数原型
* step(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua函数原型
* step() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Execute a single step
*
* @return
*
* @par Python function prototype
* step(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua function prototype
* step() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int step();
/**
* \chinese
*
*
* @return
*
* @par Python函数原型
* resume(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua函数原型
* resume() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Resume the interpreter
*
* @return
*
* @par Python function prototype
* resume(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua function prototype
* resume() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int resume();
/**
* \chinese
*
*
* @param wait
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Wait for the previous sequence to complete before resuming the interpreter
*
* @param wait
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int setResumeWait(bool wait);
/**
* \chinese
*
*
* @return
*
* @par Python函数原型
* getStatus(self: pyaubo_sdk.RuntimeMachine) ->
* arcs::common_interface::RuntimeState
*
* @par Lua函数原型
* getStatus() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":"Running"}
*
* \endchinese
* \english
* Get the status of the planner
*
* @return
*
* @par Python function prototype
* getStatus(self: pyaubo_sdk.RuntimeMachine) ->
* arcs::common_interface::RuntimeState
*
* @par Lua function prototype
* getStatus() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":"Running"}
*
* \endenglish
*/
ARCS_DEPRECATED RuntimeState getStatus();
RuntimeState getRuntimeState();
/**
* \chinese
*
*
* @param lineno
* @return
*
* @par Python函数原型
* setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
*
* @par Lua函数原型
* setBreakPoint(lineno: number) -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Set a breakpoint
*
* @param lineno
* @return
*
* @par Python function prototype
* setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
*
* @par Lua function prototype
* setBreakPoint(lineno: number) -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int setBreakPoint(int lineno);
/**
* \chinese
*
*
* @param lineno
* @return
*
* @par Python函数原型
* removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
*
* @par Lua函数原型
* removeBreakPoint(lineno: number) -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Remove a breakpoint
*
* @param lineno
* @return
*
* @par Python function prototype
* removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
*
* @par Lua function prototype
* removeBreakPoint(lineno: number) -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int removeBreakPoint(int lineno);
/**
* \chinese
*
*
* @return
*
* @par Python函数原型
* clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua函数原型
* clearBreakPoints() -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Clear all breakpoints
*
* @return
*
* @par Python function prototype
* clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
*
* @par Lua function prototype
* clearBreakPoints() -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int clearBreakPoints();
/**
* \chinese
*
*
* @param name
* @return
*
* @par Python函数原型
* timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua函数原型
* timerStart(name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Start the timer
*
* @param name
* @return
*
* @par Python function prototype
* timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua function prototype
* timerStart(name: string) -> nil
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int timerStart(const std::string &name);
/**
* \chinese
*
*
* @param name
* @return
*
* @par Python函数原型
* timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua函数原型
* timerStop(name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Stop the timer
*
* @param name
* @return
*
* @par Python function prototype
* timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua function prototype
* timerStop(name: string) -> nil
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int timerStop(const std::string &name);
/**
* \chinese
*
*
* @param name
* @return
*
* @par Python函数原型
* timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua函数原型
* timerReset(name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Reset the timer
*
* @param name
* @return
*
* @par Python function prototype
* timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua function prototype
* timerReset(name: string) -> nil
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int timerReset(const std::string &name);
/**
* \chinese
*
*
* @param name
* @return
*
* @par Python函数原型
* timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua函数原型
* timerDelete(name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Delete the timer
*
* @param name
* @return
*
* @par Python function prototype
* timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
*
* @par Lua function prototype
* timerDelete(name: string) -> nil
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int timerDelete(const std::string &name);
/**
* \chinese
*
*
* @param name
* @return
*
* @par Python函数原型
* getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
*
* @par Lua函数原型
* getTimer(name: string) -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":25.409769612}
*
* \endchinese
* \english
* Get the timer value
*
* @param name
* @return
*
* @par Python function prototype
* getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
*
* @par Lua function prototype
* getTimer(name: string) -> number
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":25.409769612}
*
* \endenglish
*/
double getTimer(const std::string &name);
/**
* \chinese
*
*
* @param distance
* @param delay
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* Start configuring trigger
*
* @param distance
* @param delay
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int triggBegin(double distance, double delay);
/**
* \chinese
*
*
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endchinese
* \english
* End configuring trigger
*
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":0}
*
* \endenglish
*/
int triggEnd();
/**
* \chinese
*
*
* @param distance
* @param delay
* @param intnum
* @return
* \endchinese
* \english
* Returns the automatically assigned interrupt number
*
* @param distance
* @param delay
* @param intnum
* @return
* \endenglish
*/
int triggInterrupt(double distance, double delay);
/**
* \chinese
*
*
* @return
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":[]}
*
* \endchinese
* \english
* Get the list of all interrupt numbers
*
* @return
*
* @par JSON-RPC Request Example
* {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
*
* @par JSON-RPC Response Example
* {"id":1,"jsonrpc":"2.0","result":[]}
*
* \endenglish
*/
std::vector<int> getTriggInterrupts();
protected:
void *d_;
};
using RuntimeMachinePtr = std::shared_ptr<RuntimeMachine>;
} // namespace common_interface
} // namespace arcs
#endif // AUBO_SDK_RUNTIME_MACHINE_H