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

The TriggerTimer class. More...

Inherits QObject, and QScriptable.

Public Slots

static double currentTime ()
 Returns the current UTC time. This function returns the current UTC time as a double value in seconds, counted from January 1, 1970. Precision varies depending on platform but is usually as good or better than a millisecond.
 
bool setTimerType (const int nNewTimerType)
 Sets the timer type to use for the TriggerTimer. This function Sets the timer type to use for the TriggerTimer, see ExperimentManagerNameSpace::TriggerTimerType. More...
 
void startTimer (double dMSec)
 Starts the Trigger Timer. This function starts the Trigger Timer and then automatically emits a TriggerTimer::timeout() signal when triggered. More...
 
void stopTimer ()
 Stops the Trigger Timer. This function immediately stops the TriggerTimer, see TriggerTimer.startTimer.
 

Signals

void goingAccurate (double dRemainingTime)
 The goingAccurate Signal. More...
 
void started ()
 The started Signal. More...
 
void stopTimerSignal ()
 The stopTimerSignal Signal. More...
 
void timeout ()
 The timeout Signal. More...
 

Public Member Functions

 TriggerTimer ()
 The TriggerTimer constructor. More...
 
 ~TriggerTimer ()
 The TriggerTimer destructor. More...
 

Detailed Description

The TriggerTimer class.

The TriggerTimer can be used to create a accurate/fast triggered threaded (interval) timer.

Constructor & Destructor Documentation

TriggerTimer::TriggerTimer ( )

The TriggerTimer constructor.

No parameter

TriggerTimer::~TriggerTimer ( )

The TriggerTimer destructor.

You do not need call the destructor. The BrainStim script engine automatically performs the garbage collection after you set the object to NULL and the script ends

Member Function Documentation

void TriggerTimer::goingAccurate ( double  dRemainingTime)
signal

The goingAccurate Signal.

This signal is emitted just before the TriggerTimer::timeout signal, the Trigger Timer is then more actively observed (higher CPU load) in order to achieve a more higher accuracy. This signal is only emitted when using the ExperimentManagerNameSpace::QPC_TriggerTimerType or ExperimentManagerNameSpace::QPC_TriggerTimerType_Old type, see TriggerTimer.setTimerType(const int).

Parameters
dRemainingTimea double value that represents the remaining time it should take for the Trigger Timer to timeout.
bool TriggerTimer::setTimerType ( const int  nNewTimerType)
slot

Sets the timer type to use for the TriggerTimer. This function Sets the timer type to use for the TriggerTimer, see ExperimentManagerNameSpace::TriggerTimerType.

Parameters
nNewTimerTypea integer value holding the type of the timer, see ExperimentManagerNameSpace::TriggerTimerType.
Returns
a boolean value representing whether the function could execute successfully.
void TriggerTimer::started ( )
signal

The started Signal.

This signal is emitted automatically after the Trigger Timer has been started, see TriggerTimer::startTimer().

void TriggerTimer::startTimer ( double  dMSec)
slot

Starts the Trigger Timer. This function starts the Trigger Timer and then automatically emits a TriggerTimer::timeout() signal when triggered.

Parameters
dMSecthe period trigger time in milliseconds.
void TriggerTimer::stopTimerSignal ( )
signal

The stopTimerSignal Signal.

This signal is emitted when the TriggerTimer is stopped.

void TriggerTimer::timeout ( )
signal

The timeout Signal.

This signal is emitted automatically at each period time after the trigger is started.