MAK RTIspy API Documentation for HLA 1516
Public Member Functions | Protected Member Functions | Protected Attributes
DtCondVar__rti__ Class Reference

Platform independent condition variable. More...

+ Inheritance diagram for DtCondVar__rti__:
+ Collaboration diagram for DtCondVar__rti__:

List of all members.

Public Member Functions

 DtCondVar__rti__ (MAKRti::DtMutex__rti__ *condMutex)
 constructor
virtual ~DtCondVar__rti__ ()
 destructor
virtual void init ()
 initialize condition variable
virtual void destroy ()
 destroy the condition variable.
virtual void signal ()
 signal next waiting process that the condition has been met
virtual void broadcast ()
 signal all waiting processes that the condition has been met
virtual int wait (DtTime waitTime=0.0)
 wait for the condition to be met.

Protected Member Functions

 DtCondVar__rti__ (const DtCondVar__rti__ &orig)
 copy constructor
const DtCondVar__rti__operator= (const DtCondVar__rti__ &orig)
 assignment operator

Protected Attributes

DtClock myClock
pthread_cond_t myPtCond
 for expiration timer in pthreads implementations.
pthread_cond_t * myCond
MAKRti::DtMutex__rti__ * myCondMutex

Detailed Description

Platform independent condition variable.

Instances of DtCondVar are used to provide a platform independent condition variable mechanism for use by threads of the same process. Do not use this class to implement inter-process comm- unication between threads of different processes.


Constructor & Destructor Documentation

DtCondVar__rti__::DtCondVar__rti__ ( MAKRti::DtMutex__rti__ *  condMutex)

constructor

copy constructor

destructor

References myCond, myCondMutex, and NULL.


Member Function Documentation

void DtCondVar__rti__::broadcast ( ) [virtual]

signal all waiting processes that the condition has been met

References myCond.

Referenced by DtRtiSubscribableMessageQueue::handleStall(), and DtRtiSubscribableMessageQueue::sendMessage().

void DtCondVar__rti__::destroy ( ) [virtual]

destroy the condition variable.

This should only be called when no threads or processes will access the condition variable any longer.

References myCond.

Referenced by DtRtiSubscribableMessageQueue::clearSyncVars().

void DtCondVar__rti__::init ( ) [virtual]

initialize condition variable

Reimplemented in DtIpcCondVar__rti__.

References myCond, myCondMutex, myPtCond, and NULL.

const DtCondVar__rti__ & DtCondVar__rti__::operator= ( const DtCondVar__rti__ orig) [protected]

assignment operator

void DtCondVar__rti__::signal ( ) [virtual]

signal next waiting process that the condition has been met

References myCond.

int DtCondVar__rti__::wait ( DtTime  waitTime = 0.0) [virtual]

wait for the condition to be met.

Returns 0 if condition met, +1 if timeout occured, -1 if error

References myClock, myCond, and myCondMutex.

Referenced by DtRtiSubscribableMessageQueue::waitForMessages(), and DtRtiSubscribableMessageQueue::waitUntilFull().


Member Data Documentation

DtClock DtCondVar__rti__::myClock [protected]

Referenced by wait().

pthread_cond_t* DtCondVar__rti__::myCond [protected]
MAKRti::DtMutex__rti__* DtCondVar__rti__::myCondMutex [protected]
pthread_cond_t DtCondVar__rti__::myPtCond [protected]

for expiration timer in pthreads implementations.

WIN32

Referenced by init().


The documentation for this class was generated from the following files:

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)