| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
Endpoint.hpp
1// Copyright 2016 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
18
19#ifndef FASTDDS_RTPS__ENDPOINT_HPP
20#define FASTDDS_RTPS__ENDPOINT_HPP
21
22#include <fastdds/rtps/attributes/EndpointAttributes.hpp>
23#include <fastdds/rtps/common/Guid.hpp>
24#include <fastdds/rtps/common/Locator.hpp>
25#include <fastdds/rtps/common/Types.hpp>
26#include <fastdds/rtps/history/IChangePool.hpp>
27#include <fastdds/rtps/history/IPayloadPool.hpp>
28#include <fastdds/utils/TimedMutex.hpp>
29
30 namespace eprosima {
31 namespace fastdds {
32 namespace rtps {
33
34 class RTPSParticipantImpl;
35 class ResourceEvent;
36
37
45 class Endpoint
46{
47 friend class RTPSParticipantImpl;
48
49 protected:
50
51 Endpoint() = default;
52
53 Endpoint(
54 RTPSParticipantImpl* pimpl,
55 const GUID_t& guid,
56 const EndpointAttributes& att)
57 : mp_RTPSParticipant(pimpl)
58 , m_guid(guid)
59 , m_att(att)
60 {
61 }
62
63 virtual ~Endpoint()
64 {
65 }
66
67 public:
68
73 FASTDDS_EXPORTED_API inline const GUID_t& getGuid() const
74 {
75 return m_guid;
76 }
77
82 FASTDDS_EXPORTED_API inline RecursiveTimedMutex& getMutex()
83 {
84 return mp_mutex;
85 }
86
91 FASTDDS_EXPORTED_API inline EndpointAttributes& getAttributes()
92 {
93 return m_att;
94 }
95
96#if HAVE_SECURITY
97 bool supports_rtps_protection()
98 {
99 return supports_rtps_protection_;
100 }
101
102#endif // if HAVE_SECURITY
103
104 protected:
105
107 RTPSParticipantImpl* mp_RTPSParticipant;
108
110 const GUID_t m_guid;
111
113 EndpointAttributes m_att;
114
116 mutable RecursiveTimedMutex mp_mutex;
117
119 uint32_t fixed_payload_size_ = 0;
120
121 private:
122
123 Endpoint& operator =(
124 const Endpoint&) = delete;
125
126#if HAVE_SECURITY
127 bool supports_rtps_protection_ = true;
128#endif // if HAVE_SECURITY
129};
130
131
132} // namespace rtps
133} // namespace rtps
134} // namespace eprosima
135
136#endif //FASTDDS_RTPS__ENDPOINT_HPP
eprosima::fastdds::rtps::EndpointAttributes
Structure EndpointAttributes, describing the attributes associated with an RTPS Endpoint.
Definition EndpointAttributes.hpp:40
eprosima::fastdds::rtps::Endpoint::fixed_payload_size_
uint32_t fixed_payload_size_
Fixed size of payloads.
Definition Endpoint.hpp:119
eprosima::fastdds::rtps::Endpoint::m_guid
const GUID_t m_guid
Endpoint GUID.
Definition Endpoint.hpp:110
eprosima::fastdds::rtps::Endpoint::mp_RTPSParticipant
RTPSParticipantImpl * mp_RTPSParticipant
Pointer to the RTPSParticipant containing this endpoint.
Definition Endpoint.hpp:107
eprosima::fastdds::rtps::Endpoint::m_att
EndpointAttributes m_att
Endpoint Attributes.
Definition Endpoint.hpp:113
eprosima::fastdds::rtps::Endpoint::Endpoint
Endpoint()=default
eprosima::fastdds::rtps::Endpoint::mp_mutex
RecursiveTimedMutex mp_mutex
Endpoint Mutex.
Definition Endpoint.hpp:116
eprosima::fastdds::rtps::Endpoint::getGuid
FASTDDS_EXPORTED_API const GUID_t & getGuid() const
Get associated GUID.
Definition Endpoint.hpp:73
eprosima::fastdds::rtps::Endpoint::Endpoint
Endpoint(RTPSParticipantImpl *pimpl, const GUID_t &guid, const EndpointAttributes &att)
Definition Endpoint.hpp:53
eprosima::fastdds::rtps::Endpoint::getMutex
FASTDDS_EXPORTED_API RecursiveTimedMutex & getMutex()
Get mutex.
Definition Endpoint.hpp:82
eprosima::fastdds::rtps::Endpoint::RTPSParticipantImpl
friend class RTPSParticipantImpl
Definition Endpoint.hpp:47
eprosima::fastdds::rtps::Endpoint::getAttributes
FASTDDS_EXPORTED_API EndpointAttributes & getAttributes()
Get associated attributes.
Definition Endpoint.hpp:91
eprosima::fastdds::rtps::Endpoint::~Endpoint
virtual ~Endpoint()
Definition Endpoint.hpp:63
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds
eprosima::fastdds::RecursiveTimedMutex
std::recursive_timed_mutex RecursiveTimedMutex
Definition TimedMutex.hpp:206
eprosima
eProsima namespace.
eprosima::fastdds::rtps::GUID_t
Structure GUID_t, entity identifier, unique in DDS-RTPS Domain.
Definition Guid.hpp:40