In file testsync.h:

template <class testT, class idT = int> class testsync : public syncpoint

Template class for setting synchronization points in tests.

Inheritance:


Public Fields

idT id
callback identifier

Public Methods

explicit testsync (testT& Test, idT Id = idT(), synctype Sync = invalid, tainsec_t Time = 0)
Constructor.
virtual bool action (syncpointer& sync, 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

testT* test
diagnostics test used for callback

Inherited from syncpoint:

Public Classes

enum synctype
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
bool abortable
bool pauseable
tainsec_t time

Public Methods

bool operator! ()

Protected Fields

recursivemutex mux

Documentation

This template class implements synchronization points for test objects. It uses callback functions into the template class for action, abort, pause and resume functions. The first template parameter is the class which is used for callbacks (typically a descendent of diagtest); the second template parameter is the type which is passed as the argument to the callback fucntions; the third template parameter is the default callback member function for synchronization events; the fourth template parameter is the default callback member function for aborting a test; the fivth template parameter is the default callback member function for pausing a test; and the sixth template parameter is the default callback member function for resuming a test. (When instantinating this template, member functions have to be specified without a preceeding address operator&. Also it must not be an inline function.)

explicit testsync(testT& Test, idT Id = idT(), synctype Sync = invalid, tainsec_t Time = 0)
Constructs a test synchronization object. The synchronization point is abortable if the abort function specified in the template instantiation, is non zero. The synchronization point is pauseable if both the pause and the resume function specified in the template instantiation are non zero.

Returns:
void
Parameters:
Test - reference to a diagnostics test
Id - identification used by callback
Sync - synchronization type
Time - synchronization time

virtual bool action(syncpointer& sync, bool& notify)
Calls the action function for synchronization events.
Returns:
true if successful
Parameters:
next - synchronization point (return)
notify - if true upon return sends a notfication message

virtual bool abort()
Calls the abort test function.
Returns:
true if successful

virtual bool pause(syncpointer& syncpt)
Calls the pasue test function.
Returns:
true if successful
Parameters:
syncpt - next synchronization point (optional return)

virtual bool resume(syncpointer& syncpt)
Calls the resume test function.
Returns:
true if successful
Parameters:
syncpt - next synchronization point (optional return)

idT id
callback identifier

testT* test
diagnostics test used for callback


This class has no child classes.
Parameters:
testT - template class used for peforming the callback
idT - identification type used as callback parameter (default int)
actionDefault - default member function for a synchronization events (default 0)
abortDefault - default member function for aborting a test (default 0)
pauseDefault - default member function for pausing a test (default 0)
resumeDefault - default member function for resuming a test (default 0)
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++