diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index e93d2ea3f03..99644fec39f 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/C++/DDS/LivelinessQoS/LivelinessSubscriber.h b/examples/C++/DDS/LivelinessQoS/LivelinessSubscriber.h index 2dc110e0fe9..154decdf689 100644 --- a/examples/C++/DDS/LivelinessQoS/LivelinessSubscriber.h +++ b/examples/C++/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/C++/RTPSTest_persistent/TestReaderPersistent.h b/examples/C++/RTPSTest_persistent/TestReaderPersistent.h index f0ecd00d014..b55f4aa9cdc 100644 --- a/examples/C++/RTPSTest_persistent/TestReaderPersistent.h +++ b/examples/C++/RTPSTest_persistent/TestReaderPersistent.h @@ -28,6 +28,7 @@ class TestReaderPersistent { public: + TestReaderPersistent(); virtual ~TestReaderPersistent(); eprosima::fastrtps::rtps::RTPSParticipant* mp_participant; @@ -36,11 +37,20 @@ class TestReaderPersistent bool init(); //Initialization bool reg(); //Register void run(); //Run - class MyListener:public eprosima::fastrtps::rtps::ReaderListener + class MyListener : public eprosima::fastrtps::rtps::ReaderListener { public: - MyListener():n_received(0),n_matched(0){}; - ~MyListener(){}; + + MyListener() + : n_received(0) + , n_matched(0) + { + } + + ~MyListener() + { + } + void onNewCacheChangeAdded( eprosima::fastrtps::rtps::RTPSReader* reader, const eprosima::fastrtps::rtps::CacheChange_t* const change) override; @@ -48,11 +58,20 @@ class TestReaderPersistent eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::rtps::MatchingInfo& info) override { - if(info.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) n_matched++; - }; + if (info.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) + { + n_matched++; + } + } + uint32_t n_received; uint32_t n_matched; - }m_listener; + + private: + + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; + } + m_listener; }; #endif /* TESTREADERPERSISTENT_H_ */ diff --git a/examples/C++/RTPSTest_persistent/TestWriterPersistent.h b/examples/C++/RTPSTest_persistent/TestWriterPersistent.h index f8155578317..6ea3716369f 100644 --- a/examples/C++/RTPSTest_persistent/TestWriterPersistent.h +++ b/examples/C++/RTPSTest_persistent/TestWriterPersistent.h @@ -25,8 +25,10 @@ #include -class TestWriterPersistent { +class TestWriterPersistent +{ public: + TestWriterPersistent(); virtual ~TestWriterPersistent(); eprosima::fastrtps::rtps::RTPSParticipant* mp_participant; @@ -34,21 +36,38 @@ class TestWriterPersistent { eprosima::fastrtps::rtps::WriterHistory* mp_history; bool init(); //Initialize writer bool reg(); //Register the Writer - void run(uint16_t samples); //Run the Writer - class MyListener :public eprosima::fastrtps::rtps::WriterListener + void run( + uint16_t samples); //Run the Writer + class MyListener : public eprosima::fastrtps::rtps::WriterListener { public: - MyListener():n_matched(0){}; - ~MyListener(){}; + + MyListener() + : n_matched(0) + { + } + + ~MyListener() + { + } + void onWriterMatched( eprosima::fastrtps::rtps::RTPSWriter*, eprosima::fastrtps::rtps::MatchingInfo& info) override { if (info.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) + { ++n_matched; + } } + int n_matched; - }m_listener; + + private: + + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; + } + m_listener; }; #endif /* TESTWRITERPERSISTENT_H_ */ diff --git a/examples/C++/RTPSTest_registered/TestReaderRegistered.h b/examples/C++/RTPSTest_registered/TestReaderRegistered.h index ce9d3b53a0c..3c1799b7654 100644 --- a/examples/C++/RTPSTest_registered/TestReaderRegistered.h +++ b/examples/C++/RTPSTest_registered/TestReaderRegistered.h @@ -28,6 +28,7 @@ class TestReaderRegistered { public: + TestReaderRegistered(); virtual ~TestReaderRegistered(); eprosima::fastrtps::rtps::RTPSParticipant* mp_participant; @@ -36,11 +37,20 @@ class TestReaderRegistered bool init(); //Initialization bool reg(); //Register void run(); //Run - class MyListener:public eprosima::fastrtps::rtps::ReaderListener + class MyListener : public eprosima::fastrtps::rtps::ReaderListener { public: - MyListener():n_received(0),n_matched(0){}; - ~MyListener(){}; + + MyListener() + : n_received(0) + , n_matched(0) + { + } + + ~MyListener() + { + } + void onNewCacheChangeAdded( eprosima::fastrtps::rtps::RTPSReader* reader, const eprosima::fastrtps::rtps::CacheChange_t* const change) override; @@ -48,11 +58,20 @@ class TestReaderRegistered eprosima::fastrtps::rtps::RTPSReader*, eprosima::fastrtps::rtps::MatchingInfo& info) override { - if(info.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) n_matched++; - }; + if (info.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) + { + n_matched++; + } + } + uint32_t n_received; uint32_t n_matched; - }m_listener; + + private: + + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; + } + m_listener; }; #endif /* TESTREADER_H_ */ diff --git a/examples/C++/RTPSTest_registered/TestWriterRegistered.h b/examples/C++/RTPSTest_registered/TestWriterRegistered.h index 95040268879..110d176e4a4 100644 --- a/examples/C++/RTPSTest_registered/TestWriterRegistered.h +++ b/examples/C++/RTPSTest_registered/TestWriterRegistered.h @@ -25,8 +25,10 @@ #include "fastrtps/rtps/writer/WriterListener.h" -class TestWriterRegistered { +class TestWriterRegistered +{ public: + TestWriterRegistered(); virtual ~TestWriterRegistered(); eprosima::fastrtps::rtps::RTPSParticipant* mp_participant; @@ -34,21 +36,38 @@ class TestWriterRegistered { eprosima::fastrtps::rtps::WriterHistory* mp_history; bool init(); //Initialize writer bool reg(); //Register the Writer - void run(uint16_t samples); //Run the Writer - class MyListener :public eprosima::fastrtps::rtps::WriterListener + void run( + uint16_t samples); //Run the Writer + class MyListener : public eprosima::fastrtps::rtps::WriterListener { public: - MyListener():n_matched(0){}; - ~MyListener(){}; + + MyListener() + : n_matched(0) + { + } + + ~MyListener() + { + } + void onWriterMatched( eprosima::fastrtps::rtps::RTPSWriter*, eprosima::fastrtps::rtps::MatchingInfo& info) override { if (info.status == eprosima::fastrtps::rtps::MATCHED_MATCHING) + { ++n_matched; + } } + int n_matched; - }m_listener; + + private: + + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; + } + m_listener; }; #endif /* TESTWRITER_H_ */ diff --git a/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleReader.h b/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleReader.h index dc46d63fb48..5028c424eda 100644 --- a/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleReader.h +++ b/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleReader.h @@ -27,39 +27,49 @@ #include #include -class my_ReaderListener: public eprosima::fastrtps::rtps::ReaderListener +class my_ReaderListener : public eprosima::fastrtps::rtps::ReaderListener { - public: - int n_received; - my_ReaderListener(); - ~my_ReaderListener() override; - void onNewCacheChangeAdded( - eprosima::fastrtps::rtps::RTPSReader* reader, - const eprosima::fastrtps::rtps::CacheChange_t* const change) override; +public: - void onReaderMatched( - eprosima::fastrtps::rtps::RTPSReader* reader, - eprosima::fastrtps::rtps::MatchingInfo& info) override; + int n_received; + my_ReaderListener(); + ~my_ReaderListener() override; + void onNewCacheChangeAdded( + eprosima::fastrtps::rtps::RTPSReader* reader, + const eprosima::fastrtps::rtps::CacheChange_t* const change) override; + + void onReaderMatched( + eprosima::fastrtps::rtps::RTPSReader* reader, + eprosima::fastrtps::rtps::MatchingInfo& info) override; + +private: + + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; }; class UserDefinedTransportExampleReader { - private: - my_ReaderListener *my_listener; - public: - UserDefinedTransportExampleReader(); - ~UserDefinedTransportExampleReader(); - void init(); - bool isInitialized(); - bool read(); - private: - eprosima::fastrtps::rtps::RTPSParticipantAttributes pattr; - eprosima::fastrtps::rtps::RTPSParticipant *my_participant; - eprosima::fastrtps::rtps::ReaderAttributes rattr; - eprosima::fastrtps::rtps::RTPSReader *my_reader; - eprosima::fastrtps::rtps::HistoryAttributes hattr; - eprosima::fastrtps::ReaderQos rqos; - eprosima::fastrtps::TopicAttributes tattr; - eprosima::fastrtps::rtps::ReaderHistory *my_history; - bool initialized_; +private: + + my_ReaderListener* my_listener; + +public: + + UserDefinedTransportExampleReader(); + ~UserDefinedTransportExampleReader(); + void init(); + bool isInitialized(); + bool read(); + +private: + + eprosima::fastrtps::rtps::RTPSParticipantAttributes pattr; + eprosima::fastrtps::rtps::RTPSParticipant* my_participant; + eprosima::fastrtps::rtps::ReaderAttributes rattr; + eprosima::fastrtps::rtps::RTPSReader* my_reader; + eprosima::fastrtps::rtps::HistoryAttributes hattr; + eprosima::fastrtps::ReaderQos rqos; + eprosima::fastrtps::TopicAttributes tattr; + eprosima::fastrtps::rtps::ReaderHistory* my_history; + bool initialized_; }; diff --git a/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleWriter.h b/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleWriter.h index 3365b1f0085..7b3bda84425 100644 --- a/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleWriter.h +++ b/examples/C++/UserDefinedTransportExample/UserDefinedTransportExampleWriter.h @@ -28,44 +28,50 @@ #include #include -class my_WriterListener: public eprosima::fastrtps::rtps::WriterListener +class my_WriterListener : public eprosima::fastrtps::rtps::WriterListener { - public: - my_WriterListener(); - ~my_WriterListener() override; - void onWriterMatched( - eprosima::fastrtps::rtps::RTPSWriter* writer, - eprosima::fastrtps::rtps::MatchingInfo& info) override; - int n_matched; +public: + + my_WriterListener(); + ~my_WriterListener() override; + void onWriterMatched( + eprosima::fastrtps::rtps::RTPSWriter* writer, + eprosima::fastrtps::rtps::MatchingInfo& info) override; + int n_matched; + +private: + + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; }; class UserDefinedTransportExampleWriter { - private: +private: - my_WriterListener *my_listener; + my_WriterListener* my_listener; void waitformatching(); - public: +public: - UserDefinedTransportExampleWriter(); - ~UserDefinedTransportExampleWriter(); + UserDefinedTransportExampleWriter(); + ~UserDefinedTransportExampleWriter(); - void init(); - bool isInitialized(); + void init(); + bool isInitialized(); void sendData(); - private: - eprosima::fastrtps::rtps::RTPSParticipantAttributes pattr; - eprosima::fastrtps::rtps::RTPSParticipant *my_participant; - eprosima::fastrtps::rtps::WriterAttributes wattr; - eprosima::fastrtps::rtps::RTPSWriter *my_writer; - eprosima::fastrtps::rtps::HistoryAttributes hattr; - eprosima::fastrtps::rtps::WriterHistory *my_history; - eprosima::fastrtps::TopicAttributes tattr; - eprosima::fastrtps::WriterQos wqos; - bool initialized_; +private: + + eprosima::fastrtps::rtps::RTPSParticipantAttributes pattr; + eprosima::fastrtps::rtps::RTPSParticipant* my_participant; + eprosima::fastrtps::rtps::WriterAttributes wattr; + eprosima::fastrtps::rtps::RTPSWriter* my_writer; + eprosima::fastrtps::rtps::HistoryAttributes hattr; + eprosima::fastrtps::rtps::WriterHistory* my_history; + eprosima::fastrtps::TopicAttributes tattr; + eprosima::fastrtps::WriterQos wqos; + bool initialized_; }; diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.hpp b/src/cpp/fastdds/publisher/DataWriterImpl.hpp index bbdcdafa9c5..bd875916b3b 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.hpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.hpp @@ -381,6 +381,10 @@ class DataWriterImpl : protected rtps::IReaderDataFilter const fastrtps::rtps::ReaderProxyData* reader_info) override; 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 64555bdf322..b7915393be1 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl.hpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl.hpp @@ -389,6 +389,10 @@ class DataReaderImpl int32_t sample_lost_since_last_update) override; DataReaderImpl* data_reader_; + + private: + + using fastrtps::rtps::ReaderListener::onReaderMatched; } reader_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 ccd53e459e0..4b7cdec25a6 100644 --- a/src/cpp/rtps/DataSharing/ReaderPool.hpp +++ b/src/cpp/rtps/DataSharing/ReaderPool.hpp @@ -283,6 +283,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 48ca6c31638..44c84be3641 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 e7053c3f1e4..6baae742c8d 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h +++ b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h @@ -109,8 +109,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 diff --git a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp index 7394f96dfb0..43cf9b9e77a 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(); + mp_PDP->announceParticipantState(false, false, __wp); logInfo(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 889dd3b12ae..258a9baa685 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 3cc7b54f789..3d04330c0f6 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/test/blackbox/api/dds-pim/PubSubParticipant.hpp b/test/blackbox/api/dds-pim/PubSubParticipant.hpp index 6a9d2d313a2..d6022fc7d3a 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 1bb96f3451b..ce7e695b5f0 100644 --- a/test/blackbox/api/dds-pim/PubSubReader.hpp +++ b/test/blackbox/api/dds-pim/PubSubReader.hpp @@ -141,6 +141,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 f1ea57a2dc8..c4b6d948fad 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 ac93daa1291..3fb648b1dba 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/RTPSWithRegistrationReader.hpp b/test/blackbox/common/RTPSWithRegistrationReader.hpp index 8592ee4cc31..d8337dda908 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 8aa8c9c2456..02a9fa5b9f7 100644 --- a/test/blackbox/common/RTPSWithRegistrationWriter.hpp +++ b/test/blackbox/common/RTPSWithRegistrationWriter.hpp @@ -96,6 +96,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 e95cece3550..f079837a077 100644 --- a/test/dds/communication/PublisherDynamic.cpp +++ b/test/dds/communication/PublisherDynamic.cpp @@ -114,6 +114,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 fefd4be0070..4745b049a98 100644 --- a/test/dds/communication/SubscriberDynamic.cpp +++ b/test/dds/communication/SubscriberDynamic.cpp @@ -191,6 +191,10 @@ class ParListener : public DomainParticipantListener } #endif // if HAVE_SECURITY + +private: + + using DomainParticipantListener::on_participant_discovery; }; class SubListener : public SubscriberListener 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/unittest/dds/publisher/DataWriterTests.cpp b/test/unittest/dds/publisher/DataWriterTests.cpp index 9912b4276c0..37fea1132a4 100644 --- a/test/unittest/dds/publisher/DataWriterTests.cpp +++ b/test/unittest/dds/publisher/DataWriterTests.cpp @@ -328,6 +328,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; diff --git a/test/unittest/dds/subscriber/DataReaderTests.cpp b/test/unittest/dds/subscriber/DataReaderTests.cpp index 166b37c6247..e6c2bda123e 100644 --- a/test/unittest/dds/subscriber/DataReaderTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderTests.cpp @@ -572,6 +572,10 @@ TEST_F(DataReaderTests, get_guid) fastrtps::rtps::GUID_t guid; std::mutex mutex; std::condition_variable cv; + + private: + + using DomainParticipantListener::on_subscriber_discovery; } discovery_listener; diff --git a/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp b/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp index df4ce9e67e8..7b07e6a6602 100644 --- a/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp +++ b/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp @@ -127,6 +127,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