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