PDF
AUBO SDK  0.26.0
runtime_machine.h
Go to the documentation of this file.
1/** @file runtime_machine.h
2 * @brief Script interpreter runtime interface,
3 * allows pausing the script interpreter and setting/removing breakpoints.
4 */
5#ifndef AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H
6#define AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H
7
8#include <memory>
9#include <aubo/global_config.h>
10#include <aubo/type_def.h>
11
12namespace arcs {
13namespace common_interface {
14
15/**
16 * \chinese
17 * @defgroup RuntimeMachine RuntimeMachine (运行时管理)
18 * \endchinese
19 *
20 * \english
21 * @defgroup RuntimeMachine Runtime Management
22 * \endenglish
23 */
24class ARCS_ABI_EXPORT RuntimeMachine
25{
26public:
28 virtual ~RuntimeMachine();
29
30 /**
31 * @ingroup RuntimeMachine
32 * \chinese
33 * 返回 task_id
34 *
35 * @par JSON-RPC请求示例
36 * {"jsonrpc":"2.0","method":"RuntimeMachine.newTask","params":[false],"id":1}
37 *
38 * @par JSON-RPC响应示例
39 * {"id":1,"jsonrpc":"2.0","result":26}
40 * \endchinese
41 * \english
42 * Returns the task_id
43 *
44 * @par JSON-RPC Request Example
45 * {"jsonrpc":"2.0","method":"RuntimeMachine.newTask","params":[false],"id":1}
46 *
47 * @par JSON-RPC Response Example
48 * {"id":1,"jsonrpc":"2.0","result":26}
49 * \endenglish
50 */
51 int newTask(bool daemon = false);
52
53 /**
54 * @ingroup RuntimeMachine
55 * \chinese
56 * 删除 task,会终止正在执行的运动
57 *
58 * @par JSON-RPC请求示例
59 * {"jsonrpc":"2.0","method":"RuntimeMachine.deleteTask","params":[26],"id":1}
60 *
61 * @par JSON-RPC响应示例
62 * {"id":1,"jsonrpc":"2.0","result":0}
63 *
64 * \endchinese
65 * \english
66 * Delete a task, which will terminate any ongoing motion.
67 *
68 * @par JSON-RPC Request Example
69 * {"jsonrpc":"2.0","method":"RuntimeMachine.deleteTask","params":[26],"id":1}
70 *
71 * @par JSON-RPC Response Example
72 * {"id":1,"jsonrpc":"2.0","result":0}
73 *
74 * \endenglish
75 */
76 int deleteTask(int tid);
77
78 /**
79 * @ingroup RuntimeMachine
80 * \chinese
81 * 等待 task 自然结束
82 *
83 * @param tid
84 * @return
85 *
86 * @par JSON-RPC请求示例
87 * {"jsonrpc":"2.0","method":"RuntimeMachine.detachTask","params":[26],"id":1}
88 *
89 * @par JSON-RPC响应示例
90 * {"id":1,"jsonrpc":"2.0","result":0}
91 *
92 * \endchinese
93 * \english
94 * Wait for the task to finish naturally
95 *
96 * @param tid
97 * @return
98 *
99 * @par JSON-RPC Request Example
100 * {"jsonrpc":"2.0","method":"RuntimeMachine.detachTask","params":[26],"id":1}
101 *
102 * @par JSON-RPC Response Example
103 * {"id":1,"jsonrpc":"2.0","result":0}
104 *
105 * \endenglish
106 */
107 int detachTask(int tid);
108
109 /**
110 * @ingroup RuntimeMachine
111 * \chinese
112 * 判断任务是否存活
113 *
114 * @param tid
115 * @return
116 *
117 * @par JSON-RPC请求示例
118 * {"jsonrpc":"2.0","method":"RuntimeMachine.isTaskAlive","params":[26],"id":1}
119 *
120 * @par JSON-RPC响应示例
121 * {"id":1,"jsonrpc":"2.0","result":true}
122 *
123 * \endchinese
124 * \english
125 * Check if the task is alive
126 *
127 * @param tid
128 * @return
129 *
130 * @par JSON-RPC Request Example
131 * {"jsonrpc":"2.0","method":"RuntimeMachine.isTaskAlive","params":[26],"id":1}
132 *
133 * @par JSON-RPC Response Example
134 * {"id":1,"jsonrpc":"2.0","result":true}
135 *
136 * \endenglish
137 */
138 bool isTaskAlive(int tid);
139
140 /**
141 * @ingroup RuntimeMachine
142 * \chinese
143 * 获取任务中缓存的指令的数量
144 *
145 * @param tid
146 * @return
147 * \endchinese
148 * \english
149 * Get the number of cached instructions in the task
150 *
151 * @param tid
152 * @return
153 * \endenglish
154 */
155 int getTaskQueueSize(int tid);
156
157 /**
158 * @ingroup RuntimeMachine
159 * \chinese
160 * 切换当前线程,切换之后接下来的指令将被插入切换后的线程中
161 *
162 * @param tid
163 * @return
164 *
165 * @par JSON-RPC请求示例
166 * {"jsonrpc":"2.0","method":"RuntimeMachine.switchTask","params":[26],"id":1}
167 *
168 * @par JSON-RPC响应示例
169 * {"id":1,"jsonrpc":"2.0","result":0}
170 *
171 * \endchinese
172 * \english
173 * Switch the current thread. After switching, subsequent instructions will
174 * be inserted into the switched thread.
175 *
176 * @param tid
177 * @return
178 *
179 * @par JSON-RPC Request Example
180 * {"jsonrpc":"2.0","method":"RuntimeMachine.switchTask","params":[26],"id":1}
181 *
182 * @par JSON-RPC Response Example
183 * {"id":1,"jsonrpc":"2.0","result":0}
184 *
185 * \endenglish
186 */
187 int switchTask(int tid);
188
189 /**
190 * @ingroup RuntimeMachine
191 * \chinese
192 * 标记记下来的指令的行号和注释
193 *
194 * @param lineno
195 * @param comment
196 * @return
197 *
198 * @par JSON-RPC请求示例
199 * {"jsonrpc":"2.0","method":"RuntimeMachine.setLabel","params":[5,"moveJoint"],"id":1}
200 *
201 * @par JSON-RPC响应示例
202 * {"id":1,"jsonrpc":"2.0","result":0}
203 *
204 * \endchinese
205 * \english
206 * Mark the line number and comment of the recorded instruction
207 *
208 * @param lineno
209 * @param comment
210 * @return
211 *
212 * @par JSON-RPC Request Example
213 * {"jsonrpc":"2.0","method":"RuntimeMachine.setLabel","params":[5,"moveJoint"],"id":1}
214 *
215 * @par JSON-RPC Response Example
216 * {"id":1,"jsonrpc":"2.0","result":0}
217 *
218 * \endenglish
219 */
220 int setLabel(int lineno, const std::string &comment);
221
222 /**
223 * @ingroup RuntimeMachine
224 * \chinese
225 * 向aubo_control日志中添加注释
226 * 使用 setLabel 替换
227 *
228 * @param tid 指令的线程ID
229 * @param lineno 行号
230 * @param comment 注释
231 * @return
232 *
233 * @par Python函数原型
234 * setPlanContext(self: pyaubo_sdk.RuntimeMachine, arg0: int, arg1: int,
235 * arg2: str) -> int
236 *
237 * @par Lua函数原型
238 * setPlanContext(tid: number, lineno: number, comment: string) -> number
239 *
240 * @par JSON-RPC请求示例
241 * {"jsonrpc":"2.0","method":"RuntimeMachine.setPlanContext","params":[26,3,"moveJoint"],"id":1}
242 *
243 * @par JSON-RPC响应示例
244 * {"id":1,"jsonrpc":"2.0","result":0}
245 *
246 * \endchinese
247 * \english
248 * Add a comment to the aubo_control log
249 * Use setLabel instead
250 *
251 * @param tid Thread ID of the instruction
252 * @param lineno Line number
253 * @param comment Comment
254 * @return
255 *
256 * @par Python function prototype
257 * setPlanContext(self: pyaubo_sdk.RuntimeMachine, arg0: int, arg1: int,
258 * arg2: str) -> int
259 *
260 * @par Lua function prototype
261 * setPlanContext(tid: number, lineno: number, comment: string) -> number
262 *
263 * @par JSON-RPC Request Example
264 * {"jsonrpc":"2.0","method":"RuntimeMachine.setPlanContext","params":[26,3,"moveJoint"],"id":1}
265 *
266 * @par JSON-RPC Response Example
267 * {"id":1,"jsonrpc":"2.0","result":0}
268 *
269 * \endenglish
270 */
271 ARCS_DEPRECATED int setPlanContext(int tid, int lineno,
272 const std::string &comment);
273
274 /**
275 * @ingroup RuntimeMachine
276 * \chinese
277 * 空操作
278 *
279 * @return
280 *
281 * @par JSON-RPC请求示例
282 * {"jsonrpc":"2.0","method":"RuntimeMachine.nop","params":[],"id":1}
283 *
284 * @par JSON-RPC响应示例
285 * {"id":1,"jsonrpc":"2.0","result":0}
286 *
287 * \endchinese
288 * \english
289 * No operation
290 *
291 * @return
292 *
293 * @par JSON-RPC Request Example
294 * {"jsonrpc":"2.0","method":"RuntimeMachine.nop","params":[],"id":1}
295 *
296 * @par JSON-RPC Response Example
297 * {"id":1,"jsonrpc":"2.0","result":0}
298 *
299 * \endenglish
300 */
301 int nop();
302
303 /**
304 * @ingroup RuntimeMachine
305 * \chinese
306 * 获取耗时的接口(INST)执行状态, 如 setPersistentParameters
307 *
308 * @return 指令名字, 执行状态
309 * 执行状态: EXECUTING/FINISHED
310 *
311 * @par Python函数原型
312 * getExecutionStatus(self: pyaubo_sdk.RuntimeMachine) -> Tuple[str, str,
313 * int]
314 *
315 * @par Lua函数原型
316 * getExecutionStatus() -> string, string, number
317 *
318 * @par JSON-RPC请求示例
319 * {"jsonrpc":"2.0","method":"RuntimeMachine.getExecutionStatus","params":[],"id":1}
320 *
321 * @par JSON-RPC响应示例
322 * {"id":1,"jsonrpc":"2.0","result":["confirmSafetyParameters","FINISHED"]}
323 *
324 * \endchinese
325 * \english
326 * Get the execution status of time-consuming interfaces (INST), such as
327 * setPersistentParameters
328 *
329 * @return Instruction name, execution status
330 * Execution status: EXECUTING/FINISHED
331 *
332 * @par Python function prototype
333 * getExecutionStatus(self: pyaubo_sdk.RuntimeMachine) -> Tuple[str, str,
334 * int]
335 *
336 * @par Lua function prototype
337 * getExecutionStatus() -> string, string, number
338 *
339 * @par JSON-RPC Request Example
340 * {"jsonrpc":"2.0","method":"RuntimeMachine.getExecutionStatus","params":[],"id":1}
341 *
342 * @par JSON-RPC Response Example
343 * {"id":1,"jsonrpc":"2.0","result":["confirmSafetyParameters","FINISHED"]}
344 *
345 * \endenglish
346 */
347 std::tuple<std::string, std::string> getExecutionStatus();
348 std::tuple<std::string, std::string, int> getExecutionStatus1();
349
350 /**
351 * @ingroup RuntimeMachine
352 * \chinese
353 * 跳转到指定行号
354 *
355 * @param lineno
356 * @return
357 *
358 * @par Python函数原型
359 * gotoLine(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
360 *
361 * @par Lua函数原型
362 * gotoLine(lineno: number) -> number
363 *
364 * @par JSON-RPC请求示例
365 * {"jsonrpc":"2.0","method":"RuntimeMachine.gotoLine","params":[10],"id":1}
366 *
367 * @par JSON-RPC响应示例
368 * {"id":1,"jsonrpc":"2.0","result":0}
369 *
370 * \endchinese
371 * \english
372 * Jump to the specified line number
373 *
374 * @param lineno
375 * @return
376 *
377 * @par Python function prototype
378 * gotoLine(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
379 *
380 * @par Lua function prototype
381 * gotoLine(lineno: number) -> number
382 *
383 * @par JSON-RPC Request Example
384 * {"jsonrpc":"2.0","method":"RuntimeMachine.gotoLine","params":[10],"id":1}
385 *
386 * @par JSON-RPC Response Example
387 * {"id":1,"jsonrpc":"2.0","result":0}
388 *
389 * \endenglish
390 */
391 int gotoLine(int lineno);
392
393 /**
394 * @ingroup RuntimeMachine
395 * \chinese
396 * 获取当前运行上下文
397 *
398 * @param tid 任务编号
399 * 如果指定(不是-1),返回对应任务的运行上下文;如果不指定(是-1),返回正在运行的线程的运行上下文
400 *
401 * @return
402 *
403 * @par Python函数原型
404 * getPlanContext(self: pyaubo_sdk.RuntimeMachine) -> Tuple[int, int, str]
405 *
406 * @par Lua函数原型
407 * getPlanContext() -> number
408 *
409 * @par JSON-RPC请求示例
410 * {"jsonrpc":"2.0","method":"RuntimeMachine.getPlanContext","params":[-1],"id":1}
411 *
412 * @par JSON-RPC响应示例
413 * {"id":1,"jsonrpc":"2.0","result":[-1,0,""]}
414 *
415 * \endchinese
416 * \english
417 * Get the current runtime context
418 *
419 * @param tid Task ID
420 * If specified (not -1), returns the runtime context of the corresponding
421 * task; if not specified (is -1), returns the runtime context of the
422 * currently running thread
423 *
424 * @return
425 *
426 * @par Python function prototype
427 * getPlanContext(self: pyaubo_sdk.RuntimeMachine) -> Tuple[int, int, str]
428 *
429 * @par Lua function prototype
430 * getPlanContext() -> number
431 *
432 * @par JSON-RPC Request Example
433 * {"jsonrpc":"2.0","method":"RuntimeMachine.getPlanContext","params":[-1],"id":1}
434 *
435 * @par JSON-RPC Response Example
436 * {"id":1,"jsonrpc":"2.0","result":[-1,0,""]}
437 *
438 * \endenglish
439 */
440 std::tuple<int, int, std::string> getPlanContext(int tid = -1);
441
442 /**
443 * @ingroup RuntimeMachine
444 * \chinese
445 * 获取提前运行规划器的上下文信息
446 *
447 * @param tid 任务编号
448 * 如果指定(不是-1),返回对应任务运行规划器的上下文信息;如果不指定(是-1),返回正在运行的线程运行规划器的上下文信息
449 *
450 * @return
451 *
452 * @par JSON-RPC请求示例
453 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePlanContext","params":[-1],"id":1}
454 *
455 * @par JSON-RPC响应示例
456 * {"id":1,"jsonrpc":"2.0","result":[-1,-1,""]}
457 *
458 * \endchinese
459 * \english
460 * Get the context information of the advance planner
461 *
462 * @param tid Task ID
463 * If specified (not -1), returns the context information of the advance
464 * planner for the corresponding task; if not specified (is -1), returns the
465 * context information of the advance planner for the currently running
466 * thread
467 *
468 * @return
469 *
470 * @par JSON-RPC Request Example
471 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePlanContext","params":[-1],"id":1}
472 *
473 * @par JSON-RPC Response Example
474 * {"id":1,"jsonrpc":"2.0","result":[-1,-1,""]}
475 *
476 * \endenglish
477 */
478 std::tuple<int, int, std::string> getAdvancePlanContext(int tid = -1);
479
480 /**
481 * @ingroup RuntimeMachine
482 * \chinese
483 * 获取AdvanceRun的程序指针
484 *
485 * @return
486 *
487 * @par JSON-RPC请求示例
488 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePtr","params":[-1],"id":1}
489 *
490 * @par JSON-RPC响应示例
491 * {"id":1,"jsonrpc":"2.0","result":-1}
492 *
493 * \endchinese
494 * \english
495 * Get the program pointer of AdvanceRun
496 *
497 * @return
498 *
499 * @par JSON-RPC Request Example
500 * {"jsonrpc":"2.0","method":"RuntimeMachine.getAdvancePtr","params":[-1],"id":1}
501 *
502 * @par JSON-RPC Response Example
503 * {"id":1,"jsonrpc":"2.0","result":-1}
504 *
505 * \endenglish
506 */
507 int getAdvancePtr(int tid = -1);
508
509 /**
510 * @ingroup RuntimeMachine
511 * \chinese
512 * 获取机器人运动的程序指针
513 *
514 * @param tid 任务编号
515 * 如果指定(不是-1),返回对应任务的程序指针;如果不指定(是-1),返回正在运行线程的程序指针
516 *
517 * @return
518 *
519 * @par JSON-RPC请求示例
520 * {"jsonrpc":"2.0","method":"RuntimeMachine.getMainPtr","params":[-1],"id":1}
521 *
522 * @par JSON-RPC响应示例
523 * {"id":1,"jsonrpc":"2.0","result":-1}
524 *
525 * \endchinese
526 * \english
527 * Get the program pointer of robot motion
528 *
529 * @param tid Task ID
530 * If specified (not -1), returns the program pointer of the corresponding
531 * task; if not specified (is -1), returns the program pointer of the
532 * currently running thread
533 *
534 * @return
535 *
536 * @par JSON-RPC Request Example
537 * {"jsonrpc":"2.0","method":"RuntimeMachine.getMainPtr","params":[-1],"id":1}
538 *
539 * @par JSON-RPC Response Example
540 * {"id":1,"jsonrpc":"2.0","result":-1}
541 *
542 * \endenglish
543 */
544 int getMainPtr(int tid = -1);
545
546 /**
547 * @ingroup RuntimeMachine
548 * \chinese
549 * 获取最近解释过的指令指针
550 *
551 * @param tid
552 * @return
553 *
554 * @par JSON-RPC请求示例
555 * {"jsonrpc":"2.0","method":"RuntimeMachine.getInterpPtr","params":[26],"id":1}
556 *
557 * @par JSON-RPC响应示例
558 * {"id":1,"jsonrpc":"2.0","result":-1}
559 *
560 * \endchinese
561 * \english
562 * Get the pointer of the most recently interpreted instruction
563 *
564 * @param tid
565 * @return
566 *
567 * @par JSON-RPC Request Example
568 * {"jsonrpc":"2.0","method":"RuntimeMachine.getInterpPtr","params":[26],"id":1}
569 *
570 * @par JSON-RPC Response Example
571 * {"id":1,"jsonrpc":"2.0","result":-1}
572 *
573 * \endenglish
574 */
575 int getInterpPtr(int tid);
576
577 /**
578 * @ingroup RuntimeMachine
579 * \chinese
580 * 加载本地工程文件
581 * Lua 脚本,只需要给出文件名字,不需要后缀,需要从 ${ARCS_WS}/program
582 * 目录中查找
583 *
584 * @param program
585 * @return
586 *
587 * @par JSON-RPC请求示例
588 * {"jsonrpc":"2.0","method":"RuntimeMachine.loadProgram","params":["demo"],"id":1}
589 *
590 * @par JSON-RPC响应示例
591 * {"id":1,"jsonrpc":"2.0","result":0}
592 *
593 * \endchinese
594 * \english
595 * Load a local project file.
596 * For Lua scripts, only the file name is required (no extension), and it
597 * will be searched in the ${ARCS_WS}/program directory.
598 *
599 * @param program
600 * @return
601 *
602 * @par JSON-RPC Request Example
603 * {"jsonrpc":"2.0","method":"RuntimeMachine.loadProgram","params":["demo"],"id":1}
604 *
605 * @par JSON-RPC Response Example
606 * {"id":1,"jsonrpc":"2.0","result":0}
607 *
608 * \endenglish
609 */
610 int loadProgram(const std::string &program);
611
612 /**
613 * @ingroup RuntimeMachine
614 * \chinese
615 * 预加载工程文件
616 *
617 * @param index 0~99 工程索引号
618 * @param program 工程名字
619 * @return
620 * \endchinese
621 * \english
622 * Preload project file
623 *
624 * @param index Project index number (0~99)
625 * @param program Project name
626 * @return
627 * \endenglish
628 */
629 int preloadProgram(int index, const std::string &program);
630
631 /**
632 * @ingroup RuntimeMachine
633 * \chinese
634 * 获取预加载工程文件名字,如果没有加载或者超出索引范围则返回空字符串
635 *
636 * @param index 0~99 工程索引号
637 * @return 工程文件名字
638 * \endchinese
639 * \english
640 * Get the name of the preloaded project file. Returns an empty string if
641 * not loaded or index is out of range.
642 *
643 * @param index Project index number (0~99)
644 * @return Project file name
645 * \endenglish
646 */
647 std::string getPreloadProgram(int index);
648
649 /**
650 * @ingroup RuntimeMachine
651 * \chinese
652 * 清除所有已预加载的工程文件
653 * 调用此方法将释放所有通过 preloadProgram
654 * 预加载的工程索引及其关联的工程名称
655 *
656 * @return 成功返回0;
657 * \endchinese
658 * \english
659 * Clear all preloaded project files.
660 * Calling this method will release all project indices and their associated
661 * program names that were previously preloaded via preloadProgram.
662 *
663 * @return Returns 0 on success;
664 * \endenglish
665 */
667
668 /**
669 * @ingroup RuntimeMachine
670 * \chinese
671 * 运行已经加载的工程文件
672 *
673 * @return
674 *
675 * @par JSON-RPC请求示例
676 * {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
677 *
678 * @par JSON-RPC响应示例
679 * {"id":1,"jsonrpc":"2.0","result":0}
680 *
681 * \endchinese
682 * \english
683 * Run the already loaded project file
684 *
685 * @return
686 *
687 * @par JSON-RPC Request Example
688 * {"jsonrpc":"2.0","method":"RuntimeMachine.runProgram","params":[],"id":1}
689 *
690 * @par JSON-RPC Response Example
691 * {"id":1,"jsonrpc":"2.0","result":0}
692 *
693 * \endenglish
694 */
696
697 /**
698 * @ingroup RuntimeMachine
699 * \chinese
700 * 开始运行时
701 *
702 * @return
703 *
704 * @par Python函数原型
705 * start(self: pyaubo_sdk.RuntimeMachine) -> int
706 *
707 * @par Lua函数原型
708 * start() -> number
709 *
710 * @par JSON-RPC请求示例
711 * {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
712 *
713 * @par JSON-RPC响应示例
714 * {"id":1,"jsonrpc":"2.0","result":0}
715 *
716 * \endchinese
717 * \english
718 * Start the runtime
719 *
720 * @return
721 *
722 * @par Python function prototype
723 * start(self: pyaubo_sdk.RuntimeMachine) -> int
724 *
725 * @par Lua function prototype
726 * start() -> number
727 *
728 * @par JSON-RPC Request Example
729 * {"jsonrpc":"2.0","method":"RuntimeMachine.start","params":[],"id":1}
730 *
731 * @par JSON-RPC Response Example
732 * {"id":1,"jsonrpc":"2.0","result":0}
733 *
734 * \endenglish
735 */
736 int start();
737
738 /**
739 * @ingroup RuntimeMachine
740 * \chinese
741 * 停止运行时即脚本运行,无法停止运行时状态为 Stopped 时的机器人运动
742 *
743 * 如果考虑停止机器人所有运动,可以调用 RuntimeMachine::abort 接口
744 *
745 * @return
746 *
747 * @par Python函数原型
748 * stop(self: pyaubo_sdk.RuntimeMachine) -> int
749 *
750 * @par Lua函数原型
751 * stop() -> number
752 *
753 * @par JSON-RPC请求示例
754 * {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
755 *
756 * @par JSON-RPC响应示例
757 * {"id":1,"jsonrpc":"2.0","result":0}
758 *
759 * \endchinese
760 * \english
761 * Stop the runtime, i.e., stop script execution. Cannot stop robot motion
762 * when the runtime state is Stopped.
763 *
764 * If you want to stop all robot motion, use the RuntimeMachine::abort
765 * interface.
766 *
767 * @return
768 *
769 * @par Python function prototype
770 * stop(self: pyaubo_sdk.RuntimeMachine) -> int
771 *
772 * @par Lua function prototype
773 * stop() -> number
774 *
775 * @par JSON-RPC Request Example
776 * {"jsonrpc":"2.0","method":"RuntimeMachine.stop","params":[],"id":1}
777 *
778 * @par JSON-RPC Response Example
779 * {"id":1,"jsonrpc":"2.0","result":0}
780 *
781 * \endenglish
782 */
783 int stop();
784
785 /**
786 * @ingroup RuntimeMachine
787 * \chinese
788 * 终止机器人运行.
789 *
790 * 如果只是考虑停止运行时,可以调用 RuntimeMachine::stop 接口
791 *
792 * 如果脚本运行时处于 Running 状态,则终止运行时;如果运行时处于 Stopped
793 * 且机器人正在移动,则停止机器人移动;如果此时力控开启了,则机器人停止力控
794 *
795 * @return
796 *
797 * @par Python函数原型
798 * abort(self: pyaubo_sdk.RuntimeMachine) -> int
799 *
800 * @par Lua函数原型
801 * abort() -> number
802 *
803 * @par JSON-RPC请求示例
804 * {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
805 *
806 * @par JSON-RPC响应示例
807 * {"id":1,"jsonrpc":"2.0","result":0}
808 *
809 * \endchinese
810 * \english
811 * Abort robot operation.
812 *
813 * If you only want to stop the runtime, you can call the
814 * RuntimeMachine::stop interface.
815 *
816 * If the script runtime is in the Running state, aborts the runtime; if the
817 * runtime is Stopped and the robot is moving, stops the robot motion; if
818 * force control is enabled, stops force control.
819 *
820 * @return
821 *
822 * @par Python function prototype
823 * abort(self: pyaubo_sdk.RuntimeMachine) -> int
824 *
825 * @par Lua function prototype
826 * abort() -> number
827 *
828 * @par JSON-RPC Request Example
829 * {"jsonrpc":"2.0","method":"RuntimeMachine.abort","params":[],"id":1}
830 *
831 * @par JSON-RPC Response Example
832 * {"id":1,"jsonrpc":"2.0","result":0}
833 *
834 * \endenglish
835 */
836 int abort();
837
838 /**
839 * @ingroup RuntimeMachine
840 * \chinese
841 * 暂停解释器
842 *
843 * @return
844 *
845 * @par Python函数原型
846 * pause(self: pyaubo_sdk.RuntimeMachine) -> int
847 *
848 * @par Lua函数原型
849 * pause() -> number
850 *
851 * @par JSON-RPC请求示例
852 * {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
853 *
854 * @par JSON-RPC响应示例
855 * {"id":1,"jsonrpc":"2.0","result":0}
856 *
857 * \endchinese
858 * \english
859 * Pause the interpreter
860 *
861 * @return
862 *
863 * @par Python function prototype
864 * pause(self: pyaubo_sdk.RuntimeMachine) -> int
865 *
866 * @par Lua function prototype
867 * pause() -> number
868 *
869 * @par JSON-RPC Request Example
870 * {"jsonrpc":"2.0","method":"RuntimeMachine.pause","params":[],"id":1}
871 *
872 * @par JSON-RPC Response Example
873 * {"id":1,"jsonrpc":"2.0","result":0}
874 *
875 * \endenglish
876 */
877 int pause();
878
879 /**
880 * @ingroup RuntimeMachine
881 * \chinese
882 * 单步运行
883 *
884 * @return
885 *
886 * @par Python函数原型
887 * step(self: pyaubo_sdk.RuntimeMachine) -> int
888 *
889 * @par Lua函数原型
890 * step() -> number
891 *
892 * @par JSON-RPC请求示例
893 * {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
894 *
895 * @par JSON-RPC响应示例
896 * {"id":1,"jsonrpc":"2.0","result":0}
897 *
898 * \endchinese
899 * \english
900 * Execute a single step
901 *
902 * @return
903 *
904 * @par Python function prototype
905 * step(self: pyaubo_sdk.RuntimeMachine) -> int
906 *
907 * @par Lua function prototype
908 * step() -> number
909 *
910 * @par JSON-RPC Request Example
911 * {"jsonrpc":"2.0","method":"RuntimeMachine.step","params":[],"id":1}
912 *
913 * @par JSON-RPC Response Example
914 * {"id":1,"jsonrpc":"2.0","result":0}
915 *
916 * \endenglish
917 */
918 int step();
919
920 /**
921 * @ingroup RuntimeMachine
922 * \chinese
923 * 恢复解释器
924 *
925 * @return
926 *
927 * @par Python函数原型
928 * resume(self: pyaubo_sdk.RuntimeMachine) -> int
929 *
930 * @par Lua函数原型
931 * resume() -> number
932 *
933 * @par JSON-RPC请求示例
934 * {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
935 *
936 * @par JSON-RPC响应示例
937 * {"id":1,"jsonrpc":"2.0","result":0}
938 *
939 * \endchinese
940 * \english
941 * Resume the interpreter
942 *
943 * @return
944 *
945 * @par Python function prototype
946 * resume(self: pyaubo_sdk.RuntimeMachine) -> int
947 *
948 * @par Lua function prototype
949 * resume() -> number
950 *
951 * @par JSON-RPC Request Example
952 * {"jsonrpc":"2.0","method":"RuntimeMachine.resume","params":[],"id":1}
953 *
954 * @par JSON-RPC Response Example
955 * {"id":1,"jsonrpc":"2.0","result":0}
956 *
957 * \endenglish
958 */
959 int resume();
960
961 /**
962 * @ingroup RuntimeMachine
963 * \chinese
964 * 恢复解释器(不检查当前点和暂停点距离)
965 *
966 * @return
967 *
968 * @par Python函数原型
969 * arbitraryResume(self: pyaubo_sdk.RuntimeMachine) -> int
970 *
971 * @par Lua函数原型
972 * arbitraryResume() -> number
973 *
974 * @par JSON-RPC请求示例
975 * {"jsonrpc":"2.0","method":"RuntimeMachine.arbitraryResume","params":[],"id":1}
976 *
977 * @par JSON-RPC响应示例
978 * {"id":1,"jsonrpc":"2.0","result":0}
979 *
980 * \endchinese
981 * \english
982 * Resume the interpreter
983 *
984 * @return
985 *
986 * @par Python function prototype
987 * arbitraryResume(self: pyaubo_sdk.RuntimeMachine) -> int
988 *
989 * @par Lua function prototype
990 * arbitraryResume() -> number
991 *
992 * @par JSON-RPC Request Example
993 * {"jsonrpc":"2.0","method":"RuntimeMachine.arbitraryResume","params":[],"id":1}
994 *
995 * @par JSON-RPC Response Example
996 * {"id":1,"jsonrpc":"2.0","result":0}
997 *
998 * \endenglish
999 */
1001
1002 /**
1003 * @ingroup RuntimeMachine
1004 * \chinese
1005 * 恢复解释器之前等待恢复前之前的序列完成
1006 *
1007 * @param wait
1008 * @return
1009 *
1010 * @par JSON-RPC请求示例
1011 * {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
1012 *
1013 * @par JSON-RPC响应示例
1014 * {"id":1,"jsonrpc":"2.0","result":0}
1015 *
1016 * \endchinese
1017 * \english
1018 * Wait for the previous sequence to complete before resuming the
1019 * interpreter
1020 *
1021 * @param wait
1022 * @return
1023 *
1024 * @par JSON-RPC Request Example
1025 * {"jsonrpc":"2.0","method":"RuntimeMachine.setResumeWait","params":[true],"id":1}
1026 *
1027 * @par JSON-RPC Response Example
1028 * {"id":1,"jsonrpc":"2.0","result":0}
1029 *
1030 * \endenglish
1031 */
1032 int setResumeWait(bool wait);
1033
1034 /**
1035 * @ingroup RuntimeMachine
1036 * \chinese
1037 * 进入临界区,abort 命令会被推迟执行,避免临界区内的指令被打断
1038 *
1039 * @param timeout 单位秒,范围 0~5 秒,表示 abort
1040 * 命令最大推迟时间,超过这个时间自动退出临界区并 abort
1041 * @return
1042 *
1043 * @par Python函数原型
1044 * enterCritical(self: pyaubo_sdk.RuntimeMachine, arg0: double) -> int
1045 *
1046 * @par Lua函数原型
1047 * enterCritical(timeout: number) -> number
1048 *
1049 * @par JSON-RPC请求示例
1050 * {"jsonrpc":"2.0","method":"RuntimeMachine.enterCritical","params":[5.0],"id":1}
1051 *
1052 * @par JSON-RPC响应示例
1053 * {"id":1,"jsonrpc":"2.0","result":0}
1054 *
1055 * \endchinese
1056 * \english
1057 * The abort command is deferred during critical sections to avoid
1058 * interrupting internal instructions.
1059 *
1060 * @param timeout (seconds, 0~5): max deferral time for abort. Exceeding it
1061 * forces exit from critical section and triggers abort.
1062 * @return
1063 *
1064 * @par Python function prototype
1065 * enterCritical(self: pyaubo_sdk.RuntimeMachine, arg0: double) -> int
1066 *
1067 * @par Lua function prototype
1068 * enterCritical(timeout: number) -> number
1069 *
1070 * @par JSON-RPC Request Example
1071 * {"jsonrpc":"2.0","method":"RuntimeMachine.enterCritical","params":[5.0],"id":1}
1072 *
1073 * @par JSON-RPC Response Example
1074 * {"id":1,"jsonrpc":"2.0","result":0}
1075 *
1076 * \endenglish
1077 */
1078 int enterCritical(double timeout);
1079
1080 /**
1081 * @ingroup RuntimeMachine
1082 * \chinese
1083 * 退出临界区
1084 *
1085 * @param
1086 * @return
1087 *
1088 * @par Python函数原型
1089 * exitCritical(self: pyaubo_sdk.RuntimeMachine) -> int
1090 *
1091 * @par Lua函数原型
1092 * exitCritical() -> number
1093 *
1094 * @par JSON-RPC请求示例
1095 * {"jsonrpc":"2.0","method":"RuntimeMachine.exitCritical","params":[],"id":1}
1096 *
1097 * @par JSON-RPC响应示例
1098 * {"id":1,"jsonrpc":"2.0","result":0}
1099 *
1100 * \endchinese
1101 * \english
1102 * Exit the critical section
1103 *
1104 * @param
1105 * @return
1106 *
1107 * @par Python function prototype
1108 * exitCritical(self: pyaubo_sdk.RuntimeMachine) -> int
1109 *
1110 * @par Lua function prototype
1111 * exitCritical() -> number
1112 *
1113 * @par JSON-RPC Request Example
1114 * {"jsonrpc":"2.0","method":"RuntimeMachine.exitCritical","params":[],"id":1}
1115 *
1116 * @par JSON-RPC Response Example
1117 * {"id":1,"jsonrpc":"2.0","result":0}
1118 *
1119 * \endenglish
1120 */
1122
1123 /**
1124 * @ingroup RuntimeMachine
1125 * \chinese
1126 * 获取规划器的状态
1127 *
1128 * @return
1129 *
1130 * @par Python函数原型
1131 * getStatus(self: pyaubo_sdk.RuntimeMachine) ->
1132 * arcs::common_interface::RuntimeState
1133 *
1134 * @par Lua函数原型
1135 * getStatus() -> number
1136 *
1137 * @par JSON-RPC请求示例
1138 * {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
1139 *
1140 * @par JSON-RPC响应示例
1141 * {"id":1,"jsonrpc":"2.0","result":"Running"}
1142 *
1143 * \endchinese
1144 * \english
1145 * Get the status of the planner
1146 *
1147 * @return
1148 *
1149 * @par Python function prototype
1150 * getStatus(self: pyaubo_sdk.RuntimeMachine) ->
1151 * arcs::common_interface::RuntimeState
1152 *
1153 * @par Lua function prototype
1154 * getStatus() -> number
1155 *
1156 * @par JSON-RPC Request Example
1157 * {"jsonrpc":"2.0","method":"RuntimeMachine.getStatus","params":[],"id":1}
1158 *
1159 * @par JSON-RPC Response Example
1160 * {"id":1,"jsonrpc":"2.0","result":"Running"}
1161 *
1162 * \endenglish
1163 */
1164 ARCS_DEPRECATED RuntimeState getStatus();
1166
1167 /**
1168 * @ingroup RuntimeMachine
1169 * \chinese
1170 * 设置断点
1171 *
1172 * @param lineno
1173 * @return
1174 *
1175 * @par Python函数原型
1176 * setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1177 *
1178 * @par Lua函数原型
1179 * setBreakPoint(lineno: number) -> number
1180 *
1181 * @par JSON-RPC请求示例
1182 * {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
1183 *
1184 * @par JSON-RPC响应示例
1185 * {"id":1,"jsonrpc":"2.0","result":0}
1186 *
1187 * \endchinese
1188 * \english
1189 * Set a breakpoint
1190 *
1191 * @param lineno
1192 * @return
1193 *
1194 * @par Python function prototype
1195 * setBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1196 *
1197 * @par Lua function prototype
1198 * setBreakPoint(lineno: number) -> number
1199 *
1200 * @par JSON-RPC Request Example
1201 * {"jsonrpc":"2.0","method":"RuntimeMachine.setBreakPoint","params":[15],"id":1}
1202 *
1203 * @par JSON-RPC Response Example
1204 * {"id":1,"jsonrpc":"2.0","result":0}
1205 *
1206 * \endenglish
1207 */
1208 int setBreakPoint(int lineno);
1209
1210 /**
1211 * @ingroup RuntimeMachine
1212 * \chinese
1213 * 移除断点
1214 *
1215 * @param lineno
1216 * @return
1217 *
1218 * @par Python函数原型
1219 * removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1220 *
1221 * @par Lua函数原型
1222 * removeBreakPoint(lineno: number) -> number
1223 *
1224 * @par JSON-RPC请求示例
1225 * {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
1226 *
1227 * @par JSON-RPC响应示例
1228 * {"id":1,"jsonrpc":"2.0","result":0}
1229 *
1230 * \endchinese
1231 * \english
1232 * Remove a breakpoint
1233 *
1234 * @param lineno
1235 * @return
1236 *
1237 * @par Python function prototype
1238 * removeBreakPoint(self: pyaubo_sdk.RuntimeMachine, arg0: int) -> int
1239 *
1240 * @par Lua function prototype
1241 * removeBreakPoint(lineno: number) -> number
1242 *
1243 * @par JSON-RPC Request Example
1244 * {"jsonrpc":"2.0","method":"RuntimeMachine.removeBreakPoint","params":[15],"id":1}
1245 *
1246 * @par JSON-RPC Response Example
1247 * {"id":1,"jsonrpc":"2.0","result":0}
1248 *
1249 * \endenglish
1250 */
1251 int removeBreakPoint(int lineno);
1252
1253 /**
1254 * @ingroup RuntimeMachine
1255 * \chinese
1256 * 清除所有断点
1257 *
1258 * @return
1259 *
1260 * @par Python函数原型
1261 * clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
1262 *
1263 * @par Lua函数原型
1264 * clearBreakPoints() -> number
1265 *
1266 * @par JSON-RPC请求示例
1267 * {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
1268 *
1269 * @par JSON-RPC响应示例
1270 * {"id":1,"jsonrpc":"2.0","result":0}
1271 *
1272 * \endchinese
1273 * \english
1274 * Clear all breakpoints
1275 *
1276 * @return
1277 *
1278 * @par Python function prototype
1279 * clearBreakPoints(self: pyaubo_sdk.RuntimeMachine) -> int
1280 *
1281 * @par Lua function prototype
1282 * clearBreakPoints() -> number
1283 *
1284 * @par JSON-RPC Request Example
1285 * {"jsonrpc":"2.0","method":"RuntimeMachine.clearBreakPoints","params":[],"id":1}
1286 *
1287 * @par JSON-RPC Response Example
1288 * {"id":1,"jsonrpc":"2.0","result":0}
1289 *
1290 * \endenglish
1291 */
1293
1294 /**
1295 * @ingroup RuntimeMachine
1296 * \chinese
1297 * 定时器开始
1298 *
1299 * @param name
1300 * @return
1301 *
1302 * @par Python函数原型
1303 * timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1304 *
1305 * @par Lua函数原型
1306 * timerStart(name: string) -> nil
1307 *
1308 * @par JSON-RPC请求示例
1309 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
1310 *
1311 * @par JSON-RPC响应示例
1312 * {"id":1,"jsonrpc":"2.0","result":0}
1313 *
1314 * \endchinese
1315 * \english
1316 * Start the timer
1317 *
1318 * @param name
1319 * @return
1320 *
1321 * @par Python function prototype
1322 * timerStart(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1323 *
1324 * @par Lua function prototype
1325 * timerStart(name: string) -> nil
1326 *
1327 * @par JSON-RPC Request Example
1328 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStart","params":["timer"],"id":1}
1329 *
1330 * @par JSON-RPC Response Example
1331 * {"id":1,"jsonrpc":"2.0","result":0}
1332 *
1333 * \endenglish
1334 */
1335 int timerStart(const std::string &name);
1336
1337 /**
1338 * @ingroup RuntimeMachine
1339 * \chinese
1340 * 定时器结束
1341 *
1342 * @param name
1343 * @return
1344 *
1345 * @par Python函数原型
1346 * timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1347 *
1348 * @par Lua函数原型
1349 * timerStop(name: string) -> nil
1350 *
1351 * @par JSON-RPC请求示例
1352 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
1353 *
1354 * @par JSON-RPC响应示例
1355 * {"id":1,"jsonrpc":"2.0","result":0}
1356 *
1357 * \endchinese
1358 * \english
1359 * Stop the timer
1360 *
1361 * @param name
1362 * @return
1363 *
1364 * @par Python function prototype
1365 * timerStop(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1366 *
1367 * @par Lua function prototype
1368 * timerStop(name: string) -> nil
1369 *
1370 * @par JSON-RPC Request Example
1371 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerStop","params":["timer"],"id":1}
1372 *
1373 * @par JSON-RPC Response Example
1374 * {"id":1,"jsonrpc":"2.0","result":0}
1375 *
1376 * \endenglish
1377 */
1378 int timerStop(const std::string &name);
1379
1380 /**
1381 * @ingroup RuntimeMachine
1382 * \chinese
1383 * 定时器重置
1384 *
1385 * @param name
1386 * @return
1387 *
1388 * @par Python函数原型
1389 * timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1390 *
1391 * @par Lua函数原型
1392 * timerReset(name: string) -> nil
1393 *
1394 * @par JSON-RPC请求示例
1395 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
1396 *
1397 * @par JSON-RPC响应示例
1398 * {"id":1,"jsonrpc":"2.0","result":0}
1399 *
1400 * \endchinese
1401 * \english
1402 * Reset the timer
1403 *
1404 * @param name
1405 * @return
1406 *
1407 * @par Python function prototype
1408 * timerReset(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1409 *
1410 * @par Lua function prototype
1411 * timerReset(name: string) -> nil
1412 *
1413 * @par JSON-RPC Request Example
1414 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerReset","params":["timer"],"id":1}
1415 *
1416 * @par JSON-RPC Response Example
1417 * {"id":1,"jsonrpc":"2.0","result":0}
1418 *
1419 * \endenglish
1420 */
1421 int timerReset(const std::string &name);
1422
1423 /**
1424 * @ingroup RuntimeMachine
1425 * \chinese
1426 * 定时器删除
1427 *
1428 * @param name
1429 * @return
1430 *
1431 * @par Python函数原型
1432 * timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1433 *
1434 * @par Lua函数原型
1435 * timerDelete(name: string) -> nil
1436 *
1437 * @par JSON-RPC请求示例
1438 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
1439 *
1440 * @par JSON-RPC响应示例
1441 * {"id":1,"jsonrpc":"2.0","result":0}
1442 *
1443 * \endchinese
1444 * \english
1445 * Delete the timer
1446 *
1447 * @param name
1448 * @return
1449 *
1450 * @par Python function prototype
1451 * timerDelete(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> int
1452 *
1453 * @par Lua function prototype
1454 * timerDelete(name: string) -> nil
1455 *
1456 * @par JSON-RPC Request Example
1457 * {"jsonrpc":"2.0","method":"RuntimeMachine.timerDelete","params":["timer"],"id":1}
1458 *
1459 * @par JSON-RPC Response Example
1460 * {"id":1,"jsonrpc":"2.0","result":0}
1461 *
1462 * \endenglish
1463 */
1464 int timerDelete(const std::string &name);
1465
1466 /**
1467 * @ingroup RuntimeMachine
1468 * \chinese
1469 * 获取定时器数值
1470 *
1471 * @param name
1472 * @return
1473 *
1474 * @par Python函数原型
1475 * getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
1476 *
1477 * @par Lua函数原型
1478 * getTimer(name: string) -> number
1479 *
1480 * @par JSON-RPC请求示例
1481 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
1482 *
1483 * @par JSON-RPC响应示例
1484 * {"id":1,"jsonrpc":"2.0","result":25.409769612}
1485 *
1486 * \endchinese
1487 * \english
1488 * Get the timer value
1489 *
1490 * @param name
1491 * @return
1492 *
1493 * @par Python function prototype
1494 * getTimer(self: pyaubo_sdk.RuntimeMachine, arg0: str) -> float
1495 *
1496 * @par Lua function prototype
1497 * getTimer(name: string) -> number
1498 *
1499 * @par JSON-RPC Request Example
1500 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTimer","params":["timer"],"id":1}
1501 *
1502 * @par JSON-RPC Response Example
1503 * {"id":1,"jsonrpc":"2.0","result":25.409769612}
1504 *
1505 * \endenglish
1506 */
1507 double getTimer(const std::string &name);
1508
1509 /**
1510 * @ingroup RuntimeMachine
1511 * \chinese
1512 * 开始配置触发
1513 *
1514 * @param distance
1515 * @param delay
1516 * @return
1517 *
1518 * @par JSON-RPC请求示例
1519 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
1520 *
1521 * @par JSON-RPC响应示例
1522 * {"id":1,"jsonrpc":"2.0","result":0}
1523 *
1524 * \endchinese
1525 * \english
1526 * Start configuring trigger
1527 *
1528 * @param distance
1529 * @param delay
1530 * @return
1531 *
1532 * @par JSON-RPC Request Example
1533 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggBegin","params":[],"id":1}
1534 *
1535 * @par JSON-RPC Response Example
1536 * {"id":1,"jsonrpc":"2.0","result":0}
1537 *
1538 * \endenglish
1539 */
1540 int triggBegin(double distance, double delay);
1541
1542 /**
1543 * @ingroup RuntimeMachine
1544 * \chinese
1545 * 终止配置触发
1546 *
1547 * @return
1548 *
1549 * @par JSON-RPC请求示例
1550 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
1551 *
1552 * @par JSON-RPC响应示例
1553 * {"id":1,"jsonrpc":"2.0","result":0}
1554 *
1555 * \endchinese
1556 * \english
1557 * End configuring trigger
1558 *
1559 * @return
1560 *
1561 * @par JSON-RPC Request Example
1562 * {"jsonrpc":"2.0","method":"RuntimeMachine.triggEnd","params":[],"id":1}
1563 *
1564 * @par JSON-RPC Response Example
1565 * {"id":1,"jsonrpc":"2.0","result":0}
1566 *
1567 * \endenglish
1568 */
1570
1571 /**
1572 * @ingroup RuntimeMachine
1573 * \chinese
1574 * 返回自动分配的中断号
1575 *
1576 * @param distance
1577 * @param delay
1578 * @param intnum
1579 * @return
1580 * \endchinese
1581 * \english
1582 * Returns the automatically assigned interrupt number
1583 *
1584 * @param distance
1585 * @param delay
1586 * @param intnum
1587 * @return
1588 * \endenglish
1589 */
1590 int triggInterrupt(double distance, double delay);
1591
1592 /**
1593 * @ingroup RuntimeMachine
1594 * \chinese
1595 * 获取所有的中断号列表
1596 *
1597 * @return
1598 *
1599 * @par JSON-RPC请求示例
1600 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
1601 *
1602 * @par JSON-RPC响应示例
1603 * {"id":1,"jsonrpc":"2.0","result":[]}
1604 *
1605 * \endchinese
1606 * \english
1607 * Get the list of all interrupt numbers
1608 *
1609 * @return
1610 *
1611 * @par JSON-RPC Request Example
1612 * {"jsonrpc":"2.0","method":"RuntimeMachine.getTriggInterrupts","params":[],"id":1}
1613 *
1614 * @par JSON-RPC Response Example
1615 * {"id":1,"jsonrpc":"2.0","result":[]}
1616 *
1617 * \endenglish
1618 */
1619 std::vector<int> getTriggInterrupts();
1620
1621protected:
1622 void *d_;
1623};
1624
1625using RuntimeMachinePtr = std::shared_ptr<RuntimeMachine>;
1626
1627} // namespace common_interface
1628} // namespace arcs
1629#endif // AUBO_SDK_RUNTIME_MACHINE_H
std::tuple< std::string, std::string, int > getExecutionStatus1()
int exitCritical()
Exit the critical section
int enterCritical(double timeout)
The abort command is deferred during critical sections to avoid interrupting internal instructions.
int arbitraryResume()
Resume the interpreter
int timerStop(const std::string &name)
Stop the timer
int preloadProgram(int index, const std::string &program)
Preload project file
double getTimer(const std::string &name)
Get the timer value
int switchTask(int tid)
Switch the current thread.
std::tuple< int, int, std::string > getPlanContext(int tid=-1)
Get the current runtime context
int resume()
Resume the interpreter
int abort()
Abort robot operation.
std::string getPreloadProgram(int index)
Get the name of the preloaded project file.
int gotoLine(int lineno)
Jump to the specified line number
int detachTask(int tid)
Wait for the task to finish naturally
int runProgram()
Run the already loaded project file
int timerReset(const std::string &name)
Reset the timer
std::tuple< int, int, std::string > getAdvancePlanContext(int tid=-1)
Get the context information of the advance planner
ARCS_DEPRECATED int setPlanContext(int tid, int lineno, const std::string &comment)
Add a comment to the aubo_control log Use setLabel instead
int triggBegin(double distance, double delay)
Start configuring trigger
int getAdvancePtr(int tid=-1)
Get the program pointer of AdvanceRun
int triggEnd()
End configuring trigger
int removeBreakPoint(int lineno)
Remove a breakpoint
int clearBreakPoints()
Clear all breakpoints
int setBreakPoint(int lineno)
Set a breakpoint
int setResumeWait(bool wait)
Wait for the previous sequence to complete before resuming the interpreter
int loadProgram(const std::string &program)
Load a local project file.
ARCS_DEPRECATED RuntimeState getStatus()
Get the status of the planner
int getInterpPtr(int tid)
Get the pointer of the most recently interpreted instruction
int clearPreloadPrograms()
Clear all preloaded project files.
int getTaskQueueSize(int tid)
Get the number of cached instructions in the task
std::vector< int > getTriggInterrupts()
Get the list of all interrupt numbers
int deleteTask(int tid)
Delete a task, which will terminate any ongoing motion.
int newTask(bool daemon=false)
Returns the task_id
int triggInterrupt(double distance, double delay)
Returns the automatically assigned interrupt number
int timerDelete(const std::string &name)
Delete the timer
int getMainPtr(int tid=-1)
Get the program pointer of robot motion
int pause()
Pause the interpreter
int step()
Execute a single step
int timerStart(const std::string &name)
Start the timer
std::tuple< std::string, std::string > getExecutionStatus()
Get the execution status of time-consuming interfaces (INST), such as setPersistentParameters
bool isTaskAlive(int tid)
Check if the task is alive
int setLabel(int lineno, const std::string &comment)
Mark the line number and comment of the recorded instruction
int stop()
Stop the runtime, i.e., stop script execution.
std::shared_ptr< RuntimeMachine > RuntimeMachinePtr
enum type definitions