Robotcode  1.0
MyExperiment Class Reference

An experiment is the root-object of the program. More...

#include <linepush5.h>

Inheritance diagram for MyExperiment:

List of all members.

Public Member Functions

 MyExperiment (string name, string code)
virtual void control ()
 Main event loop.
bool parseCommand (string arguments[], int numArgs)
virtual void onExit (void)
 Is called on Exit of the Program before destruction.

Detailed Description

An experiment is the root-object of the program.

An Experiment is the root-object of the program. Most of the behaviors can be inherited from the abstract Experiment class.

Constructor & Destructor Documentation

MyExperiment::MyExperiment ( string  name,
string  code 

Experiment Contructor. It makes a object of type MyBlock and of type MyTrial

nameName of the Experiment displayed in Text Display window
codeShort letter code, which will form the first part of all data files saved

Member Function Documentation

void MyExperiment::control ( void  ) [virtual]

Main event loop.

Experiment: control This is the main loop of the experiment. It just checks the events from the User and updates the graphic Screen and Text Display. Update Haptics run with UPDATERATE in parallel.

Implements Experiment.

bool MyExperiment::parseCommand ( string  arguments[],
int  numArgs 
) [virtual]

In this function you can program additional commands that should be understood in the TextDisplay. If you did not identfy the command, just return false and a error message will be issued.

arguments[]array of strings with all the arguments in it. arguments[0] is the command itself
numArgsNumber of Arguments
True if the command was recognized, False otherwise

< Command not recognized

< Command recognized

Reimplemented from Experiment.

void MyExperiment::onExit ( void  ) [virtual]

Is called on Exit of the Program before destruction.

This function is called before the Program exits. Thus all the devices need to be closed and the interrupt loop must be stopped. Somehow there is still a bug here: Sometimes the interrupt does not seem to terminate and updateHaptics goes in Gaga-land. Not sure why.

Reimplemented from Experiment.

The documentation for this class was generated from the following files: