MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / report

Method report

dds/monitor/DRMonitorImpl.cpp:31–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void
32DRMonitorImpl::report() {
33 if (!CORBA::is_nil(dr_writer_.in())) {
34 DataReaderReport report;
35 report.dp_id = dr_->get_dp_id();
36 DDS::Subscriber_var sub = dr_->get_subscriber();
37 report.sub_handle = sub->get_instance_handle();
38 report.dr_id = dr_->get_guid();
39 report.topic_id = dr_->get_topic_id();
40 DCPS::DataReaderImpl::InstanceHandleVec instances;
41 dr_->get_instance_handles(instances);
42 CORBA::ULong length = 0;
43 report.instances.length(static_cast<CORBA::ULong>(instances.size()));
44 for (DCPS::DataReaderImpl::InstanceHandleVec::iterator iter = instances.begin();
45 iter != instances.end();
46 ++iter) {
47 report.instances[length++] = *iter;
48 }
49 DCPS::DataReaderImpl::WriterStatePairVec writer_states;
50 dr_->get_writer_states(writer_states);
51 length = 0;
52 report.associations.length(static_cast<CORBA::ULong>(writer_states.size()));
53 for (DCPS::DataReaderImpl::WriterStatePairVec::iterator iter = writer_states.begin();
54 iter != writer_states.end();
55 ++iter) {
56 report.associations[length].dw_id = iter->first;
57 report.associations[length].state = static_cast<CORBA::Short>(iter->second);
58 length++;
59 }
60 dr_writer_->write(report, DDS::HANDLE_NIL);
61 }
62}
63
64}
65}

Callers

nothing calls this directly

Calls 13

get_writer_statesMethod · 0.80
inMethod · 0.45
get_dp_idMethod · 0.45
get_subscriberMethod · 0.45
get_instance_handleMethod · 0.45
get_guidMethod · 0.45
get_topic_idMethod · 0.45
get_instance_handlesMethod · 0.45
lengthMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected