| 103 | } |
| 104 | |
| 105 | void StaticEndpointManager::init_bit() |
| 106 | { |
| 107 | // Discover all remote publications and subscriptions. |
| 108 | |
| 109 | for (EndpointRegistry::WriterMapType::const_iterator pos = registry_.writer_map.begin(), |
| 110 | limit = registry_.writer_map.end(); |
| 111 | pos != limit; |
| 112 | ++pos) { |
| 113 | const GUID_t& remoteid = pos->first; |
| 114 | const EndpointRegistry::Writer& writer = pos->second; |
| 115 | |
| 116 | if (!equal_guid_prefixes(participant_id_, remoteid)) { |
| 117 | const DDS::BuiltinTopicKey_t key = guid_to_bit_key(remoteid); |
| 118 | |
| 119 | // pos represents a remote. |
| 120 | // Populate data. |
| 121 | DDS::PublicationBuiltinTopicData data = DDS::PublicationBuiltinTopicData(); |
| 122 | |
| 123 | data.key = key; |
| 124 | OPENDDS_STRING topic_name = writer.topic_name; |
| 125 | data.topic_name = topic_name.c_str(); |
| 126 | |
| 127 | EndpointRegistry::TopicMapType::const_iterator iter = registry_.topic_map.find(topic_name); |
| 128 | if (iter == registry_.topic_map.end()) { |
| 129 | if (log_level >= LogLevel::Error) { |
| 130 | ACE_ERROR((LM_ERROR, |
| 131 | "(%P|%t) ERROR: StaticEndpointManager::init_bit: no topic named %C\n", |
| 132 | topic_name.c_str())); |
| 133 | } |
| 134 | continue; |
| 135 | } |
| 136 | |
| 137 | const EndpointRegistry::Topic& topic = iter->second; |
| 138 | data.type_name = topic.type_name.c_str(); |
| 139 | data.durability = writer.qos.durability; |
| 140 | data.durability_service = writer.qos.durability_service; |
| 141 | data.deadline = writer.qos.deadline; |
| 142 | data.latency_budget = writer.qos.latency_budget; |
| 143 | data.liveliness = writer.qos.liveliness; |
| 144 | data.reliability = writer.qos.reliability; |
| 145 | data.lifespan = writer.qos.lifespan; |
| 146 | data.user_data = writer.qos.user_data; |
| 147 | data.ownership = writer.qos.ownership; |
| 148 | data.ownership_strength = writer.qos.ownership_strength; |
| 149 | data.destination_order = writer.qos.destination_order; |
| 150 | data.presentation = writer.publisher_qos.presentation; |
| 151 | data.partition = writer.publisher_qos.partition; |
| 152 | // If the TopicQos becomes available, this can be populated. |
| 153 | //data.topic_data = topic_details.qos_.topic_data; |
| 154 | data.group_data = writer.publisher_qos.group_data; |
| 155 | data.representation = writer.qos.representation; |
| 156 | |
| 157 | #ifndef DDS_HAS_MINIMUM_BIT |
| 158 | OpenDDS::DCPS::PublicationBuiltinTopicDataDataReaderImpl* bit = pub_bit(); |
| 159 | if (bit) { // bit may be null if the DomainParticipant is shutting down |
| 160 | bit->store_synthetic_data(data, DDS::NEW_VIEW_STATE); |
| 161 | } |
| 162 | #endif /* DDS_HAS_MINIMUM_BIT */ |
nothing calls this directly
no test coverage detected