| 512 | } |
| 513 | |
| 514 | DDS::ReturnCode_t |
| 515 | SubscriberImpl::get_datareaders( |
| 516 | DDS::DataReaderSeq & readers, |
| 517 | DDS::SampleStateMask sample_states, |
| 518 | DDS::ViewStateMask view_states, |
| 519 | DDS::InstanceStateMask instance_states) |
| 520 | { |
| 521 | DataReaderSet localreaders; |
| 522 | { |
| 523 | ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, |
| 524 | guard, |
| 525 | this->dr_set_lock_, |
| 526 | DDS::RETCODE_ERROR); |
| 527 | localreaders = datareader_set_; |
| 528 | } |
| 529 | |
| 530 | #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE |
| 531 | // If access_scope is GROUP and ordered_access is true then return readers as |
| 532 | // list which may contain same readers multiple times. Otherwise return readers |
| 533 | // as set. |
| 534 | if (this->qos_.presentation.access_scope == ::DDS::GROUP_PRESENTATION_QOS) { |
| 535 | if (this->access_depth_ == 0 && this->qos_.presentation.coherent_access) { |
| 536 | return ::DDS::RETCODE_PRECONDITION_NOT_MET; |
| 537 | } |
| 538 | if (this->qos_.presentation.ordered_access) { |
| 539 | |
| 540 | GroupRakeData data; |
| 541 | for (DataReaderSet::const_iterator pos = localreaders.begin(); |
| 542 | pos != localreaders.end(); ++pos) { |
| 543 | (*pos)->get_ordered_data(data, sample_states, view_states, instance_states); |
| 544 | } |
| 545 | |
| 546 | // Return list of readers in the order of the source timestamp of the received |
| 547 | // samples from readers. |
| 548 | data.get_datareaders(readers); |
| 549 | return DDS::RETCODE_OK; |
| 550 | } |
| 551 | } |
| 552 | #endif |
| 553 | |
| 554 | // Return set of datareaders. |
| 555 | readers.length(0); |
| 556 | for (DataReaderSet::const_iterator pos = localreaders.begin(); |
| 557 | pos != localreaders.end(); ++pos) { |
| 558 | if ((*pos)->have_sample_states(sample_states) && |
| 559 | (*pos)->have_view_states(view_states) && |
| 560 | (*pos)->have_instance_states(instance_states)) { |
| 561 | push_back(readers, DDS::DataReader::_duplicate(pos->in())); |
| 562 | } |
| 563 | } |
| 564 | |
| 565 | return DDS::RETCODE_OK; |
| 566 | } |
| 567 | |
| 568 | DDS::ReturnCode_t |
| 569 | SubscriberImpl::notify_datareaders() |
nothing calls this directly
no test coverage detected