Skip to content

Commit

Permalink
Fix conflicts.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany authored Mar 3, 2025
1 parent 7eb6ccd commit 0fc90a4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,7 @@
#ifndef _FASTDDS_SHAREDMEM_TRANSPORT_DESCRIPTOR_
#define _FASTDDS_SHAREDMEM_TRANSPORT_DESCRIPTOR_

<<<<<<< HEAD:include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h
#include "fastdds/rtps/transport/TransportDescriptorInterface.h"
=======
#ifndef FASTDDS_RTPS_TRANSPORT_SHARED_MEM__SHAREDMEMTRANSPORTDESCRIPTOR_HPP
#define FASTDDS_RTPS_TRANSPORT_SHARED_MEM__SHAREDMEMTRANSPORTDESCRIPTOR_HPP

#include <cstdint>
#include <string>

#include <fastdds/rtps/attributes/ThreadSettings.hpp>
#include <fastdds/rtps/transport/PortBasedTransportDescriptor.hpp>
#include <fastdds/fastdds_dll.hpp>
>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659)):include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.hpp

namespace eprosima {
namespace fastdds {
Expand Down Expand Up @@ -153,12 +141,6 @@ struct SharedMemTransportDescriptor : public TransportDescriptorInterface
uint32_t healthy_check_timeout_ms_ = shm_default_healthy_check_timeout_ms;
std::string rtps_dump_file_ {""};

<<<<<<< HEAD:include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h
=======
//! Thread settings for the transport dump thread
ThreadSettings dump_thread_ {};

>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659)):include/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.hpp
};

} // namespace rtps
Expand Down
19 changes: 2 additions & 17 deletions src/cpp/rtps/transport/shared_mem/SharedMemTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,12 @@
#endif // ifdef ANDROID

#include <fastdds/dds/log/Log.hpp>
<<<<<<< HEAD
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/transport/SenderResource.h>
#include <fastdds/rtps/transport/TransportInterface.h>
#include <fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h>
#include <fastrtps/rtps/messages/CDRMessage.h>
#include <fastrtps/rtps/messages/MessageReceiver.h>
=======
#include <fastdds/rtps/common/Locator.hpp>
#include <fastdds/rtps/transport/SenderResource.hpp>
#include <fastdds/rtps/transport/TransportInterface.hpp>
#include <fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.hpp>
>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659))

#include <rtps/network/ReceiverResource.h>
#include <rtps/transport/shared_mem/SharedMemChannelResource.hpp>
Expand All @@ -52,16 +46,14 @@ namespace eprosima {
namespace fastdds {
namespace rtps {

<<<<<<< HEAD
using octet = fastrtps::rtps::octet;
using SenderResource = fastrtps::rtps::SenderResource;
using LocatorSelectorEntry = fastrtps::rtps::LocatorSelectorEntry;
using LocatorSelector = fastrtps::rtps::LocatorSelector;
using PortParameters = fastrtps::rtps::PortParameters;
=======

// TODO(Adolfo): Calculate this value from UDP sockets buffers size.
static constexpr uint32_t shm_default_segment_size = 512 * 1024;
>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659))

TransportInterface* SharedMemTransportDescriptor::create_transport() const
{
Expand Down Expand Up @@ -254,13 +246,6 @@ bool SharedMemTransport::DoInputLocatorsMatch(
bool SharedMemTransport::init(
const fastrtps::rtps::PropertyPolicy*)
{
<<<<<<< HEAD
// TODO(Adolfo): Calculate this value from UDP sockets buffers size.
static constexpr uint32_t shm_default_segment_size = 512 * 1024;
=======
(void) max_msg_size_no_frag;
>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659))

if (configuration_.segment_size() == 0)
{
configuration_.segment_size(shm_default_segment_size);
Expand Down
23 changes: 0 additions & 23 deletions src/cpp/rtps/transport/shared_mem/SharedMemTransportDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,11 @@

using namespace eprosima::fastdds::rtps;

namespace eprosima {
namespace fastdds {
namespace rtps {

<<<<<<< HEAD
static constexpr uint32_t shm_default_segment_size = 0;
static constexpr uint32_t shm_default_port_queue_capacity = 512;
static constexpr uint32_t shm_default_healthy_check_timeout_ms = 1000;

} // rtps
} // fastdds
} // eprosima

=======
>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659))
//*********************************************************
// SharedMemTransportDescriptor
//*********************************************************
SharedMemTransportDescriptor::SharedMemTransportDescriptor()
<<<<<<< HEAD
: TransportDescriptorInterface(shm_default_segment_size, s_maximumInitialPeersRange)
, segment_size_(shm_default_segment_size)
, port_queue_capacity_(shm_default_port_queue_capacity)
, healthy_check_timeout_ms_(shm_default_healthy_check_timeout_ms)
, rtps_dump_file_("")
=======
: PortBasedTransportDescriptor(shm_default_segment_size, s_maximumInitialPeersRange)
>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659))
{
maxMessageSize = s_maximumMessageSize;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ class TransportInterface;
*
* @ingroup TRANSPORT_MODULE
*/
<<<<<<< HEAD:test/mock/rtps/SharedMemTransportDescriptor/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h
typedef struct SharedMemTransportDescriptor : public TransportDescriptorInterface
=======
struct SharedMemTransportDescriptor : public PortBasedTransportDescriptor
>>>>>>> b54cb8ef (Improve `max_allocations` calculation on SHM transport (#5659)):test/mock/rtps/SharedMemTransportDescriptor/fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.hpp
struct SharedMemTransportDescriptor : public TransportDescriptorInterface
{
static constexpr uint32_t shm_default_segment_size = 0;
static constexpr uint32_t shm_default_port_queue_capacity = 512;
Expand Down

0 comments on commit 0fc90a4

Please sign in to comment.