00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "DRPeriodicMonitorImpl.h" 00009 #include "monitorC.h" 00010 #include "monitorTypeSupportImpl.h" 00011 #include "dds/DCPS/DataReaderImpl.h" 00012 #include <dds/DdsDcpsInfrastructureC.h> 00013 00014 namespace OpenDDS { 00015 namespace DCPS { 00016 00017 00018 DRPeriodicMonitorImpl::DRPeriodicMonitorImpl(DataReaderImpl* dr, 00019 OpenDDS::DCPS::DataReaderPeriodicReportDataWriter_ptr dr_per_writer) 00020 : dr_(dr), 00021 dr_per_writer_(DataReaderPeriodicReportDataWriter::_duplicate(dr_per_writer)) 00022 { 00023 } 00024 00025 DRPeriodicMonitorImpl::~DRPeriodicMonitorImpl() 00026 { 00027 } 00028 00029 void 00030 DRPeriodicMonitorImpl::report() { 00031 if (!CORBA::is_nil(this->dr_per_writer_.in())) { 00032 DataReaderPeriodicReport report; 00033 report.dr_id = dr_->get_subscription_id(); 00034 //report.associations = dr_-> 00035 this->dr_per_writer_->write(report, DDS::HANDLE_NIL); 00036 } 00037 } 00038 00039 00040 } // namespace DCPS 00041 } // namespace OpenDDS 00042