#include <SIG_Interpreter.h>
Public Methods | |
SIG_Interpreter (SIGEL_Robot::SIG_LanguageParameters const &langParams, SIGEL_Program::SIG_Program const &robotProgram, SIG_CommandInterface &commandInterface, SIG_SimulationQueries const &simulationQueries) | |
The constructor of a SIG_Interpreter object. More... | |
void | interprete (double timeAccountSize) |
Interpretes the program until the executes robot-commands have exceeded the time supplied in timeAccountSize. More... | |
Private Attributes | |
SIGEL_Program::SIG_Program const& | robotProgram |
The robot-program to interprete. More... | |
SIGEL_Robot::SIG_LanguageParameters const& | langParams |
The language-parameters of the robot to control (set of forbidden commands for example). More... | |
SIG_CommandInterface& | commandInterface |
The object that contains the methos used to manipulate the simulation (setting of joint coordinates for example). More... | |
SIG_SimulationQueries const& | simulationQueries |
The object containing the methods used to query information about the current simulation state. More... | |
double | remainingLastCommandTime |
The time at which the last command's execution that exceeded the supplied time account of the previous interprete-methodcall is finished. More... | |
QVector<SIG_Register> | registers |
The set of registers modeling the robots register-machine. More... | |
long | programCounter |
The number of the next command to execute. More... | |
bool | compareFlag |
Contains the results of the last comparison done by a CMP-command. More... |
For this task it uses the classes SIG_CommandInterface and SIG_SimulationQueries to interact with the simulator. SIG_CommandInterface is used to communicate move-commands to the simulator. The class SIG_SimulationQueries is used to receive information about the actual simulation state out of the simulator (like sensor-results). The program of the robot is represented as a SIG_RobotProgram-object. Also known to this class is the language parameters in form of a SIG_LanguageParameters-object. For example they contain the set of forbidden commands. The interpretation works of an internal model of the register-machine (consisting of its registers for example).
Definition at line 31 of file SIG_Interpreter.h.
|
The constructor of a SIG_Interpreter object.
Definition at line 8 of file SIG_Interpreter.cpp. |
|
Interpretes the program until the executes robot-commands have exceeded the time supplied in timeAccountSize. The SIG_Interpreter resumes its work at the program position refered to by the program counter. Every executed command decreases the remaining time to interprete about the amount specified in the language parameters. During the interpretation the register's state may change, the simulation may be manipulated through the commandInterface and queried through the simulationQueries.
Definition at line 30 of file SIG_Interpreter.cpp. |
|
The object that contains the methos used to manipulate the simulation (setting of joint coordinates for example).
Definition at line 86 of file SIG_Interpreter.h. |
|
Contains the results of the last comparison done by a CMP-command.
Definition at line 113 of file SIG_Interpreter.h. |
|
The language-parameters of the robot to control (set of forbidden commands for example).
Definition at line 80 of file SIG_Interpreter.h. |
|
The number of the next command to execute.
Definition at line 108 of file SIG_Interpreter.h. |
|
The set of registers modeling the robots register-machine.
Definition at line 103 of file SIG_Interpreter.h. |
|
The time at which the last command's execution that exceeded the supplied time account of the previous interprete-methodcall is finished.
Definition at line 98 of file SIG_Interpreter.h. |
|
The robot-program to interprete.
Definition at line 74 of file SIG_Interpreter.h. |
|
The object containing the methods used to query information about the current simulation state.
Definition at line 92 of file SIG_Interpreter.h. |