| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
ChainingTransportDescriptor.hpp
1// Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
19
20#ifndef FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORTDESCRIPTOR_HPP
21#define FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORTDESCRIPTOR_HPP
22
23#include <memory>
24#include <vector>
25
26#include "TransportInterface.hpp"
27
28 namespace eprosima {
29 namespace fastdds {
30 namespace rtps {
31
42 typedef struct ChainingTransportDescriptor : public TransportDescriptorInterface
43{
44 FASTDDS_EXPORTED_API ChainingTransportDescriptor(
45 std::shared_ptr<TransportDescriptorInterface> low_level)
46 : TransportDescriptorInterface(low_level->maxMessageSize, low_level->maxInitialPeersRange)
47 , low_level_descriptor(low_level)
48 {
49 }
50
51 FASTDDS_EXPORTED_API ChainingTransportDescriptor(
52 const ChainingTransportDescriptor& t)
53 : TransportDescriptorInterface(t)
54 , low_level_descriptor(t.low_level_descriptor)
55 {
56 }
57
59 FASTDDS_EXPORTED_API virtual uint32_t min_send_buffer_size() const override
60 {
61 return low_level_descriptor->min_send_buffer_size();
62 }
63
65 FASTDDS_EXPORTED_API virtual uint32_t max_message_size() const override
66 {
67 return low_level_descriptor->max_message_size();
68 }
69
70 FASTDDS_EXPORTED_API virtual ~ChainingTransportDescriptor() = default;
71
73 std::shared_ptr<TransportDescriptorInterface> low_level_descriptor;
74} ChainingTransportDescriptor;
75
76} // namespace rtps
77} // namespace fastdds
78} // namespace eprosima
79
80#endif // FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORTDESCRIPTOR_HPP
eprosima::fastdds::rtps::ChainingTransportDescriptor
eprosima::fastdds::rtps::ChainingTransportDescriptor ChainingTransportDescriptor
Base class for the descriptors of chaining transports.
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::rtps::ChainingTransportDescriptor::low_level_descriptor
std::shared_ptr< TransportDescriptorInterface > low_level_descriptor
Descriptor for lower level transport.
Definition ChainingTransportDescriptor.hpp:73
eprosima::fastdds::rtps::ChainingTransportDescriptor::min_send_buffer_size
virtual FASTDDS_EXPORTED_API uint32_t min_send_buffer_size() const override
Returns the minimum size required for a send operation.
Definition ChainingTransportDescriptor.hpp:59
eprosima::fastdds::rtps::ChainingTransportDescriptor::ChainingTransportDescriptor
FASTDDS_EXPORTED_API ChainingTransportDescriptor(const ChainingTransportDescriptor &t)
Definition ChainingTransportDescriptor.hpp:51
eprosima::fastdds::rtps::ChainingTransportDescriptor::ChainingTransportDescriptor
FASTDDS_EXPORTED_API ChainingTransportDescriptor(std::shared_ptr< TransportDescriptorInterface > low_level)
Definition ChainingTransportDescriptor.hpp:44
eprosima::fastdds::rtps::ChainingTransportDescriptor::max_message_size
virtual FASTDDS_EXPORTED_API uint32_t max_message_size() const override
Returns the maximum size expected for received messages.
Definition ChainingTransportDescriptor.hpp:65
eprosima::fastdds::rtps::ChainingTransportDescriptor::~ChainingTransportDescriptor
virtual FASTDDS_EXPORTED_API ~ChainingTransportDescriptor()=default
eprosima::fastdds::rtps::TransportDescriptorInterface::maxMessageSize
uint32_t maxMessageSize
Maximum size of a single message in the transport.
Definition TransportDescriptorInterface.hpp:123
eprosima::fastdds::rtps::TransportDescriptorInterface::TransportDescriptorInterface
FASTDDS_EXPORTED_API TransportDescriptorInterface(uint32_t maximumMessageSize, uint32_t maximumInitialPeersRange)
Constructor.
Definition TransportDescriptorInterface.hpp:50
eprosima::fastdds::rtps::TransportDescriptorInterface::maxInitialPeersRange
uint32_t maxInitialPeersRange
Number of channels opened with each initial remote peer.
Definition TransportDescriptorInterface.hpp:126