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

Method receive_image

dds/InfoRepo/DCPSInfo_i.cpp:2296–2458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2294}
2295
2296bool
2297TAO_DDS_DCPSInfo_i::receive_image(const Update::UImage& image)
2298{
2299 if (OpenDDS::DCPS::DCPS_debug_level > 0) {
2300 ACE_DEBUG((LM_DEBUG,
2301 ACE_TEXT("(%P|%t) TAO_DDS_DCPSInfo_i::receive_image: ")
2302 ACE_TEXT("processing persistent data.\n")));
2303 }
2304
2305 // Initialize builtin topics first so that they always have the same IDs
2306#ifndef DDS_HAS_MINIMUM_BIT
2307 if (TheServiceParticipant->get_BIT()) {
2308 for (Update::UImage::ParticipantSeq::const_iterator
2309 iter = image.participants.begin();
2310 iter != image.participants.end(); iter++) {
2311 const Update::UParticipant* part = *iter;
2312 if (!domain(part->domainId)) {
2313 if (OpenDDS::DCPS::DCPS_debug_level > 4) {
2314 ACE_DEBUG((LM_WARNING,
2315 ACE_TEXT("(%P|%t) WARNING: TAO_DDS_DCPSInfo_i::receive_image: ")
2316 ACE_TEXT("invalid domain Id: %d\n"),
2317 part->domainId));
2318 }
2319 return false;
2320 }
2321 }
2322 }
2323#endif
2324
2325 // Ensure that new non-BIT participants do not reuse an id
2326 participantIdGenerator_.last(image.lastPartId);
2327
2328 for (Update::UImage::ParticipantSeq::const_iterator
2329 iter = image.participants.begin();
2330 iter != image.participants.end(); iter++) {
2331 const Update::UParticipant* part = *iter;
2332
2333 if (!this->add_domain_participant(part->domainId, part->participantId
2334 , part->participantQos)) {
2335 OpenDDS::DCPS::RepoIdConverter converter(part->participantId);
2336 ACE_ERROR((LM_ERROR,
2337 ACE_TEXT("(%P|%t) ERROR: TAO_DDS_DCPSInfo_i::receive_image: ")
2338 ACE_TEXT("failed to add participant %C to domain %d.\n"),
2339 std::string(converter).c_str(),
2340 part->domainId));
2341 return false;
2342
2343 } else if (OpenDDS::DCPS::DCPS_debug_level > 0) {
2344 OpenDDS::DCPS::RepoIdConverter converter(part->participantId);
2345 ACE_DEBUG((LM_DEBUG,
2346 ACE_TEXT("(%P|%t) TAO_DDS_DCPSInfo_i::receive_image: ")
2347 ACE_TEXT("added participant %C to domain %d.\n"),
2348 std::string(converter).c_str(),
2349 part->domainId));
2350 }
2351 }
2352
2353 for (Update::UImage::TopicSeq::const_iterator iter = image.topics.begin();

Callers 1

pushImageMethod · 0.80

Calls 10

add_topicMethod · 0.95
add_subscriptionMethod · 0.95
add_publicationMethod · 0.95
domainFunction · 0.85
get_BITMethod · 0.80
lastMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected