#include <TopicMonitorImpl.h>
Inheritance diagram for OpenDDS::DCPS::TopicMonitorImpl:
Public Member Functions | |
TopicMonitorImpl (TopicImpl *topic, OpenDDS::DCPS::TopicReportDataWriter_ptr topic_writer) | |
virtual | ~TopicMonitorImpl () |
virtual void | report () |
Private Attributes | |
TopicImpl * | topic_ |
OpenDDS::DCPS::TopicReportDataWriter_var | topic_writer_ |
Definition at line 22 of file TopicMonitorImpl.h.
OpenDDS::DCPS::TopicMonitorImpl::TopicMonitorImpl | ( | TopicImpl * | topic, | |
OpenDDS::DCPS::TopicReportDataWriter_ptr | topic_writer | |||
) |
Definition at line 19 of file TopicMonitorImpl.cpp.
00021 : topic_(topic), 00022 topic_writer_(TopicReportDataWriter::_duplicate(topic_writer)) 00023 { 00024 }
OpenDDS::DCPS::TopicMonitorImpl::~TopicMonitorImpl | ( | ) | [virtual] |
void OpenDDS::DCPS::TopicMonitorImpl::report | ( | ) | [virtual] |
Implements OpenDDS::DCPS::Monitor.
Definition at line 31 of file TopicMonitorImpl.cpp.
References OpenDDS::DCPS::TopicImpl::get_id(), OpenDDS::DCPS::DomainParticipantImpl::get_id(), OpenDDS::DCPS::TopicDescriptionImpl::get_name(), OpenDDS::DCPS::TopicDescriptionImpl::get_participant(), OpenDDS::DCPS::TopicDescriptionImpl::get_type_name(), DDS::HANDLE_NIL, topic_, and topic_writer_.
00031 { 00032 if (!CORBA::is_nil(this->topic_writer_.in())) { 00033 TopicReport report; 00034 DDS::DomainParticipant_var dp = this->topic_->get_participant(); 00035 DomainParticipantImpl* dp_impl = 00036 dynamic_cast<DomainParticipantImpl*>(dp.in()); 00037 report.dp_id = dp_impl->get_id(); 00038 report.topic_id = this->topic_->get_id(); 00039 report.topic_name = this->topic_->get_name(); 00040 report.type_name = this->topic_->get_type_name(); 00041 this->topic_writer_->write(report, DDS::HANDLE_NIL); 00042 } 00043 }
TopicImpl* OpenDDS::DCPS::TopicMonitorImpl::topic_ [private] |
OpenDDS::DCPS::TopicReportDataWriter_var OpenDDS::DCPS::TopicMonitorImpl::topic_writer_ [private] |