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

Method pre_reader

dds/DCPS/StaticDiscovery.cpp:2332–2360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2330}
2331
2332void StaticDiscovery::pre_reader(DataReaderImpl* reader)
2333{
2334 const DDS::Subscriber_var sub = reader->get_subscriber();
2335 const DDS::DomainParticipant_var part = sub->get_participant();
2336 const DDS::DomainId_t dom = part->get_domain_id();
2337
2338 DDS::DomainParticipantQos partQos;
2339 part->get_qos(partQos);
2340 if (partQos.user_data.value.length() < 6)
2341 return;
2342 const unsigned char* const partId = partQos.user_data.value.get_buffer();
2343
2344 DDS::DataReaderQos qos;
2345 reader->get_qos(qos);
2346 if (qos.user_data.value.length() < 3)
2347 return;
2348 const unsigned char* const drId = qos.user_data.value.get_buffer();
2349
2350 const EntityId_t entId =
2351 EndpointRegistry::build_id(drId, ENTITYKIND_USER_READER_WITH_KEY);
2352 const GUID_t rid = EndpointRegistry::build_id(dom, partId, entId);
2353
2354 const EndpointRegistry::ReaderMapType::const_iterator iter =
2355 registry.reader_map.find(rid);
2356
2357 if (iter != registry.reader_map.end() && !iter->second.trans_cfg.empty()) {
2358 TransportRegistry::instance()->bind_config(iter->second.trans_cfg, reader);
2359 }
2360}
2361
2362StaticDiscovery_rch StaticDiscovery::instance_(make_rch<StaticDiscovery>(Discovery::DEFAULT_STATIC));
2363

Callers 1

enableMethod · 0.80

Calls 12

build_idFunction · 0.85
instanceFunction · 0.85
get_subscriberMethod · 0.45
get_participantMethod · 0.45
get_domain_idMethod · 0.45
get_qosMethod · 0.45
lengthMethod · 0.45
get_bufferMethod · 0.45
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
bind_configMethod · 0.45

Tested by

no test coverage detected