![]() |
MAK RTIspy API Documentation for HLA 1516
|
Platform independent condition variable. More...
Inheritance diagram for DtCondVar__rti__:
Collaboration diagram for DtCondVar__rti__: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 |
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.
| DtCondVar__rti__::DtCondVar__rti__ | ( | MAKRti::DtMutex__rti__ * | condMutex | ) |
constructor
| DtCondVar__rti__::DtCondVar__rti__ | ( | const DtCondVar__rti__ & | orig | ) | [protected] |
copy constructor
| DtCondVar__rti__::~DtCondVar__rti__ | ( | ) | [virtual] |
destructor
References myCond, myCondMutex, and NULL.
| 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().
DtClock DtCondVar__rti__::myClock [protected] |
Referenced by wait().
pthread_cond_t* DtCondVar__rti__::myCond [protected] |
Referenced by broadcast(), destroy(), DtIpcCondVar__rti__::DtIpcCondVar__rti__(), DtIpcCondVar__rti__::init(), init(), signal(), wait(), and ~DtCondVar__rti__().
MAKRti::DtMutex__rti__* DtCondVar__rti__::myCondMutex [protected] |
Referenced by DtIpcCondVar__rti__::init(), init(), wait(), and ~DtCondVar__rti__().
pthread_cond_t DtCondVar__rti__::myPtCond [protected] |