Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages   Examples  

Condq Class Reference
[Synchronisation]

Inherits Observable< CondqObserver >, TraceProducer, ReportProducer, DefLabeledObject, and StatisticObject.


Detailed Description

Condq can be used to let a process wait for an arbitrary condition.

Author:
Ralf Gerstenberger

Note:
Condq supports Observation

Condq supports Trace

Condq supports Report

Since:
1.0


Public Member Functions

 Condq (Simulation *s, Label l, CondqObserver *o=0)
 Construction.

 ~Condq ()
 Destruction.

const std::list< Process * > & getProcessList () const
 Get list of blocked process objects.

virtual TracegetTrace () const
 Get pointer to Trace.

virtual void report (Report *r)
 Generate report.

Synchronisation
bool wait (Condition cond)
 Wait for cond.

void signal ()
 Trigger condition check.

Statistics
Statistics

virtual void reset ()
 Reset statistics.

unsigned int getZeroWait () const
 Number of processes.

double getAVWaitTime () const
 Average slave waiting time.

unsigned int getUsers () const
 Users.

unsigned int getSignals () const
 Signals.


Static Public Attributes

Condq specific trace marks
const MarkTypeId baseMarkId = 1000
const MarkType markCreate = MarkType("create", baseMarkId+1, typeid(Condq))
const MarkType markDestroy = MarkType("destroy", baseMarkId+2, typeid(Condq))
const MarkType markWait = MarkType("wait", baseMarkId+3, typeid(Condq))
const MarkType markContinue = MarkType("continue", baseMarkId+4, typeid(Condq))
const MarkType markSignal = MarkType("signal", baseMarkId+5, typeid(Condq))


Constructor & Destructor Documentation

Condq Simulation s,
Label  l,
CondqObserver o = 0
 

Construction.

Parameters:
s pointer to Simulation object
l label of this object
o initial observer


Member Function Documentation

bool wait Condition  cond  ) 
 

Wait for cond.

If the supplied condition cond is false the current process is blocked until the condition is true and signal() was called. If a blocked process is interrupted, it is reactivated and the function returns false. (An interrupted process has influence on the queue-statistic but not on user and waiting time statistics.)


Generated on Mon Aug 11 10:36:07 2003 for ODEMx by doxygen1.3