forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDWPeriodicMonitorImpl.cpp
48 lines (39 loc) · 1.15 KB
/
DWPeriodicMonitorImpl.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
*
*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/
#include "DWPeriodicMonitorImpl.h"
#include "monitorC.h"
#include "monitorTypeSupportImpl.h"
#include "dds/DCPS/DataWriterImpl.h"
#include <dds/DdsDcpsInfrastructureC.h>
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
namespace OpenDDS {
namespace DCPS {
DWPeriodicMonitorImpl::DWPeriodicMonitorImpl(DataWriterImpl* dw,
OpenDDS::DCPS::DataWriterPeriodicReportDataWriter_ptr dw_per_writer)
: dw_(dw),
dw_per_writer_(DataWriterPeriodicReportDataWriter::_duplicate(dw_per_writer))
{
}
DWPeriodicMonitorImpl::~DWPeriodicMonitorImpl()
{
}
void
DWPeriodicMonitorImpl::report() {
if (!CORBA::is_nil(this->dw_per_writer_.in())) {
DataWriterPeriodicReport report;
report.dw_id = dw_->get_repo_id();
//report.data_dropped_count = dw_->
//report.data_delivered_count = dw_->
//report.control_dropped_count = dw_->
//report.control_delivered_count = dw_->
//report.associations = dw_->
this->dw_per_writer_->write(report, DDS::HANDLE_NIL);
}
}
} // namespace DCPS
} // namespace OpenDDS
OPENDDS_END_VERSIONED_NAMESPACE_DECL