#include <DiscoveryBase.h>
Inheritance diagram for OpenDDS::DCPS::DcpsUpcalls:
Public Member Functions | |
DcpsUpcalls (DCPS::DataReaderCallbacks *drr, const RepoId &reader, const DCPS::WriterAssociation &wa, bool active, DCPS::DataWriterCallbacks *dwr) | |
int | svc () |
void | writer_done () |
Public Attributes | |
DCPS::DataReaderCallbacks *const | drr_ |
const RepoId & | reader_ |
const DCPS::WriterAssociation & | wa_ |
bool | active_ |
DCPS::DataWriterCallbacks *const | dwr_ |
bool | reader_done_ |
bool | writer_done_ |
ACE_Thread_Mutex | mtx_ |
ACE_Condition_Thread_Mutex | cnd_ |
Definition at line 34 of file DiscoveryBase.h.
OpenDDS::DCPS::DcpsUpcalls::DcpsUpcalls | ( | DCPS::DataReaderCallbacks * | drr, | |
const RepoId & | reader, | |||
const DCPS::WriterAssociation & | wa, | |||
bool | active, | |||
DCPS::DataWriterCallbacks * | dwr | |||
) | [inline] |
Definition at line 35 of file DiscoveryBase.h.
00040 : drr_(drr), reader_(reader), wa_(wa), active_(active), dwr_(dwr) 00041 , reader_done_(false), writer_done_(false), cnd_(mtx_) 00042 {}
int OpenDDS::DCPS::DcpsUpcalls::svc | ( | ) | [inline] |
Definition at line 44 of file DiscoveryBase.h.
References active_, OpenDDS::DCPS::DataReaderCallbacks::add_association(), OpenDDS::DCPS::DataWriterCallbacks::association_complete(), cnd_, drr_, dwr_, mtx_, reader_, reader_done_, wa_, and writer_done_.
00045 { 00046 drr_->add_association(reader_, wa_, active_); 00047 { 00048 ACE_GUARD_RETURN(ACE_Thread_Mutex, g, mtx_, -1); 00049 reader_done_ = true; 00050 cnd_.signal(); 00051 while (!writer_done_) { 00052 cnd_.wait(); 00053 } 00054 } 00055 dwr_->association_complete(reader_); 00056 return 0; 00057 }
void OpenDDS::DCPS::DcpsUpcalls::writer_done | ( | ) | [inline] |
Definition at line 59 of file DiscoveryBase.h.
References cnd_, mtx_, and writer_done_.
Referenced by OpenDDS::DCPS::EndpointManager< OpenDDS::DCPS::StaticDiscoveredParticipantData >::match().
00060 { 00061 { 00062 ACE_GUARD(ACE_Thread_Mutex, g, mtx_); 00063 writer_done_ = true; 00064 cnd_.signal(); 00065 } 00066 wait(); 00067 }
ACE_Condition_Thread_Mutex OpenDDS::DCPS::DcpsUpcalls::cnd_ |
ACE_Thread_Mutex OpenDDS::DCPS::DcpsUpcalls::mtx_ |