OpenDDS::DCPS::PublisherMonitorImpl Class Reference

#include <PublisherMonitorImpl.h>

Inheritance diagram for OpenDDS::DCPS::PublisherMonitorImpl:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PublisherMonitorImpl (PublisherImpl *pub, OpenDDS::DCPS::PublisherReportDataWriter_ptr pub_writer)
virtual ~PublisherMonitorImpl ()
virtual void report ()

Private Attributes

PublisherImplpub_
OpenDDS::DCPS::PublisherReportDataWriter_var pub_writer_

Detailed Description

Definition at line 22 of file PublisherMonitorImpl.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::PublisherMonitorImpl::PublisherMonitorImpl ( PublisherImpl pub,
OpenDDS::DCPS::PublisherReportDataWriter_ptr  pub_writer 
)

Definition at line 19 of file PublisherMonitorImpl.cpp.

00021   : pub_(pub),
00022     pub_writer_(PublisherReportDataWriter::_duplicate(pub_writer))
00023 {
00024 }

OpenDDS::DCPS::PublisherMonitorImpl::~PublisherMonitorImpl (  )  [virtual]

Definition at line 26 of file PublisherMonitorImpl.cpp.

00027 {
00028 }


Member Function Documentation

void OpenDDS::DCPS::PublisherMonitorImpl::report (  )  [virtual]

Implements OpenDDS::DCPS::Monitor.

Definition at line 31 of file PublisherMonitorImpl.cpp.

References OpenDDS::DCPS::PublisherImpl::get_instance_handle(), OpenDDS::DCPS::PublisherImpl::get_participant(), OpenDDS::DCPS::PublisherImpl::get_publication_ids(), DDS::HANDLE_NIL, pub_, and pub_writer_.

00031                              {
00032   if (!CORBA::is_nil(this->pub_writer_.in())) {
00033     PublisherReport report;
00034     report.handle = pub_->get_instance_handle();
00035     DDS::DomainParticipant_var dp = pub_->get_participant();
00036     report.dp_id   = dynamic_cast<DomainParticipantImpl*>(dp.in())->get_id();
00037     TransportImpl_rch ti; //TODO: transport    = pub_->get_transport_impl();
00038     // TODO: remove/replace
00039     report.transport_id = 0;
00040     PublisherImpl::PublicationIdVec writers;
00041     pub_->get_publication_ids(writers);
00042     CORBA::ULong length = 0;
00043     report.writers.length(static_cast<CORBA::ULong>(writers.size()));
00044     for (PublisherImpl::PublicationIdVec::iterator iter = writers.begin();
00045          iter != writers.end();
00046          ++iter) {
00047       report.writers[length++] = *iter;
00048     }
00049     this->pub_writer_->write(report, DDS::HANDLE_NIL);
00050   }
00051 }


Member Data Documentation

PublisherImpl* OpenDDS::DCPS::PublisherMonitorImpl::pub_ [private]

Definition at line 30 of file PublisherMonitorImpl.h.

Referenced by report().

OpenDDS::DCPS::PublisherReportDataWriter_var OpenDDS::DCPS::PublisherMonitorImpl::pub_writer_ [private]

Definition at line 31 of file PublisherMonitorImpl.h.

Referenced by report().


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:06:43 2016 for OpenDDS by  doxygen 1.4.7