OpenDDS  Snapshot(2023/04/28-20:55)
DataWriterRemoteImpl.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 "DataWriterRemoteImpl.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 ReaderAssociation& reader,
38  bool active)
39 {
40  if (DCPS_debug_level) {
41  LogGuid writer_log(yourId);
42  LogGuid reader_log(reader.readerId);
43  ACE_DEBUG((LM_DEBUG, ACE_TEXT("(%P|%t) DataWriterRemoteImpl::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.in()) {
52  parent->add_association(yourId, reader, 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.in()) {
63  parent->remove_associations(readers, 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.in()) {
74  parent->update_incompatible_qos(status);
75  }
76 }
77 
78 void
80  const DDS::StringSeq& params)
81 {
82  // the local copy of parent_ is necessary to prevent race condition
84  if (parent.in()) {
85  parent->update_subscription_params(readerId, params);
86  }
87 }
88 
89 } // namespace DCPS
90 } // namespace OpenDDS
91 
virtual void update_incompatible_qos(const IncompatibleQosStatus &status)
Defines the interface for Discovery callbacks into the DataWriter.
#define ACE_DEBUG(X)
const char * c_str() const
virtual void add_association(const GUID_t &yourId, const ReaderAssociation &readers, bool active)
sequence< GUID_t > ReaderIdSeq
LM_DEBUG
virtual void update_subscription_params(const GUID_t &readerId, const DDS::StringSeq &exprParams)
ACE_CDR::Boolean Boolean
virtual void remove_associations(const ReaderIdSeq &readers, CORBA::Boolean callback)
WeakRcHandle< DataWriterCallbacks > parent_
ACE_TEXT("TCP_Factory")
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
Definition: debug.cpp:30
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
DataWriterRemoteImpl(DataWriterCallbacks &parent)
RcHandle< T > lock() const
Definition: RcObject.h:188
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
sequence< string > StringSeq
Definition: DdsDcpsCore.idl:50