| 2669 | } |
| 2670 | |
| 2671 | void StaticDiscovery::create_bit_dr(DDS::TopicDescription_ptr topic, const char* type, |
| 2672 | SubscriberImpl* sub, const DDS::DataReaderQos& qos) |
| 2673 | { |
| 2674 | TopicDescriptionImpl* bit_topic_i = |
| 2675 | dynamic_cast<TopicDescriptionImpl*>(topic); |
| 2676 | if (bit_topic_i == 0) { |
| 2677 | ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) PeerDiscovery::create_bit_dr") |
| 2678 | ACE_TEXT(" - Could not cast TopicDescription to TopicDescriptionImpl\n"))); |
| 2679 | return; |
| 2680 | } |
| 2681 | |
| 2682 | DDS::DomainParticipant_var participant = sub->get_participant(); |
| 2683 | DomainParticipantImpl* participant_i = |
| 2684 | dynamic_cast<DomainParticipantImpl*>(participant.in()); |
| 2685 | if (participant_i == 0) { |
| 2686 | ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) PeerDiscovery::create_bit_dr") |
| 2687 | ACE_TEXT(" - Could not cast DomainParticipant to DomainParticipantImpl\n"))); |
| 2688 | return; |
| 2689 | } |
| 2690 | |
| 2691 | TypeSupport_var type_support = |
| 2692 | Registered_Data_Types->lookup(participant, type); |
| 2693 | |
| 2694 | DDS::DataReader_var dr = type_support->create_datareader(); |
| 2695 | DataReaderImpl* dri = dynamic_cast<DataReaderImpl*>(dr.in()); |
| 2696 | if (dri == 0) { |
| 2697 | ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) PeerDiscovery::create_bit_dr") |
| 2698 | ACE_TEXT(" - Could not cast DataReader to DataReaderImpl\n"))); |
| 2699 | return; |
| 2700 | } |
| 2701 | |
| 2702 | dri->init(bit_topic_i, qos, 0 /*listener*/, 0 /*mask*/, participant_i, sub); |
| 2703 | dri->disable_transport(); |
| 2704 | dri->enable(); |
| 2705 | } |
| 2706 | |
| 2707 | void StaticParticipant::remove_discovered_participant(DiscoveredParticipantIter& iter) |
| 2708 | { |
nothing calls this directly
no test coverage detected