Monitor Class Reference
[Extended Processor classes to help analyse networks.]

Communications monitoring Processor object. More...

#include <monitor.h>

Inheritance diagram for Monitor:

Inheritance graph
[legend]
Collaboration diagram for Monitor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

const double averageThroughput ()
const double elapsedTime ()
const uint elementsProcessed ()
void resetPlungerMemory ()
const uint samplesProcessed ()
const double signalProcessed ()
const double timesFasterThanReal ()
void waitForPlunger ()

Detailed Description

Communications monitoring Processor object.

Author:
Gav Wood <gav@cs.york.ac.uk>
This is an extended Processor-based class that is essentially just a repeater. It may be placed between two other Processor objects and through the extra API methods can give the developer information as to the speed and nature of the data transfer.

It also has a couple of methods allowing the developer to block based on waiting for plungers, meaning they can be counted or otherwise acted upon.


Member Function Documentation

const double Monitor::averageThroughput (  )  [inline]

Determine the realtime throughput.

Returns:
The number of bits that flowed through this processor per (real time) second.

const double Monitor::elapsedTime (  )  [inline]

Determine time elapsed between go() and stop().

Returns:
The number of seconds elapsed between go() and stop().

const uint Monitor::elementsProcessed (  )  [inline]

Determine the number of (32-bit) elements that flowed through this object.

Returns:
The total number of elements to flow through this object.

const uint Monitor::samplesProcessed (  )  [inline]

Determine the number of samples that flowed through this object.

Returns:
The total number of samples to flow through this object.

const double Monitor::signalProcessed (  )  [inline]

Determine the total amount of signal time to flow through this object.

Returns:
the amount of signal, measured in seconds, that flowed through this object.

const double Monitor::timesFasterThanReal (  )  [inline]

Determine how many times faster than realtime the signal flowed through this object. If the signal is flowing through in real time (e.g. because the source of the network is realtime-based) then this should be very close to 1.0.

Returns:
The number of times faster than real the signal was processed.

void Monitor::waitForPlunger (  ) 

Block until a plunger flows through this object. If a plunger has already flowed through that hasn't itself been waited for explicity, exit immediately. If you don't want this to happen, then call resetPlungerMemory() first.

Typically used in a basic for() loop to count until the required number of plungers has passed through the network.

See also:
resetPlungerMemory()

void Monitor::resetPlungerMemory (  ) 

Any plungers that have flowed through previously will be instantly forgotten. waitForPlunger will only exit for plungers delivered after this call.

See also:
waitForPlunger()


The documentation for this class was generated from the following files:
Generated on Thu Jul 13 06:56:34 2006 for Exscalibar by  doxygen 1.4.7