Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_Simulation::SIG_Interpreter Class Reference

This class interpretes the robot-program. More...

#include <SIG_Interpreter.h>

List of all members.

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_CommandInterfacecommandInterface
 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_Registerregisters
 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...


Detailed Description

This class interpretes the robot-program.

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.


Constructor & Destructor Documentation

SIGEL_Simulation::SIG_Interpreter::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.

Parameters:
langParams   The language-parameters of the robot to control.
robotProgram   The robot-program to interprete.
commandInterface   The object offering the methods to manipulate the simulation.
simulationQueries   The object offering the methods to query actual simulation information.

Definition at line 8 of file SIG_Interpreter.cpp.


Member Function Documentation

void SIGEL_Simulation::SIG_Interpreter::interprete ( double timeAccountSize )
 

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.

Parameters:
timeAccountSize   The amount of model-time that the interpretation may consume until the control is returned to the calling method. Usually this is the stepsize of the simulation.

Definition at line 30 of file SIG_Interpreter.cpp.


Member Data Documentation

SIG_CommandInterface & SIGEL_Simulation::SIG_Interpreter::commandInterface [private]
 

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.

bool SIGEL_Simulation::SIG_Interpreter::compareFlag [private]
 

Contains the results of the last comparison done by a CMP-command.

Definition at line 113 of file SIG_Interpreter.h.

SIGEL_Robot::SIG_LanguageParameters const & SIGEL_Simulation::SIG_Interpreter::langParams [private]
 

The language-parameters of the robot to control (set of forbidden commands for example).

Definition at line 80 of file SIG_Interpreter.h.

long SIGEL_Simulation::SIG_Interpreter::programCounter [private]
 

The number of the next command to execute.

Definition at line 108 of file SIG_Interpreter.h.

QVector< SIG_Register > SIGEL_Simulation::SIG_Interpreter::registers [private]
 

The set of registers modeling the robots register-machine.

Definition at line 103 of file SIG_Interpreter.h.

double SIGEL_Simulation::SIG_Interpreter::remainingLastCommandTime [private]
 

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.

SIGEL_Program::SIG_Program const & SIGEL_Simulation::SIG_Interpreter::robotProgram [private]
 

The robot-program to interprete.

Definition at line 74 of file SIG_Interpreter.h.

SIG_SimulationQueries const & SIGEL_Simulation::SIG_Interpreter::simulationQueries [private]
 

The object containing the methods used to query information about the current simulation state.

Definition at line 92 of file SIG_Interpreter.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:50 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000