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 namespace OpenDDS {
00015 namespace DCPS {
00016 
00017 
00018 DWPeriodicMonitorImpl::DWPeriodicMonitorImpl(DataWriterImpl* dw,
00019               OpenDDS::DCPS::DataWriterPeriodicReportDataWriter_ptr dw_per_writer)
00020   : dw_(dw),
00021     dw_per_writer_(DataWriterPeriodicReportDataWriter::_duplicate(dw_per_writer))
00022 {
00023 }
00024 
00025 DWPeriodicMonitorImpl::~DWPeriodicMonitorImpl()
00026 {
00027 }
00028 
00029 void
00030 DWPeriodicMonitorImpl::report() {
00031   if (!CORBA::is_nil(this->dw_per_writer_.in())) {
00032     DataWriterPeriodicReport report;
00033     report.dw_id   = dw_->get_publication_id();
00034     //report.data_dropped_count = dw_->
00035     //report.data_delivered_count  = dw_->
00036     //report.control_dropped_count  = dw_->
00037     //report.control_delivered_count  = dw_->
00038     //report.associations  = dw_->
00039     this->dw_per_writer_->write(report, DDS::HANDLE_NIL);
00040   }
00041 }
00042 
00043 
00044 } // namespace DCPS
00045 } // namespace OpenDDS
00046 

Generated on Fri Feb 12 20:05:23 2016 for OpenDDS by  doxygen 1.4.7