![]() |
AUBO SDK
0.26.0
|
The RuntimeMachine class. More...
#include <runtime_machine.h>
Public Member Functions | |
| RuntimeMachine () | |
| virtual | ~RuntimeMachine () |
| int | newTask (bool daemon=false) |
| Returns the task_id | |
| int | deleteTask (int tid) |
| Delete a task, which will terminate any ongoing motion. | |
| int | detachTask (int tid) |
| Wait for the task to finish naturally | |
| bool | isTaskAlive (int tid) |
| Check if the task is alive | |
| int | getTaskQueueSize (int tid) |
| Get the number of cached instructions in the task | |
| int | switchTask (int tid) |
| Switch the current thread. | |
| int | setLabel (int lineno, const std::string &comment) |
| Mark the line number and comment of the recorded instruction | |
| ARCS_DEPRECATED int | setPlanContext (int tid, int lineno, const std::string &comment) |
| Add a comment to the aubo_control log Use setLabel instead | |
| int | nop () |
| No operation | |
| std::tuple< std::string, std::string > | getExecutionStatus () |
| Get the execution status of time-consuming interfaces (INST), such as setPersistentParameters | |
| std::tuple< std::string, std::string, int > | getExecutionStatus1 () |
| int | gotoLine (int lineno) |
| Jump to the specified line number | |
| std::tuple< int, int, std::string > | getPlanContext (int tid=-1) |
| Get the current runtime context | |
| std::tuple< int, int, std::string > | getAdvancePlanContext (int tid=-1) |
| Get the context information of the advance planner | |
| int | getAdvancePtr (int tid=-1) |
| Get the program pointer of AdvanceRun | |
| int | getMainPtr (int tid=-1) |
| Get the program pointer of robot motion | |
| int | getInterpPtr (int tid) |
| Get the pointer of the most recently interpreted instruction | |
| int | loadProgram (const std::string &program) |
| Load a local project file. | |
| int | preloadProgram (int index, const std::string &program) |
| Preload project file | |
| std::string | getPreloadProgram (int index) |
| Get the name of the preloaded project file. | |
| int | clearPreloadPrograms () |
| Clear all preloaded project files. | |
| int | runProgram () |
| Run the already loaded project file | |
| int | start () |
| Start the runtime | |
| int | stop () |
| Stop the runtime, i.e., stop script execution. | |
| int | abort () |
| Abort robot operation. | |
| int | pause () |
| Pause the interpreter | |
| int | step () |
| Execute a single step | |
| int | resume () |
| Resume the interpreter | |
| int | arbitraryResume () |
| Resume the interpreter | |
| int | setResumeWait (bool wait) |
| Wait for the previous sequence to complete before resuming the interpreter | |
| ARCS_DEPRECATED RuntimeState | getStatus () |
| Get the status of the planner | |
| RuntimeState | getRuntimeState () |
| int | setBreakPoint (int lineno) |
| Set a breakpoint | |
| int | removeBreakPoint (int lineno) |
| Remove a breakpoint | |
| int | clearBreakPoints () |
| Clear all breakpoints | |
| int | timerStart (const std::string &name) |
| Start the timer | |
| int | timerStop (const std::string &name) |
| Stop the timer | |
| int | timerReset (const std::string &name) |
| Reset the timer | |
| int | timerDelete (const std::string &name) |
| Delete the timer | |
| double | getTimer (const std::string &name) |
| Get the timer value | |
| int | triggBegin (double distance, double delay) |
| Start configuring trigger | |
| int | triggEnd () |
| End configuring trigger | |
| int | triggInterrupt (double distance, double delay) |
| Returns the automatically assigned interrupt number | |
| std::vector< int > | getTriggInterrupts () |
| Get the list of all interrupt numbers | |
Protected Attributes | |
| void * | d_ |
The RuntimeMachine class.
Definition at line 18 of file runtime_machine.h.
| arcs::common_interface::RuntimeMachine::RuntimeMachine | ( | ) |
|
virtual |
| int arcs::common_interface::RuntimeMachine::abort | ( | ) |
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.
| int arcs::common_interface::RuntimeMachine::arbitraryResume | ( | ) |
Resume the interpreter
| int arcs::common_interface::RuntimeMachine::clearBreakPoints | ( | ) |
Clear all breakpoints
| int arcs::common_interface::RuntimeMachine::clearPreloadPrograms | ( | ) |
Clear all preloaded project files.
Calling this method will release all project indices and their associated program names that were previously preloaded via preloadProgram.
| int arcs::common_interface::RuntimeMachine::deleteTask | ( | int | tid | ) |
Delete a task, which will terminate any ongoing motion.
| int arcs::common_interface::RuntimeMachine::detachTask | ( | int | tid | ) |
Wait for the task to finish naturally
| tid |
| std::tuple< int, int, std::string > arcs::common_interface::RuntimeMachine::getAdvancePlanContext | ( | int | tid = -1 | ) |
Get the context information of the advance planner
| 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 |
| int arcs::common_interface::RuntimeMachine::getAdvancePtr | ( | int | tid = -1 | ) |
Get the program pointer of AdvanceRun
| std::tuple< std::string, std::string > arcs::common_interface::RuntimeMachine::getExecutionStatus | ( | ) |
Get the execution status of time-consuming interfaces (INST), such as setPersistentParameters
| std::tuple< std::string, std::string, int > arcs::common_interface::RuntimeMachine::getExecutionStatus1 | ( | ) |
| int arcs::common_interface::RuntimeMachine::getInterpPtr | ( | int | tid | ) |
Get the pointer of the most recently interpreted instruction
| tid |
| int arcs::common_interface::RuntimeMachine::getMainPtr | ( | int | tid = -1 | ) |
Get the program pointer of robot motion
| 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 |
| std::tuple< int, int, std::string > arcs::common_interface::RuntimeMachine::getPlanContext | ( | int | tid = -1 | ) |
Get the current runtime context
| 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 |
| std::string arcs::common_interface::RuntimeMachine::getPreloadProgram | ( | int | index | ) |
Get the name of the preloaded project file.
Returns an empty string if not loaded or index is out of range.
| index | Project index number (0~99) |
| RuntimeState arcs::common_interface::RuntimeMachine::getRuntimeState | ( | ) |
| ARCS_DEPRECATED RuntimeState arcs::common_interface::RuntimeMachine::getStatus | ( | ) |
Get the status of the planner
| int arcs::common_interface::RuntimeMachine::getTaskQueueSize | ( | int | tid | ) |
Get the number of cached instructions in the task
| tid |
| double arcs::common_interface::RuntimeMachine::getTimer | ( | const std::string & | name | ) |
Get the timer value
| name |
| std::vector< int > arcs::common_interface::RuntimeMachine::getTriggInterrupts | ( | ) |
Get the list of all interrupt numbers
| int arcs::common_interface::RuntimeMachine::gotoLine | ( | int | lineno | ) |
Jump to the specified line number
| lineno |
| bool arcs::common_interface::RuntimeMachine::isTaskAlive | ( | int | tid | ) |
Check if the task is alive
| tid |
| int arcs::common_interface::RuntimeMachine::loadProgram | ( | const std::string & | program | ) |
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.
| program |
| int arcs::common_interface::RuntimeMachine::newTask | ( | bool | daemon = false | ) |
Returns the task_id
| int arcs::common_interface::RuntimeMachine::nop | ( | ) |
No operation
| int arcs::common_interface::RuntimeMachine::pause | ( | ) |
Pause the interpreter
| int arcs::common_interface::RuntimeMachine::preloadProgram | ( | int | index, |
| const std::string & | program | ||
| ) |
Preload project file
| index | Project index number (0~99) |
| program | Project name |
| int arcs::common_interface::RuntimeMachine::removeBreakPoint | ( | int | lineno | ) |
Remove a breakpoint
| lineno |
| int arcs::common_interface::RuntimeMachine::resume | ( | ) |
Resume the interpreter
| int arcs::common_interface::RuntimeMachine::runProgram | ( | ) |
Run the already loaded project file
| int arcs::common_interface::RuntimeMachine::setBreakPoint | ( | int | lineno | ) |
Set a breakpoint
| lineno |
| int arcs::common_interface::RuntimeMachine::setLabel | ( | int | lineno, |
| const std::string & | comment | ||
| ) |
Mark the line number and comment of the recorded instruction
| lineno | |
| comment |
| ARCS_DEPRECATED int arcs::common_interface::RuntimeMachine::setPlanContext | ( | int | tid, |
| int | lineno, | ||
| const std::string & | comment | ||
| ) |
Add a comment to the aubo_control log Use setLabel instead
| tid | Thread ID of the instruction |
| lineno | Line number |
| comment | Comment |
| int arcs::common_interface::RuntimeMachine::setResumeWait | ( | bool | wait | ) |
Wait for the previous sequence to complete before resuming the interpreter
| wait |
| int arcs::common_interface::RuntimeMachine::start | ( | ) |
Start the runtime
| int arcs::common_interface::RuntimeMachine::step | ( | ) |
Execute a single step
| int arcs::common_interface::RuntimeMachine::stop | ( | ) |
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.
| int arcs::common_interface::RuntimeMachine::switchTask | ( | int | tid | ) |
Switch the current thread.
After switching, subsequent instructions will be inserted into the switched thread.
| tid |
| int arcs::common_interface::RuntimeMachine::timerDelete | ( | const std::string & | name | ) |
Delete the timer
| name |
| int arcs::common_interface::RuntimeMachine::timerReset | ( | const std::string & | name | ) |
Reset the timer
| name |
| int arcs::common_interface::RuntimeMachine::timerStart | ( | const std::string & | name | ) |
Start the timer
| name |
| int arcs::common_interface::RuntimeMachine::timerStop | ( | const std::string & | name | ) |
Stop the timer
| name |
| int arcs::common_interface::RuntimeMachine::triggBegin | ( | double | distance, |
| double | delay | ||
| ) |
Start configuring trigger
| distance | |
| delay |
| int arcs::common_interface::RuntimeMachine::triggEnd | ( | ) |
End configuring trigger
| int arcs::common_interface::RuntimeMachine::triggInterrupt | ( | double | distance, |
| double | delay | ||
| ) |
Returns the automatically assigned interrupt number
| distance | |
| delay | |
| intnum |
|
protected |
Definition at line 1485 of file runtime_machine.h.