OpenDDS::DCPS::DcpsUpcalls Struct Reference

#include <DiscoveryBase.h>

Inheritance diagram for OpenDDS::DCPS::DcpsUpcalls:

Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::DcpsUpcalls:

Collaboration graph
[legend]
List of all members.

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 RepoIdreader_
const DCPS::WriterAssociationwa_
bool active_
DCPS::DataWriterCallbacks
*const 
dwr_
bool reader_done_
bool writer_done_
ACE_Thread_Mutex mtx_
ACE_Condition_Thread_Mutex cnd_

Detailed Description

Definition at line 34 of file DiscoveryBase.h.


Constructor & Destructor Documentation

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       {}


Member Function Documentation

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       }


Member Data Documentation

bool OpenDDS::DCPS::DcpsUpcalls::active_

Definition at line 72 of file DiscoveryBase.h.

Referenced by svc().

ACE_Condition_Thread_Mutex OpenDDS::DCPS::DcpsUpcalls::cnd_

Definition at line 76 of file DiscoveryBase.h.

Referenced by svc(), and writer_done().

DCPS::DataReaderCallbacks* const OpenDDS::DCPS::DcpsUpcalls::drr_

Definition at line 69 of file DiscoveryBase.h.

Referenced by svc().

DCPS::DataWriterCallbacks* const OpenDDS::DCPS::DcpsUpcalls::dwr_

Definition at line 73 of file DiscoveryBase.h.

Referenced by svc().

ACE_Thread_Mutex OpenDDS::DCPS::DcpsUpcalls::mtx_

Definition at line 75 of file DiscoveryBase.h.

Referenced by svc(), and writer_done().

const RepoId& OpenDDS::DCPS::DcpsUpcalls::reader_

Definition at line 70 of file DiscoveryBase.h.

Referenced by svc().

bool OpenDDS::DCPS::DcpsUpcalls::reader_done_

Definition at line 74 of file DiscoveryBase.h.

Referenced by svc().

const DCPS::WriterAssociation& OpenDDS::DCPS::DcpsUpcalls::wa_

Definition at line 71 of file DiscoveryBase.h.

Referenced by svc().

bool OpenDDS::DCPS::DcpsUpcalls::writer_done_

Definition at line 74 of file DiscoveryBase.h.

Referenced by svc(), and writer_done().


The documentation for this struct was generated from the following file:
Generated on Fri Feb 12 20:06:14 2016 for OpenDDS by  doxygen 1.4.7