From 2e6fbd6ec7334b06bdb6ed7b59a5a634a8816358 Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:51:12 +0200 Subject: [PATCH 1/7] Refs #20709: Make private RTPSMessageGroup.h Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- include/fastdds/rtps/reader/StatefulReader.h | 1 - include/fastdds/rtps/writer/RTPSWriter.h | 45 +------------------ include/fastdds/rtps/writer/ReaderLocator.h | 2 +- include/fastdds/rtps/writer/StatelessWriter.h | 4 +- .../builtin/discovery/participant/PDPClient.h | 3 +- .../discovery/participant/PDPServer.hpp | 1 + .../rtps/flowcontrol/FlowControllerImpl.hpp | 1 + src/cpp/rtps/history/WriterHistory.cpp | 5 ++- src/cpp/rtps/messages/RTPSGapBuilder.hpp | 2 +- src/cpp/rtps/messages/RTPSMessageGroup.cpp | 3 +- .../cpp}/rtps/messages/RTPSMessageGroup.h | 0 src/cpp/rtps/messages/SendBuffersManager.cpp | 3 +- src/cpp/rtps/reader/StatefulReader.cpp | 2 +- src/cpp/rtps/writer/RTPSWriter.cpp | 6 +-- src/cpp/rtps/writer/StatefulWriter.cpp | 2 +- src/cpp/rtps/writer/StatelessWriter.cpp | 1 + .../rtps/messages/RTPSGapBuilder.hpp | 2 +- .../rtps/messages/RTPSMessageGroup.h | 0 .../fastdds/rtps/writer/RTPSWriter.h | 2 +- .../fastdds/rtps/writer/ReaderLocator.h | 1 - 20 files changed, 23 insertions(+), 63 deletions(-) rename {include/fastdds => src/cpp}/rtps/messages/RTPSMessageGroup.h (100%) rename test/mock/rtps/RTPSMessageGroup/{fastdds => }/rtps/messages/RTPSMessageGroup.h (100%) diff --git a/include/fastdds/rtps/reader/StatefulReader.h b/include/fastdds/rtps/reader/StatefulReader.h index 97cc36f91e9..41ae9edcc04 100644 --- a/include/fastdds/rtps/reader/StatefulReader.h +++ b/include/fastdds/rtps/reader/StatefulReader.h @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/include/fastdds/rtps/writer/RTPSWriter.h b/include/fastdds/rtps/writer/RTPSWriter.h index 0c997d368ef..68cea5dd79d 100644 --- a/include/fastdds/rtps/writer/RTPSWriter.h +++ b/include/fastdds/rtps/writer/RTPSWriter.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -61,6 +60,7 @@ namespace rtps { class WriterListener; class WriterHistory; class DataSharingNotifier; +class RTPSMessageGroup; struct CacheChange_t; /** @@ -588,49 +588,6 @@ class RTPSWriter bool is_pool_initialized() const; - template - bool send_data_or_fragments( - RTPSMessageGroup& group, - CacheChange_t* change, - bool inline_qos, - Functor sent_fun) - { - bool sent_ok = true; - - uint32_t n_fragments = change->getFragmentCount(); - if (n_fragments > 0) - { - for (FragmentNumber_t frag = 1; frag <= n_fragments; frag++) - { - sent_ok &= group.add_data_frag(*change, frag, inline_qos); - if (sent_ok) - { - sent_fun(change, frag); - } - else - { - EPROSIMA_LOG_ERROR(RTPS_WRITER, - "Error sending fragment (" << change->sequenceNumber << ", " << frag << ")"); - break; - } - } - } - else - { - sent_ok = group.add_data(*change, inline_qos); - if (sent_ok) - { - sent_fun(change, 0); - } - else - { - EPROSIMA_LOG_ERROR(RTPS_WRITER, "Error sending change " << change->sequenceNumber); - } - } - - return sent_ok; - } - void add_statistics_sent_submessage( CacheChange_t* change, size_t num_locators); diff --git a/include/fastdds/rtps/writer/ReaderLocator.h b/include/fastdds/rtps/writer/ReaderLocator.h index 49a697fd9e4..a48f3717d3b 100644 --- a/include/fastdds/rtps/writer/ReaderLocator.h +++ b/include/fastdds/rtps/writer/ReaderLocator.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include namespace eprosima { diff --git a/include/fastdds/rtps/writer/StatelessWriter.h b/include/fastdds/rtps/writer/StatelessWriter.h index 98c117d95d4..a78f81fee52 100644 --- a/include/fastdds/rtps/writer/StatelessWriter.h +++ b/include/fastdds/rtps/writer/StatelessWriter.h @@ -38,6 +38,7 @@ namespace eprosima { namespace fastrtps { namespace rtps { +class RTPSMessageGroup; /** * Class StatelessWriter, specialization of RTPSWriter that manages writers that don't keep state of the matched readers. @@ -46,7 +47,8 @@ namespace rtps { class StatelessWriter : public RTPSWriter { friend class RTPSParticipantImpl; - + friend class RTPSMessageGroup; + protected: StatelessWriter( diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h index 09855bca335..631180c9d84 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h +++ b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h @@ -21,12 +21,11 @@ #define _FASTDDS_RTPS_PDPCLIENT_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include - #include #include #include #include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp index 3d54c147ef2..0db72cff9e3 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp @@ -36,6 +36,7 @@ #include #include #include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp b/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp index c245866a73d..587bf89ebb6 100644 --- a/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp +++ b/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp @@ -15,6 +15,7 @@ #include #include +#include #include #include diff --git a/src/cpp/rtps/history/WriterHistory.cpp b/src/cpp/rtps/history/WriterHistory.cpp index 1553d35881a..29764710dee 100644 --- a/src/cpp/rtps/history/WriterHistory.cpp +++ b/src/cpp/rtps/history/WriterHistory.cpp @@ -18,12 +18,13 @@ #include +#include + #include #include #include #include - -#include +#include namespace eprosima { namespace fastrtps { diff --git a/src/cpp/rtps/messages/RTPSGapBuilder.hpp b/src/cpp/rtps/messages/RTPSGapBuilder.hpp index a9ad290361c..72545165073 100644 --- a/src/cpp/rtps/messages/RTPSGapBuilder.hpp +++ b/src/cpp/rtps/messages/RTPSGapBuilder.hpp @@ -21,7 +21,7 @@ #define RTPSGAPBUILDER_HPP #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include +#include "RTPSMessageGroup.h" namespace eprosima { namespace fastrtps { diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.cpp b/src/cpp/rtps/messages/RTPSMessageGroup.cpp index f4999e6f46e..fbb117ac942 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.cpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup.cpp @@ -17,11 +17,12 @@ * */ +#include "RTPSMessageGroup.h" + #include #include #include -#include #include #include diff --git a/include/fastdds/rtps/messages/RTPSMessageGroup.h b/src/cpp/rtps/messages/RTPSMessageGroup.h similarity index 100% rename from include/fastdds/rtps/messages/RTPSMessageGroup.h rename to src/cpp/rtps/messages/RTPSMessageGroup.h diff --git a/src/cpp/rtps/messages/SendBuffersManager.cpp b/src/cpp/rtps/messages/SendBuffersManager.cpp index c9d4a7e3c3a..4e70678e1e8 100644 --- a/src/cpp/rtps/messages/SendBuffersManager.cpp +++ b/src/cpp/rtps/messages/SendBuffersManager.cpp @@ -17,8 +17,9 @@ */ #include "SendBuffersManager.hpp" + +#include "RTPSMessageGroup.h" #include "../participant/RTPSParticipantImpl.h" -#include namespace eprosima { namespace fastrtps { diff --git a/src/cpp/rtps/reader/StatefulReader.cpp b/src/cpp/rtps/reader/StatefulReader.cpp index 95a7da8e3ae..5d0d95d5f26 100644 --- a/src/cpp/rtps/reader/StatefulReader.cpp +++ b/src/cpp/rtps/reader/StatefulReader.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/src/cpp/rtps/writer/RTPSWriter.cpp b/src/cpp/rtps/writer/RTPSWriter.cpp index ec7527bd75f..ec5e56c6e10 100644 --- a/src/cpp/rtps/writer/RTPSWriter.cpp +++ b/src/cpp/rtps/writer/RTPSWriter.cpp @@ -22,20 +22,18 @@ #include #include - #include #include -#include #include #include #include #include +#include +#include #include - #include #include - #include "../flowcontrol/FlowController.hpp" namespace eprosima { diff --git a/src/cpp/rtps/writer/StatefulWriter.cpp b/src/cpp/rtps/writer/StatefulWriter.cpp index ec2b10342dc..f2e35e819f1 100644 --- a/src/cpp/rtps/writer/StatefulWriter.cpp +++ b/src/cpp/rtps/writer/StatefulWriter.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -45,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/src/cpp/rtps/writer/StatelessWriter.cpp b/src/cpp/rtps/writer/StatelessWriter.cpp index 84c99aeb0ab..498e562eb1e 100644 --- a/src/cpp/rtps/writer/StatelessWriter.cpp +++ b/src/cpp/rtps/writer/StatelessWriter.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include diff --git a/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp b/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp index 4b162ac4d13..ae984a9ca4a 100644 --- a/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp +++ b/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp @@ -20,7 +20,7 @@ #ifndef RTPSGAPBUILDER_HPP #define RTPSGAPBUILDER_HPP -#include +#include namespace eprosima { namespace fastrtps { diff --git a/test/mock/rtps/RTPSMessageGroup/fastdds/rtps/messages/RTPSMessageGroup.h b/test/mock/rtps/RTPSMessageGroup/rtps/messages/RTPSMessageGroup.h similarity index 100% rename from test/mock/rtps/RTPSMessageGroup/fastdds/rtps/messages/RTPSMessageGroup.h rename to test/mock/rtps/RTPSMessageGroup/rtps/messages/RTPSMessageGroup.h diff --git a/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h b/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h index 42ac0cf307b..e1b3cdf1477 100644 --- a/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h +++ b/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h @@ -29,10 +29,10 @@ #include #include #include -#include #include #include #include +#include namespace eprosima { namespace fastrtps { diff --git a/test/mock/rtps/ReaderLocator/fastdds/rtps/writer/ReaderLocator.h b/test/mock/rtps/ReaderLocator/fastdds/rtps/writer/ReaderLocator.h index 1c8c99eb265..89c028e3e08 100644 --- a/test/mock/rtps/ReaderLocator/fastdds/rtps/writer/ReaderLocator.h +++ b/test/mock/rtps/ReaderLocator/fastdds/rtps/writer/ReaderLocator.h @@ -28,7 +28,6 @@ #include #include #include -#include #include namespace eprosima { From 4460b36b322ff5066c1b61118b789958003397ac Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Wed, 3 Apr 2024 17:09:13 +0200 Subject: [PATCH 2/7] Refs #20709: Make private RTPSMessageCreator.h Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- src/cpp/rtps/messages/RTPSMessageCreator.cpp | 2 +- {include/fastdds => src/cpp}/rtps/messages/RTPSMessageCreator.h | 0 src/cpp/rtps/messages/RTPSMessageGroup.cpp | 2 +- src/cpp/rtps/messages/RTPSMessageGroup.h | 2 +- src/cpp/rtps/messages/RTPSMessageGroup_t.hpp | 2 +- src/cpp/rtps/reader/WriterProxy.cpp | 2 +- src/cpp/rtps/writer/StatefulWriter.cpp | 2 +- src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename {include/fastdds => src/cpp}/rtps/messages/RTPSMessageCreator.h (100%) diff --git a/src/cpp/rtps/messages/RTPSMessageCreator.cpp b/src/cpp/rtps/messages/RTPSMessageCreator.cpp index 83314711540..6e1de4b2998 100644 --- a/src/cpp/rtps/messages/RTPSMessageCreator.cpp +++ b/src/cpp/rtps/messages/RTPSMessageCreator.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include using namespace eprosima::fastrtps; using ParameterList = eprosima::fastdds::dds::ParameterList; diff --git a/include/fastdds/rtps/messages/RTPSMessageCreator.h b/src/cpp/rtps/messages/RTPSMessageCreator.h similarity index 100% rename from include/fastdds/rtps/messages/RTPSMessageCreator.h rename to src/cpp/rtps/messages/RTPSMessageCreator.h diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.cpp b/src/cpp/rtps/messages/RTPSMessageGroup.cpp index fbb117ac942..827120e5805 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.cpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.h b/src/cpp/rtps/messages/RTPSMessageGroup.h index b2e1d98dfcb..76613c009bd 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.h +++ b/src/cpp/rtps/messages/RTPSMessageGroup.h @@ -22,7 +22,7 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #include -#include +#include #include #include diff --git a/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp b/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp index f1b31218440..afa2ed303c9 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace eprosima { namespace fastrtps { diff --git a/src/cpp/rtps/reader/WriterProxy.cpp b/src/cpp/rtps/reader/WriterProxy.cpp index 55f3a741855..b4a146cc7cc 100644 --- a/src/cpp/rtps/reader/WriterProxy.cpp +++ b/src/cpp/rtps/reader/WriterProxy.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/writer/StatefulWriter.cpp b/src/cpp/rtps/writer/StatefulWriter.cpp index f2e35e819f1..6046dc187b1 100644 --- a/src/cpp/rtps/writer/StatefulWriter.cpp +++ b/src/cpp/rtps/writer/StatefulWriter.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp index 3ae852e659c..64f7dfc475f 100644 --- a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp +++ b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #define FASTDDS_STATISTICS_NETWORK_SUBMESSAGE 0x80 From eb1f11b337a56f56eba9d3ad504e0e2c7c01adde Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Thu, 4 Apr 2024 13:03:36 +0200 Subject: [PATCH 3/7] Refs #20709: Make private CDRMessage.h and move CDRMessage.hpp to CDRMessage.cpp Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- .../dds/core/policy/ParameterTypes.hpp | 2 +- .../messages/RTPSMessageSenderInterface.hpp | 2 +- .../transport/test_UDPv4TransportDescriptor.h | 3 +- include/fastdds/rtps/writer/StatelessWriter.h | 2 +- src/cpp/fastdds/core/policy/ParameterList.hpp | 2 +- src/cpp/fastdds/topic/ContentFilterInfo.hpp | 2 +- .../topic/ContentFilteredTopicImpl.cpp | 2 +- .../rtps/builtin/liveliness/WLPListener.cpp | 2 +- .../cpp/rtps/messages/CDRMessage.cpp | 4 +- .../cpp}/rtps/messages/CDRMessage.h | 122 +++++++++--------- src/cpp/rtps/messages/RTPSMessageCreator.cpp | 2 +- src/cpp/rtps/messages/RTPSMessageGroup_t.hpp | 2 +- src/cpp/rtps/security/SecurityManager.cpp | 2 +- .../rtps/transport/UDPTransportInterface.cpp | 3 +- src/cpp/rtps/transport/UDPv4Transport.cpp | 2 +- .../shared_mem/SharedMemTransport.cpp | 2 +- src/cpp/rtps/transport/test_UDPv4Transport.h | 2 +- src/cpp/security/authentication/PKIDH.cpp | 9 +- .../cryptography/AESGCMGMAC_Transform.cpp | 2 +- .../rtps/messages/RTPSStatisticsMessages.hpp | 2 +- test/blackbox/common/BlackboxTestsKeys.cpp | 3 +- .../common/DDSBlackboxTestsContentFilter.cpp | 2 + .../common/DDSBlackboxTestsListeners.cpp | 1 + .../EDP/rtps/builtin/discovery/endpoint/EDP.h | 2 +- .../rtps/builtin/discovery/participant/PDP.h | 3 +- .../builtin/discovery/participant/PDPSimple.h | 2 +- .../builtin/BuiltinDataSerializationTests.cpp | 2 +- .../accesscontrol/AccessControlTests.cpp | 3 +- .../authentication/BuiltinPKIDHTests.cpp | 2 +- 29 files changed, 97 insertions(+), 94 deletions(-) rename include/fastdds/rtps/messages/CDRMessage.hpp => src/cpp/rtps/messages/CDRMessage.cpp (99%) rename {include/fastdds => src/cpp}/rtps/messages/CDRMessage.h (81%) diff --git a/include/fastdds/dds/core/policy/ParameterTypes.hpp b/include/fastdds/dds/core/policy/ParameterTypes.hpp index 3fc0a760456..d390fc0ca3b 100644 --- a/include/fastdds/dds/core/policy/ParameterTypes.hpp +++ b/include/fastdds/dds/core/policy/ParameterTypes.hpp @@ -28,7 +28,7 @@ #include #include -#include +#include #if HAVE_SECURITY #include diff --git a/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp b/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp index 6ef5c16e5b8..babed57bae1 100644 --- a/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp +++ b/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp @@ -26,7 +26,7 @@ #include #include -#include +#include namespace eprosima { namespace fastrtps { diff --git a/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h b/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h index 79665530133..03e55a37c1a 100644 --- a/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h +++ b/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h @@ -16,10 +16,11 @@ #define _FASTDDS_TEST_UDPV4_TRANSPORT_DESCRIPTOR_ #include +#include #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/include/fastdds/rtps/writer/StatelessWriter.h b/include/fastdds/rtps/writer/StatelessWriter.h index a78f81fee52..0f51fd9c60b 100644 --- a/include/fastdds/rtps/writer/StatelessWriter.h +++ b/include/fastdds/rtps/writer/StatelessWriter.h @@ -48,7 +48,7 @@ class StatelessWriter : public RTPSWriter { friend class RTPSParticipantImpl; friend class RTPSMessageGroup; - + protected: StatelessWriter( diff --git a/src/cpp/fastdds/core/policy/ParameterList.hpp b/src/cpp/fastdds/core/policy/ParameterList.hpp index ed0ecd22b08..6ea9a42b248 100644 --- a/src/cpp/fastdds/core/policy/ParameterList.hpp +++ b/src/cpp/fastdds/core/policy/ParameterList.hpp @@ -23,8 +23,8 @@ #include #include #include -#include #include +#include #include diff --git a/src/cpp/fastdds/topic/ContentFilterInfo.hpp b/src/cpp/fastdds/topic/ContentFilterInfo.hpp index b1814a980ea..759a6c9ffca 100644 --- a/src/cpp/fastdds/topic/ContentFilterInfo.hpp +++ b/src/cpp/fastdds/topic/ContentFilterInfo.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp b/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp index 3914bee1a7b..a590c831c36 100644 --- a/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp +++ b/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp @@ -25,11 +25,11 @@ #include #include #include -#include #include #include #include #include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/builtin/liveliness/WLPListener.cpp b/src/cpp/rtps/builtin/liveliness/WLPListener.cpp index d0f6e4ed492..35633035a2e 100644 --- a/src/cpp/rtps/builtin/liveliness/WLPListener.cpp +++ b/src/cpp/rtps/builtin/liveliness/WLPListener.cpp @@ -32,12 +32,12 @@ #include #include #include -#include #include #include #include #include +#include #include namespace eprosima { diff --git a/include/fastdds/rtps/messages/CDRMessage.hpp b/src/cpp/rtps/messages/CDRMessage.cpp similarity index 99% rename from include/fastdds/rtps/messages/CDRMessage.hpp rename to src/cpp/rtps/messages/CDRMessage.cpp index 414ec888f44..ed9313c6396 100644 --- a/include/fastdds/rtps/messages/CDRMessage.hpp +++ b/src/cpp/rtps/messages/CDRMessage.cpp @@ -15,10 +15,12 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS /** - * @file CDRMessage.hpp + * @file CDRMessage.cpp * */ +#include "CDRMessage.h" + #include #include #include diff --git a/include/fastdds/rtps/messages/CDRMessage.h b/src/cpp/rtps/messages/CDRMessage.h similarity index 81% rename from include/fastdds/rtps/messages/CDRMessage.h rename to src/cpp/rtps/messages/CDRMessage.h index d5fb563e08e..6ebe98167cc 100644 --- a/include/fastdds/rtps/messages/CDRMessage.h +++ b/src/cpp/rtps/messages/CDRMessage.h @@ -53,116 +53,116 @@ namespace CDRMessage { * @return True if correct. */ /// @{ -inline bool readEntityId( +bool readEntityId( CDRMessage_t* msg, EntityId_t* id); -inline bool readData( +bool readData( CDRMessage_t* msg, octet* o, uint32_t length); -inline bool read_array_with_max_size( +bool read_array_with_max_size( CDRMessage_t* msg, octet* arr, size_t max_size); -inline bool readDataReversed( +bool readDataReversed( CDRMessage_t* msg, octet* o, uint32_t length); -inline bool readInt32( +bool readInt32( CDRMessage_t* msg, int32_t* lo); -inline bool readUInt32( +bool readUInt32( CDRMessage_t* msg, uint32_t* ulo); -inline bool readInt64( +bool readInt64( CDRMessage_t* msg, int64_t* lolo); -inline bool readUInt64( +bool readUInt64( CDRMessage_t* msg, uint64_t* lolo); -inline bool readSequenceNumber( +bool readSequenceNumber( CDRMessage_t* msg, SequenceNumber_t* sn); -inline bool readInt16( +bool readInt16( CDRMessage_t* msg, int16_t* i16); -inline bool readUInt16( +bool readUInt16( CDRMessage_t* msg, uint16_t* i16); -inline bool readLocator( +bool readLocator( CDRMessage_t* msg, Locator_t* loc); -inline bool readOctet( +bool readOctet( CDRMessage_t* msg, octet* o); -inline SequenceNumberSet_t readSequenceNumberSet( +SequenceNumberSet_t readSequenceNumberSet( CDRMessage_t* msg); -inline bool readFragmentNumberSet( +bool readFragmentNumberSet( CDRMessage_t* msg, FragmentNumberSet_t* snset); -inline bool readTimestamp( +bool readTimestamp( CDRMessage_t* msg, Time_t* ts); -inline bool readString( +bool readString( CDRMessage_t* msg, std::string* p_str); -inline bool readString( +bool readString( CDRMessage_t* msg, fastcdr::string_255* stri); -inline bool readOctetVector( +bool readOctetVector( CDRMessage_t* msg, std::vector* ocvec); -inline bool readProperty( +bool readProperty( CDRMessage_t* msg, Property& property); -inline bool readBinaryProperty( +bool readBinaryProperty( CDRMessage_t* msg, BinaryProperty& binary_property); -inline bool readPropertySeq( +bool readPropertySeq( CDRMessage_t* msg, PropertySeq& properties, const uint32_t parameter_length); -inline bool readBinaryPropertySeq( +bool readBinaryPropertySeq( CDRMessage_t* msg, BinaryPropertySeq& binary_properties, const uint32_t parameter_length); -inline bool readDataHolder( +bool readDataHolder( CDRMessage_t* msg, DataHolder& data_holder, const uint32_t parameter_length); -inline bool readDataHolderSeq( +bool readDataHolderSeq( CDRMessage_t* msg, DataHolderSeq& data_holders); -inline bool readMessageIdentity( +bool readMessageIdentity( CDRMessage_t* msg, security::MessageIdentity& message_identity); -inline bool readParticipantGenericMessage( +bool readParticipantGenericMessage( CDRMessage_t* msg, security::ParticipantGenericMessage& message); ///@} @@ -174,11 +174,11 @@ inline bool readParticipantGenericMessage( * @param data_size Size of the data the message is suppose to carry * @return True if correct. */ -inline bool initCDRMsg( +bool initCDRMsg( CDRMessage_t* msg, uint32_t data_size = RTPSMESSAGE_COMMON_DATA_PAYLOAD_SIZE); -inline bool wrapVector( +bool wrapVector( CDRMessage_t* msg, std::vector& vectorToWrap); @@ -188,7 +188,7 @@ inline bool wrapVector( * @param[in] second Pointer to second message. ** @return True if correct. */ -inline bool appendMsg( +bool appendMsg( CDRMessage_t* first, CDRMessage_t* second); @@ -205,127 +205,127 @@ inline bool appendMsg( /// @{ template -inline bool addPrimitive( +bool addPrimitive( CDRMessage_t* msg, T value); -inline bool hasSpace( +bool hasSpace( CDRMessage_t* msg, const uint32_t length); -inline void copyToBuffer( +void copyToBuffer( CDRMessage_t* msg, const octet* data, const uint32_t length, bool reverse = false); -inline bool addData( +bool addData( CDRMessage_t*, const octet*, const uint32_t number_bytes); -inline bool addDataReversed( +bool addDataReversed( CDRMessage_t*, const octet*, const uint32_t byte_number); -inline bool addOctet( +bool addOctet( CDRMessage_t* msg, octet o); -inline bool addUInt16( +bool addUInt16( CDRMessage_t* msg, uint16_t us); -inline bool addInt32( +bool addInt32( CDRMessage_t* msg, int32_t lo); -inline bool addUInt32( +bool addUInt32( CDRMessage_t* msg, uint32_t lo); -inline bool addInt64( +bool addInt64( CDRMessage_t* msg, int64_t lo); -inline bool addUInt64( +bool addUInt64( CDRMessage_t* msg, uint64_t lo); -inline bool addEntityId( +bool addEntityId( CDRMessage_t* msg, const EntityId_t* id); -inline bool addSequenceNumber( +bool addSequenceNumber( CDRMessage_t* msg, const SequenceNumber_t* sn); -inline bool addSequenceNumberSet( +bool addSequenceNumberSet( CDRMessage_t* msg, const SequenceNumberSet_t* sns); -inline bool addFragmentNumberSet( +bool addFragmentNumberSet( CDRMessage_t* msg, FragmentNumberSet_t* fns); -inline bool addLocator( +bool addLocator( CDRMessage_t* msg, const Locator_t& loc); -inline bool add_string( +bool add_string( CDRMessage_t* msg, const char* in_str); -inline bool add_string( +bool add_string( CDRMessage_t* msg, const std::string& in_str); -inline bool add_string( +bool add_string( CDRMessage_t* msg, const fastcdr::string_255& in_str); -inline bool addOctetVector( +bool addOctetVector( CDRMessage_t* msg, const std::vector* ocvec, bool add_final_padding = true); -inline bool addProperty( +bool addProperty( CDRMessage_t* msg, const Property& property); -inline bool addBinaryProperty( +bool addBinaryProperty( CDRMessage_t* msg, const BinaryProperty& binary_property, bool add_final_padding = true); -inline bool addPropertySeq( +bool addPropertySeq( CDRMessage_t* msg, const PropertySeq& properties); -inline bool addBinaryPropertySeq( +bool addBinaryPropertySeq( CDRMessage_t* msg, const BinaryPropertySeq& binary_properties, bool add_final_padding); -inline bool addBinaryPropertySeq( +bool addBinaryPropertySeq( CDRMessage_t* msg, const BinaryPropertySeq& binary_properties, const std::string& name_start, bool add_final_padding); -inline bool addDataHolder( +bool addDataHolder( CDRMessage_t* msg, const DataHolder& data_holder); -inline bool addDataHolderSeq( +bool addDataHolderSeq( CDRMessage_t* msg, const DataHolderSeq& data_holders); -inline bool addMessageIdentity( +bool addMessageIdentity( CDRMessage_t* msg, const security::MessageIdentity& message_identity); -inline bool addParticipantGenericMessage( +bool addParticipantGenericMessage( CDRMessage_t* msg, const security::ParticipantGenericMessage& message); @@ -338,7 +338,7 @@ inline bool addParticipantGenericMessage( * @param length The number of bytes to skip * @return true if skipped, false otherwise */ -inline bool skip( +bool skip( CDRMessage_t* msg, uint32_t length); @@ -350,7 +350,7 @@ inline bool skip( #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include +#include "CDRMessage.cpp" #endif /* DOXYGEN_SHOULD_SKIP_THIS */ #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC diff --git a/src/cpp/rtps/messages/RTPSMessageCreator.cpp b/src/cpp/rtps/messages/RTPSMessageCreator.cpp index 6e1de4b2998..2556393b084 100644 --- a/src/cpp/rtps/messages/RTPSMessageCreator.cpp +++ b/src/cpp/rtps/messages/RTPSMessageCreator.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include using namespace eprosima::fastrtps; diff --git a/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp b/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp index afa2ed303c9..b889d533ade 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp @@ -22,7 +22,7 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #include -#include +#include #include namespace eprosima { diff --git a/src/cpp/rtps/security/SecurityManager.cpp b/src/cpp/rtps/security/SecurityManager.cpp index 495087f8349..13ffd779041 100644 --- a/src/cpp/rtps/security/SecurityManager.cpp +++ b/src/cpp/rtps/security/SecurityManager.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -44,6 +43,7 @@ #include #include +#include #include #include #include diff --git a/src/cpp/rtps/transport/UDPTransportInterface.cpp b/src/cpp/rtps/transport/UDPTransportInterface.cpp index 96f39bbeaf6..e932db34a87 100644 --- a/src/cpp/rtps/transport/UDPTransportInterface.cpp +++ b/src/cpp/rtps/transport/UDPTransportInterface.cpp @@ -22,9 +22,8 @@ #include #include -#include #include - +#include #include #include #include diff --git a/src/cpp/rtps/transport/UDPv4Transport.cpp b/src/cpp/rtps/transport/UDPv4Transport.cpp index b2ebb3c3f84..9ccbd18cd47 100644 --- a/src/cpp/rtps/transport/UDPv4Transport.cpp +++ b/src/cpp/rtps/transport/UDPv4Transport.cpp @@ -19,11 +19,11 @@ #include #include -#include #include #include #include +#include #include #include #include diff --git a/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp b/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp index 809c62e54a7..f43f8dde615 100644 --- a/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp +++ b/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp @@ -24,10 +24,10 @@ #include #include -#include #include #include +#include #include #include #include diff --git a/src/cpp/rtps/transport/test_UDPv4Transport.h b/src/cpp/rtps/transport/test_UDPv4Transport.h index 8bf175f1816..46f018062fc 100644 --- a/src/cpp/rtps/transport/test_UDPv4Transport.h +++ b/src/cpp/rtps/transport/test_UDPv4Transport.h @@ -19,8 +19,8 @@ #include #include -#include #include +#include #include diff --git a/src/cpp/security/authentication/PKIDH.cpp b/src/cpp/security/authentication/PKIDH.cpp index 921202fe618..1f8a0e94a7c 100644 --- a/src/cpp/security/authentication/PKIDH.cpp +++ b/src/cpp/security/authentication/PKIDH.cpp @@ -21,16 +21,15 @@ #define OPENSSL_API_COMPAT 10101 #include -#include + +#include #include #include -#include #include - +#include +#include #include -#include - #if OPENSSL_VERSION_NUMBER >= 0x10100000L #define IS_OPENSSL_1_1 1 #define OPENSSL_CONST const diff --git a/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp b/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp index 8d7bb092f0c..e85d6740799 100644 --- a/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp +++ b/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp index 64f7dfc475f..d8b4126959c 100644 --- a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp +++ b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #define FASTDDS_STATISTICS_NETWORK_SUBMESSAGE 0x80 diff --git a/test/blackbox/common/BlackboxTestsKeys.cpp b/test/blackbox/common/BlackboxTestsKeys.cpp index 62c4b1bce30..923ad08f17c 100644 --- a/test/blackbox/common/BlackboxTestsKeys.cpp +++ b/test/blackbox/common/BlackboxTestsKeys.cpp @@ -17,7 +17,8 @@ #include "PubSubReader.hpp" #include "PubSubWriter.hpp" -#include +#include +#include TEST(KeyedTopic, RegistrationNonKeyedFail) { diff --git a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp index dc72f1e5479..24eebf72aa6 100644 --- a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp +++ b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp @@ -21,7 +21,9 @@ #include #include #include +#include #include +#include #include #include "../types/HelloWorldTypeObjectSupport.hpp" diff --git a/test/blackbox/common/DDSBlackboxTestsListeners.cpp b/test/blackbox/common/DDSBlackboxTestsListeners.cpp index 9fcba4cba3a..ab6eed1af56 100644 --- a/test/blackbox/common/DDSBlackboxTestsListeners.cpp +++ b/test/blackbox/common/DDSBlackboxTestsListeners.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "BlackboxTests.hpp" #include "PubSubReader.hpp" diff --git a/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h b/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h index 1bac39bab51..4f4b850545e 100644 --- a/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h +++ b/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include diff --git a/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h b/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h index b288545290d..2b00a4f1ad4 100644 --- a/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h +++ b/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h @@ -22,10 +22,9 @@ #include #include -#include - #include #include +#include #include namespace eprosima { diff --git a/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h b/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h index 1012f973e76..4540baafd86 100644 --- a/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h +++ b/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h @@ -22,10 +22,10 @@ #include #include -#include #include #include +#include namespace eprosima { namespace fastrtps { diff --git a/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp b/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp index f8f74b4fc4f..401dbbc739c 100644 --- a/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp +++ b/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp @@ -29,8 +29,8 @@ #include #include #include -#include +#include #include namespace eprosima { diff --git a/test/unittest/security/accesscontrol/AccessControlTests.cpp b/test/unittest/security/accesscontrol/AccessControlTests.cpp index afdfe5c4f51..8ffa196a941 100644 --- a/test/unittest/security/accesscontrol/AccessControlTests.cpp +++ b/test/unittest/security/accesscontrol/AccessControlTests.cpp @@ -19,8 +19,7 @@ #include #include #include -#include - +#include #include #include #include diff --git a/test/unittest/security/authentication/BuiltinPKIDHTests.cpp b/test/unittest/security/authentication/BuiltinPKIDHTests.cpp index 37622e782f1..3422e445ccf 100644 --- a/test/unittest/security/authentication/BuiltinPKIDHTests.cpp +++ b/test/unittest/security/authentication/BuiltinPKIDHTests.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include "AuthenticationPluginTests.hpp" #include From f5d116ac8799cc12f388a7bfe8e0ab082c64bc53 Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Tue, 21 May 2024 12:49:49 +0200 Subject: [PATCH 4/7] Refs #20709: Apply suggestions Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- include/fastdds/dds/core/policy/ParameterTypes.hpp | 1 - .../rtps/messages/RTPSMessageSenderInterface.hpp | 3 ++- .../rtps/transport/test_UDPv4TransportDescriptor.h | 11 +++++++++-- src/cpp/fastdds/core/policy/ParameterList.hpp | 2 +- src/cpp/fastdds/topic/ContentFilterInfo.hpp | 2 +- src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp | 2 +- .../rtps/builtin/discovery/participant/PDPClient.h | 2 +- .../rtps/builtin/discovery/participant/PDPServer.hpp | 2 +- src/cpp/rtps/builtin/liveliness/WLPListener.cpp | 2 +- src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp | 2 +- src/cpp/rtps/history/WriterHistory.cpp | 2 +- src/cpp/rtps/messages/CDRMessage.cpp | 2 +- .../rtps/messages/{CDRMessage.h => CDRMessage.hpp} | 2 +- src/cpp/rtps/messages/RTPSGapBuilder.hpp | 2 +- src/cpp/rtps/messages/RTPSMessageCreator.cpp | 4 ++-- .../{RTPSMessageCreator.h => RTPSMessageCreator.hpp} | 0 src/cpp/rtps/messages/RTPSMessageGroup.cpp | 4 ++-- .../{RTPSMessageGroup.h => RTPSMessageGroup.hpp} | 5 +++-- src/cpp/rtps/messages/RTPSMessageGroup_t.hpp | 4 ++-- src/cpp/rtps/messages/SendBuffersManager.cpp | 2 +- src/cpp/rtps/reader/StatefulReader.cpp | 2 +- src/cpp/rtps/reader/WriterProxy.cpp | 2 +- src/cpp/rtps/security/SecurityManager.cpp | 2 +- src/cpp/rtps/transport/UDPTransportInterface.cpp | 2 +- src/cpp/rtps/transport/UDPv4Transport.cpp | 2 +- .../rtps/transport/shared_mem/SharedMemTransport.cpp | 2 +- src/cpp/rtps/transport/test_UDPv4Transport.h | 2 +- src/cpp/rtps/writer/RTPSWriter.cpp | 4 ++-- src/cpp/rtps/writer/StatefulWriter.cpp | 4 ++-- src/cpp/rtps/writer/StatelessWriter.cpp | 2 +- src/cpp/security/authentication/PKIDH.cpp | 3 ++- .../security/cryptography/AESGCMGMAC_Transform.cpp | 2 +- .../rtps/messages/RTPSStatisticsMessages.hpp | 4 ++-- test/blackbox/common/BlackboxTestsKeys.cpp | 2 +- .../blackbox/common/DDSBlackboxTestsContentFilter.cpp | 2 +- test/blackbox/common/DDSBlackboxTestsListeners.cpp | 2 +- .../rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h | 2 +- .../rtps/PDP/rtps/builtin/discovery/participant/PDP.h | 2 +- .../rtps/builtin/discovery/participant/PDPSimple.h | 2 +- .../RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp | 2 +- .../rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h | 2 +- .../rtps/builtin/BuiltinDataSerializationTests.cpp | 2 +- .../security/accesscontrol/AccessControlTests.cpp | 2 +- .../security/authentication/BuiltinPKIDHTests.cpp | 2 +- 44 files changed, 60 insertions(+), 51 deletions(-) rename src/cpp/rtps/messages/{CDRMessage.h => CDRMessage.hpp} (99%) rename src/cpp/rtps/messages/{RTPSMessageCreator.h => RTPSMessageCreator.hpp} (100%) rename src/cpp/rtps/messages/{RTPSMessageGroup.h => RTPSMessageGroup.hpp} (99%) diff --git a/include/fastdds/dds/core/policy/ParameterTypes.hpp b/include/fastdds/dds/core/policy/ParameterTypes.hpp index d390fc0ca3b..acfb88e5d8b 100644 --- a/include/fastdds/dds/core/policy/ParameterTypes.hpp +++ b/include/fastdds/dds/core/policy/ParameterTypes.hpp @@ -28,7 +28,6 @@ #include #include -#include #if HAVE_SECURITY #include diff --git a/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp b/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp index babed57bae1..47bf27409d3 100644 --- a/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp +++ b/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp @@ -26,12 +26,13 @@ #include #include -#include namespace eprosima { namespace fastrtps { namespace rtps { +struct CDRMessage_t; + /** * An interface used in \ref RTPSMessageGroup to handle destinations management * and message sending. diff --git a/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h b/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h index 03e55a37c1a..6d62a49443c 100644 --- a/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h +++ b/include/fastdds/rtps/transport/test_UDPv4TransportDescriptor.h @@ -20,9 +20,16 @@ #include #include -#include + + namespace eprosima { +namespace fastrtps { +namespace rtps { + +struct CDRMessage_t; +} //rtps +} //fastrtps namespace fastdds { namespace rtps { @@ -33,7 +40,7 @@ namespace rtps { struct test_UDPv4TransportDescriptor : public SocketTransportDescriptor { //! Custom message filtering functions - typedef std::function filter; + typedef std::function filter; //! Locator filtering function typedef std::function DestinationLocatorFilter; diff --git a/src/cpp/fastdds/core/policy/ParameterList.hpp b/src/cpp/fastdds/core/policy/ParameterList.hpp index 6ea9a42b248..c2ec94daa63 100644 --- a/src/cpp/fastdds/core/policy/ParameterList.hpp +++ b/src/cpp/fastdds/core/policy/ParameterList.hpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include diff --git a/src/cpp/fastdds/topic/ContentFilterInfo.hpp b/src/cpp/fastdds/topic/ContentFilterInfo.hpp index 759a6c9ffca..84a28496862 100644 --- a/src/cpp/fastdds/topic/ContentFilterInfo.hpp +++ b/src/cpp/fastdds/topic/ContentFilterInfo.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp b/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp index a590c831c36..073b55eb86d 100644 --- a/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp +++ b/src/cpp/fastdds/topic/ContentFilteredTopicImpl.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h index 631180c9d84..a0a4387373a 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h +++ b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp index 0db72cff9e3..550aa7f92b0 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/builtin/liveliness/WLPListener.cpp b/src/cpp/rtps/builtin/liveliness/WLPListener.cpp index 35633035a2e..2e624076c16 100644 --- a/src/cpp/rtps/builtin/liveliness/WLPListener.cpp +++ b/src/cpp/rtps/builtin/liveliness/WLPListener.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include namespace eprosima { diff --git a/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp b/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp index 587bf89ebb6..bbe1af9d51d 100644 --- a/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp +++ b/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/src/cpp/rtps/history/WriterHistory.cpp b/src/cpp/rtps/history/WriterHistory.cpp index 29764710dee..6d520bf4f3f 100644 --- a/src/cpp/rtps/history/WriterHistory.cpp +++ b/src/cpp/rtps/history/WriterHistory.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastrtps { diff --git a/src/cpp/rtps/messages/CDRMessage.cpp b/src/cpp/rtps/messages/CDRMessage.cpp index ed9313c6396..c50f0ee9e07 100644 --- a/src/cpp/rtps/messages/CDRMessage.cpp +++ b/src/cpp/rtps/messages/CDRMessage.cpp @@ -19,7 +19,7 @@ * */ -#include "CDRMessage.h" +#include "CDRMessage.hpp" #include #include diff --git a/src/cpp/rtps/messages/CDRMessage.h b/src/cpp/rtps/messages/CDRMessage.hpp similarity index 99% rename from src/cpp/rtps/messages/CDRMessage.h rename to src/cpp/rtps/messages/CDRMessage.hpp index 6ebe98167cc..8ab1c776aae 100644 --- a/src/cpp/rtps/messages/CDRMessage.h +++ b/src/cpp/rtps/messages/CDRMessage.hpp @@ -13,7 +13,7 @@ // limitations under the License. /** - * @file CDRMessage.h + * @file CDRMessage.hpp */ #ifndef _FASTDDS_RTPS_CDRMESSAGE_H_ diff --git a/src/cpp/rtps/messages/RTPSGapBuilder.hpp b/src/cpp/rtps/messages/RTPSGapBuilder.hpp index 72545165073..429f3d34506 100644 --- a/src/cpp/rtps/messages/RTPSGapBuilder.hpp +++ b/src/cpp/rtps/messages/RTPSGapBuilder.hpp @@ -21,7 +21,7 @@ #define RTPSGAPBUILDER_HPP #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include "RTPSMessageGroup.h" +#include "RTPSMessageGroup.hpp" namespace eprosima { namespace fastrtps { diff --git a/src/cpp/rtps/messages/RTPSMessageCreator.cpp b/src/cpp/rtps/messages/RTPSMessageCreator.cpp index 2556393b084..c5dde1b0a85 100644 --- a/src/cpp/rtps/messages/RTPSMessageCreator.cpp +++ b/src/cpp/rtps/messages/RTPSMessageCreator.cpp @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include using namespace eprosima::fastrtps; using ParameterList = eprosima::fastdds::dds::ParameterList; diff --git a/src/cpp/rtps/messages/RTPSMessageCreator.h b/src/cpp/rtps/messages/RTPSMessageCreator.hpp similarity index 100% rename from src/cpp/rtps/messages/RTPSMessageCreator.h rename to src/cpp/rtps/messages/RTPSMessageCreator.hpp diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.cpp b/src/cpp/rtps/messages/RTPSMessageGroup.cpp index 827120e5805..91e551db544 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.cpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup.cpp @@ -17,12 +17,12 @@ * */ -#include "RTPSMessageGroup.h" +#include "RTPSMessageGroup.hpp" #include #include -#include +#include #include #include diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.h b/src/cpp/rtps/messages/RTPSMessageGroup.hpp similarity index 99% rename from src/cpp/rtps/messages/RTPSMessageGroup.h rename to src/cpp/rtps/messages/RTPSMessageGroup.hpp index 76613c009bd..be729632bc9 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.h +++ b/src/cpp/rtps/messages/RTPSMessageGroup.hpp @@ -21,9 +21,10 @@ #define _FASTDDS_RTPS_RTPSMESSAGEGROUP_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include -#include #include +#include + +#include #include #include diff --git a/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp b/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp index b889d533ade..1c8d2cdc90e 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup_t.hpp @@ -22,8 +22,8 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #include -#include -#include +#include +#include namespace eprosima { namespace fastrtps { diff --git a/src/cpp/rtps/messages/SendBuffersManager.cpp b/src/cpp/rtps/messages/SendBuffersManager.cpp index 4e70678e1e8..38a6e2d83f0 100644 --- a/src/cpp/rtps/messages/SendBuffersManager.cpp +++ b/src/cpp/rtps/messages/SendBuffersManager.cpp @@ -18,7 +18,7 @@ #include "SendBuffersManager.hpp" -#include "RTPSMessageGroup.h" +#include "RTPSMessageGroup.hpp" #include "../participant/RTPSParticipantImpl.h" namespace eprosima { diff --git a/src/cpp/rtps/reader/StatefulReader.cpp b/src/cpp/rtps/reader/StatefulReader.cpp index 5d0d95d5f26..879003a7115 100644 --- a/src/cpp/rtps/reader/StatefulReader.cpp +++ b/src/cpp/rtps/reader/StatefulReader.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/reader/WriterProxy.cpp b/src/cpp/rtps/reader/WriterProxy.cpp index b4a146cc7cc..da818e70e91 100644 --- a/src/cpp/rtps/reader/WriterProxy.cpp +++ b/src/cpp/rtps/reader/WriterProxy.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/security/SecurityManager.cpp b/src/cpp/rtps/security/SecurityManager.cpp index 13ffd779041..d2b586b969f 100644 --- a/src/cpp/rtps/security/SecurityManager.cpp +++ b/src/cpp/rtps/security/SecurityManager.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/transport/UDPTransportInterface.cpp b/src/cpp/rtps/transport/UDPTransportInterface.cpp index e932db34a87..90bfcd32d4a 100644 --- a/src/cpp/rtps/transport/UDPTransportInterface.cpp +++ b/src/cpp/rtps/transport/UDPTransportInterface.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/transport/UDPv4Transport.cpp b/src/cpp/rtps/transport/UDPv4Transport.cpp index 9ccbd18cd47..76422083876 100644 --- a/src/cpp/rtps/transport/UDPv4Transport.cpp +++ b/src/cpp/rtps/transport/UDPv4Transport.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp b/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp index f43f8dde615..a65523a1939 100644 --- a/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp +++ b/src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/transport/test_UDPv4Transport.h b/src/cpp/rtps/transport/test_UDPv4Transport.h index 46f018062fc..835949f25fa 100644 --- a/src/cpp/rtps/transport/test_UDPv4Transport.h +++ b/src/cpp/rtps/transport/test_UDPv4Transport.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include diff --git a/src/cpp/rtps/writer/RTPSWriter.cpp b/src/cpp/rtps/writer/RTPSWriter.cpp index ec5e56c6e10..007232132e7 100644 --- a/src/cpp/rtps/writer/RTPSWriter.cpp +++ b/src/cpp/rtps/writer/RTPSWriter.cpp @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/cpp/rtps/writer/StatefulWriter.cpp b/src/cpp/rtps/writer/StatefulWriter.cpp index 6046dc187b1..d51e528dc54 100644 --- a/src/cpp/rtps/writer/StatefulWriter.cpp +++ b/src/cpp/rtps/writer/StatefulWriter.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/cpp/rtps/writer/StatelessWriter.cpp b/src/cpp/rtps/writer/StatelessWriter.cpp index 498e562eb1e..3b5a373736a 100644 --- a/src/cpp/rtps/writer/StatelessWriter.cpp +++ b/src/cpp/rtps/writer/StatelessWriter.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/cpp/security/authentication/PKIDH.cpp b/src/cpp/security/authentication/PKIDH.cpp index 1f8a0e94a7c..2833edfbddc 100644 --- a/src/cpp/security/authentication/PKIDH.cpp +++ b/src/cpp/security/authentication/PKIDH.cpp @@ -26,7 +26,8 @@ #include #include #include -#include + +#include #include #include diff --git a/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp b/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp index e85d6740799..3d5f1398632 100644 --- a/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp +++ b/src/cpp/security/cryptography/AESGCMGMAC_Transform.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp index d8b4126959c..d17ac8fe1d8 100644 --- a/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp +++ b/src/cpp/statistics/rtps/messages/RTPSStatisticsMessages.hpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #define FASTDDS_STATISTICS_NETWORK_SUBMESSAGE 0x80 diff --git a/test/blackbox/common/BlackboxTestsKeys.cpp b/test/blackbox/common/BlackboxTestsKeys.cpp index 923ad08f17c..5173258367e 100644 --- a/test/blackbox/common/BlackboxTestsKeys.cpp +++ b/test/blackbox/common/BlackboxTestsKeys.cpp @@ -18,7 +18,7 @@ #include "PubSubWriter.hpp" #include -#include +#include TEST(KeyedTopic, RegistrationNonKeyedFail) { diff --git a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp index 24eebf72aa6..1f4937a820a 100644 --- a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp +++ b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include "../types/HelloWorldTypeObjectSupport.hpp" diff --git a/test/blackbox/common/DDSBlackboxTestsListeners.cpp b/test/blackbox/common/DDSBlackboxTestsListeners.cpp index ab6eed1af56..2dcfe2f0cef 100644 --- a/test/blackbox/common/DDSBlackboxTestsListeners.cpp +++ b/test/blackbox/common/DDSBlackboxTestsListeners.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "BlackboxTests.hpp" #include "PubSubReader.hpp" diff --git a/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h b/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h index 4f4b850545e..6500c7ed343 100644 --- a/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h +++ b/test/mock/rtps/EDP/rtps/builtin/discovery/endpoint/EDP.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include diff --git a/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h b/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h index 2b00a4f1ad4..0c25b76b274 100644 --- a/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h +++ b/test/mock/rtps/PDP/rtps/builtin/discovery/participant/PDP.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include namespace eprosima { diff --git a/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h b/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h index 4540baafd86..9b476996230 100644 --- a/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h +++ b/test/mock/rtps/PDPSimple/rtps/builtin/discovery/participant/PDPSimple.h @@ -25,7 +25,7 @@ #include #include -#include +#include namespace eprosima { namespace fastrtps { diff --git a/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp b/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp index ae984a9ca4a..7f39f460486 100644 --- a/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp +++ b/test/mock/rtps/RTPSGapBuilder/rtps/messages/RTPSGapBuilder.hpp @@ -20,7 +20,7 @@ #ifndef RTPSGAPBUILDER_HPP #define RTPSGAPBUILDER_HPP -#include +#include namespace eprosima { namespace fastrtps { diff --git a/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h b/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h index e1b3cdf1477..8df4be32e50 100644 --- a/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h +++ b/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastrtps { diff --git a/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp b/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp index 401dbbc739c..067aa533a8c 100644 --- a/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp +++ b/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include namespace eprosima { diff --git a/test/unittest/security/accesscontrol/AccessControlTests.cpp b/test/unittest/security/accesscontrol/AccessControlTests.cpp index 8ffa196a941..b5edec5c9ec 100644 --- a/test/unittest/security/accesscontrol/AccessControlTests.cpp +++ b/test/unittest/security/accesscontrol/AccessControlTests.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/unittest/security/authentication/BuiltinPKIDHTests.cpp b/test/unittest/security/authentication/BuiltinPKIDHTests.cpp index 3422e445ccf..cde5952192d 100644 --- a/test/unittest/security/authentication/BuiltinPKIDHTests.cpp +++ b/test/unittest/security/authentication/BuiltinPKIDHTests.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include "AuthenticationPluginTests.hpp" #include From 745a751855f1ddcce02e6509dbf091bc17c99f37 Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Tue, 21 May 2024 16:11:42 +0200 Subject: [PATCH 5/7] Refs #20709: Fix compilation issue Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- src/cpp/rtps/messages/RTPSMessageGroup.cpp | 14 ++++++++++++++ src/cpp/rtps/messages/RTPSMessageGroup.hpp | 12 +----------- test/blackbox/common/BlackboxTestsKeys.cpp | 2 +- .../blackbox/common/DDSBlackboxTestsDataReader.cpp | 1 + .../{RTPSMessageGroup.h => RTPSMessageGroup.hpp} | 0 5 files changed, 17 insertions(+), 12 deletions(-) rename test/mock/rtps/RTPSMessageGroup/rtps/messages/{RTPSMessageGroup.h => RTPSMessageGroup.hpp} (100%) diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.cpp b/src/cpp/rtps/messages/RTPSMessageGroup.cpp index 91e551db544..aed3c2485e4 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.cpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup.cpp @@ -329,6 +329,20 @@ void RTPSMessageGroup::flush_and_reset() current_dst_ = c_GuidPrefix_Unknown; } +void RTPSMessageGroup::sender( + Endpoint* endpoint, + RTPSMessageSenderInterface* msg_sender) +{ + assert((endpoint != nullptr && msg_sender != nullptr) || (endpoint == nullptr && msg_sender == nullptr)); + if (endpoint != endpoint_ || msg_sender != sender_) + { + flush_and_reset(); + } + + endpoint_ = endpoint; + sender_ = msg_sender; +} + void RTPSMessageGroup::check_and_maybe_flush( const GuidPrefix_t& destination_guid_prefix) { diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.hpp b/src/cpp/rtps/messages/RTPSMessageGroup.hpp index be729632bc9..2194fc44679 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.hpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup.hpp @@ -221,17 +221,7 @@ class RTPSMessageGroup */ void sender( Endpoint* endpoint, - RTPSMessageSenderInterface* msg_sender) - { - assert((endpoint != nullptr && msg_sender != nullptr) || (endpoint == nullptr && msg_sender == nullptr)); - if (endpoint != endpoint_ || msg_sender != sender_) - { - flush_and_reset(); - } - - endpoint_ = endpoint; - sender_ = msg_sender; - } + RTPSMessageSenderInterface* msg_sender); //! Maximum fragment size minus the headers static inline constexpr uint32_t get_max_fragment_payload_size() diff --git a/test/blackbox/common/BlackboxTestsKeys.cpp b/test/blackbox/common/BlackboxTestsKeys.cpp index 5173258367e..dee1e71dc45 100644 --- a/test/blackbox/common/BlackboxTestsKeys.cpp +++ b/test/blackbox/common/BlackboxTestsKeys.cpp @@ -17,7 +17,7 @@ #include "PubSubReader.hpp" #include "PubSubWriter.hpp" -#include +#include #include TEST(KeyedTopic, RegistrationNonKeyedFail) diff --git a/test/blackbox/common/DDSBlackboxTestsDataReader.cpp b/test/blackbox/common/DDSBlackboxTestsDataReader.cpp index eaa9a5b86a6..b137afdcad9 100644 --- a/test/blackbox/common/DDSBlackboxTestsDataReader.cpp +++ b/test/blackbox/common/DDSBlackboxTestsDataReader.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include "BlackboxTests.hpp" #include "PubSubParticipant.hpp" diff --git a/test/mock/rtps/RTPSMessageGroup/rtps/messages/RTPSMessageGroup.h b/test/mock/rtps/RTPSMessageGroup/rtps/messages/RTPSMessageGroup.hpp similarity index 100% rename from test/mock/rtps/RTPSMessageGroup/rtps/messages/RTPSMessageGroup.h rename to test/mock/rtps/RTPSMessageGroup/rtps/messages/RTPSMessageGroup.hpp From d3abbcd127f18574a95418ea52fa065035280889 Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Wed, 22 May 2024 10:18:19 +0200 Subject: [PATCH 6/7] Refs #20709: Apply suggestions Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- .../messages/RTPSMessageSenderInterface.hpp | 3 +- src/cpp/CMakeLists.txt | 1 + src/cpp/fastdds/core/policy/ParameterList.hpp | 2 +- src/cpp/rtps/messages/CDRMessage.cpp | 122 +++++++++--------- src/cpp/rtps/messages/CDRMessage.hpp | 2 - src/cpp/rtps/messages/RTPSMessageCreator.cpp | 4 +- src/cpp/rtps/messages/RTPSMessageCreator.hpp | 3 +- src/cpp/rtps/messages/RTPSMessageGroup.hpp | 9 +- src/cpp/security/authentication/PKIDH.cpp | 5 +- test/blackbox/CMakeLists.txt | 1 + test/unittest/dds/publisher/CMakeLists.txt | 1 + test/unittest/dds/status/CMakeLists.txt | 1 + test/unittest/rtps/builtin/CMakeLists.txt | 1 + test/unittest/rtps/discovery/CMakeLists.txt | 1 + test/unittest/rtps/network/CMakeLists.txt | 1 + test/unittest/rtps/security/CMakeLists.txt | 1 + .../security/accesscontrol/CMakeLists.txt | 1 + .../security/authentication/CMakeLists.txt | 1 + test/unittest/statistics/dds/CMakeLists.txt | 2 + test/unittest/statistics/rtps/CMakeLists.txt | 2 + test/unittest/transport/CMakeLists.txt | 5 + 21 files changed, 93 insertions(+), 76 deletions(-) diff --git a/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp b/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp index 47bf27409d3..3925d2aa440 100644 --- a/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp +++ b/include/fastdds/rtps/messages/RTPSMessageSenderInterface.hpp @@ -34,8 +34,7 @@ namespace rtps { struct CDRMessage_t; /** - * An interface used in \ref RTPSMessageGroup to handle destinations management - * and message sending. + * Interface to handle destinations management and message sending. */ class RTPSMessageSenderInterface { diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index 7a5e2ab085f..613c9b4c5d9 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -139,6 +139,7 @@ set(${PROJECT_NAME}_source_files rtps/history/TopicPayloadPool.cpp rtps/history/TopicPayloadPoolRegistry.cpp rtps/history/WriterHistory.cpp + rtps/messages/CDRMessage.cpp rtps/messages/MessageReceiver.cpp rtps/messages/RTPSGapBuilder.cpp rtps/messages/RTPSMessageCreator.cpp diff --git a/src/cpp/fastdds/core/policy/ParameterList.hpp b/src/cpp/fastdds/core/policy/ParameterList.hpp index c2ec94daa63..39dd77057fd 100644 --- a/src/cpp/fastdds/core/policy/ParameterList.hpp +++ b/src/cpp/fastdds/core/policy/ParameterList.hpp @@ -22,8 +22,8 @@ #include #include -#include #include + #include #include diff --git a/src/cpp/rtps/messages/CDRMessage.cpp b/src/cpp/rtps/messages/CDRMessage.cpp index c50f0ee9e07..3cff3eff4f8 100644 --- a/src/cpp/rtps/messages/CDRMessage.cpp +++ b/src/cpp/rtps/messages/CDRMessage.cpp @@ -19,7 +19,7 @@ * */ -#include "CDRMessage.hpp" +#include #include #include @@ -33,7 +33,7 @@ namespace eprosima { namespace fastrtps { namespace rtps { -inline bool CDRMessage::initCDRMsg( +bool CDRMessage::initCDRMsg( CDRMessage_t* msg, uint32_t payload_size) { @@ -48,7 +48,7 @@ inline bool CDRMessage::initCDRMsg( return true; } -inline bool CDRMessage::wrapVector( +bool CDRMessage::wrapVector( CDRMessage_t* msg, std::vector& vectorToWrap) { @@ -65,14 +65,14 @@ inline bool CDRMessage::wrapVector( return true; } -inline bool CDRMessage::appendMsg( +bool CDRMessage::appendMsg( CDRMessage_t* first, CDRMessage_t* second) { return(CDRMessage::addData(first, second->buffer, second->length)); } -inline bool CDRMessage::readEntityId( +bool CDRMessage::readEntityId( CDRMessage_t* msg, EntityId_t* id) { @@ -85,7 +85,7 @@ inline bool CDRMessage::readEntityId( return true; } -inline bool CDRMessage::readData( +bool CDRMessage::readData( CDRMessage_t* msg, octet* o, uint32_t length) @@ -110,7 +110,7 @@ inline bool CDRMessage::readData( return true; } -inline bool CDRMessage::read_array_with_max_size( +bool CDRMessage::read_array_with_max_size( CDRMessage_t* msg, octet* arr, size_t max_size) @@ -130,7 +130,7 @@ inline bool CDRMessage::read_array_with_max_size( return valid; } -inline bool CDRMessage::readDataReversed( +bool CDRMessage::readDataReversed( CDRMessage_t* msg, octet* o, uint32_t length) @@ -143,7 +143,7 @@ inline bool CDRMessage::readDataReversed( return true; } -inline bool CDRMessage::readInt32( +bool CDRMessage::readInt32( CDRMessage_t* msg, int32_t* lo) { @@ -167,7 +167,7 @@ inline bool CDRMessage::readInt32( return true; } -inline bool CDRMessage::readUInt32( +bool CDRMessage::readUInt32( CDRMessage_t* msg, uint32_t* ulo) { @@ -191,7 +191,7 @@ inline bool CDRMessage::readUInt32( return true; } -inline bool CDRMessage::readInt64( +bool CDRMessage::readInt64( CDRMessage_t* msg, int64_t* lolo) { @@ -218,7 +218,7 @@ inline bool CDRMessage::readInt64( return true; } -inline bool CDRMessage::readUInt64( +bool CDRMessage::readUInt64( CDRMessage_t* msg, uint64_t* ulolo) { @@ -245,7 +245,7 @@ inline bool CDRMessage::readUInt64( return true; } -inline bool CDRMessage::readSequenceNumber( +bool CDRMessage::readSequenceNumber( CDRMessage_t* msg, SequenceNumber_t* sn) { @@ -258,7 +258,7 @@ inline bool CDRMessage::readSequenceNumber( return valid; } -inline SequenceNumberSet_t CDRMessage::readSequenceNumberSet( +SequenceNumberSet_t CDRMessage::readSequenceNumberSet( CDRMessage_t* msg) { bool valid = true; @@ -291,7 +291,7 @@ inline SequenceNumberSet_t CDRMessage::readSequenceNumberSet( return SequenceNumberSet_t (c_SequenceNumber_Unknown); } -inline bool CDRMessage::readFragmentNumberSet( +bool CDRMessage::readFragmentNumberSet( CDRMessage_t* msg, FragmentNumberSet_t* fns) { @@ -319,7 +319,7 @@ inline bool CDRMessage::readFragmentNumberSet( return valid; } -inline bool CDRMessage::readTimestamp( +bool CDRMessage::readTimestamp( CDRMessage_t* msg, rtps::Time_t* ts) { @@ -331,7 +331,7 @@ inline bool CDRMessage::readTimestamp( return valid; } -inline bool CDRMessage::readLocator( +bool CDRMessage::readLocator( CDRMessage_t* msg, Locator_t* loc) { @@ -347,7 +347,7 @@ inline bool CDRMessage::readLocator( return valid; } -inline bool CDRMessage::readInt16( +bool CDRMessage::readInt16( CDRMessage_t* msg, int16_t* i16) { @@ -370,7 +370,7 @@ inline bool CDRMessage::readInt16( return true; } -inline bool CDRMessage::readUInt16( +bool CDRMessage::readUInt16( CDRMessage_t* msg, uint16_t* i16) { @@ -393,7 +393,7 @@ inline bool CDRMessage::readUInt16( return true; } -inline bool CDRMessage::readOctet( +bool CDRMessage::readOctet( CDRMessage_t* msg, octet* o) { @@ -406,7 +406,7 @@ inline bool CDRMessage::readOctet( return true; } -inline bool CDRMessage::readOctetVector( +bool CDRMessage::readOctetVector( CDRMessage_t* msg, std::vector* ocvec) { @@ -422,7 +422,7 @@ inline bool CDRMessage::readOctetVector( return valid; } -inline bool CDRMessage::readString( +bool CDRMessage::readString( CDRMessage_t* msg, std::string* stri) { @@ -449,7 +449,7 @@ inline bool CDRMessage::readString( return valid; } -inline bool CDRMessage::readString( +bool CDRMessage::readString( CDRMessage_t* msg, fastcdr::string_255* stri) { @@ -472,14 +472,14 @@ inline bool CDRMessage::readString( return valid; } -inline bool CDRMessage::hasSpace( +bool CDRMessage::hasSpace( CDRMessage_t* msg, const uint32_t length) { return msg && (msg->pos + length <= msg->max_size); } -inline void CDRMessage::copyToBuffer( +void CDRMessage::copyToBuffer( CDRMessage_t* msg, const octet* data, const uint32_t length, @@ -500,7 +500,7 @@ inline void CDRMessage::copyToBuffer( msg->length += length; } -inline bool CDRMessage::addData( +bool CDRMessage::addData( CDRMessage_t* msg, const octet* data, const uint32_t length) @@ -513,7 +513,7 @@ inline bool CDRMessage::addData( return true; } -inline bool CDRMessage::addDataReversed( +bool CDRMessage::addDataReversed( CDRMessage_t* msg, const octet* data, const uint32_t length) @@ -527,7 +527,7 @@ inline bool CDRMessage::addDataReversed( } template -inline bool CDRMessage::addPrimitive( +bool CDRMessage::addPrimitive( CDRMessage_t* msg, T value) { @@ -541,49 +541,49 @@ inline bool CDRMessage::addPrimitive( return true; } -inline bool CDRMessage::addOctet( +bool CDRMessage::addOctet( CDRMessage_t* msg, octet O) { return addPrimitive(msg, O); } -inline bool CDRMessage::addUInt16( +bool CDRMessage::addUInt16( CDRMessage_t* msg, uint16_t us) { return addPrimitive(msg, us); } -inline bool CDRMessage::addInt32( +bool CDRMessage::addInt32( CDRMessage_t* msg, int32_t lo) { return addPrimitive(msg, lo); } -inline bool CDRMessage::addUInt32( +bool CDRMessage::addUInt32( CDRMessage_t* msg, uint32_t ulo) { return addPrimitive(msg, ulo); } -inline bool CDRMessage::addInt64( +bool CDRMessage::addInt64( CDRMessage_t* msg, int64_t lolo) { return addPrimitive(msg, lolo); } -inline bool CDRMessage::addUInt64( +bool CDRMessage::addUInt64( CDRMessage_t* msg, uint64_t ulolo) { return addPrimitive(msg, ulolo); } -inline bool CDRMessage::addOctetVector( +bool CDRMessage::addOctetVector( CDRMessage_t* msg, const std::vector* ocvec, bool add_final_padding) @@ -619,7 +619,7 @@ inline bool CDRMessage::addOctetVector( return valid; } -inline bool CDRMessage::addEntityId( +bool CDRMessage::addEntityId( CDRMessage_t* msg, const EntityId_t* ID) { @@ -633,7 +633,7 @@ inline bool CDRMessage::addEntityId( return true; } -inline bool CDRMessage::addSequenceNumber( +bool CDRMessage::addSequenceNumber( CDRMessage_t* msg, const SequenceNumber_t* sn) { @@ -643,7 +643,7 @@ inline bool CDRMessage::addSequenceNumber( return true; } -inline bool CDRMessage::addSequenceNumberSet( +bool CDRMessage::addSequenceNumberSet( CDRMessage_t* msg, const SequenceNumberSet_t* sns) { @@ -672,7 +672,7 @@ inline bool CDRMessage::addSequenceNumberSet( return true; } -inline bool CDRMessage::addFragmentNumberSet( +bool CDRMessage::addFragmentNumberSet( CDRMessage_t* msg, FragmentNumberSet_t* fns) { @@ -706,7 +706,7 @@ inline bool CDRMessage::addFragmentNumberSet( return true; } -inline bool CDRMessage::addLocator( +bool CDRMessage::addLocator( CDRMessage_t* msg, const Locator_t& loc) { @@ -716,7 +716,7 @@ inline bool CDRMessage::addLocator( return true; } -inline bool CDRMessage::add_string( +bool CDRMessage::add_string( CDRMessage_t* msg, const char* in_str) { @@ -731,21 +731,21 @@ inline bool CDRMessage::add_string( return valid; } -inline bool CDRMessage::add_string( +bool CDRMessage::add_string( CDRMessage_t* msg, const std::string& in_str) { return add_string(msg, in_str.c_str()); } -inline bool CDRMessage::add_string( +bool CDRMessage::add_string( CDRMessage_t* msg, const fastcdr::string_255& in_str) { return add_string(msg, in_str.c_str()); } -inline bool CDRMessage::addProperty( +bool CDRMessage::addProperty( CDRMessage_t* msg, const Property& property) { @@ -766,7 +766,7 @@ inline bool CDRMessage::addProperty( return true; } -inline bool CDRMessage::readProperty( +bool CDRMessage::readProperty( CDRMessage_t* msg, Property& property) { @@ -784,7 +784,7 @@ inline bool CDRMessage::readProperty( return true; } -inline bool CDRMessage::addBinaryProperty( +bool CDRMessage::addBinaryProperty( CDRMessage_t* msg, const BinaryProperty& binary_property, bool add_final_padding) @@ -806,7 +806,7 @@ inline bool CDRMessage::addBinaryProperty( return true; } -inline bool CDRMessage::readBinaryProperty( +bool CDRMessage::readBinaryProperty( CDRMessage_t* msg, BinaryProperty& binary_property) { @@ -825,7 +825,7 @@ inline bool CDRMessage::readBinaryProperty( return true; } -inline bool CDRMessage::addPropertySeq( +bool CDRMessage::addPropertySeq( CDRMessage_t* msg, const PropertySeq& properties) { @@ -860,7 +860,7 @@ inline bool CDRMessage::addPropertySeq( return returnedValue; } -inline bool CDRMessage::readPropertySeq( +bool CDRMessage::readPropertySeq( CDRMessage_t* msg, PropertySeq& properties, const uint32_t parameter_length) @@ -891,7 +891,7 @@ inline bool CDRMessage::readPropertySeq( } -inline bool CDRMessage::addBinaryPropertySeq( +bool CDRMessage::addBinaryPropertySeq( CDRMessage_t* msg, const BinaryPropertySeq& binary_properties, bool add_final_padding) @@ -930,7 +930,7 @@ inline bool CDRMessage::addBinaryPropertySeq( return returnedValue; } -inline bool CDRMessage::addBinaryPropertySeq( +bool CDRMessage::addBinaryPropertySeq( CDRMessage_t* msg, const BinaryPropertySeq& binary_properties, const std::string& name_start, @@ -970,7 +970,7 @@ inline bool CDRMessage::addBinaryPropertySeq( return returnedValue; } -inline bool CDRMessage::readBinaryPropertySeq( +bool CDRMessage::readBinaryPropertySeq( CDRMessage_t* msg, BinaryPropertySeq& binary_properties, const uint32_t parameter_length) @@ -1001,7 +1001,7 @@ inline bool CDRMessage::readBinaryPropertySeq( return returnedValue; } -inline bool CDRMessage::addDataHolder( +bool CDRMessage::addDataHolder( CDRMessage_t* msg, const DataHolder& data_holder) { @@ -1023,7 +1023,7 @@ inline bool CDRMessage::addDataHolder( return true; } -inline bool CDRMessage::readDataHolder( +bool CDRMessage::readDataHolder( CDRMessage_t* msg, DataHolder& data_holder, const uint32_t parameter_length) @@ -1047,7 +1047,7 @@ inline bool CDRMessage::readDataHolder( } -inline bool CDRMessage::addDataHolderSeq( +bool CDRMessage::addDataHolderSeq( CDRMessage_t* msg, const DataHolderSeq& data_holders) { @@ -1071,7 +1071,7 @@ inline bool CDRMessage::addDataHolderSeq( return returnedValue; } -inline bool CDRMessage::readDataHolderSeq( +bool CDRMessage::readDataHolderSeq( CDRMessage_t* msg, DataHolderSeq& data_holders) { @@ -1103,7 +1103,7 @@ inline bool CDRMessage::readDataHolderSeq( return returnedValue; } -inline bool CDRMessage::addMessageIdentity( +bool CDRMessage::addMessageIdentity( CDRMessage_t* msg, const security::MessageIdentity& message_identity) { @@ -1125,7 +1125,7 @@ inline bool CDRMessage::addMessageIdentity( return true; } -inline bool CDRMessage::readMessageIdentity( +bool CDRMessage::readMessageIdentity( CDRMessage_t* msg, security::MessageIdentity& message_identity) { @@ -1147,7 +1147,7 @@ inline bool CDRMessage::readMessageIdentity( return true; } -inline bool CDRMessage::addParticipantGenericMessage( +bool CDRMessage::addParticipantGenericMessage( CDRMessage_t* msg, const security::ParticipantGenericMessage& message) { @@ -1197,7 +1197,7 @@ inline bool CDRMessage::addParticipantGenericMessage( return true; } -inline bool CDRMessage::readParticipantGenericMessage( +bool CDRMessage::readParticipantGenericMessage( CDRMessage_t* msg, security::ParticipantGenericMessage& message) { @@ -1247,7 +1247,7 @@ inline bool CDRMessage::readParticipantGenericMessage( return true; } -inline bool CDRMessage::skip( +bool CDRMessage::skip( CDRMessage_t* msg, uint32_t length) { diff --git a/src/cpp/rtps/messages/CDRMessage.hpp b/src/cpp/rtps/messages/CDRMessage.hpp index 8ab1c776aae..656e6078c45 100644 --- a/src/cpp/rtps/messages/CDRMessage.hpp +++ b/src/cpp/rtps/messages/CDRMessage.hpp @@ -350,8 +350,6 @@ bool skip( #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "CDRMessage.cpp" - #endif /* DOXYGEN_SHOULD_SKIP_THIS */ #endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #endif /* _FASTDDS_RTPS_CDRMESSAGE_H_ */ diff --git a/src/cpp/rtps/messages/RTPSMessageCreator.cpp b/src/cpp/rtps/messages/RTPSMessageCreator.cpp index c5dde1b0a85..5751d21303a 100644 --- a/src/cpp/rtps/messages/RTPSMessageCreator.cpp +++ b/src/cpp/rtps/messages/RTPSMessageCreator.cpp @@ -17,11 +17,11 @@ * */ +#include + #include #include #include -#include -#include using namespace eprosima::fastrtps; using ParameterList = eprosima::fastdds::dds::ParameterList; diff --git a/src/cpp/rtps/messages/RTPSMessageCreator.hpp b/src/cpp/rtps/messages/RTPSMessageCreator.hpp index 536faea8b1d..0adacdc2bd6 100644 --- a/src/cpp/rtps/messages/RTPSMessageCreator.hpp +++ b/src/cpp/rtps/messages/RTPSMessageCreator.hpp @@ -20,12 +20,13 @@ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #include -#include #include #include #include #include +#include + namespace eprosima { namespace fastrtps { namespace rtps { diff --git a/src/cpp/rtps/messages/RTPSMessageGroup.hpp b/src/cpp/rtps/messages/RTPSMessageGroup.hpp index 2194fc44679..fce14d51319 100644 --- a/src/cpp/rtps/messages/RTPSMessageGroup.hpp +++ b/src/cpp/rtps/messages/RTPSMessageGroup.hpp @@ -21,16 +21,15 @@ #define _FASTDDS_RTPS_RTPSMESSAGEGROUP_H_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC -#include -#include - -#include - #include #include #include #include +#include +#include + +#include namespace eprosima { namespace fastrtps { diff --git a/src/cpp/security/authentication/PKIDH.cpp b/src/cpp/security/authentication/PKIDH.cpp index 2833edfbddc..856caef55f7 100644 --- a/src/cpp/security/authentication/PKIDH.cpp +++ b/src/cpp/security/authentication/PKIDH.cpp @@ -23,13 +23,14 @@ #include #include -#include #include #include +#include +#include #include #include -#include + #if OPENSSL_VERSION_NUMBER >= 0x10100000L #define IS_OPENSSL_1_1 1 diff --git a/test/blackbox/CMakeLists.txt b/test/blackbox/CMakeLists.txt index 63b9c6dc4e0..725b8883b26 100644 --- a/test/blackbox/CMakeLists.txt +++ b/test/blackbox/CMakeLists.txt @@ -136,6 +136,7 @@ file(GLOB DDS_BLACKBOXTESTS_TEST_SOURCE "common/DDSBlackboxTests*.cpp") set(DDS_BLACKBOXTESTS_SOURCE ${DDS_BLACKBOXTESTS_TEST_SOURCE} ${BLACKBOXTESTS_SOURCE} + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ) # Prepare static discovery xml file for blackbox tests. diff --git a/test/unittest/dds/publisher/CMakeLists.txt b/test/unittest/dds/publisher/CMakeLists.txt index cd3f207bfb5..4789243678b 100644 --- a/test/unittest/dds/publisher/CMakeLists.txt +++ b/test/unittest/dds/publisher/CMakeLists.txt @@ -121,6 +121,7 @@ set(DATAWRITERTESTS_SOURCE DataWriterTests.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPool.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPoolRegistry.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/WriterHistory.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/MessageReceiver.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSGapBuilder.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp diff --git a/test/unittest/dds/status/CMakeLists.txt b/test/unittest/dds/status/CMakeLists.txt index 711073a5c04..aea9b9c2190 100644 --- a/test/unittest/dds/status/CMakeLists.txt +++ b/test/unittest/dds/status/CMakeLists.txt @@ -64,6 +64,7 @@ set(LISTENERTESTS_SOURCE ListenerTests.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/CacheChangePool.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPool.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPoolRegistry.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/network/NetmaskFilterKind.cpp diff --git a/test/unittest/rtps/builtin/CMakeLists.txt b/test/unittest/rtps/builtin/CMakeLists.txt index 79d207a3766..13166ff97c1 100644 --- a/test/unittest/rtps/builtin/CMakeLists.txt +++ b/test/unittest/rtps/builtin/CMakeLists.txt @@ -27,6 +27,7 @@ set(BUILTIN_DATA_SERIALIZATION_TESTS_SOURCE BuiltinDataSerializationTests.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/LocatorWithMask.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/FlowControllerConsts.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/resources/ResourceEvent.cpp diff --git a/test/unittest/rtps/discovery/CMakeLists.txt b/test/unittest/rtps/discovery/CMakeLists.txt index b001a7663a6..44d70de11fe 100644 --- a/test/unittest/rtps/discovery/CMakeLists.txt +++ b/test/unittest/rtps/discovery/CMakeLists.txt @@ -92,6 +92,7 @@ set(TCPTransportInterface_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/TransportInterface.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/ChannelResource.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/PortBasedTransportDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/tcp/TCPControlMessage.cpp diff --git a/test/unittest/rtps/network/CMakeLists.txt b/test/unittest/rtps/network/CMakeLists.txt index 8095ff14daf..e083a3eb2fe 100644 --- a/test/unittest/rtps/network/CMakeLists.txt +++ b/test/unittest/rtps/network/CMakeLists.txt @@ -22,6 +22,7 @@ set(NETWORKFACTORYTESTS_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/LocatorWithMask.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/NetworkFactory.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp diff --git a/test/unittest/rtps/security/CMakeLists.txt b/test/unittest/rtps/security/CMakeLists.txt index c927133ca28..6eda1583053 100644 --- a/test/unittest/rtps/security/CMakeLists.txt +++ b/test/unittest/rtps/security/CMakeLists.txt @@ -28,6 +28,7 @@ set(SOURCES_SECURITY_TEST_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPool.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPoolRegistry.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/resources/ResourceEvent.cpp diff --git a/test/unittest/security/accesscontrol/CMakeLists.txt b/test/unittest/security/accesscontrol/CMakeLists.txt index fe0a56d91d6..4ae0b8124bd 100644 --- a/test/unittest/security/accesscontrol/CMakeLists.txt +++ b/test/unittest/security/accesscontrol/CMakeLists.txt @@ -28,6 +28,7 @@ set(COMMON_SOURCES_ACCESS_CONTROL_TEST_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Token.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/exceptions/Exception.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/resources/ResourceEvent.cpp diff --git a/test/unittest/security/authentication/CMakeLists.txt b/test/unittest/security/authentication/CMakeLists.txt index e896ba3d77b..9cb785a4dec 100644 --- a/test/unittest/security/authentication/CMakeLists.txt +++ b/test/unittest/security/authentication/CMakeLists.txt @@ -30,6 +30,7 @@ set(COMMON_SOURCES_AUTH_PLUGIN_TEST_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Token.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/exceptions/Exception.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/resources/ResourceEvent.cpp diff --git a/test/unittest/statistics/dds/CMakeLists.txt b/test/unittest/statistics/dds/CMakeLists.txt index 8971227878f..aaf126af4b2 100644 --- a/test/unittest/statistics/dds/CMakeLists.txt +++ b/test/unittest/statistics/dds/CMakeLists.txt @@ -222,6 +222,7 @@ if (SQLITE3_SUPPORT AND FASTDDS_STATISTICS AND NOT QNX) ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPool.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPoolRegistry.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/WriterHistory.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/MessageReceiver.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSGapBuilder.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp @@ -395,6 +396,7 @@ if (SQLITE3_SUPPORT AND FASTDDS_STATISTICS AND NOT QNX) ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPool.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPoolRegistry.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/WriterHistory.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/MessageReceiver.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSGapBuilder.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp diff --git a/test/unittest/statistics/rtps/CMakeLists.txt b/test/unittest/statistics/rtps/CMakeLists.txt index ea906b30359..243c8baa0bc 100644 --- a/test/unittest/statistics/rtps/CMakeLists.txt +++ b/test/unittest/statistics/rtps/CMakeLists.txt @@ -18,6 +18,7 @@ endif() set(STATISTICS_RTPS_TESTS_SOURCE RTPSStatisticsTests.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ) add_executable(RTPSStatisticsTests ${STATISTICS_RTPS_TESTS_SOURCE}) @@ -77,6 +78,7 @@ set(STATISTICS_RTPS_MONITORSERVICETESTS_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPool.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/history/TopicPayloadPoolRegistry.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/NetworkFactory.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp diff --git a/test/unittest/transport/CMakeLists.txt b/test/unittest/transport/CMakeLists.txt index fdbe4c131cb..186915cc75c 100644 --- a/test/unittest/transport/CMakeLists.txt +++ b/test/unittest/transport/CMakeLists.txt @@ -47,6 +47,7 @@ if(TLS_FOUND) endif() set(TCPTransportInterface_SOURCE + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/tcp/RTCPMessageManager.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/transport/tcp/TCPControlMessage.cpp @@ -73,6 +74,7 @@ set(UDPV4TESTS_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/LocatorWithMask.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/NetworkFactory.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp @@ -101,6 +103,7 @@ set(UDPV6TESTS_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/LocatorWithMask.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/NetworkFactory.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/network.cpp @@ -132,6 +135,7 @@ set(TCPV4TESTS_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/LocatorWithMask.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/NetworkFactory.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp @@ -178,6 +182,7 @@ set(TCPV6TESTS_SOURCE ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/LocatorWithMask.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/common/Time_t.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/flowcontrol/ThroughputControllerDescriptor.cpp + ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/CDRMessage.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/messages/RTPSMessageCreator.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/NetworkFactory.cpp ${PROJECT_SOURCE_DIR}/src/cpp/rtps/network/utils/netmask_filter.cpp From 6481ed8128bf51fc472561b29828d3bb27de687d Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Thu, 23 May 2024 16:45:34 +0200 Subject: [PATCH 7/7] Refs #20709: Order headers Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- src/cpp/fastdds/core/policy/ParameterList.hpp | 6 +++--- src/cpp/rtps/messages/CDRMessage.cpp | 2 +- src/cpp/security/authentication/PKIDH.cpp | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cpp/fastdds/core/policy/ParameterList.hpp b/src/cpp/fastdds/core/policy/ParameterList.hpp index 39dd77057fd..c42f78746d5 100644 --- a/src/cpp/fastdds/core/policy/ParameterList.hpp +++ b/src/cpp/fastdds/core/policy/ParameterList.hpp @@ -20,14 +20,14 @@ #define _FASTDDS_DDS_QOS_PARAMETERLIST_HPP_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC +#include + #include -#include #include +#include #include -#include - namespace eprosima { namespace fastdds { namespace dds { diff --git a/src/cpp/rtps/messages/CDRMessage.cpp b/src/cpp/rtps/messages/CDRMessage.cpp index 3cff3eff4f8..aaaa8dd21d1 100644 --- a/src/cpp/rtps/messages/CDRMessage.cpp +++ b/src/cpp/rtps/messages/CDRMessage.cpp @@ -19,7 +19,7 @@ * */ -#include +#include "CDRMessage.hpp" #include #include diff --git a/src/cpp/security/authentication/PKIDH.cpp b/src/cpp/security/authentication/PKIDH.cpp index 856caef55f7..b1fbedb90b5 100644 --- a/src/cpp/security/authentication/PKIDH.cpp +++ b/src/cpp/security/authentication/PKIDH.cpp @@ -22,12 +22,13 @@ #include +#include + #include #include #include #include -#include #include #include