From 1ba569ef9cf4830c9b7b5c9cce8ebe129e67b908 Mon Sep 17 00:00:00 2001 From: Eduardo Ponz Segrelles Date: Wed, 20 Mar 2024 19:48:45 +0100 Subject: [PATCH] Refs #20592: Fix hidden overloaded virtual methods * Refs #20592: Fix for test Signed-off-by: EduPonz * Refs #20592: Fix for examples Signed-off-by: EduPonz * Refs #20592: Add more warning flags to Ubuntu CI Signed-off-by: EduPonz * Refs #20592: Remove default values on overloaded PDPClient::announceParticipantState Signed-off-by: EduPonz --------- Signed-off-by: EduPonz (cherry picked from commit 63cc242b290bd88084bac12f8ed6c15f230d379a) Fix conflicts Signed-off-by: JesusPoderoso --- .github/workflows/reusable-ubuntu-ci.yml | 2 +- .../DiscoveryServerExample/DiscoveryServerPublisher.h | 2 ++ .../dds/DiscoveryServerExample/DiscoveryServerServer.h | 4 ++++ .../DiscoveryServerExample/DiscoveryServerSubscriber.h | 2 ++ examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h | 6 ++++++ examples/cpp/rtps/Persistent/TestReaderPersistent.h | 4 ++++ examples/cpp/rtps/Persistent/TestWriterPersistent.h | 4 ++++ examples/cpp/rtps/Registered/TestReaderRegistered.h | 4 ++++ examples/cpp/rtps/Registered/TestWriterRegistered.h | 4 ++++ include/fastrtps/subscriber/SubscriberHistory.h | 4 ++++ src/cpp/fastdds/domain/DomainParticipantImpl.hpp | 4 ++++ src/cpp/fastdds/publisher/DataWriterImpl.hpp | 4 ++++ src/cpp/fastdds/subscriber/DataReaderImpl.hpp | 4 ++++ .../fastrtps_deprecated/participant/ParticipantImpl.h | 6 ++++++ src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h | 4 ++++ src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h | 4 ++++ src/cpp/rtps/DataSharing/ReaderPool.hpp | 2 ++ src/cpp/rtps/DataSharing/WriterPool.hpp | 2 ++ src/cpp/rtps/builtin/discovery/participant/PDPClient.h | 6 ++++-- src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp | 2 ++ .../discovery/participant/timedevent/DSClientEvent.cpp | 3 ++- src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp | 2 ++ .../BasicPayloadPool_impl/PreallocatedWithRealloc.hpp | 2 ++ src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp | 4 ++++ .../history/TopicPayloadPool_impl/DynamicReusable.hpp | 4 ++++ .../rtps/history/TopicPayloadPool_impl/Preallocated.hpp | 2 ++ .../TopicPayloadPool_impl/PreallocatedWithRealloc.hpp | 2 ++ src/cpp/rtps/transport/TCPTransportInterface.h | 2 ++ src/cpp/rtps/transport/UDPTransportInterface.h | 2 ++ src/cpp/rtps/transport/shared_mem/SharedMemTransport.h | 2 ++ .../rtps/monitor-service/MonitorServiceListener.hpp | 2 ++ test/blackbox/api/dds-pim/PubSubParticipant.hpp | 2 ++ test/blackbox/api/dds-pim/PubSubReader.hpp | 3 +++ test/blackbox/api/dds-pim/PubSubWriter.hpp | 4 ++++ test/blackbox/api/dds-pim/PubSubWriterReader.hpp | 4 ++++ test/blackbox/common/DDSBlackboxTestsBasic.cpp | 7 ++++++- .../common/DDSBlackboxTestsDataRepresentationQos.cpp | 4 ++++ test/blackbox/common/DDSBlackboxTestsDiscovery.cpp | 6 ++++++ test/blackbox/common/DDSBlackboxTestsFindTopic.cpp | 8 +++++++- test/blackbox/common/RTPSWithRegistrationReader.hpp | 2 ++ test/blackbox/common/RTPSWithRegistrationWriter.hpp | 2 ++ test/dds/communication/PublisherDynamic.cpp | 2 ++ test/dds/communication/PublisherModule.hpp | 2 ++ test/dds/communication/SubscriberDynamic.cpp | 2 ++ test/dds/communication/SubscriberModule.hpp | 2 ++ test/dds/discovery/ParticipantModule.hpp | 2 ++ test/performance/latency/LatencyTestTypes.hpp | 4 ++++ test/performance/throughput/ThroughputTypes.hpp | 4 ++++ test/unittest/dds/participant/ParticipantTests.cpp | 5 +++++ test/unittest/dds/publisher/DataWriterTests.cpp | 7 +++++++ test/unittest/dds/publisher/PublisherTests.cpp | 3 +++ test/unittest/dds/status/ListenerTests.cpp | 4 ++++ test/unittest/dds/subscriber/DataReaderHistoryTests.cpp | 9 ++++++++- test/unittest/dds/subscriber/DataReaderTests.cpp | 4 ++++ test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp | 3 +++ test/unittest/dds/subscriber/FooTypeSupport.hpp | 3 +++ test/unittest/dds/topic/TopicTests.cpp | 4 ++++ .../StatisticsDomainParticipantStatusQueryableTests.cpp | 4 ++++ .../statistics/dds/StatisticsDomainParticipantTests.cpp | 4 ++++ 59 files changed, 204 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 31b76e07131..66b86532f80 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -105,7 +105,7 @@ jobs: colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta colcon_build_args: ${{ inputs.colcon-args }} cmake_args: ${{ inputs.cmake-args }} - cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall" + cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wpedantic -Wunused-value -Woverloaded-virtual" -DFASTDDS_EXAMPLE_TESTS=ON cmake_build_type: ${{ matrix.cmake-build-type }} workspace: ${{ github.workspace }} diff --git a/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerPublisher.h b/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerPublisher.h index aa9900ab992..82bbfd6ee47 100644 --- a/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerPublisher.h +++ b/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerPublisher.h @@ -105,6 +105,8 @@ class HelloWorldPublisher private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + //! Number of DataReaders matched to the associated DataWriter std::atomic matched_; } diff --git a/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerServer.h b/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerServer.h index 3979af2e6f1..566dd904826 100644 --- a/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerServer.h +++ b/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerServer.h @@ -84,6 +84,10 @@ class DiscoveryServer void on_participant_discovery( eprosima::fastdds::dds::DomainParticipant* /*participant*/, eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info) override; + + private: + + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; } listener_; diff --git a/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerSubscriber.h b/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerSubscriber.h index 66fb7c181a7..21cfed4832f 100644 --- a/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerSubscriber.h +++ b/examples/cpp/dds/DiscoveryServerExample/DiscoveryServerSubscriber.h @@ -112,6 +112,8 @@ class HelloWorldSubscriber private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + HelloWorld hello_; //! Number of DataWriters matched to the associated DataReader diff --git a/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h b/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h index 2dc110e0fe9..154decdf689 100644 --- a/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h +++ b/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h @@ -101,9 +101,15 @@ class LivelinessSubscriber class PartListener : public eprosima::fastdds::dds::DomainParticipantListener { + public: + virtual void on_participant_discovery( eprosima::fastdds::dds::DomainParticipant* participant, eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info) override; + + private: + + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; }; PartListener part_listener_; diff --git a/examples/cpp/rtps/Persistent/TestReaderPersistent.h b/examples/cpp/rtps/Persistent/TestReaderPersistent.h index b23b1e49399..b55f4aa9cdc 100644 --- a/examples/cpp/rtps/Persistent/TestReaderPersistent.h +++ b/examples/cpp/rtps/Persistent/TestReaderPersistent.h @@ -66,6 +66,10 @@ class TestReaderPersistent uint32_t n_received; uint32_t n_matched; + + private: + + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; } m_listener; }; diff --git a/examples/cpp/rtps/Persistent/TestWriterPersistent.h b/examples/cpp/rtps/Persistent/TestWriterPersistent.h index 41b00ef7c6c..6ea3716369f 100644 --- a/examples/cpp/rtps/Persistent/TestWriterPersistent.h +++ b/examples/cpp/rtps/Persistent/TestWriterPersistent.h @@ -62,6 +62,10 @@ class TestWriterPersistent } int n_matched; + + private: + + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; } m_listener; }; diff --git a/examples/cpp/rtps/Registered/TestReaderRegistered.h b/examples/cpp/rtps/Registered/TestReaderRegistered.h index 207b54254da..3c1799b7654 100644 --- a/examples/cpp/rtps/Registered/TestReaderRegistered.h +++ b/examples/cpp/rtps/Registered/TestReaderRegistered.h @@ -66,6 +66,10 @@ class TestReaderRegistered uint32_t n_received; uint32_t n_matched; + + private: + + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; } m_listener; }; diff --git a/examples/cpp/rtps/Registered/TestWriterRegistered.h b/examples/cpp/rtps/Registered/TestWriterRegistered.h index 7263ee013c1..110d176e4a4 100644 --- a/examples/cpp/rtps/Registered/TestWriterRegistered.h +++ b/examples/cpp/rtps/Registered/TestWriterRegistered.h @@ -62,6 +62,10 @@ class TestWriterRegistered } int n_matched; + + private: + + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; } m_listener; }; diff --git a/include/fastrtps/subscriber/SubscriberHistory.h b/include/fastrtps/subscriber/SubscriberHistory.h index be94ed6a291..eba33252b01 100644 --- a/include/fastrtps/subscriber/SubscriberHistory.h +++ b/include/fastrtps/subscriber/SubscriberHistory.h @@ -179,6 +179,10 @@ class SubscriberHistory : public rtps::ReaderHistory private: + using rtps::ReaderHistory::completed_change; + using rtps::ReaderHistory::received_change; + using rtps::ReaderHistory::remove_change_nts; + using t_m_Inst_Caches = std::map; //!Map where keys are instance handles and values vectors of cache changes diff --git a/src/cpp/fastdds/domain/DomainParticipantImpl.hpp b/src/cpp/fastdds/domain/DomainParticipantImpl.hpp index 2586b77d737..f2746ed522c 100644 --- a/src/cpp/fastdds/domain/DomainParticipantImpl.hpp +++ b/src/cpp/fastdds/domain/DomainParticipantImpl.hpp @@ -662,6 +662,10 @@ class DomainParticipantImpl bool on_guard_; }; + using fastrtps::rtps::RTPSParticipantListener::onParticipantDiscovery; + using fastrtps::rtps::RTPSParticipantListener::onReaderDiscovery; + using fastrtps::rtps::RTPSParticipantListener::onWriterDiscovery; + public: MyRTPSParticipantListener( diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.hpp b/src/cpp/fastdds/publisher/DataWriterImpl.hpp index a0294a5540c..c32d703e5e6 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.hpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.hpp @@ -459,6 +459,10 @@ class DataWriterImpl : protected rtps::IReaderDataFilter #endif //FASTDDS_STATISTICS DataWriterImpl* data_writer_; + + private: + + using fastrtps::rtps::WriterListener::onWriterMatched; } writer_listener_; diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl.hpp b/src/cpp/fastdds/subscriber/DataReaderImpl.hpp index 3a0bbdf5f45..4ba6f323862 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl.hpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl.hpp @@ -451,6 +451,10 @@ class DataReaderImpl #endif //FASTDDS_STATISTICS DataReaderImpl* data_reader_; + + private: + + using fastrtps::rtps::ReaderListener::onReaderMatched; } reader_listener_; diff --git a/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h b/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h index 37ba3eabf96..a0165ac0c75 100644 --- a/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h +++ b/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h @@ -233,6 +233,12 @@ class ParticipantImpl ParticipantImpl* mp_participantimpl; + private: + + using rtps::RTPSParticipantListener::onParticipantDiscovery; + using rtps::RTPSParticipantListener::onReaderDiscovery; + using rtps::RTPSParticipantListener::onWriterDiscovery; + } m_rtps_listener; diff --git a/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h b/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h index b86a83fea6c..ca0db2822b0 100644 --- a/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h +++ b/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h @@ -243,6 +243,10 @@ class PublisherImpl const LivelinessLostStatus& status) override; PublisherImpl* mp_publisherImpl; + + private: + + using rtps::WriterListener::onWriterMatched; } m_writerListener; diff --git a/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h b/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h index 18ed81d8f99..49429570bfd 100644 --- a/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h +++ b/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h @@ -221,6 +221,10 @@ class SubscriberImpl rtps::RTPSReader* reader, const LivelinessChangedStatus& status) override; SubscriberImpl* mp_subscriberImpl; + + private: + + using rtps::ReaderListener::onReaderMatched; } m_readerListener; diff --git a/src/cpp/rtps/DataSharing/ReaderPool.hpp b/src/cpp/rtps/DataSharing/ReaderPool.hpp index 788c49cdbf6..136276a30ec 100644 --- a/src/cpp/rtps/DataSharing/ReaderPool.hpp +++ b/src/cpp/rtps/DataSharing/ReaderPool.hpp @@ -284,6 +284,8 @@ class ReaderPool : public DataSharingPayloadPool private: + using DataSharingPayloadPool::init_shared_memory; + bool is_volatile_; //< Whether the reader is volatile or not uint64_t next_payload_; //< Index of the next history position to read SequenceNumber_t last_sn_; //< Sequence number of the last read payload diff --git a/src/cpp/rtps/DataSharing/WriterPool.hpp b/src/cpp/rtps/DataSharing/WriterPool.hpp index 270d09c2c9e..c37b83975c9 100644 --- a/src/cpp/rtps/DataSharing/WriterPool.hpp +++ b/src/cpp/rtps/DataSharing/WriterPool.hpp @@ -353,6 +353,8 @@ class WriterPool : public DataSharingPayloadPool private: + using DataSharingPayloadPool::init_shared_memory; + octet* payloads_pool_; //< Shared pool of payloads uint32_t max_data_size_; //< Maximum size of the serialized payload data diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h index 4a5d5d7aee4..ca4be4ef530 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h +++ b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h @@ -114,8 +114,8 @@ class PDPClient : public PDP */ void announceParticipantState( bool new_change, - bool dispose = false, - WriteParams& wparams = WriteParams::WRITE_PARAM_DEFAULT) override; + bool dispose, + WriteParams& wparams) override; /** * These methods wouldn't be needed under perfect server operation @@ -178,6 +178,8 @@ class PDPClient : public PDP private: + using fastrtps::rtps::PDP::announceParticipantState; + /** * Manually match the local PDP reader with the PDP writer of a given server. The function is * not thread safe (nts) in the sense that it does not take the PDP mutex. It does however take diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp index c5a30905e6d..5b9fdcfd7d2 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp @@ -317,6 +317,8 @@ class PDPServer : public fastrtps::rtps::PDP private: + using fastrtps::rtps::PDP::announceParticipantState; + #if HAVE_SECURITY /** * Returns whether discovery should be secured diff --git a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp index 4621a6adaf4..deb44928545 100644 --- a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp @@ -90,7 +90,8 @@ bool DSClientEvent::event() // This marks to announceParticipantState that the announcement is only meant for missing servers, // so it is not a periodic announcement mp_PDP->_serverPing = true; - mp_PDP->announceParticipantState(false); + WriteParams __wp = WriteParams::write_params_default(); + mp_PDP->announceParticipantState(false, false, __wp); EPROSIMA_LOG_INFO(CLIENT_PDP_THREAD, "Client " << mp_PDP->getRTPSParticipant()->getGuid() << " PDP announcement"); } diff --git a/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp b/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp index 76fa7e42f14..b483b3b548d 100644 --- a/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp +++ b/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp @@ -18,6 +18,8 @@ class BaseImpl : public IPayloadPool { +public: + bool get_payload( uint32_t size, CacheChange_t& cache_change) override diff --git a/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp b/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp index e54c2a3ca2f..730d06f3933 100644 --- a/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp +++ b/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp @@ -39,5 +39,7 @@ class Impl : public BaseImpl private: + using BaseImpl::get_payload; + uint32_t min_payload_size_; }; diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp index e7b8cdd045a..d003e0ea1b5 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp @@ -86,6 +86,10 @@ class DynamicTopicPayloadPool : public TopicPayloadPool return DYNAMIC_RESERVE_MEMORY_MODE; } +private: + + using TopicPayloadPool::get_payload; + }; } // namespace rtps diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp index 8886521cbe8..76d19fd0eb4 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp @@ -41,6 +41,10 @@ class DynamicReusableTopicPayloadPool : public TopicPayloadPool return DYNAMIC_REUSABLE_MEMORY_MODE; } +private: + + using TopicPayloadPool::get_payload; + }; } // namespace rtps diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp index aa4bc67fff1..99ed905664c 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp @@ -80,6 +80,8 @@ class PreallocatedTopicPayloadPool : public TopicPayloadPool private: + using TopicPayloadPool::get_payload; + uint32_t payload_size_; uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories) }; diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp index 75e0cf1c68d..d8ed34b41e2 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp @@ -80,6 +80,8 @@ class PreallocatedReallocTopicPayloadPool : public TopicPayloadPool private: + using TopicPayloadPool::get_payload; + uint32_t min_payload_size_; uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories) }; diff --git a/src/cpp/rtps/transport/TCPTransportInterface.h b/src/cpp/rtps/transport/TCPTransportInterface.h index a81266af6e8..a0301bf3f94 100644 --- a/src/cpp/rtps/transport/TCPTransportInterface.h +++ b/src/cpp/rtps/transport/TCPTransportInterface.h @@ -74,6 +74,8 @@ class TCPTransportInterface : public TransportInterface std::atomic alive_; + using TransportInterface::transform_remote_locator; + protected: std::vector current_interfaces_; diff --git a/src/cpp/rtps/transport/UDPTransportInterface.h b/src/cpp/rtps/transport/UDPTransportInterface.h index 655ab4aad85..bbeeafed885 100644 --- a/src/cpp/rtps/transport/UDPTransportInterface.h +++ b/src/cpp/rtps/transport/UDPTransportInterface.h @@ -37,6 +37,8 @@ class UDPTransportInterface : public TransportInterface { friend class UDPSenderResource; + using TransportInterface::transform_remote_locator; + public: ~UDPTransportInterface() override; diff --git a/src/cpp/rtps/transport/shared_mem/SharedMemTransport.h b/src/cpp/rtps/transport/shared_mem/SharedMemTransport.h index 88f146a7d06..2e77a024b3e 100644 --- a/src/cpp/rtps/transport/shared_mem/SharedMemTransport.h +++ b/src/cpp/rtps/transport/shared_mem/SharedMemTransport.h @@ -200,6 +200,8 @@ class SharedMemTransport : public TransportInterface private: + using TransportInterface::transform_remote_locator; + //! Constructor with no descriptor is necessary for implementations derived from this class. SharedMemTransport(); diff --git a/src/cpp/statistics/rtps/monitor-service/MonitorServiceListener.hpp b/src/cpp/statistics/rtps/monitor-service/MonitorServiceListener.hpp index 15eec99e65b..27354bb3e74 100644 --- a/src/cpp/statistics/rtps/monitor-service/MonitorServiceListener.hpp +++ b/src/cpp/statistics/rtps/monitor-service/MonitorServiceListener.hpp @@ -70,7 +70,9 @@ class MonitorServiceListener : MonitorService* monitor_srv_; +private: + using fastrtps::rtps::WriterListener::onWriterMatched; }; #endif // FASTDDS_STATISTICS diff --git a/test/blackbox/api/dds-pim/PubSubParticipant.hpp b/test/blackbox/api/dds-pim/PubSubParticipant.hpp index 2ff2b5aaeff..ceee9578df4 100644 --- a/test/blackbox/api/dds-pim/PubSubParticipant.hpp +++ b/test/blackbox/api/dds-pim/PubSubParticipant.hpp @@ -192,6 +192,8 @@ class PubSubParticipant private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + ParticipantListener& operator =( const ParticipantListener&) = delete; PubSubParticipant* participant_; diff --git a/test/blackbox/api/dds-pim/PubSubReader.hpp b/test/blackbox/api/dds-pim/PubSubReader.hpp index 6c26120cc06..699f2ab3ef0 100644 --- a/test/blackbox/api/dds-pim/PubSubReader.hpp +++ b/test/blackbox/api/dds-pim/PubSubReader.hpp @@ -142,6 +142,9 @@ class PubSubReader private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery; + ParticipantListener& operator =( const ParticipantListener&) = delete; PubSubReader& reader_; diff --git a/test/blackbox/api/dds-pim/PubSubWriter.hpp b/test/blackbox/api/dds-pim/PubSubWriter.hpp index 27c027233a2..3392007515c 100644 --- a/test/blackbox/api/dds-pim/PubSubWriter.hpp +++ b/test/blackbox/api/dds-pim/PubSubWriter.hpp @@ -156,6 +156,10 @@ class PubSubWriter private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_subscriber_discovery; + ParticipantListener& operator =( const ParticipantListener&) = delete; diff --git a/test/blackbox/api/dds-pim/PubSubWriterReader.hpp b/test/blackbox/api/dds-pim/PubSubWriterReader.hpp index ab9b4a80d5e..c81ba1a0701 100644 --- a/test/blackbox/api/dds-pim/PubSubWriterReader.hpp +++ b/test/blackbox/api/dds-pim/PubSubWriterReader.hpp @@ -168,6 +168,10 @@ class PubSubWriterReader private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_subscriber_discovery; + //! Mutex guarding all info collections mutable std::mutex info_mutex_; //! The discovered participants excluding the participant this listener is listening to diff --git a/test/blackbox/common/DDSBlackboxTestsBasic.cpp b/test/blackbox/common/DDSBlackboxTestsBasic.cpp index bf626cfdb0f..5026b54447a 100644 --- a/test/blackbox/common/DDSBlackboxTestsBasic.cpp +++ b/test/blackbox/common/DDSBlackboxTestsBasic.cpp @@ -477,8 +477,10 @@ TEST(DDSBasic, PidRelatedSampleIdentity) TEST(DDSBasic, IgnoreParticipant) { - struct IgnoringDomainParticipantListener : public DomainParticipantListener + class IgnoringDomainParticipantListener : public DomainParticipantListener { + public: + std::atomic_int num_matched{0}; std::atomic_int num_ignored{0}; @@ -505,6 +507,9 @@ TEST(DDSBasic, IgnoreParticipant) } } + private: + + using DomainParticipantListener::on_participant_discovery; }; // Set DomainParticipantFactory to create disabled entities DomainParticipantFactoryQos factory_qos; diff --git a/test/blackbox/common/DDSBlackboxTestsDataRepresentationQos.cpp b/test/blackbox/common/DDSBlackboxTestsDataRepresentationQos.cpp index 3818d4e4364..6181f8c465d 100644 --- a/test/blackbox/common/DDSBlackboxTestsDataRepresentationQos.cpp +++ b/test/blackbox/common/DDSBlackboxTestsDataRepresentationQos.cpp @@ -65,6 +65,10 @@ class MockHelloWorldPubSubType : public HelloWorldPubSubType static eprosima::fastcdr::EncodingAlgorithmFlag last_encoding; static DataRepresentationId_t last_data_representation; + +private: + + using HelloWorldPubSubType::serialize; }; eprosima::fastcdr::EncodingAlgorithmFlag diff --git a/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp b/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp index 4bc653320c3..0ce3e35ba63 100644 --- a/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp +++ b/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp @@ -451,6 +451,8 @@ TEST(DDSDiscovery, ParticipantProxyPhysicalData) private: + using DomainParticipantListener::on_participant_discovery; + std::condition_variable* cv_; std::mutex* mtx_; @@ -598,6 +600,8 @@ TEST(DDSDiscovery, DDSDiscoveryDoesNotDropUDPLocator) struct CustomDomainParticipantListener : public DomainParticipantListener { + using DomainParticipantListener::on_participant_discovery; + std::mutex mtx; std::condition_variable cv; GUID_t guid; @@ -1653,6 +1657,8 @@ TEST(DDSDiscovery, DataracePDP) { public: + using DomainParticipantListener::on_participant_discovery; + CustomDomainParticipantListener() : DomainParticipantListener() , discovery_future(discovery_promise.get_future()) diff --git a/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp b/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp index eb207896720..ce274a7aab7 100644 --- a/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp +++ b/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp @@ -49,8 +49,10 @@ class DDSFindTopicTest : public testing::Test /** * A dummy type support class. */ - struct TestType : public TopicDataType + class TestType : public TopicDataType { + public: + TestType() : TopicDataType() { @@ -96,6 +98,10 @@ class DDSFindTopicTest : public testing::Test return false; } + private: + + using TopicDataType::getSerializedSizeProvider; + using TopicDataType::serialize; }; public: diff --git a/test/blackbox/common/RTPSWithRegistrationReader.hpp b/test/blackbox/common/RTPSWithRegistrationReader.hpp index 5b9603c1b3a..d48300ca830 100644 --- a/test/blackbox/common/RTPSWithRegistrationReader.hpp +++ b/test/blackbox/common/RTPSWithRegistrationReader.hpp @@ -110,6 +110,8 @@ class RTPSWithRegistrationReader private: + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; + Listener& operator =( const Listener&) = delete; diff --git a/test/blackbox/common/RTPSWithRegistrationWriter.hpp b/test/blackbox/common/RTPSWithRegistrationWriter.hpp index 459f7223694..0b35f07cd9e 100644 --- a/test/blackbox/common/RTPSWithRegistrationWriter.hpp +++ b/test/blackbox/common/RTPSWithRegistrationWriter.hpp @@ -97,6 +97,8 @@ class RTPSWithRegistrationWriter private: + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; + Listener& operator =( const Listener&) = delete; diff --git a/test/dds/communication/PublisherDynamic.cpp b/test/dds/communication/PublisherDynamic.cpp index 47659e778b4..753325adba2 100644 --- a/test/dds/communication/PublisherDynamic.cpp +++ b/test/dds/communication/PublisherDynamic.cpp @@ -115,6 +115,8 @@ class ParListener : public DomainParticipantListener private: + using DomainParticipantListener::on_participant_discovery; + bool exit_on_lost_liveliness_; }; diff --git a/test/dds/communication/PublisherModule.hpp b/test/dds/communication/PublisherModule.hpp index 91b04db5e54..fb144821a0a 100644 --- a/test/dds/communication/PublisherModule.hpp +++ b/test/dds/communication/PublisherModule.hpp @@ -85,6 +85,8 @@ class PublisherModule private: + using DomainParticipantListener::on_participant_discovery; + std::mutex mutex_; std::condition_variable cv_; unsigned int matched_ = 0; diff --git a/test/dds/communication/SubscriberDynamic.cpp b/test/dds/communication/SubscriberDynamic.cpp index f3276601d90..dae0f6cd866 100644 --- a/test/dds/communication/SubscriberDynamic.cpp +++ b/test/dds/communication/SubscriberDynamic.cpp @@ -150,6 +150,8 @@ class ParListener : public DomainParticipantListener private: + using DomainParticipantListener::on_participant_discovery; + std::promise is_worth_a_type_; }; diff --git a/test/dds/communication/SubscriberModule.hpp b/test/dds/communication/SubscriberModule.hpp index 9b7751452e1..e8559128440 100644 --- a/test/dds/communication/SubscriberModule.hpp +++ b/test/dds/communication/SubscriberModule.hpp @@ -92,6 +92,8 @@ class SubscriberModule private: + using DomainParticipantListener::on_participant_discovery; + std::mutex mutex_; std::condition_variable cv_; const uint32_t publishers_ = 0; diff --git a/test/dds/discovery/ParticipantModule.hpp b/test/dds/discovery/ParticipantModule.hpp index dc7d190bef3..53073911104 100644 --- a/test/dds/discovery/ParticipantModule.hpp +++ b/test/dds/discovery/ParticipantModule.hpp @@ -52,6 +52,8 @@ class ParticipantModule : public DomainParticipantListener private: + using DomainParticipantListener::on_participant_discovery; + unsigned int matched_ = 0; DomainParticipant* participant_ = nullptr; DiscoveryProtocol_t discovery_protocol_; diff --git a/test/performance/latency/LatencyTestTypes.hpp b/test/performance/latency/LatencyTestTypes.hpp index 64e68138f50..e5a5d51e838 100644 --- a/test/performance/latency/LatencyTestTypes.hpp +++ b/test/performance/latency/LatencyTestTypes.hpp @@ -157,6 +157,10 @@ class LatencyDataType : public eprosima::fastdds::dds::TopicDataType // Name static const std::string type_name_; + +private: + + using eprosima::fastrtps::TopicDataType::is_plain; }; enum TESTCOMMAND : uint32_t diff --git a/test/performance/throughput/ThroughputTypes.hpp b/test/performance/throughput/ThroughputTypes.hpp index 050058d5b7b..dc5f48efc59 100644 --- a/test/performance/throughput/ThroughputTypes.hpp +++ b/test/performance/throughput/ThroughputTypes.hpp @@ -194,6 +194,10 @@ class ThroughputDataType : public eprosima::fastrtps::TopicDataType // Name static const std::string type_name_; + +private: + + using eprosima::fastrtps::TopicDataType::is_plain; }; enum e_Command : uint32_t diff --git a/test/unittest/dds/participant/ParticipantTests.cpp b/test/unittest/dds/participant/ParticipantTests.cpp index 98a24b7b4a4..b3e063fca36 100644 --- a/test/unittest/dds/participant/ParticipantTests.cpp +++ b/test/unittest/dds/participant/ParticipantTests.cpp @@ -249,6 +249,9 @@ class LoanableTopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::is_plain; }; class BarType @@ -2479,6 +2482,8 @@ class CustomListener2 : public DomainParticipantListener { public: + using DomainParticipantListener::on_participant_discovery; + CustomListener2() : future_(promise_.get_future()) { diff --git a/test/unittest/dds/publisher/DataWriterTests.cpp b/test/unittest/dds/publisher/DataWriterTests.cpp index b210f4a01ba..3bd38b5cf91 100644 --- a/test/unittest/dds/publisher/DataWriterTests.cpp +++ b/test/unittest/dds/publisher/DataWriterTests.cpp @@ -390,6 +390,10 @@ TEST(DataWriterTests, get_guid) fastrtps::rtps::GUID_t guid; std::mutex mutex; std::condition_variable cv; + + private: + + using DomainParticipantListener::on_publisher_discovery; } discovery_listener; @@ -1320,6 +1324,7 @@ class LoanableTypeSupport : public TopicDataType public: typedef LoanableType type; + using TopicDataType::is_plain; LoanableTypeSupport() : TopicDataType() @@ -1494,6 +1499,8 @@ class LoanableTypeSupportTesting : public LoanableTypeSupport { public: + using LoanableTypeSupport::is_plain; + bool is_plain_result = true; bool construct_sample_result = true; diff --git a/test/unittest/dds/publisher/PublisherTests.cpp b/test/unittest/dds/publisher/PublisherTests.cpp index 5379b87c993..4faf69d01d4 100644 --- a/test/unittest/dds/publisher/PublisherTests.cpp +++ b/test/unittest/dds/publisher/PublisherTests.cpp @@ -191,6 +191,9 @@ class LoanableTopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::is_plain; }; diff --git a/test/unittest/dds/status/ListenerTests.cpp b/test/unittest/dds/status/ListenerTests.cpp index ed4c3e962b1..61afbb40dcf 100644 --- a/test/unittest/dds/status/ListenerTests.cpp +++ b/test/unittest/dds/status/ListenerTests.cpp @@ -535,6 +535,10 @@ class TopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::getSerializedSizeProvider; + using TopicDataType::serialize; }; class UserListeners : public ::testing::Test diff --git a/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp b/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp index fdc09b2f87d..5efd99bf2b6 100644 --- a/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp @@ -21,14 +21,21 @@ class TestType : public TopicDataType void* data, eprosima::fastrtps::rtps::SerializedPayload_t* payload)); + MOCK_METHOD3(serialize, bool( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + DataRepresentationId_t data_representation)); + MOCK_METHOD2(deserialize, bool( eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data)); + MOCK_METHOD2(getSerializedSizeProvider, std::function ( + void* data, DataRepresentationId_t data_representation)); + MOCK_METHOD1(getSerializedSizeProvider, std::function ( void* data)); - MOCK_METHOD0(createData, void* ()); MOCK_METHOD1(deleteData, void( diff --git a/test/unittest/dds/subscriber/DataReaderTests.cpp b/test/unittest/dds/subscriber/DataReaderTests.cpp index a7f1ee7b87a..fcf165369de 100644 --- a/test/unittest/dds/subscriber/DataReaderTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderTests.cpp @@ -596,6 +596,10 @@ TEST_F(DataReaderTests, get_guid) GUID_t guid; std::mutex mutex; std::condition_variable cv; + + private: + + using DomainParticipantListener::on_subscriber_discovery; } discovery_listener; diff --git a/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp b/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp index 49e0e7ea0ae..d55d950041c 100644 --- a/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp +++ b/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp @@ -177,6 +177,9 @@ class FooBoundedTypeSupport : public TopicDataType return false; } +private: + + using TopicDataType::is_plain; }; } // namespace dds diff --git a/test/unittest/dds/subscriber/FooTypeSupport.hpp b/test/unittest/dds/subscriber/FooTypeSupport.hpp index cc0dba0621c..893a61fb8a3 100644 --- a/test/unittest/dds/subscriber/FooTypeSupport.hpp +++ b/test/unittest/dds/subscriber/FooTypeSupport.hpp @@ -206,6 +206,9 @@ class FooTypeSupport : public TopicDataType return true; } +private: + + using TopicDataType::is_plain; }; } // namespace dds diff --git a/test/unittest/dds/topic/TopicTests.cpp b/test/unittest/dds/topic/TopicTests.cpp index a5bb4c4aa9f..7f004619090 100644 --- a/test/unittest/dds/topic/TopicTests.cpp +++ b/test/unittest/dds/topic/TopicTests.cpp @@ -124,6 +124,10 @@ class TopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::getSerializedSizeProvider; + using TopicDataType::serialize; }; TEST(TopicTests, ChangeTopicQos) diff --git a/test/unittest/statistics/dds/StatisticsDomainParticipantStatusQueryableTests.cpp b/test/unittest/statistics/dds/StatisticsDomainParticipantStatusQueryableTests.cpp index 72eb46a693d..09558402292 100644 --- a/test/unittest/statistics/dds/StatisticsDomainParticipantStatusQueryableTests.cpp +++ b/test/unittest/statistics/dds/StatisticsDomainParticipantStatusQueryableTests.cpp @@ -90,6 +90,10 @@ class TopicDataTypeMock : public eprosima::fastdds::dds::TopicDataType setName(""); } +private: + + using eprosima::fastdds::dds::TopicDataType::getSerializedSizeProvider; + using eprosima::fastdds::dds::TopicDataType::serialize; }; namespace eprosima { diff --git a/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp b/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp index 50fc6ef1239..aaa34188199 100644 --- a/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp +++ b/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp @@ -130,6 +130,10 @@ class TopicDataTypeMock : public eprosima::fastdds::dds::TopicDataType return true; } +private: + + using eprosima::fastdds::dds::TopicDataType::getSerializedSizeProvider; + using eprosima::fastdds::dds::TopicDataType::serialize; }; class StatisticsDomainParticipantTests : public ::testing::Test