In file testiter.h:

class testiterator

Object for implementing a test iterations

Inheritance:


Public Methods

explicit testiterator (const string& Name)
Default constructor
virtual ~testiterator ()
Default constructor
virtual bool init (diagStorage& Storage, excitationManager& Excitations, diagtest& Test, const cmdnotify& Notify, bool rtMode = true)
Initialization method.
virtual bool begin (std::ostringstream& errmsg)
Startup method.
virtual bool end (std::ostringstream& errmsg)
Cleanup method.
virtual bool setup (std::ostringstream& errmsg, tainsec_t starttime)
Setup method.
virtual bool evaluate (std::ostringstream& errmsg, bool& anotherone, int testrindex, int& rindex, bool& notify)
Evaluation method.
virtual string name () const
Name of supervisory task.
virtual int step () const
Returns the iteration number
virtual int numOfSteps () const
Setup method.
virtual testiterator* self () const
New test iterator object.

Protected Fields

recursivemutex mux
Mutex to protect supervisory object
string myname
Name of supervisory task
bool RTmode
Real-time mode
diagStorage* storage
Pointer to diagnostic storage object
testpointMgr* tpMgr
Pointer to test point management object
excitationManager* excitations
Pointer to excitation manager
diagtest* test
Pointer to diagnostics test
cmdnotify notify
Command notification object
int stepnow
Iteration count

Documentation

Test iterator. This object implements the iteration behaviour of a diagnostics tests. All iterators must be descendents from this object. This object implements a mutex, a pointer to the storage object, a pointer to the excitation manager for iterator controlled channels, a pointer to the diagnostics test, a command notification object and a iteration counter.

explicit testiterator(const string& Name)
Constructs a test iterator object.
Parameters:
Name - name oftest iterator

virtual ~testiterator()
Destructs a test iterator object.

virtual bool init(diagStorage& Storage, excitationManager& Excitations, diagtest& Test, const cmdnotify& Notify, bool rtMode = true)
Initializes the test iterator. Sets the storage pointer, the command notification object, the excitation manager pointer, the test pointer, and calls the begin function.
Returns:
true if successful
Parameters:
Storage - diagnostics storage object
Excitations - excitation manager
Test - diagnostics test
Notify - command notification object
rtMode - Real-time mode if true (old data otherwise)

virtual bool begin(std::ostringstream& errmsg)
Begins the test iterator. This function should be overwritten by descendents for initialization.
Returns:
true if successful
Parameters:
errmsg - error message stream

virtual bool end(std::ostringstream& errmsg)
Ends the test iterator. This function should be overwritten by descendents for clean up.
Returns:
true if successful
Parameters:
errmsg - error message stream

virtual bool setup(std::ostringstream& errmsg, tainsec_t starttime)
Sets up the test iterator. This function should be overwritten by descendents. This one just increases the iteration count.
Returns:
true if successful
Parameters:
errmsg - error message stream
starttime - earliest time excitation can be turned on

virtual bool evaluate(std::ostringstream& errmsg, bool& anotherone, int testrindex, int& rindex, bool& notify)
Evaluates a test after each iteration. This function should be overwritten by descendents to implement an evaluation step (can call the merit function of the test). If the function returns with anotherone set to true an other test iteration step will be scheduled, otherwise the test stops. If the iterator writes result records it must increase the rindex upon return to the next free index.
Returns:
true if successful
Parameters:
errmsg - error message stream
anotherone - true if continue, false if stop
testrindex - first result index of test
rindex - result index for iterator result (in/out)
notify - if true upon return sends a notfication message

virtual string name() const
Returns the name of the supervisory task.
Returns:
name of supervisory task

virtual int step() const
Returns the iteration number
Returns:
iteration count

virtual int numOfSteps() const
Returns the total number of test iteration. This function must be overwritten by descendents and should return -1 if the number is unknown.
Returns:
number of iteration steps

virtual testiterator* self() const
A function which returns a new test iterator object of the same type. Must be overwritten by descendents.
Returns:
new test iterator

recursivemutex mux
Mutex to protect supervisory object

string myname
Name of supervisory task

bool RTmode
Real-time mode

diagStorage* storage
Pointer to diagnostic storage object

testpointMgr* tpMgr
Pointer to test point management object

excitationManager* excitations
Pointer to excitation manager

diagtest* test
Pointer to diagnostics test

cmdnotify notify
Command notification object

int stepnow
Iteration count


Direct child classes:
repeatiterator
Author:
Written December 1998 by Daniel Sigg
Version:
0.1

alphabetic index hierarchy of classes


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


generated by doc++