OpenDDS  Snapshot(2023/04/28-20:55)
Public Member Functions | Private Types | Private Attributes | List of all members
Update::Manager Class Reference

#include <UpdateManager.h>

Inheritance diagram for Update::Manager:
Inheritance graph
[legend]
Collaboration diagram for Update::Manager:
Collaboration graph
[legend]

Public Member Functions

 Manager ()
 
virtual ~Manager ()
 
virtual int init (int argc, ACE_TCHAR *argv[])
 Shared object initializer. More...
 
virtual int fini ()
 Shared object finalizer. More...
 
void add (TAO_DDS_DCPSInfo_i *info)
 
void add (Updater *updater)
 
void remove ()
 
void remove (const Updater *updater)
 
void requestImage ()
 Force a clean shutdown. More...
 
void pushImage (const DImage &image)
 Downstream request to push image. More...
 
template<class UType >
void create (const UType &info)
 
template<class QosType >
void update (const IdPath &id, const QosType &qos)
 
void destroy (const IdPath &id, ItemType type, ActorType actor=DataWriter)
 
void add (const DTopic &topic)
 
void add (const DParticipant &participant)
 
void add (const DActor &actor)
 
virtual void updateLastPartId (PartIdType partId)
 Update Last Participant Id for the repo. More...
 
- Public Member Functions inherited from ACE_Service_Object
 ACE_Service_Object (ACE_Reactor *=0)
 
virtual ~ACE_Service_Object (void)
 
virtual int suspend (void)
 
virtual int resume (void)
 
- Public Member Functions inherited from ACE_Event_Handler
virtual ~ACE_Event_Handler (void)
 
virtual ACE_HANDLE get_handle (void) const
 
virtual void set_handle (ACE_HANDLE)
 
virtual int priority (void) const
 
virtual void priority (int priority)
 
virtual int handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_timeout (const ACE_Time_Value &current_time, const void *act=0)
 
virtual int handle_exit (ACE_Process *)
 
virtual int handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask)
 
virtual int handle_signal (int signum, siginfo_t *=0, ucontext_t *=0)
 
virtual int resume_handler (void)
 
virtual int handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual int handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual void reactor (ACE_Reactor *reactor)
 
virtual ACE_Reactorreactor (void) const
 
virtual ACE_Reactor_Timer_Interfacereactor_timer_interface (void) const
 
virtual Reference_Count add_reference (void)
 
virtual Reference_Count remove_reference (void)
 
Reference_Counting_Policyreference_counting_policy (void)
 
- Public Member Functions inherited from ACE_Shared_Object
 ACE_Shared_Object (void)
 
virtual ~ACE_Shared_Object (void)
 
virtual int info (ACE_TCHAR **info_string, size_t length=0) const
 

Private Types

typedef std::set< Updater * > Updaters
 

Private Attributes

TAO_DDS_DCPSInfo_iinfo_
 
Updaters updaters_
 

Additional Inherited Members

- Public Types inherited from ACE_Event_Handler
typedef long Reference_Count
 
- Static Public Member Functions inherited from ACE_Event_Handler
static ACE_THR_FUNC_RETURN read_adapter (void *event_handler)
 
static int register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED)
 
static int remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr)
 
- Public Attributes inherited from ACE_Service_Object
 ACE_ALLOC_HOOK_DECLARE
 
- Public Attributes inherited from ACE_Event_Handler
 LO_PRIORITY
 
 HI_PRIORITY
 
 NULL_MASK
 
 READ_MASK
 
 WRITE_MASK
 
 EXCEPT_MASK
 
 ACCEPT_MASK
 
 CONNECT_MASK
 
 TIMER_MASK
 
 QOS_MASK
 
 GROUP_QOS_MASK
 
 SIGNAL_MASK
 
 ALL_EVENTS_MASK
 
 RWE_MASK
 
 DONT_CALL
 
 ACE_EVENT_HANDLER_NOT_RESUMED
 
 ACE_REACTOR_RESUMES_HANDLER
 
 ACE_APPLICATION_RESUMES_HANDLER
 
- Protected Types inherited from ACE_Event_Handler
typedef ACE_Atomic_Op< ACE_SYNCH_MUTEX, Reference_CountAtomic_Reference_Count
 
- Protected Member Functions inherited from ACE_Event_Handler
 ACE_Event_Handler (ACE_Reactor *=0, int priority=ACE_Event_Handler::LO_PRIORITY)
 
- Protected Attributes inherited from ACE_Event_Handler
Atomic_Reference_Count reference_count_
 

Detailed Description

Definition at line 32 of file UpdateManager.h.

Member Typedef Documentation

◆ Updaters

typedef std::set<Updater*> Update::Manager::Updaters
private

Definition at line 83 of file UpdateManager.h.

Constructor & Destructor Documentation

◆ Manager()

Update::Manager::Manager ( )

Definition at line 22 of file UpdateManager.cpp.

23  : info_(0)
24 {
25 }
TAO_DDS_DCPSInfo_i * info_
Definition: UpdateManager.h:88

◆ ~Manager()

Update::Manager::~Manager ( )
virtual

Definition at line 27 of file UpdateManager.cpp.

28 {
29 }

Member Function Documentation

◆ add() [1/5]

void Update::Manager::add ( TAO_DDS_DCPSInfo_i info)

Definition at line 32 of file UpdateManager.cpp.

References ACE_Shared_Object::info(), and info_.

Referenced by TAO_DDS_DCPSInfo_i::add(), Update::PersistenceUpdater::init(), and TAO_DDS_DCPSInfo_i::init_persistence().

33 {
34  info_ = info;
35 }
virtual int info(ACE_TCHAR **info_string, size_t length=0) const
TAO_DDS_DCPSInfo_i * info_
Definition: UpdateManager.h:88

◆ add() [2/5]

void Update::Manager::add ( Updater updater)

Definition at line 38 of file UpdateManager.cpp.

References updaters_.

39 {
40  // push new element to the back.
41  updaters_.insert(updater);
42 }
Updaters updaters_
Definition: UpdateManager.h:89

◆ add() [3/5]

void Update::Manager::add ( const DTopic topic)

Definition at line 315 of file UpdateManager.cpp.

References TAO_DDS_DCPSInfo_i::add_topic(), Update::TopicStrt< Q, S >::dataType, Update::TopicStrt< Q, S >::domainId, info_, Update::TopicStrt< Q, S >::name, Update::TopicStrt< Q, S >::participantId, Update::TopicStrt< Q, S >::topicId, and Update::TopicStrt< Q, S >::topicQos.

316 {
317  if (info_ == NULL) {
318  return;
319  }
320 
321  // Demarshal QOS data
322  TAO_InputCDR in_cdr(topic.topicQos.second.second
323  , topic.topicQos.second.first);
324 
325  DDS::TopicQos qos;
326  in_cdr >> qos;
327 
328  // Pass topic info to infoRepo.
329  info_->add_topic(topic.topicId, topic.domainId
330  , topic.participantId, topic.name.c_str()
331  , topic.dataType.c_str(), qos);
332 }
bool add_topic(const OpenDDS::DCPS::GUID_t &topicId, DDS::DomainId_t domainId, const OpenDDS::DCPS::GUID_t &participantId, const char *topicName, const char *dataTypeName, const DDS::TopicQos &qos)
Add a previously existing topic to the repository.
Definition: DCPSInfo_i.cpp:232
TAO_DDS_DCPSInfo_i * info_
Definition: UpdateManager.h:88

◆ add() [4/5]

void Update::Manager::add ( const DParticipant participant)

Definition at line 335 of file UpdateManager.cpp.

References TAO_DDS_DCPSInfo_i::add_domain_participant(), Update::ParticipantStrt< QosSeq >::domainId, info_, Update::ParticipantStrt< QosSeq >::participantId, and Update::ParticipantStrt< QosSeq >::participantQos.

336 {
337  if (info_ == NULL) {
338  return;
339  }
340 
341  // Demarshal QOS data
342  TAO_InputCDR in_cdr(participant.participantQos.second.second
343  , participant.participantQos.second.first);
344 
346  in_cdr >> qos;
347 
348  // Pass participant info to infoRepo.
349  info_->add_domain_participant(participant.domainId
350  , participant.participantId
351  , qos);
352 }
virtual OpenDDS::DCPS::AddDomainStatus add_domain_participant(DDS::DomainId_t domain, const DDS::DomainParticipantQos &qos)
TAO_DDS_DCPSInfo_i * info_
Definition: UpdateManager.h:88

◆ add() [5/5]

void Update::Manager::add ( const DActor actor)

Definition at line 355 of file UpdateManager.cpp.

References Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::actorId, TAO_DDS_DCPSInfo_i::add_publication(), TAO_DDS_DCPSInfo_i::add_subscription(), Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::callback, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::contentSubscriptionProfile, Update::DataReader, Update::DataWriter, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::domainId, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::drdwQos, Update::ContentSubscriptionInfo::exprParams, Update::ContentSubscriptionInfo::filterClassName, Update::ContentSubscriptionInfo::filterExpr, info_, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::participantId, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::pubsubQos, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::serializedTypeInfo, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::topicId, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::transportContext, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::transportInterfaceInfo, and Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::type.

356 {
357  if (info_ == NULL) {
358  return;
359  }
360 
361  // Demarshal QOS data
362  TAO_InputCDR pubSubCdr(actor.pubsubQos.second.second
363  , actor.pubsubQos.second.first);
364 
365  TAO_InputCDR drdwCdr(actor.drdwQos.second.second
366  , actor.drdwQos.second.first);
367 
368  std::string callback(actor.callback.c_str());
369 
370  TAO_InputCDR transportCdr(actor.transportInterfaceInfo.second
371  , actor.transportInterfaceInfo.first);
372 
373  OpenDDS::DCPS::TransportLocatorSeq transport_info;
374  transportCdr >> transport_info;
375 
376  TAO_InputCDR typeInfoCdr(actor.serializedTypeInfo.second, actor.serializedTypeInfo.first);
377 
378  DDS::OctetSeq serializedTypeInfo;
379  typeInfoCdr >> serializedTypeInfo;
380 
381  if (actor.type == DataReader) {
382  DDS::SubscriberQos sub_qos;
383  DDS::DataReaderQos reader_qos;
384 
385  pubSubCdr >> sub_qos;
386  drdwCdr >> reader_qos;
387 
389  csi.filterClassName = actor.contentSubscriptionProfile.filterClassName.c_str();
390  csi.filterExpr = actor.contentSubscriptionProfile.filterExpr.c_str();
391  TAO_InputCDR cspCdr(actor.contentSubscriptionProfile.exprParams.second,
392  actor.contentSubscriptionProfile.exprParams.first);
393  cspCdr >> csi.exprParams;
394 
395  // Pass actor to InfoRepo.
396  info_->add_subscription(actor.domainId, actor.participantId
397  , actor.topicId, actor.actorId
398  , callback.c_str(), reader_qos
399  , transport_info, actor.transportContext, sub_qos
400  , csi.filterClassName, csi.filterExpr, csi.exprParams
401  , serializedTypeInfo);
402 
403  } else if (actor.type == DataWriter) {
404  DDS::PublisherQos pub_qos;
405  DDS::DataWriterQos writer_qos;
406 
407  pubSubCdr >> pub_qos;
408  drdwCdr >> writer_qos;
409 
410  // Pass actor info to infoRepo.
411  info_->add_publication(actor.domainId, actor.participantId
412  , actor.topicId, actor.actorId
413  , callback.c_str(), writer_qos
414  , transport_info, actor.transportContext, pub_qos
415  , serializedTypeInfo);
416  }
417 }
sequence< TransportLocator > TransportLocatorSeq
virtual OpenDDS::DCPS::GUID_t add_subscription(DDS::DomainId_t domainId, const OpenDDS::DCPS::GUID_t &participantId, const OpenDDS::DCPS::GUID_t &topicId, OpenDDS::DCPS::DataReaderRemote_ptr subscription, const DDS::DataReaderQos &qos, const OpenDDS::DCPS::TransportLocatorSeq &transInfo, const DDS::SubscriberQos &subscriberQos, const char *filterClassName, const char *filterExpression, const DDS::StringSeq &exprParams, const DDS::OctetSeq &serializedTypeInfo)
Definition: DCPSInfo_i.cpp:681
sequence< octet > OctetSeq
Definition: DdsDcpsCore.idl:64
virtual OpenDDS::DCPS::GUID_t add_publication(DDS::DomainId_t domainId, const OpenDDS::DCPS::GUID_t &participantId, const OpenDDS::DCPS::GUID_t &topicId, OpenDDS::DCPS::DataWriterRemote_ptr publication, const DDS::DataWriterQos &qos, const OpenDDS::DCPS::TransportLocatorSeq &transInfo, const DDS::PublisherQos &publisherQos, const DDS::OctetSeq &serializedTypeInfo)
Definition: DCPSInfo_i.cpp:374
TAO_DDS_DCPSInfo_i * info_
Definition: UpdateManager.h:88

◆ create()

template<class UType >
void Update::Manager::create ( const UType &  info)

Definition at line 12 of file UpdateManager_T.cpp.

References updaters_.

Referenced by TAO_DDS_DCPSInfo_i::add_publication(), TAO_DDS_DCPSInfo_i::add_subscription(), TAO_DDS_DCPSInfo_i::assert_topic(), and DCPS_IR_Participant::takeOwnership().

13 {
14  // Invoke add on each of the iterators.
15  for (Updaters::iterator iter = updaters_.begin();
16  iter != updaters_.end();
17  iter++) {
18  (*iter)->create(info);
19  }
20 }
Updaters updaters_
Definition: UpdateManager.h:89
virtual int info(ACE_TCHAR **info_string, size_t length=0) const

◆ destroy()

void Update::Manager::destroy ( const IdPath id,
ItemType  type,
ActorType  actor = DataWriter 
)

Definition at line 304 of file UpdateManager.cpp.

References updaters_.

Referenced by DCPS_IR_Participant::remove_all_dependents(), TAO_DDS_DCPSInfo_i::remove_domain_participant(), TAO_DDS_DCPSInfo_i::remove_publication(), TAO_DDS_DCPSInfo_i::remove_subscription(), and TAO_DDS_DCPSInfo_i::remove_topic().

305 {
306  // Invoke remove on each of the iterators.
307  for (Updaters::iterator iter = updaters_.begin();
308  iter != updaters_.end();
309  iter++) {
310  (*iter)->destroy(id, type, actor);
311  }
312 }
Updaters updaters_
Definition: UpdateManager.h:89

◆ fini()

int Update::Manager::fini ( void  )
virtual

Shared object finalizer.

Reimplemented from ACE_Shared_Object.

Definition at line 72 of file UpdateManager.cpp.

73 {
74  return 0;
75 }

◆ init()

int Update::Manager::init ( int  argc,
ACE_TCHAR argv[] 
)
virtual

Shared object initializer.

Reimplemented from ACE_Shared_Object.

Definition at line 66 of file UpdateManager.cpp.

67 {
68  return 0;
69 }

◆ pushImage()

void Update::Manager::pushImage ( const DImage image)

Downstream request to push image.

Definition at line 112 of file UpdateManager.cpp.

References ACE_ERROR, ACE_NEW_NORETURN, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::actorId, Update::ImageData< T, P, A, W >::actors, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::callback, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::contentSubscriptionProfile, Update::DataReader, Update::TopicStrt< Q, S >::dataType, Update::DataWriter, Update::TopicStrt< Q, S >::domainId, Update::ParticipantStrt< QosSeq >::domainId, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::domainId, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::drdwQos, Update::ContentSubscriptionInfo::exprParams, Update::ContentSubscriptionInfo::filterClassName, Update::ContentSubscriptionInfo::filterExpr, info_, Update::ImageData< T, P, A, W >::lastPartId, LM_ERROR, Update::TopicStrt< Q, S >::name, Update::ParticipantStrt< QosSeq >::owner, Update::TopicStrt< Q, S >::participantId, Update::ParticipantStrt< QosSeq >::participantId, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::participantId, Update::ParticipantStrt< QosSeq >::participantQos, Update::ImageData< T, P, A, W >::participants, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::pubsubQos, TAO_DDS_DCPSInfo_i::receive_image(), Update::SeqGuard< T >::seq(), Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::serializedTypeInfo, Update::TopicStrt< Q, S >::topicId, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::topicId, Update::TopicStrt< Q, S >::topicQos, Update::ImageData< T, P, A, W >::topics, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::transportContext, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::transportInterfaceInfo, Update::ActorStrt< PSQ, RWQ, C, T, CSP, STI >::type, and Update::ImageData< T, P, A, W >::wActors.

Referenced by Update::PersistenceUpdater::requestImage().

113 {
114  if (info_ == NULL) {
115  return;
116  }
117 
118  // image to be propagated.
119  UImage u_image;
120 
121  /***************************
122  // The downstream image needs to be converted to a
123  // format compatible with the upstream layers (Dimage -> UImage)
124  // The Uimage cotains a lot of references to the complex data
125  // types. These are collecetd in several buckets (see below) and
126  // passed by reference. Usage of a custom guard class 'SeqGuard'
127  // automates memory cleanup.
128  ***************************/
129 
130  // Participant buckets
131  SeqGuard<DDS::DomainParticipantQos> part_qos_guard;
132  SeqGuard<DDS::DomainParticipantQos>::Seq& part_qos = part_qos_guard.seq();
133 
134  SeqGuard<UParticipant> part_guard;
135  SeqGuard<UParticipant>::Seq& parts = part_guard.seq();
136 
137  for (DImage::ParticipantSeq::const_iterator iter = image.participants.begin();
138  iter != image.participants.end(); iter++) {
139  const DParticipant& part = *iter;
140 
141  TAO_InputCDR in_cdr(part.participantQos.second.second
142  , part.participantQos.second.first);
143 
146  in_cdr >> *qos;
147  part_qos.push_back(qos);
148 
149  UParticipant* u_part;
150  ACE_NEW_NORETURN(u_part, UParticipant(part.domainId
151  , part.owner
152  , part.participantId
153  , *qos));
154  parts.push_back(u_part);
155 
156  // push newly created UParticipant into UImage Participant bucket
157  u_image.participants.push_back(u_part);
158  }
159 
160  // Topic buckets
161  SeqGuard<DDS::TopicQos> topics_qos_guard;
162  SeqGuard<DDS::TopicQos>::Seq& topics_qos = topics_qos_guard.seq();
163 
164  SeqGuard<UTopic> topics_guard;
165  SeqGuard<UTopic>::Seq& topics = topics_guard.seq();
166 
167  for (DImage::TopicSeq::const_iterator iter = image.topics.begin();
168  iter != image.topics.end(); iter++) {
169  const DTopic& topic = *iter;
170 
171  TAO_InputCDR in_cdr(topic.topicQos.second.second
172  , topic.topicQos.second.first);
173 
174  DDS::TopicQos* qos;
176  in_cdr >> *qos;
177  topics_qos.push_back(qos);
178 
179  UTopic* u_topic;
180  ACE_NEW_NORETURN(u_topic
181  , UTopic(topic.domainId, topic.topicId
182  , topic.participantId
183  , topic.name.c_str()
184  , topic.dataType.c_str(), *qos));
185  topics.push_back(u_topic);
186 
187  // Push newly created UTopic into UImage Topic bucket
188  u_image.topics.push_back(u_topic);
189  }
190 
191  // Actor buckets
192  SeqGuard<DDS::PublisherQos> pub_qos_guard;
193  SeqGuard<DDS::PublisherQos>::Seq& pub_qos_seq = pub_qos_guard.seq();
194  SeqGuard<DDS::DataWriterQos> dw_qos_guard;
195  SeqGuard<DDS::DataWriterQos>::Seq& dw_qos_seq = dw_qos_guard.seq();
196 
197  SeqGuard<DDS::SubscriberQos> sub_qos_guard;
198  SeqGuard<DDS::SubscriberQos>::Seq& sub_qos_seq = sub_qos_guard.seq();
199  SeqGuard<DDS::DataReaderQos> dr_qos_guard;
200  SeqGuard<DDS::DataReaderQos>::Seq& dr_qos_seq = dr_qos_guard.seq();
201 
202  SeqGuard<OpenDDS::DCPS::TransportLocatorSeq> trans_guard;
203  SeqGuard<OpenDDS::DCPS::TransportLocatorSeq>::Seq& transports = trans_guard.seq();
204 
205  SeqGuard<DDS::OctetSeq> type_info_guard;
206  SeqGuard<DDS::OctetSeq>::Seq& serializedTypeInfoSeq = type_info_guard.seq();
207 
208  SeqGuard<URActor> reader_guard;
209  SeqGuard<URActor>::Seq& readers = reader_guard.seq();
210  SeqGuard<UWActor> writer_guard;
211  SeqGuard<UWActor>::Seq& writers = writer_guard.seq();
212 
213  ContentSubscriptionInfo csi;
214 
215  for (DImage::ReaderSeq::const_iterator iter = image.actors.begin();
216  iter != image.actors.end(); iter++) {
217  const DActor& actor = *iter;
218 
219  TAO_InputCDR in_cdr(actor.transportInterfaceInfo.second
220  , actor.transportInterfaceInfo.first);
223  transports.push_back(trans);
224  in_cdr >> *trans;
225 
226  TAO_InputCDR ti_cdr(actor.serializedTypeInfo.second
227  , actor.serializedTypeInfo.first);
228  DDS::OctetSeq* type_info_ptr;
229  ACE_NEW_NORETURN(type_info_ptr, DDS::OctetSeq);
230  serializedTypeInfoSeq.push_back(type_info_ptr);
231  ti_cdr >> *type_info_ptr;
232 
233  DDS::PublisherQos* pub_qos = 0;
234  DDS::DataWriterQos* writer_qos = 0;
235  DDS::SubscriberQos* sub_qos = 0;
236  DDS::DataReaderQos* reader_qos = 0;
237 
238  if (actor.type == DataReader) {
239  TAO_InputCDR sub_cdr(actor.pubsubQos.second.second
240  , actor.pubsubQos.second.first);
242  sub_qos_seq.push_back(sub_qos);
243  sub_cdr >> *sub_qos;
244 
245  TAO_InputCDR read_cdr(actor.drdwQos.second.second
246  , actor.drdwQos.second.first);
248  dr_qos_seq.push_back(reader_qos);
249  read_cdr >> *reader_qos;
250 
251  csi.filterClassName = actor.contentSubscriptionProfile.filterClassName.c_str();
252  csi.filterExpr = actor.contentSubscriptionProfile.filterExpr.c_str();
253  TAO_InputCDR csp_cdr(actor.contentSubscriptionProfile.exprParams.second,
254  actor.contentSubscriptionProfile.exprParams.first);
255  csp_cdr >> csi.exprParams;
256 
257  URActor* reader;
258  ACE_NEW_NORETURN(reader
259  , URActor(actor.domainId, actor.actorId
260  , actor.topicId, actor.participantId
261  , actor.type, actor.callback.c_str()
262  , *sub_qos, *reader_qos
263  , *trans, actor.transportContext, csi
264  , *type_info_ptr));
265  readers.push_back(reader);
266  u_image.actors.push_back(reader);
267 
268  } else if (actor.type == DataWriter) {
269  TAO_InputCDR pub_cdr(actor.pubsubQos.second.second
270  , actor.pubsubQos.second.first);
272  pub_qos_seq.push_back(pub_qos);
273  pub_cdr >> *pub_qos;
274 
275  TAO_InputCDR write_cdr(actor.drdwQos.second.second
276  , actor.drdwQos.second.first);
278  dw_qos_seq.push_back(writer_qos);
279  write_cdr >> *writer_qos;
280 
281  UWActor* writer;
282  ACE_NEW_NORETURN(writer
283  , UWActor(actor.domainId, actor.actorId
284  , actor.topicId, actor.participantId
285  , actor.type, actor.callback.c_str()
286  , *pub_qos, *writer_qos
287  , *trans, actor.transportContext, csi
288  , *type_info_ptr));
289  writers.push_back(writer);
290  u_image.wActors.push_back(writer);
291 
292  } else {
293  ACE_ERROR((LM_ERROR, "Update::Manager::pushImage> unknown "
294  "actor type.\n"));
295  }
296  }
297 
298  u_image.lastPartId = image.lastPartId;
299 
300  info_->receive_image(u_image);
301 }
#define ACE_ERROR(X)
struct TopicStrt< QosSeq, std::string > DTopic
struct ParticipantStrt< QosSeq > DParticipant
std::vector< T * > Seq
bool receive_image(const Update::UImage &image)
sequence< TransportLocator > TransportLocatorSeq
struct ActorStrt< QosSeq, QosSeq, std::string, BinSeq, ContentSubscriptionBin, BinSeq > DActor
struct ImageData< UTopic *, UParticipant *, URActor *, UWActor *> UImage
#define ACE_NEW_NORETURN(POINTER, CONSTRUCTOR)
sequence< octet > OctetSeq
Definition: DdsDcpsCore.idl:64
struct ParticipantStrt< DDS::DomainParticipantQos &> UParticipant
struct TopicStrt< DDS::TopicQos &, std::string > UTopic
TAO_DDS_DCPSInfo_i * info_
Definition: UpdateManager.h:88
struct ActorStrt< DDS::SubscriberQos &, DDS::DataReaderQos &, std::string, OpenDDS::DCPS::TransportLocatorSeq &, ContentSubscriptionInfo &, DDS::OctetSeq &> URActor
struct ActorStrt< DDS::PublisherQos &, DDS::DataWriterQos &, std::string, OpenDDS::DCPS::TransportLocatorSeq &, ContentSubscriptionInfo &, DDS::OctetSeq &> UWActor

◆ remove() [1/2]

void Update::Manager::remove ( void  )

Definition at line 45 of file UpdateManager.cpp.

References info_.

46 {
47  // Clean the reference to the InfoRepo.
48  info_ = 0;
49 }
TAO_DDS_DCPSInfo_i * info_
Definition: UpdateManager.h:88

◆ remove() [2/2]

void Update::Manager::remove ( const Updater updater)

Definition at line 52 of file UpdateManager.cpp.

References updaters_.

53 {
54  // check if the Updaters is part of the list.
55  Updaters::iterator iter = updaters_.find(const_cast<Updater*>(updater));
56 
57  if (iter == updaters_.end()) {
58  return;
59  }
60 
61  // remove the element
62  updaters_.erase(iter);
63 }
Updaters updaters_
Definition: UpdateManager.h:89

◆ requestImage()

void Update::Manager::requestImage ( )

Force a clean shutdown.

Upstream request for a fresh image Currently handled synchronously via 'pushImage' TBD: Replace with an asynchronous model.

Definition at line 78 of file UpdateManager.cpp.

References updaters_.

Referenced by TAO_DDS_DCPSInfo_i::init_persistence().

79 {
80  for (Updaters::iterator iter = updaters_.begin();
81  iter != updaters_.end();
82  iter++) {
83  (*iter)->requestImage();
84  }
85 }
Updaters updaters_
Definition: UpdateManager.h:89

◆ update()

template<class QosType >
void Update::Manager::update ( const IdPath id,
const QosType &  qos 
)

Definition at line 24 of file UpdateManager_T.cpp.

References updaters_.

Referenced by TAO_DDS_DCPSInfo_i::update_domain_participant_qos(), TAO_DDS_DCPSInfo_i::update_publication_qos(), TAO_DDS_DCPSInfo_i::update_subscription_params(), TAO_DDS_DCPSInfo_i::update_subscription_qos(), and TAO_DDS_DCPSInfo_i::update_topic_qos().

25 {
26  // Invoke update on each of the iterators.
27  for (Updaters::iterator iter = updaters_.begin();
28  iter != updaters_.end();
29  iter++) {
30  (*iter)->update(id, qos);
31  }
32 }
Updaters updaters_
Definition: UpdateManager.h:89

◆ updateLastPartId()

void Update::Manager::updateLastPartId ( PartIdType  partId)
virtual

Update Last Participant Id for the repo.

Definition at line 419 of file UpdateManager.cpp.

References updaters_.

420 {
421  for (Updaters::iterator iter = updaters_.begin();
422  iter != updaters_.end();
423  iter++) {
424  (*iter)->updateLastPartId(partId);
425  }
426 }
Updaters updaters_
Definition: UpdateManager.h:89

Member Data Documentation

◆ info_

TAO_DDS_DCPSInfo_i* Update::Manager::info_
private

Definition at line 88 of file UpdateManager.h.

Referenced by add(), pushImage(), and remove().

◆ updaters_

Updaters Update::Manager::updaters_
private

Definition at line 89 of file UpdateManager.h.

Referenced by add(), create(), destroy(), remove(), requestImage(), update(), and updateLastPartId().


The documentation for this class was generated from the following files: