5 #ifndef AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H 6 #define AUBO_SDK_RUNTIME_MACHINE_INTERFACE_H 9 #include <aubo/global_config.h> 13 namespace common_interface {
34 int newTask(
bool daemon =
false);
46 int deleteTask(
int tid);
61 int detachTask(
int tid);
76 bool isTaskAlive(
int tid);
91 int switchTask(
int tid);
107 int setLabel(
int lineno,
const std::string &comment);
132 ARCS_DEPRECATED
int setPlanContext(
int tid,
int lineno,
133 const std::string &comment);
169 std::tuple<std::string, std::string> getExecutionStatus();
170 std::tuple<std::string, std::string, int> getExecutionStatus1();
191 int gotoLine(
int lineno);
214 std::tuple<int, int, std::string> getPlanContext(
int tid = -1);
231 std::tuple<int, int, std::string> getAdvancePlanContext(
int tid = -1);
245 int getAdvancePtr(
int tid = -1);
262 int getMainPtr(
int tid = -1);
277 int getInterpPtr(
int tid);
294 int loadProgram(
const std::string &program);
450 int setResumeWait(
bool wait);
493 int setBreakPoint(
int lineno);
514 int removeBreakPoint(
int lineno);
534 int clearBreakPoints();
555 int timerStart(
const std::string &name);
576 int timerStop(
const std::string &name);
597 int timerReset(
const std::string &name);
618 int timerDelete(
const std::string &name);
639 double getTimer(
const std::string &name);
655 int triggBegin(
double distance,
double delay);
679 int triggInterrupt(
double distance,
double delay);
693 std::vector<int> getTriggInterrupts();
702 #define RuntimeMachine_DECLARES \ 703 _FUNC(RuntimeMachine, 1, newTask, daemon) \ 704 _FUNC(RuntimeMachine, 1, deleteTask, tid) \ 705 _FUNC(RuntimeMachine, 1, detachTask, tid) \ 706 _FUNC(RuntimeMachine, 1, isTaskAlive, tid) \ 707 _INST(RuntimeMachine, 0, nop) \ 708 _FUNC(RuntimeMachine, 1, switchTask, tid) \ 709 _FUNC(RuntimeMachine, 2, setLabel, tid, lineno) \ 710 _FUNC(RuntimeMachine, 3, setPlanContext, tid, lineno, comment) \ 711 _FUNC(RuntimeMachine, 1, gotoLine, lineno) \ 712 _FUNC(RuntimeMachine, 1, getAdvancePlanContext, tid) \ 713 _FUNC(RuntimeMachine, 1, getAdvancePtr, tid) \ 714 _FUNC(RuntimeMachine, 1, getMainPtr, tid) \ 715 _FUNC(RuntimeMachine, 1, getInterpPtr, tid) \ 716 _FUNC(RuntimeMachine, 1, getPlanContext, tid) \ 717 _FUNC(RuntimeMachine, 0, getExecutionStatus) \ 718 _FUNC(RuntimeMachine, 0, getExecutionStatus1) \ 719 _FUNC(RuntimeMachine, 1, loadProgram, program) \ 720 _FUNC(RuntimeMachine, 0, runProgram) \ 721 _FUNC(RuntimeMachine, 0, start) \ 722 _FUNC(RuntimeMachine, 0, stop) \ 723 _FUNC(RuntimeMachine, 0, abort) \ 724 _FUNC(RuntimeMachine, 0, pause) \ 725 _FUNC(RuntimeMachine, 0, step) \ 726 _FUNC(RuntimeMachine, 1, setResumeWait, wait) \ 727 _FUNC(RuntimeMachine, 0, resume) \ 728 _FUNC(RuntimeMachine, 0, getStatus) \ 729 _FUNC(RuntimeMachine, 0, getRuntimeState) \ 730 _FUNC(RuntimeMachine, 1, setBreakPoint, lineno) \ 731 _FUNC(RuntimeMachine, 1, removeBreakPoint, lineno) \ 732 _FUNC(RuntimeMachine, 0, clearBreakPoints) \ 733 _INST(RuntimeMachine, 1, timerStart, name) \ 734 _INST(RuntimeMachine, 1, timerStop, name) \ 735 _INST(RuntimeMachine, 1, timerReset, name) \ 736 _INST(RuntimeMachine, 1, timerDelete, name) \ 737 _FUNC(RuntimeMachine, 1, getTimer, name) \ 738 _FUNC(RuntimeMachine, 2, triggBegin, distance, delay) \ 739 _FUNC(RuntimeMachine, 0, triggEnd) \ 740 _FUNC(RuntimeMachine, 2, triggInterrupt, distance, delay) \ 741 _FUNC(RuntimeMachine, 0, getTriggInterrupts) 746 #endif // AUBO_SDK_RUNTIME_MACHINE_H
The RuntimeMachine class.
std::shared_ptr< RuntimeMachine > RuntimeMachinePtr