diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 5eeb13d9897..8bd84d9b173 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -57,7 +57,7 @@ env: TRIGGERING_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} VCPKG_INSTALLED_DIR: ${{ github.workspace }}\vcpkg\installed CTEST_OUTPUT_ON_FAILURE: ON - VCPKG_GIT_COMMIT: 898b728edc5e0d12b50015f9cd18247c4257a3eb + VCPKG_GIT_COMMIT: f7423ee180c4b7f40d43402c2feb3859161ef625 jobs: diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c4269529c05..8bdfce8b504 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -57,7 +57,7 @@ env: TRIGGERING_COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} VCPKG_INSTALLED_DIR: ${{ github.workspace }}\vcpkg\installed CTEST_OUTPUT_ON_FAILURE: ON - VCPKG_GIT_COMMIT: 898b728edc5e0d12b50015f9cd18247c4257a3eb + VCPKG_GIT_COMMIT: f7423ee180c4b7f40d43402c2feb3859161ef625 jobs: u22: diff --git a/.github/workflows/docker_image.yml b/.github/workflows/docker_image.yml index e839981b014..f47c14d1a62 100644 --- a/.github/workflows/docker_image.yml +++ b/.github/workflows/docker_image.yml @@ -44,7 +44,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 + uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 with: context: . push: true diff --git a/.github/workflows/ishapes.yml b/.github/workflows/ishapes.yml index cb872ec2e82..cdfd03fed4d 100644 --- a/.github/workflows/ishapes.yml +++ b/.github/workflows/ishapes.yml @@ -8,7 +8,7 @@ concurrency: cancel-in-progress: true env: - VCPKG_GIT_COMMIT: 898b728edc5e0d12b50015f9cd18247c4257a3eb + VCPKG_GIT_COMMIT: f7423ee180c4b7f40d43402c2feb3859161ef625 jobs: @@ -92,9 +92,9 @@ jobs: cd OpenDDS perl configure --optimize --no-debug --static --tests ^ "--qt=%VCPKG_INSTALLED_DIR%/x64-windows" ^ - "--mpc:value_template platforms=x64" ^ - "--mpc:value_template configurations=Release" ^ - "--mpc:value_template Release::runtime_library=MultiThreadedDLL" + --mpc:value_template platforms=x64 ^ + --mpc:value_template configurations=Release ^ + --mpc:value_template Release::runtime_library=MultiThreadedDLL tools\scripts\show_build_config.pl - name: build shell: cmd diff --git a/acetao.ini b/acetao.ini index 4b32597b2d5..e093b5ce984 100644 --- a/acetao.ini +++ b/acetao.ini @@ -35,3 +35,20 @@ tar.gz-md5=6bbd4ef19fda1ff6a69fa8df33e72d06 tar.bz2-filename=ACE+TAO-src-7.1.3.tar.bz2 tar.bz2-url=https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-7_1_3/ACE%2BTAO-src-7.1.3.tar.bz2 tar.bz2-md5=a4a2cbb7c5eaec50f1fae041f0b4ee0d + +[ace8tao4] +hold=0 +desc=ACE 8/TAO 4 +version=8.0.0 +repo=https://github.com/DOCGroup/ACE_TAO.git +branch=master +url=https://github.com/DOCGroup/ACE_TAO/releases/tag/ACE%2BTAO-8_0_0 +zip-filename=ACE+TAO-src-8.0.0.zip +zip-url=https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-8_0_0/ACE%2BTAO-src-8.0.0.zip +zip-md5=e3c467db77570b57288bedfc02980dcd +tar.gz-filename=ACE+TAO-src-8.0.0.tar.gz +tar.gz-url=https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-8_0_0/ACE%2BTAO-src-8.0.0.tar.gz +tar.gz-md5=07b87e35172758a88904fedaf8a3a8a8 +tar.bz2-filename=ACE+TAO-src-8.0.0.tar.bz2 +tar.bz2-url=https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-8_0_0/ACE%2BTAO-src-8.0.0.tar.bz2 +tar.bz2-md5=a55665e09071049099977ee5fa2af2a4 diff --git a/configure b/configure index 06793f72037..a768974a56c 100755 --- a/configure +++ b/configure @@ -224,6 +224,7 @@ my @specs = 'mpc=s', 'MPC (use MPC_ROOT, ACE_ROOT/MPC, or download)', 'doc-group|doc_group!', 'Use the DOC Group release of TAO 2.5.x (yes)', 'doc-group3|doc_group3!', 'Use the DOC Group release of TAO 3.x (no)', + 'ace-tao=s', 'Use the ACE/TAO version from acetao.ini', 'ace-github-latest!', 'Clone latest ACE/TAO/MPC from GitHub (no)', 'force-ace-tao', 'Force configuration of ACE/TAO (no)', 'no-disable-deprecated', 'Turn off disabling deprecated interfaces when' . @@ -997,6 +998,10 @@ if (!$ace_src || !$tao_src) { # Get ACE/TAO version info my ($section_names, $sections) = read_ini_file("$FindBin::RealBin/acetao.ini"); my $ace_tao_version = $opts{'doc-group3'} ? $sections->{ace7tao3} : $sections->{ace6tao2}; + if ($opts{'ace-tao'}) { + $ace_tao_version = $sections->{$opts{'ace-tao'}}; + die "ERROR: No entry named '$opts{'ace-tao'}' in acetao.ini" unless $ace_tao_version; + } if ($opts{verbose}) { print("ACE/TAO Version Info:"); new Dumpvalue()->dumpValue($ace_tao_version); diff --git a/dds/DCPS/DataDurabilityCache.cpp b/dds/DCPS/DataDurabilityCache.cpp index 677c88ed4a9..ce2a8f74030 100644 --- a/dds/DCPS/DataDurabilityCache.cpp +++ b/dds/DCPS/DataDurabilityCache.cpp @@ -783,8 +783,8 @@ OpenDDS::DCPS::DataDurabilityCache::get_data( */ DDS::ReturnCode_t ret = data_writer->register_instance_from_durable_data(handle, - move(registration_sample), - registration_timestamp); + OPENDDS_MOVE_NS::move(registration_sample), + registration_timestamp); if (ret != DDS::RETCODE_OK) return false; @@ -834,7 +834,7 @@ OpenDDS::DCPS::DataDurabilityCache::get_data( sample_length); mb->wr_ptr(sample_length); - const DDS::ReturnCode_t ret = data_writer->write(move(mb), + const DDS::ReturnCode_t ret = data_writer->write(OPENDDS_MOVE_NS::move(mb), handle, source_timestamp, 0 /* no content filtering */, diff --git a/dds/DCPS/DataReaderImpl_T.h b/dds/DCPS/DataReaderImpl_T.h index 82e58bafcd5..40bd26507ea 100644 --- a/dds/DCPS/DataReaderImpl_T.h +++ b/dds/DCPS/DataReaderImpl_T.h @@ -866,7 +866,7 @@ namespace OpenDDS { bool just_registered; unique_ptr data(new (*data_allocator()) MessageTypeWithAllocator(sample)); - store_instance_data(move(data), DDS::HANDLE_NIL, header, instance, just_registered, filtered); + store_instance_data(OPENDDS_MOVE_NS::move(data), DDS::HANDLE_NIL, header, instance, just_registered, filtered); if (instance) inst = instance->instance_handle_; } @@ -909,7 +909,7 @@ namespace OpenDDS { bool just_registered, filtered; unique_ptr data(new (*data_allocator()) MessageTypeWithAllocator); get_key_value(*data, instance); - store_instance_data(move(data), publication_handle, header, si, just_registered, filtered); + store_instance_data(OPENDDS_MOVE_NS::move(data), publication_handle, header, si, just_registered, filtered); if (!filtered) { notify_read_conditions(); } @@ -1086,7 +1086,7 @@ namespace OpenDDS { } return; } - store_instance_data(move(data), publication_handle, sample.header_, instance, just_registered, filtered); + store_instance_data(OPENDDS_MOVE_NS::move(data), publication_handle, sample.header_, instance, just_registered, filtered); return; } const bool encapsulated = sample.header_.cdr_encapsulation_; @@ -1190,7 +1190,7 @@ namespace OpenDDS { } #endif - store_instance_data(move(data), publication_handle, sample.header_, instance, just_registered, filtered); + store_instance_data(OPENDDS_MOVE_NS::move(data), publication_handle, sample.header_, instance, just_registered, filtered); } virtual void dispose_unregister(const OpenDDS::DCPS::ReceivedDataSample& sample, @@ -1929,7 +1929,7 @@ void store_instance_data(unique_ptr instance_data, if (!filtered && time_based_filter_instance(instance_ptr, now, deadline)) { filtered = true; if (qos_.reliability.kind == DDS::RELIABLE_RELIABILITY_QOS) { - delay_sample(handle, move(instance_data), header, just_registered, now, deadline); + delay_sample(handle, OPENDDS_MOVE_NS::move(instance_data), header, just_registered, now, deadline); } } else { // nothing time based filtered now @@ -1942,7 +1942,7 @@ void store_instance_data(unique_ptr instance_data, } } - finish_store_instance_data(move(instance_data), header, instance_ptr, is_dispose_msg, is_unregister_msg); + finish_store_instance_data(OPENDDS_MOVE_NS::move(instance_data), header, instance_ptr, is_dispose_msg, is_unregister_msg); } else { @@ -2317,7 +2317,7 @@ void delay_sample(DDS::InstanceHandle_t handle, #ifdef ACE_HAS_CPP11 filter_delayed_sample_map_.emplace(std::piecewise_construct, std::forward_as_tuple(handle), - std::forward_as_tuple(move(data), hdr, just_registered)); + std::forward_as_tuple(OPENDDS_MOVE_NS::move(data), hdr, just_registered)); #else filter_delayed_sample_map_.insert(std::make_pair(handle, FilterDelayedSample(move(data), hdr, just_registered))); #endif @@ -2335,7 +2335,7 @@ void delay_sample(DDS::InstanceHandle_t handle, FilterDelayedSample& sample = i->second; // we only care about the most recently filtered sample, so clean up the last one - sample.message = move(data); + sample.message = OPENDDS_MOVE_NS::move(data); sample.header = hdr; sample.new_instance = just_registered; // already scheduled for timeout at the desired time @@ -2411,7 +2411,7 @@ void filter_delayed(const MonotonicTimePoint& now) const bool new_instance = data->second.new_instance; // should not use data iterator anymore, since finish_store_instance_data releases sample_lock_ - finish_store_instance_data(move(data->second.message), + finish_store_instance_data(OPENDDS_MOVE_NS::move(data->second.message), *header, instance, NOT_DISPOSE_MSG, @@ -2462,7 +2462,7 @@ typedef ACE_Strong_Bound_Ptr msg, DataSampleHeader_ptr hdr, bool new_inst) - : message(move(msg)) + : message(OPENDDS_MOVE_NS::move(msg)) , header(hdr) , new_instance(new_inst) {} diff --git a/dds/DCPS/DataWriterImpl.cpp b/dds/DCPS/DataWriterImpl.cpp index 041e0265852..755d317bf2a 100644 --- a/dds/DCPS/DataWriterImpl.cpp +++ b/dds/DCPS/DataWriterImpl.cpp @@ -541,15 +541,14 @@ DataWriterImpl::association_complete_i(const GUID_t& remote_id) DataSampleHeader header; Message_Block_Ptr end_historic_samples( - create_control_message( - END_HISTORIC_SAMPLES, header, move(data), + create_control_message(END_HISTORIC_SAMPLES, header, OPENDDS_MOVE_NS::move(data), SystemTimePoint::now().to_idl_struct())); this->controlTracker.message_sent(); guard.release(); ACE_Reverse_Lock rev_lock(lock_); ACE_Guard > rev_guard(rev_lock); - SendControlStatus ret = send_w_control(list, header, move(end_historic_samples), remote_id); + SendControlStatus ret = send_w_control(list, header, OPENDDS_MOVE_NS::move(end_historic_samples), remote_id); if (ret == SEND_CONTROL_ERROR) { ACE_ERROR((LM_WARNING, ACE_TEXT("(%P|%t) WARNING: ") ACE_TEXT("DataWriterImpl::association_complete_i: ") @@ -775,12 +774,12 @@ void DataWriterImpl::replay_durable_data_for(const GUID_t& remote_id) ser << remote_id; DataSampleHeader header; - Message_Block_Ptr end_historic_samples(create_control_message(END_HISTORIC_SAMPLES, header, move(data), + Message_Block_Ptr end_historic_samples(create_control_message(END_HISTORIC_SAMPLES, header, OPENDDS_MOVE_NS::move(data), SystemTimePoint::now().to_idl_struct())); this->controlTracker.message_sent(); guard.release(); - const SendControlStatus ret = send_w_control(list, header, move(end_historic_samples), remote_id); + const SendControlStatus ret = send_w_control(list, header, OPENDDS_MOVE_NS::move(end_historic_samples), remote_id); if (ret == SEND_CONTROL_ERROR) { ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ") ACE_TEXT("DataWriterImpl::replay_durable_data_for: ") @@ -1074,10 +1073,10 @@ DataWriterImpl::send_request_ack() create_control_message( REQUEST_ACK, element->get_header(), - move(blk), + OPENDDS_MOVE_NS::move(blk), SystemTimePoint::now().to_idl_struct())); - element->set_sample(move(sample)); + element->set_sample(OPENDDS_MOVE_NS::move(sample)); ret = this->data_container_->enqueue_control(element); @@ -1645,10 +1644,10 @@ DataWriterImpl::register_instance_i(DDS::InstanceHandle_t& handle, create_control_message( INSTANCE_REGISTRATION, element->get_header(), - move(data), + OPENDDS_MOVE_NS::move(data), source_timestamp)); - element->set_sample(move(sample)); + element->set_sample(OPENDDS_MOVE_NS::move(sample)); ret = this->data_container_->enqueue_control(element); @@ -1678,7 +1677,7 @@ DataWriterImpl::register_instance_from_durable_data( get_lock(), DDS::RETCODE_ERROR); - const DDS::ReturnCode_t ret = register_instance_i(handle, move(data), source_timestamp); + const DDS::ReturnCode_t ret = register_instance_i(handle, OPENDDS_MOVE_NS::move(data), source_timestamp); if (ret != DDS::RETCODE_OK) { ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: DataWriterImpl::register_instance_from_durable_data: ") @@ -1739,9 +1738,9 @@ DataWriterImpl::unregister_instance_i(DDS::InstanceHandle_t handle, Message_Block_Ptr sample(create_control_message(UNREGISTER_INSTANCE, element->get_header(), - move(unregistered_sample_data), + OPENDDS_MOVE_NS::move(unregistered_sample_data), source_timestamp)); - element->set_sample(move(sample)); + element->set_sample(OPENDDS_MOVE_NS::move(sample)); ret = this->data_container_->enqueue_control(element); @@ -1811,9 +1810,9 @@ DataWriterImpl::dispose_and_unregister(DDS::InstanceHandle_t handle, Message_Block_Ptr sample(create_control_message(DISPOSE_UNREGISTER_INSTANCE, element->get_header(), - move(data_sample), + OPENDDS_MOVE_NS::move(data_sample), source_timestamp)); - element->set_sample(move(sample)); + element->set_sample(OPENDDS_MOVE_NS::move(sample)); ret = this->data_container_->enqueue_control(element); @@ -1906,13 +1905,13 @@ DataWriterImpl::write(Message_Block_Ptr data, } Message_Block_Ptr temp; - ret = create_sample_data_message(move(data), + ret = create_sample_data_message(OPENDDS_MOVE_NS::move(data), handle, element->get_header(), temp, source_timestamp, (filter_out != 0)); - element->set_sample(move(temp)); + element->set_sample(OPENDDS_MOVE_NS::move(temp)); if (ret != DDS::RETCODE_OK) { data_container_->release_buffer(element); @@ -2068,9 +2067,9 @@ DataWriterImpl::dispose(DDS::InstanceHandle_t handle, Message_Block_Ptr sample(create_control_message(DISPOSE_INSTANCE, element->get_header(), - move(registered_sample_data), + OPENDDS_MOVE_NS::move(registered_sample_data), source_timestamp)); - element->set_sample(move(sample)); + element->set_sample(OPENDDS_MOVE_NS::move(sample)); ret = this->data_container_->enqueue_control(element); @@ -2424,15 +2423,14 @@ DataWriterImpl::end_coherent_changes(const GroupCoherentSamples& group_samples) DataSampleHeader header; Message_Block_Ptr control( - create_control_message( - END_COHERENT_CHANGES, header, move(data), + create_control_message(END_COHERENT_CHANGES, header, OPENDDS_MOVE_NS::move(data), SystemTimePoint::now().to_idl_struct())); this->coherent_ = false; this->coherent_samples_ = 0; guard.release(); - if (this->send_control(header, move(control)) == SEND_CONTROL_ERROR) { + if (this->send_control(header, OPENDDS_MOVE_NS::move(control)) == SEND_CONTROL_ERROR) { ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: DataWriterImpl::end_coherent_changes:") ACE_TEXT(" unable to send END_COHERENT_CHANGES control message!\n"))); @@ -2548,11 +2546,10 @@ DataWriterImpl::send_liveliness(const MonotonicTimePoint& now) DataSampleHeader header; Message_Block_Ptr empty; Message_Block_Ptr liveliness_msg( - create_control_message( - DATAWRITER_LIVELINESS, header, move(empty), + create_control_message(DATAWRITER_LIVELINESS, header, OPENDDS_MOVE_NS::move(empty), SystemTimePoint::now().to_idl_struct())); - if (this->send_control(header, move(liveliness_msg)) == SEND_CONTROL_ERROR) { + if (this->send_control(header, OPENDDS_MOVE_NS::move(liveliness_msg)) == SEND_CONTROL_ERROR) { ACE_ERROR_RETURN((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: DataWriterImpl::send_liveliness: ") ACE_TEXT("send_control failed.\n")), @@ -2801,7 +2798,7 @@ DataWriterImpl::send_control(const DataSampleHeader& header, { controlTracker.message_sent(); - SendControlStatus status = TransportClient::send_control(header, move(msg)); + SendControlStatus status = TransportClient::send_control(header, OPENDDS_MOVE_NS::move(msg)); if (status != SEND_CONTROL_OK) { controlTracker.message_dropped(); @@ -3130,7 +3127,7 @@ DDS::ReturnCode_t DataWriterImpl::get_or_create_instance_handle( } // tell DataWriterLocal and Publisher about the instance. - const DDS::ReturnCode_t ret = register_instance_i(handle, move(serialized), source_timestamp); + const DDS::ReturnCode_t ret = register_instance_i(handle, OPENDDS_MOVE_NS::move(serialized), source_timestamp); // note: the WriteDataContainer/PublicationInstance maintains ownership // of the marshalled sample. if (ret != DDS::RETCODE_OK) { @@ -3250,7 +3247,7 @@ DDS::ReturnCode_t DataWriterImpl::write_sample( return DDS::RETCODE_ERROR; } - return write(move(serialized), handle, source_timestamp, filter_out, sample.native_data()); + return write(OPENDDS_MOVE_NS::move(serialized), handle, source_timestamp, filter_out, sample.native_data()); } } // namespace DCPS diff --git a/dds/DCPS/RTPS/RtpsDiscovery.h b/dds/DCPS/RTPS/RtpsDiscovery.h index 55567ef4e3d..79ffc15e6dd 100644 --- a/dds/DCPS/RTPS/RtpsDiscovery.h +++ b/dds/DCPS/RTPS/RtpsDiscovery.h @@ -151,8 +151,8 @@ class OpenDDS_Rtps_Export RtpsDiscovery : public DCPS::Discovery { DCPS::TimeDuration auth_resend_period() const { return config_->auth_resend_period(); } void auth_resend_period(const DCPS::TimeDuration& x) { config_->auth_resend_period(x); } - u_short max_spdp_sequence_msg_reset_check() const { return config_->max_spdp_sequence_msg_reset_check(); } - void max_spdp_sequence_msg_reset_check(u_short reset_value) { config_->max_spdp_sequence_msg_reset_check(reset_value); } + u_short max_spdp_sequence_msg_reset_checks() const { return config_->max_spdp_sequence_msg_reset_checks(); } + void max_spdp_sequence_msg_reset_checks(u_short reset_value) { config_->max_spdp_sequence_msg_reset_checks(reset_value); } bool rtps_relay_only() const { return config_->rtps_relay_only(); } void rtps_relay_only_now(bool f); diff --git a/dds/DCPS/RTPS/RtpsDiscoveryConfig.cpp b/dds/DCPS/RTPS/RtpsDiscoveryConfig.cpp index f809d25e9cf..cb31a6e9b41 100644 --- a/dds/DCPS/RTPS/RtpsDiscoveryConfig.cpp +++ b/dds/DCPS/RTPS/RtpsDiscoveryConfig.cpp @@ -713,16 +713,16 @@ RtpsDiscoveryConfig::auth_resend_period(const DCPS::TimeDuration& x) } u_short -RtpsDiscoveryConfig::max_spdp_sequence_msg_reset_check() const +RtpsDiscoveryConfig::max_spdp_sequence_msg_reset_checks() const { - return TheServiceParticipant->config_store()->get_uint32(config_key("MAX_SPDP_SEQUENCE_MSG_RESET_CHECK").c_str(), + return TheServiceParticipant->config_store()->get_uint32(config_key("MAX_SPDP_SEQUENCE_MSG_RESET_CHECKS").c_str(), 3); } void -RtpsDiscoveryConfig::max_spdp_sequence_msg_reset_check(u_short reset_value) +RtpsDiscoveryConfig::max_spdp_sequence_msg_reset_checks(u_short reset_value) { - TheServiceParticipant->config_store()->set_uint32(config_key("MAX_SPDP_SEQUENCE_MSG_RESET_CHECK").c_str(), + TheServiceParticipant->config_store()->set_uint32(config_key("MAX_SPDP_SEQUENCE_MSG_RESET_CHECKS").c_str(), reset_value); } diff --git a/dds/DCPS/RTPS/RtpsDiscoveryConfig.h b/dds/DCPS/RTPS/RtpsDiscoveryConfig.h index 08b0427310c..7799247daa1 100644 --- a/dds/DCPS/RTPS/RtpsDiscoveryConfig.h +++ b/dds/DCPS/RTPS/RtpsDiscoveryConfig.h @@ -167,8 +167,8 @@ class OpenDDS_Rtps_Export RtpsDiscoveryConfig : public OpenDDS::DCPS::RcObject { DCPS::TimeDuration auth_resend_period() const; void auth_resend_period(const DCPS::TimeDuration& x); - u_short max_spdp_sequence_msg_reset_check() const; - void max_spdp_sequence_msg_reset_check(u_short reset_value); + u_short max_spdp_sequence_msg_reset_checks() const; + void max_spdp_sequence_msg_reset_checks(u_short reset_value); DCPS::NetworkAddress spdp_rtps_relay_address() const; void spdp_rtps_relay_address(const DCPS::NetworkAddress& address); diff --git a/dds/DCPS/RTPS/Sedp.cpp b/dds/DCPS/RTPS/Sedp.cpp index 3be6eb9db5e..f780bedda5e 100644 --- a/dds/DCPS/RTPS/Sedp.cpp +++ b/dds/DCPS/RTPS/Sedp.cpp @@ -3408,7 +3408,7 @@ Sedp::Writer::write_parameter_list(const ParameterList& plist, DCPS::EncapsulationHeader encap; if (encap.from_encoding(sedp_encoding, DCPS::MUTABLE) && serializer << encap && serializer << plist) { - send_sample(move(payload), size, reader, sequence, reader != GUID_UNKNOWN); + send_sample(OPENDDS_MOVE_NS::move(payload), size, reader, sequence, reader != GUID_UNKNOWN); } else { result = DDS::RETCODE_ERROR; } @@ -3438,7 +3438,7 @@ Sedp::LivelinessWriter::write_participant_message(const ParticipantMessageData& DCPS::EncapsulationHeader encap; if (encap.from_encoding(sedp_encoding, DCPS::FINAL) && serializer << encap && serializer << pmd) { - send_sample(move(payload), size, reader, sequence, reader != GUID_UNKNOWN); + send_sample(OPENDDS_MOVE_NS::move(payload), size, reader, sequence, reader != GUID_UNKNOWN); } else { result = DDS::RETCODE_ERROR; } @@ -3467,7 +3467,7 @@ Sedp::SecurityWriter::write_stateless_message(const DDS::Security::ParticipantSt DCPS::EncapsulationHeader encap; if (encap.from_encoding(sedp_encoding, DCPS::FINAL) && serializer << encap && serializer << msg) { - send_sample(move(payload), size, reader, sequence); + send_sample(OPENDDS_MOVE_NS::move(payload), size, reader, sequence); } else { result = DDS::RETCODE_ERROR; } @@ -3495,7 +3495,7 @@ Sedp::SecurityWriter::write_volatile_message_secure(const DDS::Security::Partici DCPS::EncapsulationHeader encap; if (encap.from_encoding(sedp_encoding, DCPS::FINAL) && serializer << encap && serializer << msg) { - send_sample(move(payload), size, reader, sequence); + send_sample(OPENDDS_MOVE_NS::move(payload), size, reader, sequence); } else { result = DDS::RETCODE_ERROR; } @@ -3572,7 +3572,7 @@ Sedp::DiscoveryWriter::write_unregister_dispose(const GUID_t& rid, CORBA::UShort if (encap.from_encoding(sedp_encoding, DCPS::MUTABLE) && serializer << encap && serializer << plist) { // Send - write_control_msg(move(payload), size, DCPS::DISPOSE_UNREGISTER_INSTANCE); + write_control_msg(OPENDDS_MOVE_NS::move(payload), size, DCPS::DISPOSE_UNREGISTER_INSTANCE); return DDS::RETCODE_OK; } else { // Error @@ -3596,7 +3596,7 @@ Sedp::Writer::end_historic_samples(const GUID_t& reader) if (mb.get()) { mb->cont()->wr_ptr(sizeof(reader)); // 'mb' would contain the DSHeader, but we skip it. mb.cont() has the data - write_control_msg(move(mb), sizeof(reader), DCPS::END_HISTORIC_SAMPLES, + write_control_msg(OPENDDS_MOVE_NS::move(mb), sizeof(reader), DCPS::END_HISTORIC_SAMPLES, DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN()); } else { ACE_ERROR((LM_ERROR, @@ -3618,7 +3618,7 @@ Sedp::Writer::request_ack(const GUID_t& reader) if (mb.get()) { mb->cont()->wr_ptr(sizeof(reader)); // 'mb' would contain the DSHeader, but we skip it. mb.cont() has the data - write_control_msg(move(mb), sizeof(reader), DCPS::REQUEST_ACK, + write_control_msg(OPENDDS_MOVE_NS::move(mb), sizeof(reader), DCPS::REQUEST_ACK, DCPS::SequenceNumber::SEQUENCENUMBER_UNKNOWN()); } else { ACE_ERROR((LM_ERROR, @@ -3755,7 +3755,7 @@ bool Sedp::TypeLookupRequestWriter::send_type_lookup_request( if (encap.from_encoding(serializer.encoding(), DCPS::FINAL) && serializer << encap && serializer << type_lookup_request) { DCPS::SequenceNumber sn(seq_++); - send_sample(move(payload), size, reader, sn); + send_sample(OPENDDS_MOVE_NS::move(payload), size, reader, sn); } else { if (DCPS::DCPS_debug_level) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: " @@ -3796,7 +3796,7 @@ bool Sedp::TypeLookupReplyWriter::send_type_lookup_reply( if (encap.from_encoding(serializer.encoding(), DCPS::FINAL) && serializer << encap && serializer << type_lookup_reply) { DCPS::SequenceNumber sn(seq_++); - send_sample(move(payload), size, reader, sn); + send_sample(OPENDDS_MOVE_NS::move(payload), size, reader, sn); } else { if (DCPS::DCPS_debug_level) { ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: " diff --git a/dds/DCPS/RTPS/Spdp.cpp b/dds/DCPS/RTPS/Spdp.cpp index 71e4a9524ce..5a36b8bd8dc 100644 --- a/dds/DCPS/RTPS/Spdp.cpp +++ b/dds/DCPS/RTPS/Spdp.cpp @@ -235,7 +235,7 @@ Spdp::Spdp(DDS::DomainId_t domain, , lease_duration_(disco_->config()->lease_duration()) , lease_extension_(disco_->config()->lease_extension()) , max_lease_duration_(disco_->config()->max_lease_duration()) - , max_spdp_sequence_msg_reset_check_(disco->config()->max_spdp_sequence_msg_reset_check()) + , max_spdp_sequence_msg_reset_checks_(disco->config()->max_spdp_sequence_msg_reset_checks()) , check_source_ip_(disco->config()->check_source_ip()) , undirected_spdp_(disco->config()->undirected_spdp()) #if OPENDDS_CONFIG_SECURITY @@ -300,7 +300,7 @@ Spdp::Spdp(DDS::DomainId_t domain, , lease_duration_(disco_->config()->lease_duration()) , lease_extension_(disco_->config()->lease_extension()) , max_lease_duration_(disco_->config()->max_lease_duration()) - , max_spdp_sequence_msg_reset_check_(disco->config()->max_spdp_sequence_msg_reset_check()) + , max_spdp_sequence_msg_reset_checks_(disco->config()->max_spdp_sequence_msg_reset_checks()) , check_source_ip_(disco->config()->check_source_ip()) , undirected_spdp_(disco->config()->undirected_spdp()) , max_participants_in_authentication_(disco->config()->max_participants_in_authentication()) @@ -1034,7 +1034,7 @@ Spdp::handle_participant_data(DCPS::MessageId id, process_location_updates_i(iter, "valid SPDP", secure_part_user_data()); #endif // Else a reset has occurred and check if we should remove the participant - } else if (iter->second.seq_reset_count_ >= max_spdp_sequence_msg_reset_check_) { + } else if (iter->second.seq_reset_count_ >= max_spdp_sequence_msg_reset_checks_) { #if OPENDDS_CONFIG_SECURITY purge_handshake_deadlines(iter); #endif diff --git a/dds/DCPS/RTPS/Spdp.h b/dds/DCPS/RTPS/Spdp.h index 085398dd071..dc793d1bfcf 100644 --- a/dds/DCPS/RTPS/Spdp.h +++ b/dds/DCPS/RTPS/Spdp.h @@ -387,7 +387,7 @@ class OpenDDS_Rtps_Export Spdp const DCPS::TimeDuration lease_duration_; const DCPS::TimeDuration lease_extension_; const DCPS::TimeDuration max_lease_duration_; - const u_short max_spdp_sequence_msg_reset_check_; + const u_short max_spdp_sequence_msg_reset_checks_; const bool check_source_ip_; const bool undirected_spdp_; #if OPENDDS_CONFIG_SECURITY diff --git a/dds/DCPS/ReplayerImpl.cpp b/dds/DCPS/ReplayerImpl.cpp index b035b213968..53154e77975 100644 --- a/dds/DCPS/ReplayerImpl.cpp +++ b/dds/DCPS/ReplayerImpl.cpp @@ -902,12 +902,12 @@ ReplayerImpl::write (const RawDataSample* samples, list.enqueue_tail(element); Message_Block_Ptr temp; Message_Block_Ptr sample(samples[i].sample_->duplicate()); - DDS::ReturnCode_t ret = create_sample_data_message(move(sample), + DDS::ReturnCode_t ret = create_sample_data_message(OPENDDS_MOVE_NS::move(sample), element->get_header(), temp, samples[i].source_timestamp_, false); - element->set_sample(move(temp)); + element->set_sample(OPENDDS_MOVE_NS::move(temp)); if (reader_ih_ptr) { element->set_num_subs(1); element->set_sub_id(0, repo_id); diff --git a/dds/DCPS/Serializer.h b/dds/DCPS/Serializer.h index 0d8423f63a1..e556a8dc2c3 100644 --- a/dds/DCPS/Serializer.h +++ b/dds/DCPS/Serializer.h @@ -899,8 +899,8 @@ class OpenDDS_Dcps_Export Serializer { template struct KeyOnly { - explicit KeyOnly(Type& value) - : value(value) + explicit KeyOnly(Type& a_value) + : value(a_value) { } @@ -914,8 +914,8 @@ struct KeyOnly { template struct NestedKeyOnly { - explicit NestedKeyOnly(Type& value) - : value(value) + explicit NestedKeyOnly(Type& a_value) + : value(a_value) { } diff --git a/dds/DCPS/WriteDataContainer.cpp b/dds/DCPS/WriteDataContainer.cpp index 2058cfdbaf2..2bce544616d 100644 --- a/dds/DCPS/WriteDataContainer.cpp +++ b/dds/DCPS/WriteDataContainer.cpp @@ -407,7 +407,7 @@ WriteDataContainer::register_instance( } // registered the instance for the first time. - instance.reset(new PublicationInstance(move(registered_sample)), keep_count()); + instance.reset(new PublicationInstance(OPENDDS_MOVE_NS::move(registered_sample)), keep_count()); instance_handle = this->writer_->get_next_handle(); diff --git a/dds/DCPS/XTypes/TypeObject.cpp b/dds/DCPS/XTypes/TypeObject.cpp index d4e27cffe82..2d2933251fb 100644 --- a/dds/DCPS/XTypes/TypeObject.cpp +++ b/dds/DCPS/XTypes/TypeObject.cpp @@ -3820,8 +3820,9 @@ bool operator>>(Serializer& strm, XTypes::AnnotationParameterValue& uni) case XTypes::TK_STRING16: #ifdef DDS_HAS_WCHAR return (strm >> Serializer::ToBoundedString(uni.string16_value(), 128)); -#endif +#else return false; +#endif default: return (strm >> uni.extended_value()); } diff --git a/dds/DCPS/security/CommonUtilities.cpp b/dds/DCPS/security/CommonUtilities.cpp index 8e99fa01d6f..7f59c7cc240 100644 --- a/dds/DCPS/security/CommonUtilities.cpp +++ b/dds/DCPS/security/CommonUtilities.cpp @@ -94,8 +94,8 @@ bool set_security_error(DDS::Security::SecurityException& ex, std::string full(message); const size_t i = full.size(); full.resize(i + 26); - std::sprintf(&full[i], " %.2x %.2x %.2x %.2x, %.2x %.2x %.2x %.2x", - a1[0], a1[1], a1[2], a1[3], a2[0], a2[1], a2[2], a2[3]); + std::snprintf(&full[i], 26, " %.2x %.2x %.2x %.2x, %.2x %.2x %.2x %.2x", + a1[0], a1[1], a1[2], a1[3], a2[0], a2[1], a2[2], a2[3]); return set_security_error(ex, code, minor_code, full.c_str()); } diff --git a/dds/DCPS/transport/framework/DataLink.cpp b/dds/DCPS/transport/framework/DataLink.cpp index b0bf40f4399..1291b86d9e0 100644 --- a/dds/DCPS/transport/framework/DataLink.cpp +++ b/dds/DCPS/transport/framework/DataLink.cpp @@ -669,9 +669,10 @@ DataLink::send_control(const DataSampleHeader& header, Message_Block_Ptr message { DBG_ENTRY_LVL("DataLink", "send_control", 6); - TransportSendControlElement* const elem = new TransportSendControlElement(1, // initial_count - GUID_UNKNOWN, &send_response_listener_, - header, move(message)); + TransportSendControlElement* const elem + = new TransportSendControlElement(1, // initial_count + GUID_UNKNOWN, &send_response_listener_, + header, OPENDDS_MOVE_NS::move(message)); send_response_listener_.track_message(); diff --git a/dds/DCPS/transport/framework/DataLinkSet.inl b/dds/DCPS/transport/framework/DataLinkSet.inl index 02d71774c30..befcf4d3969 100644 --- a/dds/DCPS/transport/framework/DataLinkSet.inl +++ b/dds/DCPS/transport/framework/DataLinkSet.inl @@ -58,7 +58,7 @@ OpenDDS::DCPS::DataLinkSet::send(DataSampleElement* sample) DataSampleHeader::add_cfentries(guids, mb.get()); TransportCustomizedElement* tce = new TransportCustomizedElement(send_element); - tce->set_msg(move(mb)); // tce now owns ACE_Message_Block chain + tce->set_msg(OPENDDS_MOVE_NS::move(mb)); // tce now owns ACE_Message_Block chain itr->second->send(tce); @@ -124,7 +124,7 @@ OpenDDS::DCPS::DataLinkSet::send_control(GUID_t pub_id TransportSendControlElement* const send_element = new TransportSendControlElement(static_cast(dup_map.size()), pub_id, - listener.in(), header, move(msg)); + listener.in(), header, OPENDDS_MOVE_NS::move(msg)); for (MapType::iterator itr = dup_map.begin(); itr != dup_map.end(); @@ -148,8 +148,8 @@ OpenDDS::DCPS::DataLinkSet::send_response( TransportSendControlElement* const send_element = new TransportSendControlElement(static_cast(map_.size()), pub_id, - &send_response_listener_, header, - move(response)); + &send_response_listener_, header, + OPENDDS_MOVE_NS::move(response)); if (!send_element) return; send_response_listener_.track_message(); diff --git a/dds/DCPS/transport/framework/TransportClient.cpp b/dds/DCPS/transport/framework/TransportClient.cpp index 2f088bbb2c3..4a6a43e3399 100644 --- a/dds/DCPS/transport/framework/TransportClient.cpp +++ b/dds/DCPS/transport/framework/TransportClient.cpp @@ -934,7 +934,7 @@ TransportClient::send_response(const GUID_t& peer, DataLinkSet singular; singular.insert_link(found->second); - singular.send_response(peer, header, move(payload)); + singular.send_response(peer, header, OPENDDS_MOVE_NS::move(payload)); return true; } @@ -959,7 +959,7 @@ TransportClient::send_w_control(SendStateDataSampleList send_list, if (send_list.head()) { send_i(send_list, 0); } - return send_control_to(header, move(msg), destination); + return send_control_to(header, OPENDDS_MOVE_NS::move(msg), destination); } void @@ -1137,7 +1137,7 @@ TransportClient::send_control(const DataSampleHeader& header, Message_Block_Ptr msg) { OPENDDS_ASSERT(guid_ != GUID_UNKNOWN); - return links_.send_control(guid_, get_send_listener(), header, move(msg)); + return links_.send_control(guid_, get_send_listener(), header, OPENDDS_MOVE_NS::move(msg)); } SendControlStatus @@ -1158,7 +1158,7 @@ TransportClient::send_control_to(const DataSampleHeader& header, singular.insert_link(found->second); } - return singular.send_control(guid_, get_send_listener(), header, move(msg)); + return singular.send_control(guid_, get_send_listener(), header, OPENDDS_MOVE_NS::move(msg)); } bool diff --git a/dds/DCPS/transport/framework/TransportQueueElement.cpp b/dds/DCPS/transport/framework/TransportQueueElement.cpp index b720f7e0706..d26e21bf5d2 100644 --- a/dds/DCPS/transport/framework/TransportQueueElement.cpp +++ b/dds/DCPS/transport/framework/TransportQueueElement.cpp @@ -49,11 +49,11 @@ TqePair TransportQueueElement::fragment(size_t size) TransportCustomizedElement* frag = new TransportCustomizedElement(0); frag->set_fragment(this); - frag->set_msg(move(head)); + frag->set_msg(OPENDDS_MOVE_NS::move(head)); TransportCustomizedElement* rest = new TransportCustomizedElement(this); rest->set_fragment(this); - rest->set_msg(move(tail)); + rest->set_msg(OPENDDS_MOVE_NS::move(tail)); return TqePair(frag, rest); } diff --git a/dds/DCPS/transport/multicast/MulticastDataLink.cpp b/dds/DCPS/transport/multicast/MulticastDataLink.cpp index faf391f736a..a1d0fb68936 100644 --- a/dds/DCPS/transport/multicast/MulticastDataLink.cpp +++ b/dds/DCPS/transport/multicast/MulticastDataLink.cpp @@ -417,8 +417,7 @@ MulticastDataLink::syn_received_no_session(MulticastPeer source, serializer_write << source; DataSampleHeader header; - Message_Block_Ptr control( - create_control(MULTICAST_SYNACK, header, move(synack_data))); + Message_Block_Ptr control(create_control(MULTICAST_SYNACK, header, OPENDDS_MOVE_NS::move(synack_data))); if (control == 0) { ACE_ERROR((LM_ERROR, @@ -428,7 +427,7 @@ MulticastDataLink::syn_received_no_session(MulticastPeer source, return; } - const int error = send_control(header, move(control)); + const int error = send_control(header, OPENDDS_MOVE_NS::move(control)); if (error != SEND_CONTROL_OK) { ACE_ERROR((LM_ERROR, "(%P|%t) MulticastDataLink::syn_received_no_session: " "ERROR: send_control failed: %d!\n", error)); diff --git a/dds/DCPS/transport/multicast/MulticastSession.cpp b/dds/DCPS/transport/multicast/MulticastSession.cpp index 5eb0df31a2a..ad47fee33df 100644 --- a/dds/DCPS/transport/multicast/MulticastSession.cpp +++ b/dds/DCPS/transport/multicast/MulticastSession.cpp @@ -77,8 +77,7 @@ void MulticastSession::send_control(char submessage_id, Message_Block_Ptr data) { DataSampleHeader header; - Message_Block_Ptr control( - this->link_->create_control(submessage_id, header, move(data))); + Message_Block_Ptr control(this->link_->create_control(submessage_id, header, OPENDDS_MOVE_NS::move(data))); if (!control) { ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ") @@ -87,7 +86,7 @@ MulticastSession::send_control(char submessage_id, Message_Block_Ptr data) return; } - int error = this->link_->send_control(header, move(control)); + int error = this->link_->send_control(header, OPENDDS_MOVE_NS::move(control)); if (error != SEND_CONTROL_OK) { ACE_ERROR((LM_ERROR, ACE_TEXT("(%P|%t) ERROR: ") @@ -233,7 +232,7 @@ MulticastSession::send_syn(const GUID_t& local_writer, 2); // Send control sample to remote peer: - send_control(MULTICAST_SYN, move(data)); + send_control(MULTICAST_SYN, OPENDDS_MOVE_NS::move(data)); } void @@ -309,7 +308,7 @@ MulticastSession::send_synack(const GUID_t& local_reader, this->active_ ? 1 : 0), 2); // Send control sample to remote peer: - send_control(MULTICAST_SYNACK, move(data)); + send_control(MULTICAST_SYNACK, OPENDDS_MOVE_NS::move(data)); // Send naks before sending synack to // reduce wait time for resends from remote. diff --git a/dds/DCPS/transport/multicast/ReliableSession.cpp b/dds/DCPS/transport/multicast/ReliableSession.cpp index ac5d4a503e7..8113a35592b 100644 --- a/dds/DCPS/transport/multicast/ReliableSession.cpp +++ b/dds/DCPS/transport/multicast/ReliableSession.cpp @@ -457,7 +457,7 @@ ReliableSession::send_naks() } } // Send control sample to remote peer: - send_control(MULTICAST_NAK, move(data)); + send_control(MULTICAST_NAK, OPENDDS_MOVE_NS::move(data)); } if (received.disjoint()) { sending_naks = true; @@ -578,7 +578,7 @@ ReliableSession::send_naks(DisjointSequence& received) } } // Send control sample to remote peer: - send_control(MULTICAST_NAK, move(data)); + send_control(MULTICAST_NAK, OPENDDS_MOVE_NS::move(data)); } @@ -642,7 +642,7 @@ ReliableSession::send_nakack(SequenceNumber low) serializer << low; // Broadcast control sample to all peers: - send_control(MULTICAST_NAKACK, move(data)); + send_control(MULTICAST_NAKACK, OPENDDS_MOVE_NS::move(data)); } bool diff --git a/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.cpp b/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.cpp index 3e23d6b12d9..08291e2d346 100644 --- a/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.cpp +++ b/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.cpp @@ -30,11 +30,11 @@ TqePair RtpsCustomizedElement::fragment(size_t size) return null_tqe_pair; } - RtpsCustomizedElement* frag = new RtpsCustomizedElement(0, move(head)); + RtpsCustomizedElement* frag = new RtpsCustomizedElement(0, OPENDDS_MOVE_NS::move(head)); frag->set_fragment(this); frag->last_frag_ = fragNumbers.first; - RtpsCustomizedElement* rest = new RtpsCustomizedElement(this, move(tail)); + RtpsCustomizedElement* rest = new RtpsCustomizedElement(this, OPENDDS_MOVE_NS::move(tail)); rest->set_fragment(this); rest->last_frag_ = fragNumbers.second; diff --git a/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.inl b/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.inl index 8b4f112410d..9fce3956aac 100644 --- a/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.inl +++ b/dds/DCPS/transport/rtps_udp/RtpsCustomizedElement.inl @@ -16,7 +16,7 @@ RtpsCustomizedElement::RtpsCustomizedElement(TransportQueueElement* orig, : TransportCustomizedElement(orig) { set_requires_exclusive(); - set_msg(move(msg)); + set_msg(OPENDDS_MOVE_NS::move(msg)); } ACE_INLINE diff --git a/dds/DCPS/transport/rtps_udp/RtpsUdpDataLink.cpp b/dds/DCPS/transport/rtps_udp/RtpsUdpDataLink.cpp index fb027281717..8adeed330cc 100644 --- a/dds/DCPS/transport/rtps_udp/RtpsUdpDataLink.cpp +++ b/dds/DCPS/transport/rtps_udp/RtpsUdpDataLink.cpp @@ -1198,7 +1198,7 @@ RtpsUdpDataLink::RtpsWriter::customize_queue_element_helper( Message_Block_Ptr hdr(link->submsgs_to_msgblock(subm)); hdr->cont(data.release()); RtpsCustomizedElement* rtps = - new RtpsCustomizedElement(element, move(hdr)); + new RtpsCustomizedElement(element, OPENDDS_MOVE_NS::move(hdr)); // Handle durability resends if (durable) { @@ -1300,7 +1300,7 @@ RtpsUdpDataLink::customize_queue_element_non_reliable_i( Message_Block_Ptr hdr(submsgs_to_msgblock(subm)); hdr->cont(data.release()); - return new RtpsCustomizedElement(element, move(hdr)); + return new RtpsCustomizedElement(element, OPENDDS_MOVE_NS::move(hdr)); } TransportQueueElement* diff --git a/dds/DCPS/transport/shmem/ShmemDataLink.cpp b/dds/DCPS/transport/shmem/ShmemDataLink.cpp index f8b53c7c6f4..9461a660a66 100644 --- a/dds/DCPS/transport/shmem/ShmemDataLink.cpp +++ b/dds/DCPS/transport/shmem/ShmemDataLink.cpp @@ -159,7 +159,7 @@ ShmemDataLink::send_association_msg(const GUID_t& local, const GUID_t& remote) Serializer ser(message.get(), encoding_unaligned_native); ser << remote; send_strategy_->link_released(false); - TransportControlElement* send_element = new TransportControlElement(move(message)); + TransportControlElement* send_element = new TransportControlElement(OPENDDS_MOVE_NS::move(message)); this->send_i(send_element, false); } diff --git a/dds/DCPS/transport/tcp/TcpDataLink.cpp b/dds/DCPS/transport/tcp/TcpDataLink.cpp index b4897c38d24..bc58fd090e4 100644 --- a/dds/DCPS/transport/tcp/TcpDataLink.cpp +++ b/dds/DCPS/transport/tcp/TcpDataLink.cpp @@ -366,7 +366,7 @@ OpenDDS::DCPS::TcpDataLink::send_graceful_disconnect_message() *message << header_data; - TransportControlElement* send_element = new TransportControlElement(move(message)); + TransportControlElement* send_element = new TransportControlElement(OPENDDS_MOVE_NS::move(message)); // I don't want to rebuild a connection in order to send // a graceful disconnect message. @@ -486,7 +486,7 @@ OpenDDS::DCPS::TcpDataLink::request_ack_received(const ReceivedDataSample& sampl *message << header_data; - TransportControlElement* send_element = new TransportControlElement(move(message)); + TransportControlElement* send_element = new TransportControlElement(OPENDDS_MOVE_NS::move(message)); // I don't want to rebuild a connection in order to send @@ -554,7 +554,7 @@ OpenDDS::DCPS::TcpDataLink::send_association_msg(const GUID_t& local, const GUID Serializer ser(message.get(), encoding_unaligned_native); ser << remote; - TransportControlElement* send_element = new TransportControlElement(move(message), local); + TransportControlElement* send_element = new TransportControlElement(OPENDDS_MOVE_NS::move(message), local); this->send_i(send_element, false); } diff --git a/dds/DCPS/unique_ptr.h b/dds/DCPS/unique_ptr.h index ea2e4a905c1..be8beccd98c 100644 --- a/dds/DCPS/unique_ptr.h +++ b/dds/DCPS/unique_ptr.h @@ -17,6 +17,7 @@ #ifdef OPENDDS_HAS_STD_UNIQUE_PTR # include +# define OPENDDS_MOVE_NS std #else # include "Atomic.h" # ifdef ACE_HAS_CPP11 @@ -24,6 +25,7 @@ # else # include # endif +# define OPENDDS_MOVE_NS OpenDDS::DCPS #endif OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/dds/InfoRepo/DCPSInfo_i.cpp b/dds/InfoRepo/DCPSInfo_i.cpp index b61d9d8752d..fcd6218d1a5 100644 --- a/dds/InfoRepo/DCPSInfo_i.cpp +++ b/dds/InfoRepo/DCPSInfo_i.cpp @@ -598,7 +598,7 @@ TAO_DDS_DCPSInfo_i::add_publication(DDS::DomainId_t domainId, serializedTypeInfo)); DCPS_IR_Publication* pub = pubPtr.get(); - switch (partPtr->add_publication(move(pubPtr))) { + switch (partPtr->add_publication(OPENDDS_MOVE_NS::move(pubPtr))) { case -1: { OpenDDS::DCPS::RepoIdConverter converter(pubId); ACE_ERROR((LM_ERROR, @@ -821,7 +821,7 @@ bool TAO_DDS_DCPSInfo_i::add_subscription(DDS::DomainId_t domainId, bool retval = true; DCPS_IR_Subscription* sub = subPtr.get(); - if (partPtr->add_subscription(move(subPtr)) != 0) { + if (partPtr->add_subscription(OPENDDS_MOVE_NS::move(subPtr)) != 0) { // failed to add. we are responsible for the memory. retval = false; } else if (topic->add_subscription_reference(sub) != 0) { diff --git a/dds/InfoRepo/DCPS_IR_Domain.cpp b/dds/InfoRepo/DCPS_IR_Domain.cpp index 3a9d7d7d05d..db030bf3407 100644 --- a/dds/InfoRepo/DCPS_IR_Domain.cpp +++ b/dds/InfoRepo/DCPS_IR_Domain.cpp @@ -212,7 +212,7 @@ OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::add_topic_i(OpenDDS::DCPS::GUID_t& to topicName, dataTypeName)); description = desc.get(); - int descriptionAddition = add_topic_description(move(desc)); + int descriptionAddition = add_topic_description(OPENDDS_MOVE_NS::move(desc)); if (0 != descriptionAddition) { topicId = OpenDDS::DCPS::GUID_UNKNOWN; @@ -258,7 +258,7 @@ OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::add_topic_i(OpenDDS::DCPS::GUID_t& to publish_topic_bit(topic.get()); // Keep a reference to easily locate the topic by id. - this->idToTopicMap_[topicId] = move(topic); + this->idToTopicMap_[topicId] = OPENDDS_MOVE_NS::move(topic); } break; @@ -907,7 +907,7 @@ int DCPS_IR_Domain::add_topic_description(OpenDDS::DCPS::unique_ptrget_dataTypeName(), discard)) { case -1: - this->topicDescriptions_[desc_ptr->get_name()] = move(desc); + this->topicDescriptions_[desc_ptr->get_name()] = OPENDDS_MOVE_NS::move(desc); if (OpenDDS::DCPS::DCPS_debug_level > 0) { ACE_DEBUG((LM_DEBUG, diff --git a/dds/InfoRepo/UpdateListener_T.cpp b/dds/InfoRepo/UpdateListener_T.cpp index ebffb029e20..6f4390db715 100644 --- a/dds/InfoRepo/UpdateListener_T.cpp +++ b/dds/InfoRepo/UpdateListener_T.cpp @@ -81,7 +81,7 @@ UpdateListener::on_data_available( this->federationId_.id() != sample->sender) { // Delegate processing to the federation manager. - this->receiver_.add(move(sample), move(info)); + this->receiver_.add(OPENDDS_MOVE_NS::move(sample), OPENDDS_MOVE_NS::move(info)); } } else if (status == DDS::RETCODE_NO_DATA) { diff --git a/dds/idl/be_global.cpp b/dds/idl/be_global.cpp index 59f4c3f798c..9b88c6f2d4d 100644 --- a/dds/idl/be_global.cpp +++ b/dds/idl/be_global.cpp @@ -1057,7 +1057,7 @@ OpenDDS::XTypes::MemberId BE_GlobalData::get_id(AST_Field* field) return pos->second; } be_util::misc_error_and_abort("Could not get member id for field"); - return -1; + return OpenDDS::XTypes::MEMBER_ID_INVALID; } bool BE_GlobalData::dynamic_data_adapter(AST_Decl* node) const diff --git a/dds/idl/be_produce.cpp b/dds/idl/be_produce.cpp index 55f58da0e44..8a9c5240b98 100644 --- a/dds/idl/be_produce.cpp +++ b/dds/idl/be_produce.cpp @@ -274,7 +274,7 @@ void postprocess(const char* fn, ostringstream& content, // to make namespaces with names based on the file instead. std::string prefix = to_macro(fn); for (size_t i = 0; i < prefix.size(); ++i) { - prefix[i] = tolower(prefix[i]); + prefix[i] = static_cast(tolower(prefix[i])); } out << "\n" diff --git a/dds/idl/marshal_generator.cpp b/dds/idl/marshal_generator.cpp index a9572718161..e9fb8d811c3 100644 --- a/dds/idl/marshal_generator.cpp +++ b/dds/idl/marshal_generator.cpp @@ -578,10 +578,10 @@ namespace { } else { RefWrapper elem_wrapper(elem, cxx_elem, value_access + "[i]"); elem_wrapper.nested_key_only_ = nested_key_only; - Intro intro; - elem_wrapper.done(&intro); + Intro intro2; + elem_wrapper.done(&intro2); const std::string indent = " "; - intro.join(be_global->impl_, indent); + intro2.join(be_global->impl_, indent); be_global->impl_ << indent << "serialized_size(encoding, size, " << elem_wrapper.ref() << ");\n"; } @@ -659,9 +659,9 @@ namespace { } else { RefWrapper elem_wrapper(elem, cxx_elem, value_access + "[i]"); elem_wrapper.nested_key_only_ = nested_key_only; - Intro intro; - elem_wrapper.done(&intro); - intro.join(be_global->impl_, " "); + Intro intro2; + elem_wrapper.done(&intro2); + intro2.join(be_global->impl_, " "); be_global->impl_ << streamAndCheck("<< " + elem_wrapper.ref(), 4); } be_global->impl_ << @@ -792,14 +792,14 @@ namespace { be_global->impl_ << " for (CORBA::ULong i = 0; i < new_length; ++i) {\n"; - Intro intro; + Intro intro2; std::string stream_to; std::string classic_array_copy; if (!use_cxx11 && (elem_cls & CL_ARRAY)) { RefWrapper classic_array_wrapper( seq->base_type(), scoped(deepest_named_type(seq->base_type())->name()), elem_access); classic_array_wrapper.classic_array_copy_ = true; - classic_array_wrapper.done(&intro); + classic_array_wrapper.done(&intro2); classic_array_copy = classic_array_wrapper.classic_array_copy(); stream_to = classic_array_wrapper.ref(); } else if (elem_cls & CL_STRING) { @@ -815,11 +815,11 @@ namespace { } else { RefWrapper elem_wrapper(elem, cxx_elem, value_access + "[i]", false); elem_wrapper.nested_key_only_ = nested_key_only; - elem_wrapper.done(&intro); + elem_wrapper.done(&intro2); stream_to = elem_wrapper.ref(); } const std::string indent = " "; - intro.join(be_global->impl_, indent); + intro2.join(be_global->impl_, indent); be_global->impl_ << indent << " if (!(strm >> " << stream_to << ")) {\n"; @@ -829,15 +829,15 @@ namespace { " strm.set_construction_status(Serializer::ConstructionSuccessful);\n"; } else if ((try_construct == tryconstructfailaction_trim) && (elem_cls & CL_BOUNDED) && (elem_cls & (CL_STRING | CL_SEQUENCE))) { - if (elem_cls & CL_STRING){ + if (elem_cls & CL_STRING) { const std::string check_not_empty = use_cxx11 ? "!" + elem_access + ".empty()" : elem_access + ".in()"; - const std::string get_length = + const std::string get_length2 = use_cxx11 ? elem_access + ".length()" : "ACE_OS::strlen(" + elem_access + ".in())"; const string inout = use_cxx11 ? "" : ".inout()"; be_global->impl_ << " if (" + construct_bound_fail + " && " << check_not_empty << " && (" << - bounded_arg(elem) << " < " << get_length << ")) {\n" + bounded_arg(elem) << " < " << get_length2 << ")) {\n" " " << elem_access << inout << (use_cxx11 ? (".resize(" + bounded_arg(elem) + ");\n") : ("[" + bounded_arg(elem) + "] = 0;\n")) << " strm.set_construction_status(Serializer::ConstructionSuccessful);\n" @@ -2410,13 +2410,13 @@ namespace { return true; } - bool generate_struct_deserialization( - AST_Structure* node, FieldFilter field_type) + bool generate_struct_deserialization(AST_Structure* node, + FieldFilter field_filter) { const std::string actual_cpp_name = scoped(node->name()); std::string cpp_name = actual_cpp_name; std::string const_cpp_name; - switch (field_type) { + switch (field_filter) { case FieldFilter_All: const_cpp_name = "const" + actual_cpp_name + "&"; break; @@ -2429,9 +2429,9 @@ namespace { const_cpp_name = "const KeyOnly&"; break; } - const std::string value_access = field_type == FieldFilter_All ? "" : ".value"; - const bool wrap_nested_key_only = field_type != FieldFilter_All; - const Fields fields(node, field_type); + const std::string value_access = field_filter == FieldFilter_All ? "" : ".value"; + const bool wrap_nested_key_only = field_filter != FieldFilter_All; + const Fields fields(node, field_filter); const Fields::Iterator fields_end = fields.end(); RtpsFieldCustomizer rtpsCustom(cpp_name); @@ -2715,12 +2715,12 @@ namespace { return true; } - bool generate_struct_serialization_functions(AST_Structure* node, FieldFilter field_type) + bool generate_struct_serialization_functions(AST_Structure* node, FieldFilter field_filter) { const std::string actual_cpp_name = scoped(node->name()); std::string cpp_name = actual_cpp_name; std::string const_cpp_name; - switch (field_type) { + switch (field_filter) { case FieldFilter_All: const_cpp_name = "const" + actual_cpp_name + "&"; break; @@ -2733,9 +2733,9 @@ namespace { const_cpp_name = "const KeyOnly&"; break; } - const std::string value_access = field_type == FieldFilter_All ? "" : ".value"; - const bool wrap_nested_key_only = field_type != FieldFilter_All; - const Fields fields(node, field_type); + const std::string value_access = field_filter == FieldFilter_All ? "" : ".value"; + const bool wrap_nested_key_only = field_filter != FieldFilter_All; + const Fields fields(node, field_filter); const Fields::Iterator fields_end = fields.end(); RtpsFieldCustomizer rtpsCustom(cpp_name); @@ -2881,7 +2881,7 @@ namespace { be_global->impl_ << mutable_fields.str() << " return " << expr << ";\n"; } - return generate_struct_deserialization(node, field_type); + return generate_struct_deserialization(node, field_filter); } } // anonymous namespace @@ -3606,7 +3606,6 @@ bool marshal_generator::gen_union(AST_Union* node, UTL_ScopedName* name, // Add a reference to the idl file, if the descriminator is user defined. AST_Type* disc_type = resolveActualType(discriminator); - const Classification disc_cls = classify(disc_type); if (!disc_type->in_main_file() && disc_type->node_type() != AST_Decl::NT_pre_defined) { be_global->add_referenced(disc_type->file_name().c_str()); } diff --git a/docs/devguide/building/dependencies.rst b/docs/devguide/building/dependencies.rst index 858e23cd645..ccad47aef5c 100644 --- a/docs/devguide/building/dependencies.rst +++ b/docs/devguide/building/dependencies.rst @@ -49,7 +49,7 @@ ACE/TAO The DOC Group repository for ACE/TAO is hosted on Github at `DOCGroup/ACE_TAO `__. -There are two versions of ACE/TAO that are officially supported by OpenDDS in this release (|release|): +These are the versions of ACE/TAO that are officially supported by OpenDDS in this release (|release|): .. _ace6tao2: @@ -73,6 +73,14 @@ DOC Group :acetaorel:`ace7tao3` This also clones the ``master`` branch of MPC as is. :ref:`CMake ` will do the same if :cmake:var:`OPENDDS_ACE_TAO_GIT` is set to ``TRUE``. +.. _ace8tao4: + +DOC Group :acetaorel:`ace8tao4` + Pass ``--ace-tao=ace8tao4`` to the configure script to download this version. + :ref:`CMake ` will download this version if :cmake:var:`OPENDDS_ACE_TAO_KIND` is set to ``ace8tao4``. + + This version requires a C++17-capable compiler. + .. _deps-ace: ACE diff --git a/docs/devguide/building/index.rst b/docs/devguide/building/index.rst index 7075d797efd..51ce6bfcf08 100644 --- a/docs/devguide/building/index.rst +++ b/docs/devguide/building/index.rst @@ -605,7 +605,7 @@ These are all the variables that are exclusive to building OpenDDS with CMake: .. cmake:var:: OPENDDS_ACE_TAO_KIND The default is ``ace7tao3`` for :ref:`ACE 7/TAO 3 `. - Use ``ace6tao2`` to get :ref:`ACE 6/TAO 2 `. + See :ref:`here ` for other versions of ACE/TAO. .. versionadded:: 3.27 diff --git a/docs/devguide/internet_enabled_rtps.rst b/docs/devguide/internet_enabled_rtps.rst index abd0f75c1ab..fd9bce81443 100644 --- a/docs/devguide/internet_enabled_rtps.rst +++ b/docs/devguide/internet_enabled_rtps.rst @@ -16,11 +16,11 @@ Overview .. Sect<15.1> -Like any specification, standard, or system, RTPS was designed with certain assumptions. +Like any specification, standard, or system, :ref:`RTPS ` was designed with certain assumptions. Two of these assumptions severely limit the ability to use RTPS in modern network environments. -First, RTPS, or more specifically, SPDP uses multicast for discovery. +First, RTPS, or more specifically, :ref:`SPDP ` uses multicast for discovery. Multicast is not supported on the public Internet which precludes the use of RTPS for Internet of Things (IoT) applications and Industrial Internet of Things (IIoT) applications. -Second, SPDP and SEDP advertise locators (IP and port pairs) for endpoints (DDS readers and writer). +Second, SPDP and :ref:`SEDP ` advertise locators (IP and port pairs) for endpoints (DDS readers and writer). If the participant is behind a firewall that performs network address translation, then the locators advertised by the participant are useless to participants on the public side of the firewall. This section describes different tools and techniques for getting around these limitations. @@ -83,7 +83,7 @@ Firewalls on the path to the participants intercept the packet and replace the d The RTPS implementation in OpenDDS uses a port for SPDP, a port for SEDP, and a port for conventional RTPS messages. The relay mirrors this idea and exposes three ports to handle each type of traffic. -To keep NAT bindings alive, clients send STUN binding requests and indications periodically to the RtspRelay ports. +To keep NAT bindings alive, clients send STUN binding requests and indications periodically to the RtpsRelay ports. Participants using ICE may use these ports as a STUN server for determining a server reflexive address. The timing parameters for the periodic messages are controlled via the ICE configuration variables for server reflexive addresses. @@ -119,7 +119,8 @@ As an example: Each participant should use a single RtpsRelay instance due to the way NAT bindings work. Most firewalls will only forward packets received from the destination address that was originally used to create the NAT binding. -That is, if participant A is interacting with relay A and participant B is interacting with relay B, then a message from A to B must go from A to relay A, to relay B, and finally to B. Relay A cannot send directly to B since that packet will not be accepted by the firewall. +That is, if participant A is interacting with relay 1 and participant B is interacting with relay 2, then a message from participant A to participant B must go from participant A to relay 1, to relay 2, and finally to participant B. +Relay 1 cannot send directly to B since that packet will not be accepted by the firewall. .. _internet_enabled_rtps--usage: @@ -129,24 +130,30 @@ Usage .. Sect<15.2.2> +.. program:: RtpsRelay + The RtpsRelay itself is an OpenDDS application. The source code is located in :ghfile:`tools/rtpsrelay`. Security must be enabled to build the RtpsRelay. See :ref:`dds_security--building-opendds-with-security-enabled`. Each RtpsRelay process has a set of ports for exchanging RTPS messages with the participants called the "vertical" ports and a set of ports for exchanging RTPS messages with other relays called the "horizontal" ports. -The RtpsRelay contains an embedded webserver called the meta discovery server. -The webserver has the following endpoints: +.. _internet_enabled_rtps--metadisc-server: + +The RtpsRelay contains an embedded web server called the *meta discovery server*. +The listening address can be set using :option:`-MetaDiscoveryAddress` and logging can be enabled using :option:`-LogHttp`. +The web server has the following endpoints: * ``/config`` Responds with configured content and content type. - See -MetaDiscovery options below. + See :option:`-MetaDiscoveryContentPath` and :option:`-MetaDiscoveryContent` below. Potential client participants can download the necessary configuration from this endpoint. * ``/healthcheck`` Responds with HTTP 200 (OK) or 503 (Service Unavailable) if :cfg:prop:`thread monitoring is enabled ` and the RtpsRelay is not admitting new client participants. + See :option:`-UtilizationLimit`, :option:`-AdmissionControlQueueSize`, and :option:`-AdmissionControlQueueDuration` for more information. Load balancers can use this endpoint to route new client participants to an available RtpsRelay instance. The command-line options for the RtpsRelay: @@ -155,15 +162,15 @@ The command-line options for the RtpsRelay: This option is mandatory and is a unique id associated with all topics published by the relay. -.. option:: -HorizontalAddres
+.. option:: -HorizontalAddress
Determines the base network address used for receiving RTPS message from other relays. - By default, the relay listens on the first IP network and uses port 11444 for SPDP messages, 11445 for SEDP messages, and 11446 for data messages. + By default, the relay listens on the first IP network interface and uses port ``11444`` for :ref:`SPDP ` messages, ``11445`` for :ref:`SEDP ` messages, and ``11446`` for data messages. .. option:: -VerticalAddress
Determines the base network address used for receiving RTPS messages from the participants. - By default, the relay listens on 0.0.0.0:4444 for SPDP messages, 0.0.0.0:4445 for SEDP messages, and 0.0.0.0.4446 for data messages. + By default, the relay listens on ``0.0.0.0:4444`` for :ref:`SPDP ` messages, ``0.0.0.0:4445`` for :ref:`SEDP ` messages, and ``0.0.0.0.4446`` for data messages. .. option:: -RelayDomain @@ -240,6 +247,10 @@ The command-line options for the RtpsRelay: Enable/disable logging of activity events. +.. option:: -LogHttp 0|1 + + Enable/disable logging in the :ref:`meta discovery HTTP server `. + .. option:: -LogRelayStatistics .. option:: -LogHandlerStatistics @@ -268,6 +279,17 @@ The command-line options for the RtpsRelay: If :cfg:prop:`thread monitoring is enabled `, the RtpsRelay will not accept new client participants if the CPU utilization of any thread is above this limit, default .95. +.. option:: -AdmissionControlQueueSize + + The max number of new client participants that are allowed to perform discovery. + If the admission control queue is full, then new client participants are not admitted. + Default is 0 (disabled). + +.. option:: -AdmissionControlQueueDuration + + New client participants in the :option:`admission control queue <-AdmissionControlQueueSize>` that are taking longer than this many seconds to perform discovery are removed from the queue. + Default is 0. + .. option:: -PublishRelayStatus Setting this to a positive integer causes the relay to publish its status at that interval. @@ -278,17 +300,17 @@ The command-line options for the RtpsRelay: .. option:: -MetaDiscoveryAddress : - Listening address for the meta discovery server, default is ``0.0.0.0:8080``. + Listening address for the :ref:`meta discovery HTTP server `, default is ``0.0.0.0:8080``. .. option:: -MetaDiscoveryContentType - The HTTP content type to report for the meta discovery config endpoint, default is ``application/json``. + The HTTP content type to report for the :ref:`meta discovery HTTP server ` ``/config`` endpoint, default is ``application/json``. -.. option:: -MetaDiscoveryContentPath +.. option:: -MetaDiscoveryContentPath .. option:: -MetaDiscoveryContent - The content returned by the meta discovery config endpoint, default ``{}``. + The content returned by the :ref:`meta discovery HTTP server ` ``/config`` endpoint, default is ``{}``. If a path is specified, the content of the file will be used. .. option:: -MaxIpsPerClient @@ -343,7 +365,7 @@ Second, the hosts generate and exchange candidates (which includes the public IP A candidate is an IP and port that responds to STUN messages and sends datagrams. Third, the hosts send STUN binding requests to the candidates in an attempt to generate the necessary NAT bindings and establish connectivity. -For OpenDDS, ICE can be used to potentially establish connectivity between SPDP endpoints, SEDP endpoints, and ordinary RTPS endpoints. +For OpenDDS, ICE can be used to potentially establish connectivity between :ref:`SPDP ` endpoints, :ref:`SEDP ` endpoints, and ordinary RTPS endpoints. SPDP is used as the side channel for SEDP and SEDP is used as the side channel for the ordinary RTPS endpoints. To this, we added two parameters to the RTPS protocol for sending general ICE information and ICE candidates and added the ability to execute the ICE protocol and process STUN messages to the RTPS transports. diff --git a/docs/devguide/introduction.rst b/docs/devguide/introduction.rst index 891719a745a..3c49c00bb71 100644 --- a/docs/devguide/introduction.rst +++ b/docs/devguide/introduction.rst @@ -70,7 +70,7 @@ Real-time Publish-Subscribe (RTPS) The full name of this specification is the *Real-time Publish-Subscribe Protocol DDS Interoperability Wire Protocol* (DDSI-RTPS), but can also be just called RTPS. This specification describes the requirements for interoperability between DDS implementations. -See :ref:`rtps-disc` for more information. +See :ref:`rtps-disc` and :ref:`rtps-udp-transport` for more information. The version OpenDDS uses is :omgspec:`rtps`. Although the document number is v2.3, it specifies protocol version 2.4. diff --git a/docs/devguide/run_time_configuration.rst b/docs/devguide/run_time_configuration.rst index aab20e624f1..4fd4dd1747b 100644 --- a/docs/devguide/run_time_configuration.rst +++ b/docs/devguide/run_time_configuration.rst @@ -1026,21 +1026,24 @@ Configuring for RTPS Discovery .. Sect<7.3.3> +.. default-cfg-sec:: rtps_discovery + This section describes the configuration properties for :ref:`rtps-disc`. -The RTPS specification gives the following simple description that forms the basis for the discovery approach used by OpenDDS and the two different protocols used to accomplish the discovery operations. -The excerpt from the :omgspec:`rtps:8.5.1` is as follows: - The RTPS specification splits up the discovery protocol into two independent protocols: +To configure RTPS discovery, it's helpful to understand that it is composed of two distinct protocols: - 1. Participant Discovery Protocol +.. _spdp: - 2. Endpoint Discovery Protocol +*Simple Participant Discovery Protocol* (SPDP) + This protocol is how RTPS participants :prop:`discover each other ` and let each other know :prop:`they're still available `. + They also use it to exchange basic information about each other such as the domain id and addresses to use to communicate. + More about SPDP can be found in :omgspec:`rtps:8.5.3 The Simple Participant Discovery Protocol`. - A Participant Discovery Protocol (PDP) specifies how Participants discover each other in the network. - Once two Participants have discovered each other, they exchange information on the Endpoints they contain using an Endpoint Discovery Protocol (EDP). - Apart from this causality relationship, both protocols can be considered independent. +.. _sedp: -The configuration options discussed in this section allow a user to specify property values to change the behavior of the *Simple Participant Discovery Protocol* (SPDP) and/or the *Simple Endpoint Discovery Protocol* (SEDP) default settings. +*Simple Endpoint Discovery Protocol* (SEDP) + This protocol is how RTPS participants exchange information about their :term:`DataReader`\s and :term:`DataWriter`\s, including their :ref:`qos`. + More about SEDP can be found in :omgspec:`rtps:8.5.4 The Simple Endpoint Discovery Protocol`. RTPS discovery can be configured for a single domain or for multiple domains as was done in :ref:`run_time_configuration--configuring-for-multiple-dcpsinforepo-instances`. @@ -1064,7 +1067,7 @@ The following example uses the ``[common]`` section to point to an instance of a ResendPeriod=5 The instance ``[rtps_discovery/TheRTPSConfig]`` is now the location where properties that vary the default RTPS settings get specified. -In our example the :prop:`ResendPeriod=5 <[rtps_discovery]ResendPeriod>` entry sets the number of seconds between periodic announcements of available data readers / data writers and to detect the presence of other data readers / data writers on the network. +In our example the :prop:`ResendPeriod=5 ` entry sets the number of seconds between periodic announcements of available data readers / data writers and to detect the presence of other data readers / data writers on the network. This would override the default of 30 seconds. If your OpenDDS deployment uses multiple domains, the following configuration approach combines the use of the :sec:`domain` section title with :sec:`rtps_discovery` to allow a user to specify particular settings by domain. @@ -1103,22 +1106,24 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: ResendPeriod= :default: ``30`` - The number of seconds that a process waits between the announcement of participants (see :omgspec:`rtps:8.5.3`). + The number of seconds that a process waits between the :ref:`SPDP participant announcements `. .. prop:: MinResendDelay= :default: ``100`` - The minimum time in milliseconds between participant announcements. + The minimum time in milliseconds between :ref:`SPDP participant announcements `. .. prop:: QuickResendRatio= :default: ``0.1`` - Tuning parameter that configures local SPDP resends as a fraction of the resend period. + Tuning parameter that configures local :ref:`SPDP participant announcement ` resends as a fraction of the resend period. + When a new participant is discovered, the :prop:`ResendPeriod` is shorted by multiplying with the ``QuickResendRatio`` for the next announcement. + Thus, if ``ResendPeriod`` was 30 and ``QuickResendRatio`` is .1, then the resend period would go down to 3 seconds when a new participant is discovered. .. prop:: LeaseDuration= :default: ``300`` (5 minutes) - Sent as part of the participant announcement. + Sent as part of the :ref:`SPDP participant announcement `. It tells the peer participants that if they don't hear from this participant for the specified duration, then this participant can be considered "not alive". .. prop:: LeaseExtension= @@ -1200,21 +1205,21 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SedpMaxMessageSize= :default: ``65466`` (maximum worst-case UDP payload size) - Set the maximum SEDP message size. + Set the maximum :ref:`SEDP ` message size. See :prop:`[transport@rtps_udp]max_message_size`. .. prop:: SedpMulticast= :default: ``1`` - Determines whether Multicast is used for the SEDP traffic. + Determines whether multicast can be used for :ref:`SEDP ` traffic. When set to ``1``, Multicast is used. When set to ``0``, Unicast is used. .. prop:: SedpMulticastAddress=[:] :default: :prop:`InteropMulticastOverride` - The multicast group to use for SEDP multicast traffic. + The multicast group to use for :ref:`SEDP ` multicast traffic. If ```` is ``0`` or not specified, it is calculated as described in :ref:`config-ports-used-by-sedp-multicast`. .. prop:: Ipv6SedpMulticastAddress=[:] @@ -1225,7 +1230,7 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SedpLocalAddress=:[] :default: :prop:`[common]DCPSDefaultAddress` - Configure the transport instance created and used by SEDP to bind to the specified local address and port. + Configure the transport instance created and used by :ref:`SEDP ` to bind to the specified local address and port. In order to leave the port unspecified, it can be omitted from the setting but the trailing ``:`` must be present. If ```` is ``0`` or not specified, it is calculated as described in :ref:`config-ports-used-by-sedp-unicast`. @@ -1237,7 +1242,7 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SpdpMulticastAddress=[:] :default: :prop:`InteropMulticastOverride` - The multicast group to use for SPDP multicast traffic. + The multicast group to use for :ref:`SPDP ` multicast traffic. If ```` is ``0`` or not specified, it is calculated as described in :ref:`config-ports-used-by-spdp-multicast`. .. prop:: Ipv6SpdpMulticastAddress=[:] @@ -1248,7 +1253,7 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SpdpLocalAddress=[:] :default: :prop:`[common]DCPSDefaultAddress` - Address of a local interface, which will be used by SPDP to bind to that specific interface. + Address of a local interface, which will be used by :ref:`SPDP ` to bind to that specific interface. If ```` is ``0`` or not specified, it is calculated as described in :ref:`config-ports-used-by-spdp-unicast`. .. prop:: Ipv6SpdpLocalAddress=[:] @@ -1258,51 +1263,51 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SedpAdvertisedLocalAddress=:[] - Sets the address advertised by SEDP. + Sets the address advertised by :ref:`SEDP `. Typically used when the participant is behind a firewall or NAT. In order to leave the port unspecified, it can be omitted from the setting but the trailing ``:`` must be present. .. prop:: SedpSendDelay= :default: ``10`` - Time in milliseconds for a built-in SEDP Writer to wait before sending data. + Time in milliseconds for a built-in :ref:`SEDP ` Writer to wait before sending data. .. prop:: SedpHeartbeatPeriod= :default: ``200`` - Time in milliseconds for a built-in SEDP Writer to announce the availability of data. + Time in milliseconds for a built-in :ref:`SEDP ` Writer to announce the availability of data. .. prop:: SedpNakResponseDelay= :default: ``100`` - Time in milliseconds for a built-in SEDP Writer to delay the response to a negative acknowledgment. + Time in milliseconds for a built-in :ref:`SEDP ` Writer to delay the response to a negative acknowledgment. .. prop:: SpdpSendAddrs=:[,:]... - A list (comma or whitespace separated) of ``:`` pairs used as destinations for SPDP content. + A list (comma or whitespace separated) of ``:`` pairs used as destinations for :ref:`SPDP ` messages. This can be a combination of Unicast and Multicast addresses. .. prop:: MaxSpdpSequenceMsgResetChecks= :default: ``3`` - Remove a discovered participant after this number of SPDP messages with earlier sequence numbers. + Remove a discovered participant after this number of :ref:`SPDP ` messages with earlier sequence numbers. .. prop:: PeriodicDirectedSpdp= :default: ``0`` (disabled) - A boolean value that determines whether directed SPDP messages are sent to all participants once every resend period. + A boolean value that determines whether directed :ref:`SPDP ` messages are sent to all participants once every resend period. This setting should be enabled for participants that cannot use multicast to send SPDP announcements, e.g., an RtpsRelay. .. prop:: UndirectedSpdp= :default: ``1`` (enabled) - A boolean value that determines whether undirected SPDP messages are sent. + A boolean value that determines whether undirected :ref:`SPDP ` messages are sent. This setting should be disabled for participants that cannot use multicast to send SPDP announcements, e.g., an RtpsRelay. .. prop:: InteropMulticastOverride= :default: ``239.255.0.1`` - A network address specifying the multicast group to be used for SPDP and SEDP. + A network address specifying the multicast group to be used for :ref:`SPDP ` and :ref:`SEDP `. The default is defined by the RTPS specification. This property can be used, for example, to specify use of a routed group address to provide a larger discovery scope. It can be modified by :prop:`[Customization]InteropMulticastOverride`. @@ -1333,16 +1338,16 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SpdpRtpsRelayAddress=: - Specifies the address of the :ref:`RtpsRelay ` for SPDP messages. + Specifies the address of the :ref:`RtpsRelay ` for :ref:`SPDP ` messages. .. prop:: SpdpRtpsRelaySendPeriod= :default: ``30`` seconds - Specifies the interval between SPDP announcements sent to the :ref:`RtpsRelay `. + Specifies the interval between :ref:`SPDP ` announcements sent to the :ref:`RtpsRelay `. .. prop:: SedpRtpsRelayAddress=host:port - Specifies the address of the :ref:`RtpsRelay ` for SEDP messages. + Specifies the address of the :ref:`RtpsRelay ` for :ref:`SEDP ` messages. .. prop:: RtpsRelayOnly= :default: ``0`` (disabled) @@ -1357,16 +1362,16 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SpdpStunServerAddress=: - Specifies the address of the STUN server to use for SPDP when using :ref:`ICE `. + Specifies the address of the STUN server to use for :ref:`SPDP ` when using :ref:`ICE `. .. prop:: SedpStunServerAddress=: - Specifies the address of the STUN server to use for SEDP when using :ref:`ICE `. + Specifies the address of the STUN server to use for :ref:`SEDP ` when using :ref:`ICE `. .. prop:: UseIce= :default: ``0`` (disabled) - Enable or disable :ref:`ICE ` for both SPDP and SEDP. + Enable or disable :ref:`ICE ` for both :ref:`SPDP ` and :ref:`SEDP `. .. prop:: MaxAuthTime= :default: ``300`` seconds (5 minutes) @@ -1416,7 +1421,7 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SedpResponsiveMode= :default: ``0`` (disabled) - Causes the built-in SEDP endpoints to send additional messages which may reduce latency. + Causes the built-in :ref:`SEDP ` endpoints to send additional messages which may reduce latency. .. prop:: SedpPassiveConnectDuration= :default: ``60000`` milliseconds (1 minute) @@ -1426,14 +1431,14 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SendBufferSize= :default: ``0`` (system default value is used, ``65466`` typical) - Socket send buffer size for both SPDP and SEDP. + Socket send buffer size for both :ref:`SPDP ` and :ref:`SEDP `. See :prop:`[transport@rtps_udp]send_buffer_size`. .. prop:: RecvBufferSize= :default: ``0`` (system default value is used, ``65466`` typical) - Socket receive buffer size for both SPDP and SEDP. + Socket receive buffer size for both :ref:`SPDP ` and :ref:`SEDP `. See :prop:`[transport@rtps_udp]rcv_buffer_size`. @@ -1446,17 +1451,17 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SedpReceivePreallocatedMessageBlocks= :default: ``0`` (use :prop:`[transport]receive_preallocated_message_blocks`'s default) - Configure the :prop:`[transport]receive_preallocated_message_blocks` attribute of SEDP's transport. + Configure the :prop:`[transport]receive_preallocated_message_blocks` attribute of :ref:`SEDP `'s transport. .. prop:: SedpReceivePreallocatedDataBlocks= :default: ``0`` (use :prop:`[transport]receive_preallocated_data_blocks`'s default) - Configure the :prop:`[transport]receive_preallocated_data_blocks` attribute of SEDP's transport. + Configure the :prop:`[transport]receive_preallocated_data_blocks` attribute of :ref:`SEDP `'s transport. .. prop:: CheckSourceIp= :default: ``1`` (enabled) - Incoming participant announcements (SPDP) are checked to verify that their source IP address matches one of: + Incoming :ref:`SPDP participant announcements ` are checked to verify that their source IP address matches one of: - An entry in the metatraffic locator list - The configured :ref:`RtpsRelay ` (if any) @@ -1467,7 +1472,7 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem .. prop:: SpdpUserTag= :default: ``0`` (disabled) - Add the OpenDDS-specific UserTag RTPS submessage to the start of SPDP messages. + Add the OpenDDS-specific UserTag RTPS submessage to the start of :ref:`SPDP ` messages. If ```` is 0 (the default), the submessage is not added. Otherwise this submessage's contents is the 4-byte unsigned integer ````. @@ -1476,7 +1481,11 @@ Those properties, along with options specific to OpenDDS's RTPS discovery implem Ports Used by RTPS Discovery ---------------------------- -See :omgspec:`rtps:9.6.1 Default Locators` for the related RTPS spec definitions. +.. seealso:: + + :omgspec:`rtps:9.6.1 Default Locators` for the RTPS spec definitions. + + :ref:`config-ports-used-by-rtps-udp` .. _config-ports-used-by-spdp: @@ -1488,23 +1497,23 @@ Simple Participant Discovery Protocol (SPDP) SPDP Multicast """""""""""""" -The SPDP multicast port will be one of the following: +The :ref:`SPDP ` multicast port will be one of the following: -- Port from :prop:`SpdpMulticastAddress <[rtps_discovery]SpdpMulticastAddress>` if set -- :prop:`PB <[rtps_discovery]PB>` + :prop:`DG <[rtps_discovery]DG>` × *domainId* + :prop:`D0 <[rtps_discovery]D0>` +- Port from :prop:`SpdpMulticastAddress` if set +- :prop:`PB` + :prop:`DG` × *domainId* + :prop:`D0` .. _config-ports-used-by-spdp-unicast: SPDP Unicast """""""""""" -The SPDP unicast port will be one of the following: +The :ref:`SPDP ` unicast port will be one of the following: -- Port from :prop:`SpdpLocalAddress <[rtps_discovery]SpdpLocalAddress>` if set -- A system-provided port if :val:`SpdpPortMode=system <[rtps_discovery]SpdpPortMode=system>` -- :prop:`PB <[rtps_discovery]PB>` + :prop:`DG <[rtps_discovery]DG>` × *domainId* + :prop:`D1 <[rtps_discovery]D1>` + :prop:`PG <[rtps_discovery]PG>` × *participantId* if :val:`SpdpPortMode=probe <[rtps_discovery]SpdpPortMode=probe>` is set (default) +- Port from :prop:`SpdpLocalAddress` if set +- A system-provided port if :val:`SpdpPortMode=system` +- :prop:`PB` + :prop:`DG` × *domainId* + :prop:`D1` + :prop:`PG` × *participantId* if :val:`SpdpPortMode=probe` (default) - - If the port can not be opened, then the *participantId* is incremented until a port can be opened. + - *participantId* starts at 0 and if the port can not be opened, then the *participantId* is incremented until a port can be opened. - If no valid UDP port can be opened, then an error will be logged. .. _config-ports-used-by-sedp: @@ -1514,32 +1523,32 @@ Simple Endpoint Discovery Protocol (SEDP) .. note:: - :prop:`DX <[rtps_discovery]DX>` and :prop:`DY <[rtps_discovery]DY>` are OpenDDS-specific. + :prop:`DX` and :prop:`DY` are OpenDDS-specific. .. _config-ports-used-by-sedp-multicast: SEDP Multicast """""""""""""" -If :prop:`SedpMulticast=1 <[rtps_discovery]SedpMulticast>`, the SEDP multicast port will be one of the following: +If :prop:`SedpMulticast=1 `, the :ref:`SEDP ` multicast port will be one of the following: -- Port from :prop:`SedpMulticastAddress <[rtps_discovery]SedpMulticastAddress>` if set (the same as SPDP) -- :prop:`PB <[rtps_discovery]PB>` + :prop:`DG <[rtps_discovery]DG>` × *domainId* + :prop:`DX <[rtps_discovery]DX>` +- Port from :prop:`SedpMulticastAddress` if set +- :prop:`PB` + :prop:`DG` × *domainId* + :prop:`DX` .. _config-ports-used-by-sedp-unicast: SEDP Unicast """""""""""" -The SEDP unicast port will be one of the following: +The :ref:`SEDP ` unicast port will be one of the following: -- Port from :prop:`SedpLocalAddress <[rtps_discovery]SedpLocalAddress>` if set -- :prop:`PB <[rtps_discovery]PB>` + :prop:`DG <[rtps_discovery]DG>` × *domainId* + :prop:`DY <[rtps_discovery]DY>` + :prop:`PG <[rtps_discovery]PG>` × *participantId* if :val:`SedpPortMode=probe <[rtps_discovery]SedpPortMode=probe>` is set +- Port from :prop:`SedpLocalAddress` if set +- :prop:`PB` + :prop:`DG` × *domainId* + :prop:`DY` + :prop:`PG` × *participantId* if :val:`SedpPortMode=probe` - - If the port can not be opened, then the *participantId* is incremented until a port can be opened. + - *participantId* starts at 0 and if the port can not be opened, then the *participantId* is incremented until a port can be opened. - If no valid UDP port can be opened, then an error will be logged. -- A system-provided port if :val:`SedpPortMode=system <[rtps_discovery]SedpPortMode=system>` (default) +- A system-provided port if :val:`SedpPortMode=system` (default) .. _run_time_configuration--additional-ddsi-rtps-discovery-features: @@ -1552,6 +1561,8 @@ Additional RTPS Discovery Features The RTPS discovery implementation creates and manages a transport instance -- specifically an object of class ``RtpsUdpInst``. In order for applications to access this object and :ref:`enable advanced features `, the ``RtpsDiscovery`` class provides the method ``sedp_transport_inst(domainId, participant)``. +.. default-cfg-sec:: + .. _static-disc-config: .. _run_time_configuration--configuring-for-static-discovery: @@ -2670,6 +2681,8 @@ RTPS UDP Transport Configuration Properties .. Sect<7.4.5.5> +.. default-cfg-sec:: transport@rtps_udp + This section describes the configuration properties for the :ref:`rtps-udp-transport`. To provide an RTPS variant of the single configuration example from :ref:`run_time_configuration--single-transport-configuration`, the configuration file below simply introduces the ``myrtps`` transport and sets :val:`[transport]transport_type=rtps_udp`. @@ -2881,20 +2894,24 @@ Some implementation notes related to using the ``rtps_udp`` transport protocol a .. _config-ports-used-by-rtps-udp: -Ports used by RTPS/UDP +Ports Used by RTPS/UDP ^^^^^^^^^^^^^^^^^^^^^^ -See :omgspec:`rtps:9.6.1 Default Locators` for the related RTPS spec definitions. +.. seealso:: + + :omgspec:`rtps:9.6.1 Default Locators` for the RTPS spec definitions. + + :ref:`config-ports-used-by-rtps-disc` .. _config-ports-used-by-rtps-udp-multicast: Multicast """"""""" -If :prop:`use_multicast=1 <[transport@rtps_udp]use_multicast>` the RTPS/UDP multicast port will be one of the following: +If :prop:`use_multicast=1 ` the RTPS/UDP multicast port will be one of the following: -- Port from :prop:`multicast_group_address <[transport@rtps_udp]multicast_group_address>` and :prop:`ipv6_multicast_group_address <[transport@rtps_udp]ipv6_multicast_group_address>` if set -- :prop:`PB <[transport@rtps_udp]PB>` + :prop:`DG <[transport@rtps_udp]DG>` × *domainId* + :prop:`D2 <[transport@rtps_udp]D2>` +- Port from :prop:`multicast_group_address` and :prop:`ipv6_multicast_group_address` if set +- :prop:`PB` + :prop:`DG` × *domainId* + :prop:`D2` .. _config-ports-used-by-rtps-udp-unicast: @@ -2903,13 +2920,15 @@ Unicast The RTPS/UDP unicast port will be one of the following: -- Port from :prop:`local_address <[transport@rtps_udp]local_address>` and :prop:`ipv6_local_address <[transport@rtps_udp]ipv6_local_address>` if set -- :prop:`PB <[transport@rtps_udp]PB>` + :prop:`DG <[transport@rtps_udp]DG>` × *domainId* + :prop:`D3 <[transport@rtps_udp]D3>` + :prop:`PG <[transport@rtps_udp]PG>` × *participantId* if :val:`PortMode=prob <[transport@rtps_udp]PortMode=probe>` +- Port from :prop:`local_address` and :prop:`ipv6_local_address` if set +- :prop:`PB` + :prop:`DG` × *domainId* + :prop:`D3` + :prop:`PG` × *participantId* if :val:`PortMode=probe` - - If the port can not be opened, then the *participantId* is incremented until a port can be opened. + - *participantId* starts at 0 and if the port can not be opened, then the *participantId* is incremented until a port can be opened. - If no valid UDP port can be opened, then an error will be logged. -- A system-provided port if :val:`PortMode=system <[transport@rtps_udp]PortMode=system>` (default) +- A system-provided port if :val:`PortMode=system` (default) + +.. default-cfg-sec:: .. _run_time_configuration--additional-rtps-udp-features: diff --git a/docs/devguide/safety_profile.rst b/docs/devguide/safety_profile.rst index eb1598b738e..ae357023578 100644 --- a/docs/devguide/safety_profile.rst +++ b/docs/devguide/safety_profile.rst @@ -57,7 +57,7 @@ It is possible that enabling any of these compliance profiles in a Safety Profil To build OpenDDS Safety Profile, pass the command line argument ``--safety-profile`` to the configure script along with any other arguments needed for your platform or configuration. When safety profile is enabled in the configure script, the four compliance profiles listed above default to disabled. -See :ref:`install` for more information about the configure script. +See :ref:`building` for more information about the configure script. .. _safety_profile--safety-profile-configurations-of-ace: diff --git a/docs/internal/docs.rst b/docs/internal/docs.rst index 4e767927d26..418d50bf6b8 100644 --- a/docs/internal/docs.rst +++ b/docs/internal/docs.rst @@ -485,6 +485,11 @@ For :doc:`/devguide/run_time_configuration` there's a custom configuration Sphin Do not include arguments if it has arguments in the directive. The possible formats are ```` and ``@``. +.. rst:directive:: .. default-cfg-sec:: [[@]] + + This sets the default :rst:dir:`cfg:sec` to use in the roles when outside of a section. + If this is not used or has been used with no argument, then the default will be ``common``. + .. rst:directive:: .. cfg:prop:: = Use to document a configuration property that can contain :rst:dir:`cfg:val` and most other RST content. @@ -517,7 +522,7 @@ For :doc:`/devguide/run_time_configuration` there's a custom configuration Sphin - ```` Inside of a :rst:dir:`cfg:sec`, it refers to a property in that section. - Outside of a :rst:dir:`cfg:sec`, the property is assumed to be ``common``. + Outside of a :rst:dir:`cfg:sec`, the property is assumed to be in :rst:dir:`default-cfg-sec`. - ``[]`` - ``[@]`` @@ -541,7 +546,7 @@ For :doc:`/devguide/run_time_configuration` there's a custom configuration Sphin - ``=`` Inside of a :rst:dir:`cfg:sec`, it refers to a value of a property in that section. - Outside of a :rst:dir:`cfg:sec`, the property is assumed to be ``common``. + Outside of a :rst:dir:`cfg:sec`, the property is assumed to be in :rst:dir:`default-cfg-sec`. - ``[]=`` - ``[@]=`` @@ -564,7 +569,7 @@ This is a example made up for the following INI file: Outside their sections, references to properties and values must be complete: :cfg:val:`[server]os=linux`, :cfg:prop:`[server@linux]distro` - Otherwise the ``common`` section will be assumed. + Otherwise the default section will be assumed. .. cfg:sec:: server/ @@ -588,11 +593,23 @@ This is a example made up for the following INI file: .. cfg:prop:: distro= :default: ``Ubuntu`` + .. default-cfg-sec:: server + + ``default-cfg-sec=server``: :cfg:prop:`os`. + + .. default-cfg-sec:: server@linux + + ``default-cfg-sec=server@linux``: :cfg:prop:`distro`. + + .. default-cfg-sec:: + + ``default-cfg-sec=``: :cfg:prop:`[server@linux]distro`. + Turns into: Outside their sections, references to properties and values must be complete: :cfg:val:`[server]os=linux`, :cfg:prop:`[server@linux]distro` - Otherwise the ``common`` section will be assumed. + Otherwise the default section will be assumed. .. cfg:sec:: server/ :no-contents-entry: @@ -628,7 +645,19 @@ Turns into: :no-contents-entry: :no-index-entry: -.. _docs-news: + .. default-cfg-sec:: server + + ``default-cfg-sec=server``: :cfg:prop:`os`. + + .. default-cfg-sec:: server@linux + + ``default-cfg-sec=server@linux``: :cfg:prop:`distro`. + + .. default-cfg-sec:: + + ``default-cfg-sec=``: :cfg:prop:`[server@linux]distro`. + + .. _docs-news: **** News diff --git a/docs/internal/release.rst b/docs/internal/release.rst index da6bc5f88ee..d41e45e5497 100644 --- a/docs/internal/release.rst +++ b/docs/internal/release.rst @@ -358,7 +358,7 @@ Update News on Master .. note:: - This should only be done for the :ref:`latest release ` that's also a `:ref:`micro release `. + This should only be done for the :ref:`latest release ` that's also a :ref:`micro release `. The news on the master branch has to be updated to account for the micro release. Updating the news consists of: diff --git a/docs/news.d/OpenDDSConfig.rst b/docs/news.d/OpenDDSConfig.rst new file mode 100644 index 00000000000..64120f61e49 --- /dev/null +++ b/docs/news.d/OpenDDSConfig.rst @@ -0,0 +1,7 @@ +.. news-prs: 4687 + +.. news-start-section: Removals +- Removed ``OPENDDS_IGNORE_OPENDDSCONFIG_H_FILE`` macro. + + - Users manually configuring a build will need to create ``dds/OpenDDSConfig.h`` which may be empty. +.. news-end-section diff --git a/docs/news.d/OpenDDSConfigWrapper.rst b/docs/news.d/OpenDDSConfigWrapper.rst new file mode 100644 index 00000000000..1d465c75f2f --- /dev/null +++ b/docs/news.d/OpenDDSConfigWrapper.rst @@ -0,0 +1,9 @@ +.. news-prs: 4659 + +.. news-start-section: Additions +- Added :ghfile:`dds/OpenDDSConfigWrapper.h` and :ghfile:`dds/OpenDDSConfigWrapper.idl`. + + - These files will provide defaults for various configuration macros. + + - These files should be included in preference to ``dds/OpenDDSConfig.h`` +.. news-end-section diff --git a/docs/news.d/devguide-misc-fixes.rst b/docs/news.d/devguide-misc-fixes.rst new file mode 100644 index 00000000000..82ae40d608c --- /dev/null +++ b/docs/news.d/devguide-misc-fixes.rst @@ -0,0 +1,6 @@ +.. news-prs: 4699 + +.. news-start-section: Documentation +- Documented :option:`RtpsRelay -LogHttp`, :option:`RtpsRelay -AdmissionControlQueueSize`, and :option:`RtpsRelay -AdmissionControlQueueDuration`. +- Documented :ref:`SPDP ` and :ref:`SEDP `. +.. news-end-section diff --git a/docs/news.d/msg_reset_checks.rst b/docs/news.d/msg_reset_checks.rst new file mode 100644 index 00000000000..fe0eb773a63 --- /dev/null +++ b/docs/news.d/msg_reset_checks.rst @@ -0,0 +1,5 @@ +.. news-prs: 4696 + +.. news-start-section: Fixes +- :cfg:prop:`[rtps_discovery]MaxSpdpSequenceMsgResetChecks` is recognized again. +.. news-end-section diff --git a/docs/sphinx_extensions/config_domain.py b/docs/sphinx_extensions/config_domain.py index 997772c6500..8d984b016d5 100644 --- a/docs/sphinx_extensions/config_domain.py +++ b/docs/sphinx_extensions/config_domain.py @@ -17,6 +17,7 @@ from sphinx.application import Sphinx from sphinx.util import logging from sphinx.util.nodes import nested_parse_with_titles +from sphinx.util.docutils import SphinxDirective from sphinx.roles import XRefRole from custom_domain import CustomDomain, CustomDomainObject, ContextWrapper @@ -27,6 +28,10 @@ class ConfigDomain(CustomDomain): label = 'config' logger = logging.getLogger(__name__) + @classmethod + def ctx(cls, env): + return ContextWrapper(env, cls.name) + def parse(what, regex, string, node, *ret): m = re.fullmatch(regex, string) @@ -106,6 +111,31 @@ def create_signode(self, ctx, name, signode, sec_name, sec_disc, arguments): signode += addnodes.desc_annotation(text, text) +class DefaultCfgSecDirective(SphinxDirective): + has_content = True + name = 'default-cfg-sec' + + def run(self): + ctx = ConfigDomain.ctx(self.env) + + count = len(self.content) + if count == 0: + del ctx.misc[self.name] + elif count == 1: + sec = self.content[0].strip() + parse_section_name(sec, self) + ctx.misc[self.name] = sec + else: + e = ValueError(f'Can not pass more than one line to default-sec') + ConfigDomain.logger.warning(e, location=self.get_location()) + raise e + return [] + + @classmethod + def get_default_section(cls, ctx): + return ctx.misc.get(cls.name, 'common') + + # cfg:prop ==================================================================== prop_name_re = id_re + r'(?:\.' + id_re + r')*' @@ -146,10 +176,25 @@ def key_canonicalize(sec_name, sec_args, prop_name): return sec + '_' + name_canonicalize(prop_name) +def rescope(ctx, sec, sec_name, prop_name=None): + scope = ctx.get_all_names() + if scope: + # We're somewhere inside a sec + scope = scope + [None] * (2 - len(scope)) + if scope[0] == sec: + sec_name = None + if scope[1] == prop_name: + prop_name = None + elif sec == DefaultCfgSecDirective.get_default_section(ctx): + sec_name = None + + return sec_name, prop_name + + class ConfigPropRefRole(XRefRole): def process_link(self, env: BuildEnvironment, refnode: Element, has_explicit_title: bool, title: str, target: str) -> tuple[str, str]: - ctx = ContextWrapper(env, 'cfg') + ctx = ConfigDomain.ctx(env) target = target.strip() # Normalize target for the current scope @@ -159,8 +204,9 @@ def process_link(self, env: BuildEnvironment, refnode: Element, # [sec]prop anywhere pass elif scope_kind == 0 and sec is None: - # Assume prop outside section should be in [common] - target = f'[common]{target}' + # prop outside a section + default_section = DefaultCfgSecDirective.get_default_section(ctx) + target = f'[{default_section}]{target}' elif scope_kind >= 1: # prop anywhere in a section prefix = ctx.get_full_name(0) @@ -172,11 +218,7 @@ def process_link(self, env: BuildEnvironment, refnode: Element, if not has_explicit_title: # Reparse target and hide parts of title that are in the current scope sec, sec_name, sec_disc, prop_name = parse_prop_name(target, self) - scope = ctx.get_all_names() - scope = scope + [None] * (2 - len(scope)) - if scope[0] == sec: - sec_name = None - + sec_name, _ = rescope(ctx, sec, sec_name) title = prop_text(sec_name, sec_disc, prop_name) return title, target @@ -270,7 +312,7 @@ def value_text(sec_name, sec_disc, prop_name, val_name): class ConfigValueRefRole(XRefRole): def process_link(self, env: BuildEnvironment, refnode: Element, has_explicit_title: bool, title: str, target: str) -> tuple[str, str]: - ctx = ContextWrapper(env, 'cfg') + ctx = ConfigDomain.ctx(env) target = target.strip() # Normalize target for the current scope @@ -280,8 +322,9 @@ def process_link(self, env: BuildEnvironment, refnode: Element, # [sec]prop=val anywhere pass elif scope_kind == 0 and sec is None: - # prop=val outside section - target = f'[common]{target}' + # prop outside a section + default_section = DefaultCfgSecDirective.get_default_section(ctx) + target = f'[{default_section}]{target}' elif scope_kind >= 1 and prop is not None: # prop=val anywhere in a section target = ctx.get_full_name(0) + target @@ -295,13 +338,7 @@ def process_link(self, env: BuildEnvironment, refnode: Element, if not has_explicit_title: # Reparse target and hide parts of title that are in the current scope sec, sec_name, sec_disc, prop, prop_name, val_name = parse_value_name(target, self) - scope = ctx.get_all_names() - scope = scope + [None] * (3 - len(scope)) - if scope[0] == sec: - sec_name = None - if scope[1] == prop_name: - prop_name = None - + sec_name, prop_name = rescope(ctx, sec, sec_name, prop_name) title = value_text(sec_name, sec_disc, prop_name, val_name) return title, target @@ -344,6 +381,7 @@ def create_signode(self, ctx, name, signode, brackets): def setup(app: Sphinx) -> dict[str, Any]: app.add_domain(ConfigDomain) + app.add_directive(DefaultCfgSecDirective.name, DefaultCfgSecDirective) return { 'version': '0.1', diff --git a/docs/sphinx_extensions/custom_domain.py b/docs/sphinx_extensions/custom_domain.py index ea924e54953..8876a1fef14 100644 --- a/docs/sphinx_extensions/custom_domain.py +++ b/docs/sphinx_extensions/custom_domain.py @@ -22,6 +22,7 @@ def __init__(self, env, domain): self.ctx = env.ref_context.setdefault(f'{domain}-context', dict( stack=[], needs_push=True, + misc={}, )) def needs_push(self): @@ -74,6 +75,10 @@ def get_full_name(self, index=-1): def get_index_text(self, index=-1): return self.get(index, 'index_text') + @property + def misc(self): + return self.ctx['misc'] + class CustomDomainObject(ObjectDescription[str]): option_spec: OptionSpec = { diff --git a/java/dds/OpenDDS/DCPS/FakeAndroidNetworkCallback.java b/java/dds/OpenDDS/DCPS/FakeAndroidNetworkCallback.java index 190cdafefd7..032a8bb7761 100644 --- a/java/dds/OpenDDS/DCPS/FakeAndroidNetworkCallback.java +++ b/java/dds/OpenDDS/DCPS/FakeAndroidNetworkCallback.java @@ -1,10 +1,11 @@ /* - * - * * Distributed under the OpenDDS License. * See: http://www.opendds.org/license.html */ -// Empty file to build on non-android platforms +// Empty class to build on non-android platforms package OpenDDS.DCPS; + +public class FakeAndroidNetworkCallback { +} diff --git a/java/dds/dcps_java.mpc b/java/dds/dcps_java.mpc index 61be206afe0..f9424b73cbe 100644 --- a/java/dds/dcps_java.mpc +++ b/java/dds/dcps_java.mpc @@ -92,14 +92,14 @@ project: idl2jni, javah, dcpslib, optional_jni_check, dcps_java_optional, dcps_m verbatim(gnuace, top, 1) { android_target_api ?= 0 need_network_callback = $(shell [ $(android_target_api) -ge 24 ] && echo "ok") - opendds_android_network_callback = $(if $(need_network_callback),AndroidNetworkCallback.java,FakeAndroidNetworkCallback.java) + opendds_android_network_callback = $(if $(need_network_callback),AndroidNetworkCallback,FakeAndroidNetworkCallback) android_jar_file = $(if $(need_network_callback),-classpath $(android_sdk)/platforms/android-$(android_target_api)/android.jar) } Java_Files { conditional(gnuace) { commandflags += $(android_jar_file) - OpenDDS/DCPS/$(opendds_android_network_callback) + OpenDDS/DCPS/$(opendds_android_network_callback).java } } @@ -134,6 +134,6 @@ project: idl2jni, javah, dcpslib, optional_jni_check, dcps_java_optional, dcps_m " cp $(DDS_ROOT)/lib/OpenDDS_DCPS.jar $(DESTDIR)$(INSTALL_PREFIX)/$(INSTALL_LIB)" " perl -pi -e 's!\\$$[(]DDS_ROOT[)]/lib!$(INSTALL_PREFIX)/$(INSTALL_LIB)!g' $(DESTDIR)$(INSTALL_PREFIX)/share/dds/MPC/config/idl2jni.mpb" " perl -pi -e 's!\\$$[(]DDS_ROOT[)]/lib!$(INSTALL_PREFIX)/$(INSTALL_LIB)!g' $(DESTDIR)$(INSTALL_PREFIX)/share/dds/MPC/config/dcps_java.mpb" -" rm $(DESTDIR)$(INSTALL_PREFIX)/dds/*.idl && rmdir $(DESTDIR)$(INSTALL_PREFIX)/dds" + INST_TAGS := lib_output header_files template_files inline_files } }