DWPeriodicMonitorImpl.cpp

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #include "DWPeriodicMonitorImpl.h"
00009 #include "monitorC.h"
00010 #include "monitorTypeSupportImpl.h"
00011 #include "dds/DCPS/DataWriterImpl.h"
00012 #include <dds/DdsDcpsInfrastructureC.h>
00013 
00014 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00015 
00016 namespace OpenDDS {
00017 namespace DCPS {
00018 
00019 DWPeriodicMonitorImpl::DWPeriodicMonitorImpl(DataWriterImpl* dw,
00020               OpenDDS::DCPS::DataWriterPeriodicReportDataWriter_ptr dw_per_writer)
00021   : dw_(dw),
00022     dw_per_writer_(DataWriterPeriodicReportDataWriter::_duplicate(dw_per_writer))
00023 {
00024 }
00025 
00026 DWPeriodicMonitorImpl::~DWPeriodicMonitorImpl()
00027 {
00028 }
00029 
00030 void
00031 DWPeriodicMonitorImpl::report() {
00032   if (!CORBA::is_nil(this->dw_per_writer_.in())) {
00033     DataWriterPeriodicReport report;
00034     report.dw_id   = dw_->get_publication_id();
00035     //report.data_dropped_count = dw_->
00036     //report.data_delivered_count  = dw_->
00037     //report.control_dropped_count  = dw_->
00038     //report.control_delivered_count  = dw_->
00039     //report.associations  = dw_->
00040     this->dw_per_writer_->write(report, DDS::HANDLE_NIL);
00041   }
00042 }
00043 
00044 
00045 } // namespace DCPS
00046 } // namespace OpenDDS
00047 
00048 OPENDDS_END_VERSIONED_NAMESPACE_DECL
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1