Functions | |
int | to_param_list (const SPDPdiscoveredParticipantData &participant_data, ParameterList ¶m_list) |
int | to_param_list (const OpenDDS::DCPS::DiscoveredWriterData &writer_data, ParameterList ¶m_list, bool map) |
int | to_param_list (const OpenDDS::DCPS::DiscoveredReaderData &reader_data, ParameterList ¶m_list, bool map) |
int | from_param_list (const ParameterList ¶m_list, SPDPdiscoveredParticipantData &participant_data) |
int | from_param_list (const ParameterList ¶m_list, OpenDDS::DCPS::DiscoveredWriterData &writer_data) |
int | from_param_list (const ParameterList ¶m_list, OpenDDS::DCPS::DiscoveredReaderData &reader_data) |
OpenDDS_Rtps_Export int OpenDDS::RTPS::ParameterListConverter::to_param_list | ( | const SPDPdiscoveredParticipantData & | participant_data, | |
ParameterList & | param_list | |||
) |
Definition at line 270 of file ParameterListConverter.cpp.
References OpenDDS::RTPS::add_param(), OpenDDS::RTPS::add_param_locator_seq(), OpenDDS::RTPS::ParticipantProxy_t::availableBuiltinEndpoints, OpenDDS::RTPS::Parameter::builtin_endpoints, OpenDDS::RTPS::Parameter::count, OpenDDS::RTPS::SPDPdiscoveredParticipantData::ddsParticipantData, OpenDDS::RTPS::ParticipantProxy_t::defaultMulticastLocatorList, OpenDDS::RTPS::ParticipantProxy_t::defaultUnicastLocatorList, OpenDDS::RTPS::Parameter::duration, OpenDDS::DCPS::GUID_t::entityId, OpenDDS::DCPS::ENTITYID_PARTICIPANT, OpenDDS::RTPS::Parameter::expects_inline_qos, OpenDDS::RTPS::ParticipantProxy_t::expectsInlineQos, OpenDDS::RTPS::Time_t::fraction, OpenDDS::RTPS::Parameter::guid, OpenDDS::RTPS::ParticipantProxy_t::guidPrefix, OpenDDS::DCPS::GUID_t::guidPrefix, OpenDDS::RTPS::SPDPdiscoveredParticipantData::leaseDuration, OpenDDS::RTPS::ParticipantProxy_t::manualLivelinessCount, OpenDDS::RTPS::ParticipantProxy_t::metatrafficMulticastLocatorList, OpenDDS::RTPS::ParticipantProxy_t::metatrafficUnicastLocatorList, OpenDDS::RTPS::not_default(), OpenDDS::RTPS::Parameter::participant_builtin_endpoints, OpenDDS::RTPS::SPDPdiscoveredParticipantData::participantProxy, OpenDDS::RTPS::PID_DEFAULT_MULTICAST_LOCATOR, OpenDDS::RTPS::PID_DEFAULT_UNICAST_LOCATOR, OpenDDS::RTPS::PID_METATRAFFIC_MULTICAST_LOCATOR, OpenDDS::RTPS::PID_METATRAFFIC_UNICAST_LOCATOR, OpenDDS::RTPS::PID_PARTICIPANT_GUID, OpenDDS::RTPS::ParticipantProxy_t::protocolVersion, OpenDDS::RTPS::Time_t::seconds, OpenDDS::RTPS::Parameter::user_data, DDS::ParticipantBuiltinTopicData::user_data, OpenDDS::RTPS::Parameter::vendor, OpenDDS::RTPS::ParticipantProxy_t::vendorId, and OpenDDS::RTPS::Parameter::version.
Referenced by OpenDDS::RTPS::Spdp::SpdpTransport::write_i().
00272 { 00273 // Parameterize ParticipantBuiltinTopicData 00274 // Ignore participant builtin topic key 00275 00276 if (not_default(participant_data.ddsParticipantData.user_data)) 00277 { 00278 Parameter ud_param; 00279 ud_param.user_data(participant_data.ddsParticipantData.user_data); 00280 add_param(param_list, ud_param); 00281 } 00282 00283 // Parameterize ParticipantProxy_t 00284 Parameter pv_param; 00285 pv_param.version(participant_data.participantProxy.protocolVersion); 00286 add_param(param_list, pv_param); 00287 00288 // For guid prefix, copy into guid, and force some values 00289 Parameter gp_param; 00290 GUID_t guid; 00291 ACE_OS::memcpy(guid.guidPrefix, 00292 participant_data.participantProxy.guidPrefix, 00293 sizeof(guid.guidPrefix)); 00294 guid.entityId = OpenDDS::DCPS::ENTITYID_PARTICIPANT; 00295 00296 gp_param.guid(guid); 00297 gp_param._d(PID_PARTICIPANT_GUID); 00298 add_param(param_list, gp_param); 00299 00300 Parameter vid_param; 00301 vid_param.vendor(participant_data.participantProxy.vendorId); 00302 add_param(param_list, vid_param); 00303 00304 if (participant_data.participantProxy.expectsInlineQos != false) 00305 { 00306 Parameter eiq_param; // Default is false 00307 eiq_param.expects_inline_qos( 00308 participant_data.participantProxy.expectsInlineQos); 00309 add_param(param_list, eiq_param); 00310 } 00311 00312 Parameter abe_param; 00313 abe_param.participant_builtin_endpoints( 00314 participant_data.participantProxy.availableBuiltinEndpoints); 00315 add_param(param_list, abe_param); 00316 00317 // Interoperability note: 00318 // For interoperability with other DDS implemenations, we'll encode the 00319 // availableBuiltinEndpoints as PID_BUILTIN_ENDPOINT_SET in addition to 00320 // PID_PARTICIPANT_BUILTIN_ENDPOINTS (above). 00321 Parameter be_param; 00322 be_param.builtin_endpoints( 00323 participant_data.participantProxy.availableBuiltinEndpoints); 00324 add_param(param_list, be_param); 00325 00326 // Each locator 00327 add_param_locator_seq( 00328 param_list, 00329 participant_data.participantProxy.metatrafficUnicastLocatorList, 00330 PID_METATRAFFIC_UNICAST_LOCATOR); 00331 00332 add_param_locator_seq( 00333 param_list, 00334 participant_data.participantProxy.metatrafficMulticastLocatorList, 00335 PID_METATRAFFIC_MULTICAST_LOCATOR); 00336 00337 add_param_locator_seq( 00338 param_list, 00339 participant_data.participantProxy.defaultUnicastLocatorList, 00340 PID_DEFAULT_UNICAST_LOCATOR); 00341 00342 add_param_locator_seq( 00343 param_list, 00344 participant_data.participantProxy.defaultMulticastLocatorList, 00345 PID_DEFAULT_MULTICAST_LOCATOR); 00346 00347 Parameter ml_param; 00348 ml_param.count(participant_data.participantProxy.manualLivelinessCount); 00349 add_param(param_list, ml_param); 00350 00351 if ((participant_data.leaseDuration.seconds != 100) || 00352 (participant_data.leaseDuration.fraction != 0)) 00353 { 00354 Parameter ld_param; 00355 ld_param.duration(participant_data.leaseDuration); 00356 add_param(param_list, ld_param); 00357 } 00358 00359 return 0; 00360 }
OpenDDS_Rtps_Export int OpenDDS::RTPS::ParameterListConverter::to_param_list | ( | const OpenDDS::DCPS::DiscoveredWriterData & | writer_data, | |
ParameterList & | param_list, | |||
bool | map = false | |||
) |
Definition at line 362 of file ParameterListConverter.cpp.
References OpenDDS::RTPS::add_param(), OpenDDS::RTPS::add_param_dcps_locator(), OpenDDS::RTPS::add_param_rtps_locator(), OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, OpenDDS::RTPS::Parameter::deadline, DDS::PublicationBuiltinTopicData::deadline, OpenDDS::RTPS::Parameter::destination_order, DDS::PublicationBuiltinTopicData::destination_order, OpenDDS::RTPS::Parameter::durability, DDS::PublicationBuiltinTopicData::durability, OpenDDS::RTPS::Parameter::durability_service, DDS::PublicationBuiltinTopicData::durability_service, OpenDDS::RTPS::Parameter::group_data, DDS::PublicationBuiltinTopicData::group_data, OpenDDS::RTPS::Parameter::guid, DDS::ReliabilityQosPolicy::kind, OpenDDS::RTPS::Parameter::latency_budget, DDS::PublicationBuiltinTopicData::latency_budget, OpenDDS::RTPS::Parameter::lifespan, DDS::PublicationBuiltinTopicData::lifespan, OpenDDS::RTPS::Parameter::liveliness, DDS::PublicationBuiltinTopicData::liveliness, OpenDDS::RTPS::not_default(), OpenDDS::RTPS::Parameter::ownership, DDS::PublicationBuiltinTopicData::ownership, OpenDDS::RTPS::Parameter::ownership_strength, DDS::PublicationBuiltinTopicData::ownership_strength, OpenDDS::RTPS::Parameter::partition, DDS::PublicationBuiltinTopicData::partition, OpenDDS::RTPS::PID_ENDPOINT_GUID, OpenDDS::RTPS::PID_TOPIC_NAME, OpenDDS::RTPS::PID_TYPE_NAME, OpenDDS::RTPS::Parameter::presentation, DDS::PublicationBuiltinTopicData::presentation, OpenDDS::RTPS::Parameter::reliability, DDS::PublicationBuiltinTopicData::reliability, OpenDDS::RTPS::Parameter::string_data, OpenDDS::RTPS::Parameter::topic_data, DDS::PublicationBuiltinTopicData::topic_data, DDS::PublicationBuiltinTopicData::topic_name, DDS::PublicationBuiltinTopicData::type_name, OpenDDS::RTPS::Parameter::user_data, DDS::PublicationBuiltinTopicData::user_data, and OpenDDS::DCPS::DiscoveredWriterData::writerProxy.
00365 { 00366 // Ignore builtin topic key 00367 00368 { 00369 Parameter param; 00370 param.string_data(writer_data.ddsPublicationData.topic_name); 00371 param._d(PID_TOPIC_NAME); 00372 add_param(param_list, param); 00373 } 00374 { 00375 Parameter param; 00376 param.string_data(writer_data.ddsPublicationData.type_name); 00377 param._d(PID_TYPE_NAME); 00378 add_param(param_list, param); 00379 } 00380 00381 if (not_default(writer_data.ddsPublicationData.durability)) 00382 { 00383 Parameter param; 00384 param.durability(writer_data.ddsPublicationData.durability); 00385 add_param(param_list, param); 00386 } 00387 00388 if (not_default(writer_data.ddsPublicationData.durability_service)) 00389 { 00390 Parameter param; 00391 param.durability_service(writer_data.ddsPublicationData.durability_service); 00392 add_param(param_list, param); 00393 } 00394 00395 if (not_default(writer_data.ddsPublicationData.deadline)) 00396 { 00397 Parameter param; 00398 param.deadline(writer_data.ddsPublicationData.deadline); 00399 add_param(param_list, param); 00400 } 00401 00402 if (not_default(writer_data.ddsPublicationData.latency_budget)) 00403 { 00404 Parameter param; 00405 param.latency_budget(writer_data.ddsPublicationData.latency_budget); 00406 add_param(param_list, param); 00407 } 00408 00409 if (not_default(writer_data.ddsPublicationData.liveliness)) 00410 { 00411 Parameter param; 00412 param.liveliness(writer_data.ddsPublicationData.liveliness); 00413 add_param(param_list, param); 00414 } 00415 00416 // Interoperability note: 00417 // For interoperability, always write the reliability info 00418 { 00419 Parameter param; 00420 // Interoperability note: 00421 // Spec creators for RTPS have reliability indexed at 1 00422 DDS::ReliabilityQosPolicy reliability_copy = 00423 writer_data.ddsPublicationData.reliability; 00424 reliability_copy.kind = 00425 (DDS::ReliabilityQosPolicyKind)((int)reliability_copy.kind + 1); 00426 param.reliability(reliability_copy); 00427 add_param(param_list, param); 00428 } 00429 00430 if (not_default(writer_data.ddsPublicationData.lifespan)) 00431 { 00432 Parameter param; 00433 param.lifespan(writer_data.ddsPublicationData.lifespan); 00434 add_param(param_list, param); 00435 } 00436 00437 if (not_default(writer_data.ddsPublicationData.user_data)) 00438 { 00439 Parameter param; 00440 param.user_data(writer_data.ddsPublicationData.user_data); 00441 add_param(param_list, param); 00442 } 00443 00444 if (not_default(writer_data.ddsPublicationData.ownership)) 00445 { 00446 Parameter param; 00447 param.ownership(writer_data.ddsPublicationData.ownership); 00448 add_param(param_list, param); 00449 } 00450 00451 if (not_default(writer_data.ddsPublicationData.ownership_strength)) 00452 { 00453 Parameter param; 00454 param.ownership_strength(writer_data.ddsPublicationData.ownership_strength); 00455 add_param(param_list, param); 00456 } 00457 00458 if (not_default(writer_data.ddsPublicationData.destination_order)) 00459 { 00460 Parameter param; 00461 param.destination_order(writer_data.ddsPublicationData.destination_order); 00462 add_param(param_list, param); 00463 } 00464 00465 if (not_default(writer_data.ddsPublicationData.presentation)) 00466 { 00467 Parameter param; 00468 param.presentation(writer_data.ddsPublicationData.presentation); 00469 add_param(param_list, param); 00470 } 00471 00472 if (not_default(writer_data.ddsPublicationData.partition)) 00473 { 00474 Parameter param; 00475 param.partition(writer_data.ddsPublicationData.partition); 00476 add_param(param_list, param); 00477 } 00478 00479 if (not_default(writer_data.ddsPublicationData.topic_data)) 00480 { 00481 Parameter param; 00482 param.topic_data(writer_data.ddsPublicationData.topic_data); 00483 add_param(param_list, param); 00484 } 00485 00486 if (not_default(writer_data.ddsPublicationData.group_data)) 00487 { 00488 Parameter param; 00489 param.group_data(writer_data.ddsPublicationData.group_data); 00490 add_param(param_list, param); 00491 } 00492 00493 { 00494 Parameter param; 00495 param.guid(writer_data.writerProxy.remoteWriterGuid); 00496 param._d(PID_ENDPOINT_GUID); 00497 add_param(param_list, param); 00498 } 00499 CORBA::ULong locator_len = writer_data.writerProxy.allLocators.length(); 00500 00501 // Serialize from allLocators, rather than the unicastLocatorList 00502 // and multicastLocatorList. This allows OpenDDS transports to be 00503 // serialized in the proper order using custom PIDs. 00504 for (CORBA::ULong i = 0; i < locator_len; ++i) { 00505 // Each locator has a blob of interest 00506 const DCPS::TransportLocator& tl = writer_data.writerProxy.allLocators[i]; 00507 // If this is an rtps udp transport 00508 if (!std::strcmp(tl.transport_type, "rtps_udp")) { 00509 // Append the locator's deserialized locator and an RTPS PID 00510 add_param_rtps_locator(param_list, tl, map); 00511 // Otherwise, this is an OpenDDS, custom transport 00512 } else { 00513 // Append the blob and a custom PID 00514 add_param_dcps_locator(param_list, tl); 00515 if (!std::strcmp(tl.transport_type, "multicast")) { 00516 ACE_DEBUG((LM_WARNING, 00517 ACE_TEXT("(%P|%t) to_param_list(dwd) - ") 00518 ACE_TEXT("Multicast transport with RTPS ") 00519 ACE_TEXT("discovery has known issues"))); 00520 } 00521 } 00522 } 00523 00524 return 0; 00525 }
OpenDDS_Rtps_Export int OpenDDS::RTPS::ParameterListConverter::to_param_list | ( | const OpenDDS::DCPS::DiscoveredReaderData & | reader_data, | |
ParameterList & | param_list, | |||
bool | map = false | |||
) |
Definition at line 527 of file ParameterListConverter.cpp.
References OpenDDS::RTPS::add_param(), OpenDDS::RTPS::add_param_dcps_locator(), OpenDDS::RTPS::add_param_rtps_locator(), OpenDDS::RTPS::Parameter::content_filter_property, OpenDDS::DCPS::DiscoveredReaderData::contentFilterProperty, OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, OpenDDS::RTPS::Parameter::deadline, DDS::SubscriptionBuiltinTopicData::deadline, OpenDDS::RTPS::Parameter::destination_order, DDS::SubscriptionBuiltinTopicData::destination_order, OpenDDS::RTPS::Parameter::durability, DDS::SubscriptionBuiltinTopicData::durability, OpenDDS::DCPS::ContentFilterProperty_t::filterClassName, OpenDDS::RTPS::Parameter::group_data, DDS::SubscriptionBuiltinTopicData::group_data, OpenDDS::RTPS::Parameter::guid, DDS::ReliabilityQosPolicy::kind, OpenDDS::RTPS::Parameter::latency_budget, DDS::SubscriptionBuiltinTopicData::latency_budget, OpenDDS::RTPS::Parameter::liveliness, DDS::SubscriptionBuiltinTopicData::liveliness, OpenDDS::RTPS::not_default(), OpenDDS::RTPS::Parameter::ownership, DDS::SubscriptionBuiltinTopicData::ownership, OpenDDS::RTPS::Parameter::partition, DDS::SubscriptionBuiltinTopicData::partition, OpenDDS::RTPS::PID_ENDPOINT_GUID, OpenDDS::RTPS::PID_TOPIC_NAME, OpenDDS::RTPS::PID_TYPE_NAME, OpenDDS::RTPS::Parameter::presentation, DDS::SubscriptionBuiltinTopicData::presentation, OpenDDS::DCPS::DiscoveredReaderData::readerProxy, OpenDDS::RTPS::Parameter::reliability, DDS::SubscriptionBuiltinTopicData::reliability, OpenDDS::RTPS::Parameter::string_data, OpenDDS::RTPS::Parameter::time_based_filter, DDS::SubscriptionBuiltinTopicData::time_based_filter, OpenDDS::RTPS::Parameter::topic_data, DDS::SubscriptionBuiltinTopicData::topic_data, DDS::SubscriptionBuiltinTopicData::topic_name, DDS::SubscriptionBuiltinTopicData::type_name, OpenDDS::RTPS::Parameter::user_data, and DDS::SubscriptionBuiltinTopicData::user_data.
00530 { 00531 // Ignore builtin topic key 00532 { 00533 Parameter param; 00534 param.string_data(reader_data.ddsSubscriptionData.topic_name); 00535 param._d(PID_TOPIC_NAME); 00536 add_param(param_list, param); 00537 } 00538 { 00539 Parameter param; 00540 param.string_data(reader_data.ddsSubscriptionData.type_name); 00541 param._d(PID_TYPE_NAME); 00542 add_param(param_list, param); 00543 } 00544 00545 if (not_default(reader_data.ddsSubscriptionData.durability)) 00546 { 00547 Parameter param; 00548 param.durability(reader_data.ddsSubscriptionData.durability); 00549 add_param(param_list, param); 00550 } 00551 00552 if (not_default(reader_data.ddsSubscriptionData.deadline)) 00553 { 00554 Parameter param; 00555 param.deadline(reader_data.ddsSubscriptionData.deadline); 00556 add_param(param_list, param); 00557 } 00558 00559 if (not_default(reader_data.ddsSubscriptionData.latency_budget)) 00560 { 00561 Parameter param; 00562 param.latency_budget(reader_data.ddsSubscriptionData.latency_budget); 00563 add_param(param_list, param); 00564 } 00565 00566 if (not_default(reader_data.ddsSubscriptionData.liveliness)) 00567 { 00568 Parameter param; 00569 param.liveliness(reader_data.ddsSubscriptionData.liveliness); 00570 add_param(param_list, param); 00571 } 00572 00573 // Interoperability note: 00574 // For interoperability, always write the reliability info 00575 // if (not_default(reader_data.ddsSubscriptionData.reliability, false)) 00576 { 00577 Parameter param; 00578 // Interoperability note: 00579 // Spec creators for RTPS have reliability indexed at 1 00580 DDS::ReliabilityQosPolicy reliability_copy = 00581 reader_data.ddsSubscriptionData.reliability; 00582 reliability_copy.kind = 00583 (DDS::ReliabilityQosPolicyKind)((int)reliability_copy.kind + 1); 00584 param.reliability(reliability_copy); 00585 add_param(param_list, param); 00586 } 00587 00588 if (not_default(reader_data.ddsSubscriptionData.user_data)) 00589 { 00590 Parameter param; 00591 param.user_data(reader_data.ddsSubscriptionData.user_data); 00592 add_param(param_list, param); 00593 } 00594 00595 if (not_default(reader_data.ddsSubscriptionData.ownership)) 00596 { 00597 Parameter param; 00598 param.ownership(reader_data.ddsSubscriptionData.ownership); 00599 add_param(param_list, param); 00600 } 00601 00602 if (not_default(reader_data.ddsSubscriptionData.destination_order)) 00603 { 00604 Parameter param; 00605 param.destination_order(reader_data.ddsSubscriptionData.destination_order); 00606 add_param(param_list, param); 00607 } 00608 00609 if (not_default(reader_data.ddsSubscriptionData.time_based_filter)) 00610 { 00611 Parameter param; 00612 param.time_based_filter(reader_data.ddsSubscriptionData.time_based_filter); 00613 add_param(param_list, param); 00614 } 00615 00616 if (not_default(reader_data.ddsSubscriptionData.presentation)) 00617 { 00618 Parameter param; 00619 param.presentation(reader_data.ddsSubscriptionData.presentation); 00620 add_param(param_list, param); 00621 } 00622 00623 if (not_default(reader_data.ddsSubscriptionData.partition)) 00624 { 00625 Parameter param; 00626 param.partition(reader_data.ddsSubscriptionData.partition); 00627 add_param(param_list, param); 00628 } 00629 00630 if (not_default(reader_data.ddsSubscriptionData.topic_data)) 00631 { 00632 Parameter param; 00633 param.topic_data(reader_data.ddsSubscriptionData.topic_data); 00634 add_param(param_list, param); 00635 } 00636 00637 if (not_default(reader_data.ddsSubscriptionData.group_data)) 00638 { 00639 Parameter param; 00640 param.group_data(reader_data.ddsSubscriptionData.group_data); 00641 add_param(param_list, param); 00642 } 00643 00644 { 00645 Parameter param; 00646 param.guid(reader_data.readerProxy.remoteReaderGuid); 00647 param._d(PID_ENDPOINT_GUID); 00648 add_param(param_list, param); 00649 } 00650 00651 if (not_default(reader_data.contentFilterProperty)) 00652 { 00653 Parameter param; 00654 OpenDDS::DCPS::ContentFilterProperty_t cfprop_copy = reader_data.contentFilterProperty; 00655 if (!std::strlen(cfprop_copy.filterClassName)) { 00656 cfprop_copy.filterClassName = "DDSSQL"; 00657 } 00658 param.content_filter_property(cfprop_copy); 00659 add_param(param_list, param); 00660 } 00661 00662 CORBA::ULong i; 00663 CORBA::ULong locator_len = reader_data.readerProxy.allLocators.length(); 00664 // Serialize from allLocators, rather than the unicastLocatorList 00665 // and multicastLocatorList. This allows OpenDDS transports to be 00666 // serialized in the proper order using custom PIDs. 00667 for (i = 0; i < locator_len; ++i) { 00668 // Each locator has a blob of interest 00669 const DCPS::TransportLocator& tl = reader_data.readerProxy.allLocators[i]; 00670 // If this is an rtps udp transport 00671 if (!std::strcmp(tl.transport_type, "rtps_udp")) { 00672 // Append the locator's deserialized locator and an RTPS PID 00673 add_param_rtps_locator(param_list, tl, map); 00674 // Otherwise, this is an OpenDDS, custom transport 00675 } else { 00676 // Append the blob and a custom PID 00677 add_param_dcps_locator(param_list, tl); 00678 if (!std::strcmp(tl.transport_type, "multicast")) { 00679 ACE_DEBUG((LM_WARNING, 00680 ACE_TEXT("(%P|%t) to_param_list(drd) - ") 00681 ACE_TEXT("Multicast transport with RTPS ") 00682 ACE_TEXT("discovery has known issues"))); 00683 } 00684 } 00685 } 00686 00687 CORBA::ULong num_associations = 00688 reader_data.readerProxy.associatedWriters.length(); 00689 for (i = 0; i < num_associations; ++i) { 00690 Parameter param; 00691 param.guid(reader_data.readerProxy.associatedWriters[i]); 00692 param._d(PID_OPENDDS_ASSOCIATED_WRITER); 00693 add_param(param_list, param); 00694 } 00695 return 0; 00696 }
OpenDDS_Rtps_Export int OpenDDS::RTPS::ParameterListConverter::from_param_list | ( | const ParameterList & | param_list, | |
SPDPdiscoveredParticipantData & | participant_data | |||
) |
Definition at line 698 of file ParameterListConverter.cpp.
References OpenDDS::RTPS::append_locator(), OpenDDS::RTPS::ParticipantProxy_t::availableBuiltinEndpoints, OpenDDS::RTPS::SPDPdiscoveredParticipantData::ddsParticipantData, OpenDDS::RTPS::ParticipantProxy_t::defaultMulticastLocatorList, OpenDDS::RTPS::ParticipantProxy_t::defaultUnicastLocatorList, OpenDDS::RTPS::ParticipantProxy_t::expectsInlineQos, OpenDDS::RTPS::Time_t::fraction, OpenDDS::RTPS::ParticipantProxy_t::guidPrefix, OpenDDS::RTPS::SPDPdiscoveredParticipantData::leaseDuration, OpenDDS::RTPS::locator_undefined, OpenDDS::RTPS::ParticipantProxy_t::manualLivelinessCount, OpenDDS::RTPS::ParticipantProxy_t::metatrafficMulticastLocatorList, OpenDDS::RTPS::ParticipantProxy_t::metatrafficUnicastLocatorList, OpenDDS::RTPS::SPDPdiscoveredParticipantData::participantProxy, OpenDDS::RTPS::PID_BUILTIN_ENDPOINT_SET, OpenDDS::RTPS::PID_DEFAULT_MULTICAST_LOCATOR, OpenDDS::RTPS::PID_DEFAULT_UNICAST_IPADDRESS, OpenDDS::RTPS::PID_DEFAULT_UNICAST_LOCATOR, OpenDDS::RTPS::PID_DEFAULT_UNICAST_PORT, OpenDDS::RTPS::PID_EXPECTS_INLINE_QOS, OpenDDS::RTPS::PID_METATRAFFIC_MULTICAST_IPADDRESS, OpenDDS::RTPS::PID_METATRAFFIC_MULTICAST_LOCATOR, OpenDDS::RTPS::PID_METATRAFFIC_MULTICAST_PORT, OpenDDS::RTPS::PID_METATRAFFIC_UNICAST_IPADDRESS, OpenDDS::RTPS::PID_METATRAFFIC_UNICAST_LOCATOR, OpenDDS::RTPS::PID_METATRAFFIC_UNICAST_PORT, OpenDDS::RTPS::PID_PAD, OpenDDS::RTPS::PID_PARTICIPANT_BUILTIN_ENDPOINTS, OpenDDS::RTPS::PID_PARTICIPANT_GUID, OpenDDS::RTPS::PID_PARTICIPANT_LEASE_DURATION, OpenDDS::RTPS::PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT, OpenDDS::RTPS::PID_PROTOCOL_VERSION, OpenDDS::RTPS::PID_SENTINEL, OpenDDS::RTPS::PID_USER_DATA, OpenDDS::RTPS::PID_VENDORID, OpenDDS::RTPS::PIDMASK_INCOMPATIBLE, OpenDDS::RTPS::ParticipantProxy_t::protocolVersion, OpenDDS::RTPS::Time_t::seconds, OpenDDS::RTPS::set_ipaddress(), OpenDDS::RTPS::set_port(), DDS::ParticipantBuiltinTopicData::user_data, OpenDDS::RTPS::Count_t::value, OpenDDS::RTPS::VendorId_t::vendorId, and OpenDDS::RTPS::ParticipantProxy_t::vendorId.
Referenced by OpenDDS::RTPS::Spdp::data_received(), and OpenDDS::RTPS::Sedp::Reader::data_received().
00700 { 00701 // Track the state of our locators 00702 LocatorState du_last_state = locator_undefined; 00703 LocatorState mu_last_state = locator_undefined; 00704 LocatorState mm_last_state = locator_undefined; 00705 00706 // Start by setting defaults 00707 participant_data.ddsParticipantData.user_data.value.length(0); 00708 participant_data.participantProxy.availableBuiltinEndpoints = 0; 00709 participant_data.participantProxy.expectsInlineQos = false; 00710 participant_data.leaseDuration.seconds = 100; 00711 participant_data.leaseDuration.fraction = 0; 00712 00713 CORBA::ULong length = param_list.length(); 00714 for (CORBA::ULong i = 0; i < length; ++i) { 00715 const Parameter& param = param_list[i]; 00716 switch (param._d()) { 00717 case PID_USER_DATA: 00718 participant_data.ddsParticipantData.user_data = param.user_data(); 00719 break; 00720 case PID_PROTOCOL_VERSION: 00721 participant_data.participantProxy.protocolVersion = param.version(); 00722 break; 00723 case PID_PARTICIPANT_GUID: 00724 ACE_OS::memcpy(participant_data.participantProxy.guidPrefix, 00725 param.guid().guidPrefix, sizeof(GuidPrefix_t)); 00726 break; 00727 case PID_VENDORID: 00728 ACE_OS::memcpy(participant_data.participantProxy.vendorId.vendorId, 00729 param.vendor().vendorId, sizeof(OctetArray2)); 00730 break; 00731 case PID_EXPECTS_INLINE_QOS: 00732 participant_data.participantProxy.expectsInlineQos = 00733 param.expects_inline_qos(); 00734 break; 00735 case PID_PARTICIPANT_BUILTIN_ENDPOINTS: 00736 participant_data.participantProxy.availableBuiltinEndpoints = 00737 param.participant_builtin_endpoints(); 00738 break; 00739 case PID_BUILTIN_ENDPOINT_SET: 00740 // Interoperability note: 00741 // OpenSplice uses this in place of PID_PARTICIPANT_BUILTIN_ENDPOINTS 00742 // Table 9.13 indicates that PID_PARTICIPANT_BUILTIN_ENDPOINTS should be 00743 // used to represent ParticipantProxy::availableBuiltinEndpoints 00744 participant_data.participantProxy.availableBuiltinEndpoints = 00745 param.builtin_endpoints(); 00746 break; 00747 case PID_METATRAFFIC_UNICAST_LOCATOR: 00748 append_locator( 00749 participant_data.participantProxy.metatrafficUnicastLocatorList, 00750 param.locator()); 00751 break; 00752 case PID_METATRAFFIC_MULTICAST_LOCATOR: 00753 append_locator( 00754 participant_data.participantProxy.metatrafficMulticastLocatorList, 00755 param.locator()); 00756 break; 00757 case PID_DEFAULT_UNICAST_LOCATOR: 00758 append_locator( 00759 participant_data.participantProxy.defaultUnicastLocatorList, 00760 param.locator()); 00761 break; 00762 case PID_DEFAULT_MULTICAST_LOCATOR: 00763 append_locator( 00764 participant_data.participantProxy.defaultMulticastLocatorList, 00765 param.locator()); 00766 break; 00767 case PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT: 00768 participant_data.participantProxy.manualLivelinessCount.value = 00769 param.count().value; 00770 break; 00771 case PID_PARTICIPANT_LEASE_DURATION: 00772 participant_data.leaseDuration = param.duration(); 00773 break; 00774 case PID_DEFAULT_UNICAST_IPADDRESS: 00775 set_ipaddress( 00776 participant_data.participantProxy.defaultUnicastLocatorList, 00777 du_last_state, 00778 param.ipv4_address()); 00779 break; 00780 case PID_METATRAFFIC_UNICAST_IPADDRESS: 00781 set_ipaddress( 00782 participant_data.participantProxy.metatrafficUnicastLocatorList, 00783 mu_last_state, 00784 param.ipv4_address()); 00785 break; 00786 case PID_METATRAFFIC_MULTICAST_IPADDRESS: 00787 set_ipaddress( 00788 participant_data.participantProxy.metatrafficMulticastLocatorList, 00789 mm_last_state, 00790 param.ipv4_address()); 00791 break; 00792 case PID_DEFAULT_UNICAST_PORT: 00793 set_port(participant_data.participantProxy.defaultUnicastLocatorList, 00794 du_last_state, 00795 param.udpv4_port()); 00796 break; 00797 case PID_METATRAFFIC_UNICAST_PORT: 00798 set_port(participant_data.participantProxy.metatrafficUnicastLocatorList, 00799 mu_last_state, 00800 param.udpv4_port()); 00801 break; 00802 case PID_METATRAFFIC_MULTICAST_PORT: 00803 set_port(participant_data.participantProxy.metatrafficMulticastLocatorList, 00804 mm_last_state, 00805 param.udpv4_port()); 00806 break; 00807 case PID_SENTINEL: 00808 case PID_PAD: 00809 // ignore 00810 break; 00811 default: 00812 if (param._d() & PIDMASK_INCOMPATIBLE) { 00813 return -1; 00814 } 00815 } 00816 } 00817 return 0; 00818 }
OpenDDS_Rtps_Export int OpenDDS::RTPS::ParameterListConverter::from_param_list | ( | const ParameterList & | param_list, | |
OpenDDS::DCPS::DiscoveredWriterData & | writer_data | |||
) |
Definition at line 820 of file ParameterListConverter.cpp.
References OpenDDS::RTPS::append_locator(), OpenDDS::RTPS::append_locators_if_present(), OpenDDS::DCPS::DiscoveredWriterData::ddsPublicationData, DDS::PublicationBuiltinTopicData::deadline, DDS::PublicationBuiltinTopicData::destination_order, DDS::PublicationBuiltinTopicData::durability, DDS::PublicationBuiltinTopicData::durability_service, DDS::PublicationBuiltinTopicData::group_data, DDS::PublicationBuiltinTopicData::latency_budget, DDS::PublicationBuiltinTopicData::lifespan, DDS::PublicationBuiltinTopicData::liveliness, OpenDDS::RTPS::locator_undefined, OpenDDS::RTPS::normalize(), DDS::PublicationBuiltinTopicData::ownership, DDS::PublicationBuiltinTopicData::ownership_strength, DDS::PublicationBuiltinTopicData::partition, OpenDDS::RTPS::PID_DEADLINE, OpenDDS::RTPS::PID_DESTINATION_ORDER, OpenDDS::RTPS::PID_DURABILITY, OpenDDS::RTPS::PID_DURABILITY_SERVICE, OpenDDS::RTPS::PID_ENDPOINT_GUID, OpenDDS::RTPS::PID_GROUP_DATA, OpenDDS::RTPS::PID_LATENCY_BUDGET, OpenDDS::RTPS::PID_LIFESPAN, OpenDDS::RTPS::PID_LIVELINESS, OpenDDS::RTPS::PID_MULTICAST_IPADDRESS, OpenDDS::RTPS::PID_MULTICAST_LOCATOR, OpenDDS::RTPS::PID_OPENDDS_LOCATOR, OpenDDS::RTPS::PID_OWNERSHIP, OpenDDS::RTPS::PID_OWNERSHIP_STRENGTH, OpenDDS::RTPS::PID_PAD, OpenDDS::RTPS::PID_PARTITION, OpenDDS::RTPS::PID_PRESENTATION, OpenDDS::RTPS::PID_RELIABILITY, OpenDDS::RTPS::PID_SENTINEL, OpenDDS::RTPS::PID_TOPIC_DATA, OpenDDS::RTPS::PID_TOPIC_NAME, OpenDDS::RTPS::PID_TYPE_NAME, OpenDDS::RTPS::PID_UNICAST_LOCATOR, OpenDDS::RTPS::PID_USER_DATA, OpenDDS::RTPS::PIDMASK_INCOMPATIBLE, DDS::PublicationBuiltinTopicData::presentation, DDS::PublicationBuiltinTopicData::reliability, OpenDDS::RTPS::set_ipaddress(), TheServiceParticipant, DDS::PublicationBuiltinTopicData::topic_data, DDS::PublicationBuiltinTopicData::topic_name, DDS::PublicationBuiltinTopicData::type_name, DDS::PublicationBuiltinTopicData::user_data, and OpenDDS::DCPS::DiscoveredWriterData::writerProxy.
00822 { 00823 LocatorState last_state = locator_undefined; // Track state of locator 00824 // Collect the rtps_udp locators before appending them to allLocators 00825 OpenDDS::DCPS::LocatorSeq rtps_udp_locators; 00826 00827 // Start by setting defaults 00828 writer_data.ddsPublicationData.topic_name = ""; 00829 writer_data.ddsPublicationData.type_name = ""; 00830 writer_data.ddsPublicationData.durability = 00831 TheServiceParticipant->initial_DurabilityQosPolicy(); 00832 writer_data.ddsPublicationData.durability_service = 00833 TheServiceParticipant->initial_DurabilityServiceQosPolicy(); 00834 writer_data.ddsPublicationData.deadline = 00835 TheServiceParticipant->initial_DeadlineQosPolicy(); 00836 writer_data.ddsPublicationData.latency_budget = 00837 TheServiceParticipant->initial_LatencyBudgetQosPolicy(); 00838 writer_data.ddsPublicationData.liveliness = 00839 TheServiceParticipant->initial_LivelinessQosPolicy(); 00840 writer_data.ddsPublicationData.reliability = 00841 TheServiceParticipant->initial_DataWriterQos().reliability; 00842 writer_data.ddsPublicationData.lifespan = 00843 TheServiceParticipant->initial_LifespanQosPolicy(); 00844 writer_data.ddsPublicationData.user_data = 00845 TheServiceParticipant->initial_UserDataQosPolicy(); 00846 writer_data.ddsPublicationData.ownership = 00847 TheServiceParticipant->initial_OwnershipQosPolicy(); 00848 #ifdef OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE 00849 writer_data.ddsPublicationData.ownership_strength.value = 0; 00850 #else 00851 writer_data.ddsPublicationData.ownership_strength = 00852 TheServiceParticipant->initial_OwnershipStrengthQosPolicy(); 00853 #endif 00854 writer_data.ddsPublicationData.destination_order = 00855 TheServiceParticipant->initial_DestinationOrderQosPolicy(); 00856 writer_data.ddsPublicationData.presentation = 00857 TheServiceParticipant->initial_PresentationQosPolicy(); 00858 writer_data.ddsPublicationData.partition = 00859 TheServiceParticipant->initial_PartitionQosPolicy(); 00860 writer_data.ddsPublicationData.topic_data = 00861 TheServiceParticipant->initial_TopicDataQosPolicy(); 00862 writer_data.ddsPublicationData.group_data = 00863 TheServiceParticipant->initial_GroupDataQosPolicy(); 00864 writer_data.writerProxy.unicastLocatorList.length(0); 00865 writer_data.writerProxy.multicastLocatorList.length(0); 00866 00867 CORBA::ULong length = param_list.length(); 00868 for (CORBA::ULong i = 0; i < length; ++i) { 00869 const Parameter& param = param_list[i]; 00870 switch (param._d()) { 00871 case PID_TOPIC_NAME: 00872 writer_data.ddsPublicationData.topic_name = param.string_data(); 00873 break; 00874 case PID_TYPE_NAME: 00875 writer_data.ddsPublicationData.type_name = param.string_data(); 00876 break; 00877 case PID_DURABILITY: 00878 writer_data.ddsPublicationData.durability = param.durability(); 00879 break; 00880 case PID_DURABILITY_SERVICE: 00881 writer_data.ddsPublicationData.durability_service = 00882 param.durability_service(); 00883 // Interoperability note: calling normalize() shouldn't be required 00884 normalize(writer_data.ddsPublicationData.durability_service.service_cleanup_delay); 00885 break; 00886 case PID_DEADLINE: 00887 writer_data.ddsPublicationData.deadline = param.deadline(); 00888 // Interoperability note: calling normalize() shouldn't be required 00889 normalize(writer_data.ddsPublicationData.deadline.period); 00890 break; 00891 case PID_LATENCY_BUDGET: 00892 writer_data.ddsPublicationData.latency_budget = param.latency_budget(); 00893 // Interoperability note: calling normalize() shouldn't be required 00894 normalize(writer_data.ddsPublicationData.latency_budget.duration); 00895 break; 00896 case PID_LIVELINESS: 00897 writer_data.ddsPublicationData.liveliness = param.liveliness(); 00898 // Interoperability note: calling normalize() shouldn't be required 00899 normalize(writer_data.ddsPublicationData.liveliness.lease_duration); 00900 break; 00901 case PID_RELIABILITY: 00902 writer_data.ddsPublicationData.reliability = param.reliability(); 00903 // Interoperability note: 00904 // Spec creators for RTPS have reliability indexed at 1 00905 writer_data.ddsPublicationData.reliability.kind = 00906 (DDS::ReliabilityQosPolicyKind) 00907 ((int)writer_data.ddsPublicationData.reliability.kind - 1); 00908 normalize(writer_data.ddsPublicationData.reliability.max_blocking_time); 00909 break; 00910 case PID_LIFESPAN: 00911 writer_data.ddsPublicationData.lifespan = param.lifespan(); 00912 // Interoperability note: calling normalize() shouldn't be required 00913 normalize(writer_data.ddsPublicationData.lifespan.duration); 00914 break; 00915 case PID_USER_DATA: 00916 writer_data.ddsPublicationData.user_data = param.user_data(); 00917 break; 00918 case PID_OWNERSHIP: 00919 writer_data.ddsPublicationData.ownership = param.ownership(); 00920 break; 00921 case PID_OWNERSHIP_STRENGTH: 00922 writer_data.ddsPublicationData.ownership_strength = param.ownership_strength(); 00923 break; 00924 case PID_DESTINATION_ORDER: 00925 writer_data.ddsPublicationData.destination_order = param.destination_order(); 00926 break; 00927 case PID_PRESENTATION: 00928 writer_data.ddsPublicationData.presentation = param.presentation(); 00929 break; 00930 case PID_PARTITION: 00931 writer_data.ddsPublicationData.partition = param.partition(); 00932 break; 00933 case PID_TOPIC_DATA: 00934 writer_data.ddsPublicationData.topic_data = param.topic_data(); 00935 break; 00936 case PID_GROUP_DATA: 00937 writer_data.ddsPublicationData.group_data = param.group_data(); 00938 break; 00939 case PID_ENDPOINT_GUID: 00940 writer_data.writerProxy.remoteWriterGuid = param.guid(); 00941 break; 00942 case PID_UNICAST_LOCATOR: 00943 append_locator(rtps_udp_locators, param.locator()); 00944 break; 00945 case PID_MULTICAST_LOCATOR: 00946 append_locator(rtps_udp_locators, param.locator()); 00947 break; 00948 case PID_MULTICAST_IPADDRESS: 00949 set_ipaddress(rtps_udp_locators, 00950 last_state, 00951 param.ipv4_address()); 00952 break; 00953 case PID_OPENDDS_LOCATOR: 00954 // Append the rtps_udp_locators, if any, first, to preserve order 00955 append_locators_if_present(writer_data.writerProxy.allLocators, 00956 rtps_udp_locators); 00957 rtps_udp_locators.length(0); 00958 append_locator(writer_data.writerProxy.allLocators, 00959 param.opendds_locator()); 00960 break; 00961 case PID_SENTINEL: 00962 case PID_PAD: 00963 // ignore 00964 break; 00965 default: 00966 if (param._d() & PIDMASK_INCOMPATIBLE) { 00967 return -1; 00968 } 00969 } 00970 } 00971 // Append additional rtps_udp_locators, if any 00972 append_locators_if_present(writer_data.writerProxy.allLocators, 00973 rtps_udp_locators); 00974 rtps_udp_locators.length(0); 00975 return 0; 00976 }
OpenDDS_Rtps_Export int OpenDDS::RTPS::ParameterListConverter::from_param_list | ( | const ParameterList & | param_list, | |
OpenDDS::DCPS::DiscoveredReaderData & | reader_data | |||
) |
Definition at line 978 of file ParameterListConverter.cpp.
References OpenDDS::RTPS::append_associated_writer(), OpenDDS::RTPS::append_locator(), OpenDDS::RTPS::append_locators_if_present(), OpenDDS::DCPS::DiscoveredReaderData::contentFilterProperty, OpenDDS::DCPS::DiscoveredReaderData::ddsSubscriptionData, DDS::SubscriptionBuiltinTopicData::deadline, DDS::SubscriptionBuiltinTopicData::destination_order, DDS::SubscriptionBuiltinTopicData::durability, DDS::SubscriptionBuiltinTopicData::group_data, DDS::SubscriptionBuiltinTopicData::latency_budget, DDS::SubscriptionBuiltinTopicData::liveliness, OpenDDS::RTPS::locator_undefined, OpenDDS::RTPS::normalize(), DDS::SubscriptionBuiltinTopicData::ownership, DDS::SubscriptionBuiltinTopicData::partition, OpenDDS::RTPS::PID_CONTENT_FILTER_PROPERTY, OpenDDS::RTPS::PID_DEADLINE, OpenDDS::RTPS::PID_DESTINATION_ORDER, OpenDDS::RTPS::PID_DURABILITY, OpenDDS::RTPS::PID_ENDPOINT_GUID, OpenDDS::RTPS::PID_GROUP_DATA, OpenDDS::RTPS::PID_LATENCY_BUDGET, OpenDDS::RTPS::PID_LIVELINESS, OpenDDS::RTPS::PID_MULTICAST_IPADDRESS, OpenDDS::RTPS::PID_MULTICAST_LOCATOR, OpenDDS::RTPS::PID_OPENDDS_ASSOCIATED_WRITER, OpenDDS::RTPS::PID_OPENDDS_LOCATOR, OpenDDS::RTPS::PID_OWNERSHIP, OpenDDS::RTPS::PID_PAD, OpenDDS::RTPS::PID_PARTITION, OpenDDS::RTPS::PID_PRESENTATION, OpenDDS::RTPS::PID_RELIABILITY, OpenDDS::RTPS::PID_SENTINEL, OpenDDS::RTPS::PID_TIME_BASED_FILTER, OpenDDS::RTPS::PID_TOPIC_DATA, OpenDDS::RTPS::PID_TOPIC_NAME, OpenDDS::RTPS::PID_TYPE_NAME, OpenDDS::RTPS::PID_UNICAST_LOCATOR, OpenDDS::RTPS::PID_USER_DATA, OpenDDS::RTPS::PIDMASK_INCOMPATIBLE, DDS::SubscriptionBuiltinTopicData::presentation, OpenDDS::DCPS::DiscoveredReaderData::readerProxy, DDS::SubscriptionBuiltinTopicData::reliability, OpenDDS::RTPS::set_ipaddress(), TheServiceParticipant, DDS::SubscriptionBuiltinTopicData::time_based_filter, DDS::SubscriptionBuiltinTopicData::topic_data, DDS::SubscriptionBuiltinTopicData::topic_name, DDS::SubscriptionBuiltinTopicData::type_name, and DDS::SubscriptionBuiltinTopicData::user_data.
00980 { 00981 LocatorState last_state = locator_undefined; // Track state of locator 00982 // Collect the rtps_udp locators before appending them to allLocators 00983 00984 OpenDDS::DCPS::LocatorSeq rtps_udp_locators; 00985 // Start by setting defaults 00986 reader_data.ddsSubscriptionData.topic_name = ""; 00987 reader_data.ddsSubscriptionData.type_name = ""; 00988 reader_data.ddsSubscriptionData.durability = 00989 TheServiceParticipant->initial_DurabilityQosPolicy(); 00990 reader_data.ddsSubscriptionData.deadline = 00991 TheServiceParticipant->initial_DeadlineQosPolicy(); 00992 reader_data.ddsSubscriptionData.latency_budget = 00993 TheServiceParticipant->initial_LatencyBudgetQosPolicy(); 00994 reader_data.ddsSubscriptionData.liveliness = 00995 TheServiceParticipant->initial_LivelinessQosPolicy(); 00996 reader_data.ddsSubscriptionData.reliability = 00997 TheServiceParticipant->initial_DataReaderQos().reliability; 00998 reader_data.ddsSubscriptionData.ownership = 00999 TheServiceParticipant->initial_OwnershipQosPolicy(); 01000 reader_data.ddsSubscriptionData.destination_order = 01001 TheServiceParticipant->initial_DestinationOrderQosPolicy(); 01002 reader_data.ddsSubscriptionData.user_data = 01003 TheServiceParticipant->initial_UserDataQosPolicy(); 01004 reader_data.ddsSubscriptionData.time_based_filter = 01005 TheServiceParticipant->initial_TimeBasedFilterQosPolicy(); 01006 reader_data.ddsSubscriptionData.presentation = 01007 TheServiceParticipant->initial_PresentationQosPolicy(); 01008 reader_data.ddsSubscriptionData.partition = 01009 TheServiceParticipant->initial_PartitionQosPolicy(); 01010 reader_data.ddsSubscriptionData.topic_data = 01011 TheServiceParticipant->initial_TopicDataQosPolicy(); 01012 reader_data.ddsSubscriptionData.group_data = 01013 TheServiceParticipant->initial_GroupDataQosPolicy(); 01014 reader_data.readerProxy.unicastLocatorList.length(0); 01015 reader_data.readerProxy.multicastLocatorList.length(0); 01016 reader_data.readerProxy.expectsInlineQos = false; 01017 reader_data.contentFilterProperty.contentFilteredTopicName = ""; 01018 reader_data.contentFilterProperty.relatedTopicName = ""; 01019 reader_data.contentFilterProperty.filterClassName = ""; 01020 reader_data.contentFilterProperty.filterExpression = ""; 01021 reader_data.contentFilterProperty.expressionParameters.length(0); 01022 01023 CORBA::ULong length = param_list.length(); 01024 for (CORBA::ULong i = 0; i < length; ++i) { 01025 const Parameter& param = param_list[i]; 01026 switch (param._d()) { 01027 case PID_TOPIC_NAME: 01028 reader_data.ddsSubscriptionData.topic_name = param.string_data(); 01029 break; 01030 case PID_TYPE_NAME: 01031 reader_data.ddsSubscriptionData.type_name = param.string_data(); 01032 break; 01033 case PID_DURABILITY: 01034 reader_data.ddsSubscriptionData.durability = param.durability(); 01035 break; 01036 case PID_DEADLINE: 01037 reader_data.ddsSubscriptionData.deadline = param.deadline(); 01038 // Interoperability note: calling normalize() shouldn't be required 01039 normalize(reader_data.ddsSubscriptionData.deadline.period); 01040 break; 01041 case PID_LATENCY_BUDGET: 01042 reader_data.ddsSubscriptionData.latency_budget = param.latency_budget(); 01043 // Interoperability note: calling normalize() shouldn't be required 01044 normalize(reader_data.ddsSubscriptionData.latency_budget.duration); 01045 break; 01046 case PID_LIVELINESS: 01047 reader_data.ddsSubscriptionData.liveliness = param.liveliness(); 01048 // Interoperability note: calling normalize() shouldn't be required 01049 normalize(reader_data.ddsSubscriptionData.liveliness.lease_duration); 01050 break; 01051 case PID_RELIABILITY: 01052 reader_data.ddsSubscriptionData.reliability = param.reliability(); 01053 // Interoperability note: 01054 // Spec creators for RTPS have reliability indexed at 1 01055 reader_data.ddsSubscriptionData.reliability.kind = 01056 (DDS::ReliabilityQosPolicyKind) 01057 ((int)reader_data.ddsSubscriptionData.reliability.kind - 1); 01058 break; 01059 case PID_USER_DATA: 01060 reader_data.ddsSubscriptionData.user_data = param.user_data(); 01061 break; 01062 case PID_OWNERSHIP: 01063 reader_data.ddsSubscriptionData.ownership = param.ownership(); 01064 break; 01065 case PID_DESTINATION_ORDER: 01066 reader_data.ddsSubscriptionData.destination_order = param.destination_order(); 01067 break; 01068 case PID_TIME_BASED_FILTER: 01069 reader_data.ddsSubscriptionData.time_based_filter = param.time_based_filter(); 01070 // Interoperability note: calling normalize() shouldn't be required 01071 normalize(reader_data.ddsSubscriptionData.time_based_filter.minimum_separation); 01072 break; 01073 case PID_PRESENTATION: 01074 reader_data.ddsSubscriptionData.presentation = param.presentation(); 01075 break; 01076 case PID_PARTITION: 01077 reader_data.ddsSubscriptionData.partition = param.partition(); 01078 break; 01079 case PID_TOPIC_DATA: 01080 reader_data.ddsSubscriptionData.topic_data = param.topic_data(); 01081 break; 01082 case PID_GROUP_DATA: 01083 reader_data.ddsSubscriptionData.group_data = param.group_data(); 01084 break; 01085 case PID_ENDPOINT_GUID: 01086 reader_data.readerProxy.remoteReaderGuid = param.guid(); 01087 break; 01088 case PID_UNICAST_LOCATOR: 01089 append_locator(rtps_udp_locators, param.locator()); 01090 break; 01091 case PID_MULTICAST_LOCATOR: 01092 append_locator(rtps_udp_locators, param.locator()); 01093 break; 01094 case PID_CONTENT_FILTER_PROPERTY: 01095 reader_data.contentFilterProperty = param.content_filter_property(); 01096 break; 01097 case PID_MULTICAST_IPADDRESS: 01098 set_ipaddress(rtps_udp_locators, 01099 last_state, 01100 param.ipv4_address()); 01101 break; 01102 case PID_OPENDDS_LOCATOR: 01103 // Append the rtps_udp_locators, if any, first, to preserve order 01104 append_locators_if_present(reader_data.readerProxy.allLocators, 01105 rtps_udp_locators); 01106 rtps_udp_locators.length(0); 01107 append_locator(reader_data.readerProxy.allLocators, 01108 param.opendds_locator()); 01109 break; 01110 case PID_OPENDDS_ASSOCIATED_WRITER: 01111 append_associated_writer(reader_data, param); 01112 break; 01113 case PID_SENTINEL: 01114 case PID_PAD: 01115 // ignore 01116 break; 01117 default: 01118 if (param._d() & PIDMASK_INCOMPATIBLE) { 01119 return -1; 01120 } 01121 } 01122 } 01123 // Append additional rtps_udp_locators, if any 01124 append_locators_if_present(reader_data.readerProxy.allLocators, 01125 rtps_udp_locators); 01126 rtps_udp_locators.length(0); 01127 return 0; 01128 }