| 29 | } |
| 30 | |
| 31 | void |
| 32 | DRMonitorImpl::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 | } |
nothing calls this directly
no test coverage detected