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

SIGEL_GP::SIG_GPPVMData Class Reference

This class represents the functionality of data encoding and decoding for data transfer issues relating to pvm. More...

#include <SIG_GPPVMData.h>

List of all members.

Public Methods

 SIG_GPPVMData (SIGEL_Robot::SIG_Robot& robot, SIGEL_Environment::SIG_Environment& environment, SIGEL_Simulation::SIG_SimulationParameters& simulationParameter, QString fitnessName, bool visualize)
 The constructor of a PVMDataobject with all attributes as parameters, without the program of the individual, which will be given as a parameter. More...

 ~SIG_GPPVMData ()
 The destructor of the PVMDataobject. More...

void sendQStringToPVM (QString str, int taskId, int messageId)
 A function to send QStrings via PVM. More...

QString getQStringFromPVM (int taskId, int messageId)
 A function to read QStrings via PVM. More...

QString cutAfterFiveHashes (QTextStream& source)
void loadPVMDataTransfer (QTextStream & file, SIGEL_Program::SIG_Program & program)
void savePVMDataTransfer (QTextStream & file, SIGEL_Program::SIG_Program const &program)
 With this operation, the SIG_GPFitnessTrainer saves pvmdata to textstream, make it ready for transfer to the Sigel-slave. More...

void setVisualize (bool visu)
 This operation sets the visulize-flag to its right value. More...

bool getVisualize ()
 This operation gets the value of the visualize-flag. More...

QString getFitnessFunctionName ()
void setFitnessFunctionName ( QString name )

Private Attributes

SIGEL_Robot::SIG_Robotrobot
 The robot for the simulation run. More...

SIGEL_Environment::SIG_Environmentenvironment
 The environment for the simulation. More...

SIGEL_Simulation::SIG_SimulationParameterssimulationParameter
 The simulation parameters for the simulation. More...

QString fitnessName
 The name of the fitnessfunction, only necessary for computation of a fitnessvalue.. More...

bool visualize
 A flag, which indicates if the simulation have to be displayed or not. More...


Detailed Description

This class represents the functionality of data encoding and decoding for data transfer issues relating to pvm.

There is a special need for transforming methodes, to bring a textstream to a string and than to bring this string in the right order, so that it can be transfered through pvm to the sigel-slave program. The SIG_GPFitnesstrainer and sigel-slave uses this class. They need it to decode and encode the to be send or received pvm data.

Definition at line 24 of file SIG_GPPVMData.h.


Constructor & Destructor Documentation

SIGEL_GP::SIG_GPPVMData::SIG_GPPVMData ( SIGEL_Robot::SIG_Robot & robot,
SIGEL_Environment::SIG_Environment & environment,
SIGEL_Simulation::SIG_SimulationParameters & simulationParameter,
QString fitnessName,
bool visualize )
 

The constructor of a PVMDataobject with all attributes as parameters, without the program of the individual, which will be given as a parameter.

Precondition:
The GPFitnesstrainer or the sigel-slave is created and needs a PVMDataobject.

Definition at line 8 of file SIG_GPPVMData.cpp.

SIGEL_GP::SIG_GPPVMData::~SIG_GPPVMData ( )
 

The destructor of the PVMDataobject.

Definition at line 19 of file SIG_GPPVMData.cpp.


Member Function Documentation

QString SIGEL_GP::SIG_GPPVMData::cutAfterFiveHashes ( QTextStream & source )
 

Definition at line 51 of file SIG_GPPVMData.cpp.

QString SIGEL_GP::SIG_GPPVMData::getFitnessFunctionName ( )
 

Definition at line 134 of file SIG_GPPVMData.cpp.

QString SIGEL_GP::SIG_GPPVMData::getQStringFromPVM ( int taskId,
int messageId )
 

A function to read QStrings via PVM.

Parameters:
taskId   The id of the pvmtask, who is the sender of the string.
messageId   The id of the message channel, on which the data have to be received.

Definition at line 35 of file SIG_GPPVMData.cpp.

bool SIGEL_GP::SIG_GPPVMData::getVisualize ( )
 

This operation gets the value of the visualize-flag.

Returns:
The value of the visualize-flag.

Definition at line 129 of file SIG_GPPVMData.cpp.

void SIGEL_GP::SIG_GPPVMData::loadPVMDataTransfer ( QTextStream & file,
SIGEL_Program::SIG_Program & program )
 

Definition at line 63 of file SIG_GPPVMData.cpp.

void SIGEL_GP::SIG_GPPVMData::savePVMDataTransfer ( QTextStream & file,
SIGEL_Program::SIG_Program const & program )
 

With this operation, the SIG_GPFitnessTrainer saves pvmdata to textstream, make it ready for transfer to the Sigel-slave.

Parameters:
file   The textstream to which the data have to encoded.
program   The program of the individual, which is different from individual to individual and so have to be there as a parameter, all other needed datas are given as referneces.

Definition at line 98 of file SIG_GPPVMData.cpp.

Referenced by SIGEL_MasterGUI::SIG_AllIndividualsView::slotVisualize().

void SIGEL_GP::SIG_GPPVMData::sendQStringToPVM ( QString str,
int taskId,
int messageId )
 

A function to send QStrings via PVM.

Parameters:
str   The string which is to send.
taskId   The id of the pvmtask, who is the demanded receiver of the string.
messageId   The id of the message channel, on which the data have to be send.

Definition at line 22 of file SIG_GPPVMData.cpp.

Referenced by SIGEL_MasterGUI::SIG_AllIndividualsView::slotVisualize().

void SIGEL_GP::SIG_GPPVMData::setFitnessFunctionName ( QString name )
 

Definition at line 139 of file SIG_GPPVMData.cpp.

void SIGEL_GP::SIG_GPPVMData::setVisualize ( bool visu )
 

This operation sets the visulize-flag to its right value.

Parameters:
visu   The value of visulize.

Definition at line 124 of file SIG_GPPVMData.cpp.


Member Data Documentation

SIGEL_Environment::SIG_Environment & SIGEL_GP::SIG_GPPVMData::environment [private]
 

The environment for the simulation.

It doesn't be change in one evolution, therefor it is given as a reference.

Definition at line 37 of file SIG_GPPVMData.h.

QString SIGEL_GP::SIG_GPPVMData::fitnessName [private]
 

The name of the fitnessfunction, only necessary for computation of a fitnessvalue..

It doesn't be change in one evolution, therefor it is given as a reference.

Definition at line 50 of file SIG_GPPVMData.h.

SIGEL_Robot::SIG_Robot & SIGEL_GP::SIG_GPPVMData::robot [private]
 

The robot for the simulation run.

It doesn't be change in one evolution, therefor it is given as a reference.

Definition at line 31 of file SIG_GPPVMData.h.

SIGEL_Simulation::SIG_SimulationParameters & SIGEL_GP::SIG_GPPVMData::simulationParameter [private]
 

The simulation parameters for the simulation.

It doesn't be change in one evolution, therefor it is given as a reference.

Definition at line 43 of file SIG_GPPVMData.h.

bool SIGEL_GP::SIG_GPPVMData::visualize [private]
 

A flag, which indicates if the simulation have to be displayed or not.

TRUE means show the simulation without fitness computation, FALSE means compute fitnessvalue.

Definition at line 57 of file SIG_GPPVMData.h.


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