ExperimentManager script class  1.1.0.1
The Experiment Manager script class reference.
Public Slots | Signals | Public Member Functions | Properties | List of all members
cExperimentStructure Class Reference

The cExperimentStructure class. More...

Inherits QObject, and QScriptable.

Public Slots

void resetExperimentState ()
 resetExperiment slot. More...
 

Signals

void experimentStarted ()
 experimentStarted() signal. More...
 
void experimentStopped ()
 experimentStopped() signal. More...
 
void externalTriggerRecieved ()
 externalTriggerRecieved() signal. More...
 

Public Member Functions

void clearExperiment ()
 clearExperiment slot. More...
 
cBlockStructurecreateBlock ()
 createBlock slot. More...
 
cObjectStructurecreateObject ()
 createObject slot. More...
 
int getBlockCount () const
 getBlockCount slot. More...
 
QList< int > getBlockIDList ()
 getBlockIDList slot. More...
 
cBlockStructuregetBlockPointerByID (const int &nBlockID)
 getBlockPointerByID slot. More...
 
ExperimentStructuresNameSpace::strcExperimentStructureState getCurrentExperimentState () const
 getCurrentExperimentState slot. More...
 
bool getExperimentDebugMode () const
 getExperimentDebugMode slot. More...
 
int getExperimentID () const
 getExperimentID slot. More...
 
QString getExperimentName () const
 getExperimentName slot. More...
 
int getExternalTriggerCount () const
 getExternalTriggerCount slot. More...
 
int getObjectCount () const
 getObjectCount slot. More...
 
QList< cMethodStructure * > * getObjectFinalizationList (const int &nObjectID)
 getObjectFinalizationList slot. More...
 
QList< int > getObjectIDList ()
 getObjectIDList slot. More...
 
QList< cMethodStructure * > * getObjectInitializationList (const int &nObjectID)
 getObjectInitializationList slot. More...
 
QList< cMethodConnectionStructure * > * getObjectMethodConnectionList (const int &nObjectID)
 getObjectMethodConnectionList slot. More...
 
cObjectStructuregetObjectPointerByID (const int &nObjectID)
 getObjectPointerByID slot. More...
 
void incrementExternalTrigger ()
 incrementExternalTrigger slot. More...
 
bool insertObject (cObjectStructure *cObject)
 insertObject slot. More...
 
bool insertObjectFinalization (cMethodStructure *pObjectFinalization)
 insertObjectFinalization slot. More...
 
bool insertObjectInitialization (cMethodStructure *pObjectInitialization)
 insertObjectInitialization slot. More...
 
bool insertObjectMethodConnection (cMethodConnectionStructure *pMethodConnection)
 insertObjectMethodConnection slot. More...
 
bool prepareExperiment (const bool &bIgnoreNoDefinedBlocks=false)
 prepareExperiment slot. More...
 
void setExperimentDebugMode (const bool &bValue)
 setExperimentDebugMode slot. More...
 
void setExperimentID (const int &nValue)
 setExperimentID slot. More...
 
void setExperimentName (const QString &sValue)
 setExperimentName slot. More...
 
void startExperiment ()
 startExperiment slot. More...
 

Properties

bool ExperimentDebugMode
 ExperimentDebugMode property. More...
 
int ExperimentID
 ExperimentID property. More...
 
QString ExperimentName
 ExperimentName property. More...
 

Detailed Description

The cExperimentStructure class.

The cExperimentStructure class is a container to store the experiment structure, it can be created/changed dynamically or loaded from a EXML file and is internally used by the ExperimentManager to store the Experiment Structure in memory.

Member Function Documentation

void cExperimentStructure::clearExperiment ( )

clearExperiment slot.

This function removes all settings in the current Experiment Structure.

cBlockStructure* cExperimentStructure::createBlock ( )

createBlock slot.

This function constructs a new cBlockStructure structure object and inserts it in the current Experiment Structure.

Returns
a pointer to a cBlockStructure of the inserted block, if unsuccessful then it returns null.
cObjectStructure* cExperimentStructure::createObject ( )

createObject slot.

This function inserts a new cObjectStructure structure in the current Experiment Structure.

Returns
a pointer to a cObjectStructure of the inserted object, if unsuccessful then it returns null.
void cExperimentStructure::experimentStarted ( )
signal

experimentStarted() signal.

This signal is emitted when the Experiment is started.

void cExperimentStructure::experimentStopped ( )
signal

experimentStopped() signal.

This signal is emitted when the Experiment is stopped.

void cExperimentStructure::externalTriggerRecieved ( )
signal

externalTriggerRecieved() signal.

This signal is emitted when the Experiment Manager/Engine receives an external trigger.

int cExperimentStructure::getBlockCount ( ) const

getBlockCount slot.

This function return the number of defined blocks in the current experiment.

Returns
a integer value holding the experiment block count.
QList<int> cExperimentStructure::getBlockIDList ( )

getBlockIDList slot.

This function returns an array containing all declared Block ID's.

Returns
an array containing all declared Block ID's.
cBlockStructure* cExperimentStructure::getBlockPointerByID ( const int &  nBlockID)

getBlockPointerByID slot.

This function returns a pointer to a cBlockStructure identified by a block ID.

Parameters
nBlockIDa integer value defining the block ID from the requested Block pointer.
Returns
a pointer to a cBlockStructure structure.
ExperimentStructuresNameSpace::strcExperimentStructureState cExperimentStructure::getCurrentExperimentState ( ) const
inline

getCurrentExperimentState slot.

This function returns a copy of the current Experiment Structure state, see ExperimentStructuresNameSpace::strcExperimentStructureState.

Returns
a strcExperimentStructureState structure .
bool cExperimentStructure::getExperimentDebugMode ( ) const
inline

getExperimentDebugMode slot.

This function returns the current Experiment Debug mode.

Returns
a boolean value determining whether the current Experiment Debug mode is enabled.
int cExperimentStructure::getExperimentID ( ) const
inline

getExperimentID slot.

This function returns the current Experiment ID.

Returns
a integer value containing the Experiment ID.
QString cExperimentStructure::getExperimentName ( ) const
inline

getExperimentName slot.

This function returns the current Experiment Name.

Returns
a string value containing the Experiment Name.
int cExperimentStructure::getExternalTriggerCount ( ) const

getExternalTriggerCount slot.

This function returns the total number of received external triggers from the experiment since it was started.

Returns
a integer value containing the received experiment external triggers.
int cExperimentStructure::getObjectCount ( ) const

getObjectCount slot.

This function return the number of defined Objects in the current experiment.

Returns
a integer value holding the experiment Object count.
QList<cMethodStructure*>* cExperimentStructure::getObjectFinalizationList ( const int &  nObjectID)

getObjectFinalizationList slot.

This function returns a pointer to a cMethodStructure List containing all finalization methods for a specified object ID.

Returns
a pointer to a cMethodStructure Structure List.
QList<int> cExperimentStructure::getObjectIDList ( )

getObjectIDList slot.

This function returns an array containing all declared Object ID's.

Returns
an array containing all declared Object ID's.
QList<cMethodStructure*>* cExperimentStructure::getObjectInitializationList ( const int &  nObjectID)

getObjectInitializationList slot.

This function returns a pointer to a cMethodStructure List containing all initialization methods for a specified object ID.

Returns
a pointer to a cMethodStructure Structure List.
QList<cMethodConnectionStructure*>* cExperimentStructure::getObjectMethodConnectionList ( const int &  nObjectID)

getObjectMethodConnectionList slot.

This function returns a pointer to a cMethodConnectionStructure List identified by a object ID.

Parameters
nObjectIDa integer value defining the Object ID from the requested Object Method connection structure list pointer.
Returns
a pointer to a cMethodConnectionStructure Structure List.
cObjectStructure* cExperimentStructure::getObjectPointerByID ( const int &  nObjectID)

getObjectPointerByID slot.

This function returns a pointer to a cObjectStructure identified by a Object ID.

Parameters
nObjectIDa integer value defining the Object ID from the requested Object pointer.
Returns
a pointer to a cObjectStructure structure.
void cExperimentStructure::incrementExternalTrigger ( )

incrementExternalTrigger slot.

This function increments the current Experiment External trigger with 1. It is used to control the Experiment Structure.

bool cExperimentStructure::insertObject ( cObjectStructure cObject)

insertObject slot.

This function inserts a new cObjectStructure structure in the current Experiment Structure.

Parameters
cObjecta pointer to a cObjectStructure that needs to be inserted.
Returns
a boolean value determining whether the function executed successfully.
bool cExperimentStructure::insertObjectFinalization ( cMethodStructure pObjectFinalization)

insertObjectFinalization slot.

This function inserts a new cMethodStructure structure finalization method in the current Experiment Structure.

Parameters
pObjectFinalizationa pointer to a cMethodStructure that needs to be inserted.
Returns
a boolean value determining whether the function executed successfully.
bool cExperimentStructure::insertObjectInitialization ( cMethodStructure pObjectInitialization)

insertObjectInitialization slot.

This function inserts a new cMethodStructure structure initialization method in the current Experiment Structure.

Parameters
pObjectInitializationa pointer to a cMethodStructure that needs to be inserted.
Returns
a boolean value determining whether the function executed successfully.
bool cExperimentStructure::insertObjectMethodConnection ( cMethodConnectionStructure pMethodConnection)

insertObjectMethodConnection slot.

This function inserts a new cMethodConnection structure in the current Experiment Structure.

Parameters
pMethodConnectiona pointer to a cMethodConnectionStructure that needs to be inserted.
Returns
a boolean value determining whether the function executed successfully.
bool cExperimentStructure::prepareExperiment ( const bool &  bIgnoreNoDefinedBlocks = false)

prepareExperiment slot.

This function prepares the current Experiment so it can be started.

Parameters
bIgnoreNoDefinedBlocksa boolean value (default = false), if set to true than the function returns true even when there are no blocks yet defined.
Returns
a boolean value determining whether the function executed successfully.
void cExperimentStructure::resetExperimentState ( )
inlineslot

resetExperiment slot.

This function resets the current Experiment Structure state, see ExperimentStructuresNameSpace::strcExperimentStructureState.

void cExperimentStructure::setExperimentDebugMode ( const bool &  bValue)
inline

setExperimentDebugMode slot.

This function configures the Experiment Debug mode.

Parameters
bValuea boolean value determining whether the debug mode should be enabled.
void cExperimentStructure::setExperimentID ( const int &  nValue)
inline

setExperimentID slot.

This function sets the Experiment ID.

Parameters
nValuea integer value containing the new Experiment ID.
void cExperimentStructure::setExperimentName ( const QString &  sValue)
inline

setExperimentName slot.

This function sets the Experiment Name.

Parameters
sValuea string value containing the new Experiment File Name.
void cExperimentStructure::startExperiment ( )
inline

startExperiment slot.

This function starts the current Experiment and will then wait for an external trigger, see cExperimentStructure::incrementExternalTrigger().

Property Documentation

bool cExperimentStructure::ExperimentDebugMode
readwrite

ExperimentDebugMode property.

Use this property to set or retrieve the Experiment Debug Mode.

int cExperimentStructure::ExperimentID
readwrite

ExperimentID property.

Use this property to set or retrieve the Experiment ID.

QString cExperimentStructure::ExperimentName
readwrite

ExperimentName property.

Use this property to set or retrieve the Experiment Name.