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 {
27 int newTask(
bool daemon =
false);
32 int deleteTask(
int tid);
40 int detachTask(
int tid);
48 bool isTaskAlive(
int tid);
56 int switchTask(
int tid);
65 int setLabel(
int lineno,
const std::string &comment);
84 ARCS_DEPRECATED
int setPlanContext(
int tid,
int lineno,
85 const std::string &comment);
107 std::tuple<std::string, std::string> getExecutionStatus();
122 int gotoLine(
int lineno);
139 std::tuple<int, int, std::string> getPlanContext(
int tid = -1);
149 std::tuple<int, int, std::string> getAdvancePlanContext(
int tid = -1);
156 int getAdvancePtr(
int tid = -1);
166 int getMainPtr(
int tid = -1);
174 int getInterpPtr(
int tid);
191 int loadProgram(
const std::string &program);
334 int setResumeWait(
bool wait);
371 int setBreakPoint(
int lineno);
386 int removeBreakPoint(
int lineno);
400 int clearBreakPoints();
415 int timerStart(
const std::string &name);
430 int timerStop(
const std::string &name);
445 int timerReset(
const std::string &name);
460 int timerDelete(
const std::string &name);
475 double getTimer(
const std::string &name);
484 int triggBegin(
double distance,
double delay);
501 int triggInterrupt(
double distance,
double delay);
508 std::vector<int> getTriggInterrupts();
517 #define RuntimeMachine_DECLARES \ 518 _FUNC(RuntimeMachine, 1, newTask, daemon) \ 519 _FUNC(RuntimeMachine, 1, deleteTask, tid) \ 520 _FUNC(RuntimeMachine, 1, detachTask, tid) \ 521 _FUNC(RuntimeMachine, 1, isTaskAlive, tid) \ 522 _INST(RuntimeMachine, 0, nop) \ 523 _FUNC(RuntimeMachine, 1, switchTask, tid) \ 524 _FUNC(RuntimeMachine, 2, setLabel, tid, lineno) \ 525 _FUNC(RuntimeMachine, 3, setPlanContext, tid, lineno, comment) \ 526 _FUNC(RuntimeMachine, 1, gotoLine, lineno) \ 527 _FUNC(RuntimeMachine, 1, getAdvancePlanContext, tid) \ 528 _FUNC(RuntimeMachine, 1, getAdvancePtr, tid) \ 529 _FUNC(RuntimeMachine, 1, getMainPtr, tid) \ 530 _FUNC(RuntimeMachine, 1, getInterpPtr, tid) \ 531 _FUNC(RuntimeMachine, 1, getPlanContext, tid) \ 532 _FUNC(RuntimeMachine, 0, getExecutionStatus) \ 533 _FUNC(RuntimeMachine, 1, loadProgram, program) \ 534 _FUNC(RuntimeMachine, 0, runProgram) \ 535 _FUNC(RuntimeMachine, 0, start) \ 536 _FUNC(RuntimeMachine, 0, stop) \ 537 _FUNC(RuntimeMachine, 0, abort) \ 538 _FUNC(RuntimeMachine, 0, pause) \ 539 _FUNC(RuntimeMachine, 0, step) \ 540 _FUNC(RuntimeMachine, 1, setResumeWait, wait) \ 541 _FUNC(RuntimeMachine, 0, resume) \ 542 _FUNC(RuntimeMachine, 0, getStatus) \ 543 _FUNC(RuntimeMachine, 0, getRuntimeState) \ 544 _FUNC(RuntimeMachine, 1, setBreakPoint, lineno) \ 545 _FUNC(RuntimeMachine, 1, removeBreakPoint, lineno) \ 546 _FUNC(RuntimeMachine, 0, clearBreakPoints) \ 547 _INST(RuntimeMachine, 1, timerStart, name) \ 548 _INST(RuntimeMachine, 1, timerStop, name) \ 549 _INST(RuntimeMachine, 1, timerReset, name) \ 550 _INST(RuntimeMachine, 1, timerDelete, name) \ 551 _FUNC(RuntimeMachine, 1, getTimer, name) \ 552 _FUNC(RuntimeMachine, 2, triggBegin, distance, delay) \ 553 _FUNC(RuntimeMachine, 0, triggEnd) \ 554 _FUNC(RuntimeMachine, 2, triggInterrupt, distance, delay) \ 555 _FUNC(RuntimeMachine, 0, getTriggInterrupts) 560 #endif // AUBO_SDK_RUNTIME_MACHINE_H
The RuntimeMachine class.
std::shared_ptr< RuntimeMachine > RuntimeMachinePtr