Skip to content

Commit

Permalink
Refs #20709: Make private RTPSMessageGroup.h
Browse files Browse the repository at this point in the history
Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com>
  • Loading branch information
elianalf committed May 14, 2024
1 parent 5d1ecac commit 0a26720
Show file tree
Hide file tree
Showing 21 changed files with 28 additions and 98 deletions.
1 change: 0 additions & 1 deletion include/fastdds/rtps/reader/StatefulReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <fastdds/rtps/common/CDRMessage_t.h>
#include <fastdds/rtps/common/VendorId_t.hpp>
#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <fastdds/rtps/reader/RTPSReader.h>
#include <fastdds/utils/collections/ResourceLimitedVector.hpp>

Expand Down
45 changes: 1 addition & 44 deletions include/fastdds/rtps/writer/RTPSWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <fastdds/rtps/common/VendorId_t.hpp>
#include <fastdds/rtps/Endpoint.h>
#include <fastdds/rtps/interfaces/IReaderDataFilter.hpp>
#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <fastdds/rtps/writer/DeliveryRetCode.hpp>
#include <fastdds/rtps/writer/LocatorSelectorSender.hpp>
#include <fastdds/statistics/rtps/monitor_service/connections_fwd.hpp>
Expand All @@ -60,6 +59,7 @@ namespace rtps {
class WriterListener;
class WriterHistory;
class DataSharingNotifier;
class RTPSMessageGroup;
struct CacheChange_t;

/**
Expand Down Expand Up @@ -585,49 +585,6 @@ class RTPSWriter

bool is_pool_initialized() const;

template<typename Functor>
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);
Expand Down
2 changes: 1 addition & 1 deletion include/fastdds/rtps/writer/ReaderLocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/common/Guid.h>
#include <fastdds/rtps/common/SequenceNumber.h>
#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <fastdds/rtps/messages/RTPSMessageSenderInterface.hpp>
#include <fastdds/rtps/common/LocatorSelectorEntry.hpp>

namespace eprosima {
Expand Down
4 changes: 3 additions & 1 deletion include/fastdds/rtps/writer/StatelessWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -46,7 +47,8 @@ namespace rtps {
class StatelessWriter : public RTPSWriter
{
friend class RTPSParticipantImpl;

friend class RTPSMessageGroup;

protected:

StatelessWriter(
Expand Down
25 changes: 0 additions & 25 deletions include/fastrtps/rtps/messages/RTPSMessageGroup.h

This file was deleted.

3 changes: 1 addition & 2 deletions src/cpp/rtps/builtin/discovery/participant/PDPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
#define _FASTDDS_RTPS_PDPCLIENT_H_
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

#include <fastdds/rtps/messages/RTPSMessageGroup.h>

#include <rtps/builtin/discovery/participant/DS/DiscoveryServerPDPEndpoints.hpp>
#include <rtps/builtin/discovery/participant/DS/DiscoveryServerPDPEndpointsSecure.hpp>
#include <rtps/builtin/discovery/participant/PDP.h>
#include <rtps/builtin/discovery/participant/timedevent/DSClientEvent.h>
#include <rtps/messages/RTPSMessageGroup.h>

namespace eprosima {
namespace fastdds {
Expand Down
1 change: 1 addition & 0 deletions src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <rtps/builtin/discovery/database/DiscoveryDataFilter.hpp>
#include <rtps/builtin/discovery/participant/DS/DiscoveryServerPDPEndpointsSecure.hpp>
#include <rtps/builtin/discovery/participant/timedevent/DServerEvent.hpp>
#include <rtps/messages/RTPSMessageGroup.h>

namespace eprosima {
namespace fastdds {
Expand Down
1 change: 1 addition & 0 deletions src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <fastdds/utils/TimedMutex.hpp>

#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/messages/RTPSMessageGroup.h>
#include <utils/thread.hpp>
#include <utils/threading.hpp>

Expand Down
5 changes: 3 additions & 2 deletions src/cpp/rtps/history/WriterHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@

#include <fastdds/rtps/history/WriterHistory.h>

#include <mutex>

#include <fastdds/dds/log/Log.hpp>
#include <fastdds/rtps/writer/RTPSWriter.h>
#include <fastdds/rtps/common/WriteParams.h>
#include <fastdds/core/policy//ParameterSerializer.hpp>

#include <mutex>
#include <rtps/messages/RTPSMessageGroup.h>

namespace eprosima {
namespace fastrtps {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/messages/RTPSGapBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define RTPSGAPBUILDER_HPP
#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include "RTPSMessageGroup.h"

namespace eprosima {
namespace fastrtps {
Expand Down
3 changes: 2 additions & 1 deletion src/cpp/rtps/messages/RTPSMessageGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
*
*/

#include "RTPSMessageGroup.h"

#include <algorithm>

#include <fastdds/dds/log/Log.hpp>
#include <fastdds/rtps/messages/RTPSMessageCreator.h>
#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <fastdds/rtps/reader/RTPSReader.h>
#include <fastdds/rtps/writer/RTPSWriter.h>

Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/cpp/rtps/messages/SendBuffersManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
*/

#include "SendBuffersManager.hpp"

#include "RTPSMessageGroup.h"
#include "../participant/RTPSParticipantImpl.h"
#include <fastdds/rtps/messages/RTPSMessageGroup.h>

namespace eprosima {
namespace fastrtps {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/StatefulReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/rtps/common/VendorId_t.hpp>
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/messages/RTPSMessageCreator.h>
#include <fastdds/rtps/reader/ReaderListener.h>
#include <fastdds/rtps/reader/StatefulReader.h>

Expand All @@ -33,6 +32,7 @@
#include <rtps/DataSharing/DataSharingListener.hpp>
#include <rtps/DataSharing/ReaderPool.hpp>
#include <rtps/history/HistoryAttributesExtension.hpp>
#include <rtps/messages/RTPSMessageGroup.h>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/reader/WriterProxy.h>
#include <rtps/writer/LivelinessManager.hpp>
Expand Down
21 changes: 7 additions & 14 deletions src/cpp/rtps/writer/RTPSWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,18 @@

#include <mutex>

#include <rtps/history/BasicPayloadPool.hpp>
#include <rtps/history/CacheChangePool.h>

#include <rtps/DataSharing/DataSharingNotifier.hpp>
#include <rtps/DataSharing/WriterPool.hpp>

#include <rtps/participant/RTPSParticipantImpl.h>

#include <fastdds/dds/log/Log.hpp>

#include <fastdds/rtps/writer/RTPSWriter.h>

#include <fastdds/rtps/history/WriterHistory.h>

#include <fastdds/rtps/messages/RTPSMessageCreator.h>

#include <rtps/DataSharing/DataSharingNotifier.hpp>
#include <rtps/DataSharing/WriterPool.hpp>
#include <rtps/history/BasicPayloadPool.hpp>
#include <rtps/history/CacheChangePool.h>
#include <rtps/messages/RTPSMessageCreator.h>
#include <rtps/messages/RTPSMessageGroup.h>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <statistics/rtps/StatisticsBase.hpp>
#include <statistics/rtps/messages/RTPSStatisticsMessages.hpp>

#include "../flowcontrol/FlowController.hpp"

namespace eprosima {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/interfaces/IReaderDataFilter.hpp>
#include <fastdds/rtps/messages/RTPSMessageCreator.h>
#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <fastdds/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/reader/RTPSReader.h>
#include <fastdds/rtps/resources/ResourceEvent.h>
Expand All @@ -45,6 +44,7 @@
#include <rtps/history/BasicPayloadPool.hpp>
#include <rtps/history/CacheChangePool.h>
#include <rtps/messages/RTPSGapBuilder.hpp>
#include <rtps/messages/RTPSMessageGroup.h>
#include <rtps/network/utils/external_locators.hpp>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/RTPSDomainImpl.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/cpp/rtps/writer/StatelessWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <rtps/history/BasicPayloadPool.hpp>
#include <rtps/history/CacheChangePool.h>
#include <rtps/history/HistoryAttributesExtension.hpp>
#include <rtps/messages/RTPSMessageGroup.h>
#include <rtps/network/utils/external_locators.hpp>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/RTPSDomainImpl.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef RTPSGAPBUILDER_HPP
#define RTPSGAPBUILDER_HPP

#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <rtps/messages/RTPSMessageGroup.h>

namespace eprosima {
namespace fastrtps {
Expand Down
2 changes: 1 addition & 1 deletion test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
#include <fastdds/rtps/common/VendorId_t.hpp>
#include <fastdds/rtps/Endpoint.h>
#include <fastdds/rtps/interfaces/IReaderDataFilter.hpp>
#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <fastdds/rtps/writer/DeliveryRetCode.hpp>
#include <fastdds/rtps/writer/LocatorSelectorSender.hpp>
#include <fastdds/rtps/writer/WriterListener.h>
#include <rtps/messages/RTPSMessageGroup.h>

namespace eprosima {
namespace fastrtps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/common/LocatorSelectorEntry.hpp>
#include <fastdds/rtps/common/SequenceNumber.h>
#include <fastdds/rtps/messages/RTPSMessageGroup.h>
#include <fastdds/rtps/messages/RTPSMessageSenderInterface.hpp>

namespace eprosima {
Expand Down

0 comments on commit 0a26720

Please sign in to comment.