| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
RTPSMessageSenderInterface.hpp
1// Copyright 2019 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_MESSAGES__RTPSMESSAGESENDERINTERFACE_HPP
21#define FASTDDS_RTPS_MESSAGES__RTPSMESSAGESENDERINTERFACE_HPP
22
23#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
24
25#include <chrono>
26#include <vector>
27
28#include <fastdds/rtps/common/Guid.hpp>
29#include <fastdds/rtps/transport/NetworkBuffer.hpp>
30
31 namespace eprosima {
32 namespace fastdds {
33 namespace rtps {
34
35 struct CDRMessage_t;
36
40 class RTPSMessageSenderInterface
41{
42 public:
43
44 virtual ~RTPSMessageSenderInterface() = default;
45
51 virtual bool destinations_have_changed() const = 0;
52
60 virtual GuidPrefix_t destination_guid_prefix() const = 0;
61
67 virtual const std::vector<GuidPrefix_t>& remote_participants() const = 0;
68
74 virtual const std::vector<GUID_t>& remote_guids() const = 0;
75
83 virtual bool send(
84 const std::vector<eprosima::fastdds::rtps::NetworkBuffer>& buffers,
85 const uint32_t& total_bytes,
86 std::chrono::steady_clock::time_point max_blocking_time_point) const = 0;
87
91 virtual void lock() = 0;
92
96 virtual void unlock() = 0;
97
98
99};
100
101} // namespace rtps
102} // namespace fastdds
103} // namespace eprosima
104
105#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
106
107#endif // FASTDDS_RTPS_MESSAGES__RTPSMESSAGESENDERINTERFACE_HPP
eprosima::fastdds::rtps::RTPSMessageSenderInterface
Interface to handle destinations management and message sending.
Definition RTPSMessageSenderInterface.hpp:41
eprosima::fastdds::rtps::RTPSMessageSenderInterface::unlock
virtual void unlock()=0
Lock the object.
eprosima::fastdds::rtps::RTPSMessageSenderInterface::destinations_have_changed
virtual bool destinations_have_changed() const =0
Check if the destinations managed by this sender interface have changed.
eprosima::fastdds::rtps::RTPSMessageSenderInterface::remote_participants
virtual const std::vector< GuidPrefix_t > & remote_participants() const =0
Get the GUID prefix of all the destination participants.
eprosima::fastdds::rtps::RTPSMessageSenderInterface::lock
virtual void lock()=0
Lock the object.
eprosima::fastdds::rtps::RTPSMessageSenderInterface::send
virtual bool send(const std::vector< eprosima::fastdds::rtps::NetworkBuffer > &buffers, const uint32_t &total_bytes, std::chrono::steady_clock::time_point max_blocking_time_point) const =0
Send a message through this interface.
eprosima::fastdds::rtps::RTPSMessageSenderInterface::remote_guids
virtual const std::vector< GUID_t > & remote_guids() const =0
Get the GUID of all destinations.
eprosima::fastdds::rtps::RTPSMessageSenderInterface::destination_guid_prefix
virtual GuidPrefix_t destination_guid_prefix() const =0
Get a GUID prefix representing all destinations.
eprosima::fastdds::rtps::RTPSMessageSenderInterface::~RTPSMessageSenderInterface
virtual ~RTPSMessageSenderInterface()=default
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::rtps::CDRMessage_t
Structure CDRMessage_t, contains a serialized message.
Definition CDRMessage_t.hpp:51
eprosima::fastdds::rtps::GuidPrefix_t
Structure GuidPrefix_t, Guid Prefix of GUID_t.
Definition GuidPrefix_t.hpp:37