OpenDDS  Snapshot(2023/04/28-20:55)
DataReaderRemoteImpl.cpp
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #include "DataReaderRemoteImpl.h"
9 
11 #include "dds/DCPS/debug.h"
12 #include "dds/DCPS/GuidConverter.h"
13 
15 
16 namespace OpenDDS {
17 namespace DCPS {
18 
20  : parent_(parent)
21 {
22 }
23 
24 // This method is called when there are no longer any reference to the
25 // the servant.
27 {
28 }
29 
30 void
32 {
33 }
34 
35 void
37  const WriterAssociation& writer,
38  bool active)
39 {
40  if (DCPS_debug_level) {
41  LogGuid writer_log(yourId);
42  LogGuid reader_log(writer.writerId);
43  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) DataReaderRemoteImpl::add_association - ")
44  ACE_TEXT("local %C remote %C\n"),
45  writer_log.c_str(),
46  reader_log.c_str()));
47  }
48 
49  // the local copy of parent_ is necessary to prevent race condition
51  if (parent) {
52  parent->add_association(yourId, writer, active);
53  }
54 }
55 
56 void
58  CORBA::Boolean notify_lost)
59 {
60  // the local copy of parent_ is necessary to prevent race condition
62  if (parent) {
63  parent->remove_associations(writers, notify_lost);
64  }
65 }
66 
67 void
69  const IncompatibleQosStatus& status)
70 {
71  // the local copy of parent_ is necessary to prevent race condition
73  if (parent) {
74  parent->update_incompatible_qos(status);
75  }
76 }
77 
78 } // namespace DCPS
79 } // namespace OpenDDS
80 
#define ACE_DEBUG(X)
virtual void update_incompatible_qos(const IncompatibleQosStatus &status)
DataReaderRemoteImpl(DataReaderCallbacks &parent)
WeakRcHandle< DataReaderCallbacks > parent_
Defines the interface for Discovery callbacks into the DataReader.
const char * c_str() const
LM_DEBUG
ACE_CDR::Boolean Boolean
sequence< GUID_t > WriterIdSeq
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
virtual void remove_associations(const WriterIdSeq &writers, CORBA::Boolean callback)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
virtual void add_association(const GUID_t &yourId, const WriterAssociation &writer, bool active)
RcHandle< T > lock() const
Definition: RcObject.h:188
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28