In file testsync.h:

class syncpoint

Class for setting synchronization points.

Inheritance:


Public Classes

enum synctype
type of synchronization event
invalid
invalid synchronization event
absoluteTime
synchronize on absolute time
dataReady
synchronize on the time when the data is ready
excitationNeeded
synchronize on the time when an excitation is needed

Public Fields

synctype sync
synchronization type
bool abortable
true if an abort command can be recognized during the wait
bool pauseable
true if an pause command can be recognized during the wait
tainsec_t time
synchronization time

Public Methods

syncpoint (synctype Sync = invalid, tainsec_t Time = 0, bool Abortable = false, bool Pauseable = false)
Default constructor.
virtual ~syncpoint ()
Destructor.
bool operator! ()
Not operator.
virtual bool action (syncpointer& syncpt, bool& notify)
Synchronization action.
virtual bool abort ()
abort function.
virtual bool pause (syncpointer& syncpt)
pause function.
virtual bool resume (syncpointer& syncpt)
resume function.

Protected Fields

recursivemutex mux
mutex to protect syncronization point

Documentation

This class implements a synchronization point. It is used by test object to tell the supervisory when to callback and what to do. It is an abstract object.

enum synctype
type of synchronization event

invalid
invalid synchronization event

absoluteTime
synchronize on absolute time

dataReady
synchronize on the time when the data is ready

excitationNeeded
synchronize on the time when an excitation is needed

synctype sync
synchronization type

bool abortable
true if an abort command can be recognized during the wait

bool pauseable
true if an pause command can be recognized during the wait

tainsec_t time
synchronization time

syncpoint(synctype Sync = invalid, tainsec_t Time = 0, bool Abortable = false, bool Pauseable = false)
Constructs an abstract synchronization point. By default the synchronization point is invalid.
Returns:
void
Parameters:
Sync - synchronization type
Time - synchronization time
Abortable - true if abort is allowed
Pauseable - true if pause is allowed

virtual ~syncpoint()
Destructs an abstract synchronization point.
Returns:
void

bool operator! ()
Returns true if the synchronization point is invalid.
Returns:
true if invalid synchronization point

virtual bool action(syncpointer& syncpt, bool& notify)
A pure virtual function which is called when the synchronization event happens; must be overwritten by descendents. This function must return a pointer to the next synchronization point. An invalid synchronization point or a zero pointer markes the end of the test. The caller is responsible to deallocate the returned syncpoint object.
Returns:
true if successful
Parameters:
syncpt - next synchronization point (return)
notify - if true upon return sends a notfication message

virtual bool abort()
A pure virtual function which is called when a test is aborted while it waits for the synchronization event; must be overwritten by descendents. Can be used to perform abort specific functions. (Test and test iterator cleanup functions will be called independently.)
Returns:
true if successful

virtual bool pause(syncpointer& syncpt)
A pure virtual function which is called when a test is paused while it waits for the synchronization event; must be overwritten by descendents. This funciton should be used to freeze the state of the test at the current settings and excitations. If a non-zero syncpointer is returned it will be used at the next one; otherwise the current one is continued being used.
Returns:
true if successful
Parameters:
syncpt - next synchronization point (optional return)

virtual bool resume(syncpointer& syncpt)
A pure virtual function which is called when a puased test is constinued; must be overwritten by descendents. This function must provide a new valid synchronization point upon return, so that the test can be continued. This function must provide all the necessary steps to restart the test and continue the measurement at the point it was paused. If a non-zero syncpointer is returned it will be used at the next one; otherwise the current one is continued being used.
Returns:
true if successful
Parameters:
syncpt - next synchronization point (optional return)

recursivemutex mux
mutex to protect syncronization point


Direct child classes:
testsync
Author:
DS, November 98
See Also:
Diagnostics Management

alphabetic index hierarchy of classes


Please send questions and comments to sigg_d@ligo-wa.caltech.edu


generated by doc++