| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
EndpointAttributes.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_ATTRIBUTES__ENDPOINTATTRIBUTES_HPP
20#define FASTDDS_RTPS_ATTRIBUTES__ENDPOINTATTRIBUTES_HPP
21
22#include <fastdds/dds/core/policy/QosPolicies.hpp>
23#include <fastdds/rtps/attributes/ExternalLocators.hpp>
24#include <fastdds/rtps/attributes/PropertyPolicy.hpp>
25#include <fastdds/rtps/common/Guid.hpp>
26#include <fastdds/rtps/common/LocatorList.hpp>
27#include <fastdds/rtps/common/Types.hpp>
28#if HAVE_SECURITY
29#include <fastdds/rtps/attributes/EndpointSecurityAttributes.hpp>
30#endif // if HAVE_SECURITY
31 namespace eprosima {
32 namespace fastdds {
33 namespace rtps {
34
39 class EndpointAttributes
40{
41 public:
42
44 EndpointKind_t endpointKind = EndpointKind_t::WRITER;
45
47 TopicKind_t topicKind = TopicKind_t::NO_KEY;
48
50 ReliabilityKind_t reliabilityKind = ReliabilityKind_t::BEST_EFFORT;
51
53 DurabilityKind_t durabilityKind = DurabilityKind_t::VOLATILE;
54
56 GUID_t persistence_guid;
57
59 ExternalLocators external_unicast_locators;
60
62 bool ignore_non_matching_locators = false;
63
65 LocatorList_t unicastLocatorList;
66
68 LocatorList_t multicastLocatorList;
69
71 LocatorList_t remoteLocatorList;
72
74 PropertyPolicy properties;
75
77 fastdds::dds::OwnershipQosPolicyKind ownershipKind = fastdds::dds::OwnershipQosPolicyKind::SHARED_OWNERSHIP_QOS;
78
79 EndpointAttributes()
80 {
81 datasharing_.off();
82 }
83
84 virtual ~EndpointAttributes() = default;
85
90 inline int16_t getUserDefinedID() const
91 {
92 return m_userDefinedID;
93 }
94
99 inline int16_t getEntityID() const
100 {
101 return m_entityID;
102 }
103
108 inline void setUserDefinedID(
109 int16_t id)
110 {
111 m_userDefinedID = id;
112 }
113
118 inline void setEntityID(
119 int16_t id)
120 {
121 m_entityID = id;
122 }
123
128 inline void set_data_sharing_configuration(
129 fastdds::dds::DataSharingQosPolicy cfg)
130 {
131 datasharing_ = cfg;
132 }
133
138 inline const fastdds::dds::DataSharingQosPolicy& data_sharing_configuration() const
139 {
140 return datasharing_;
141 }
142
143#if HAVE_SECURITY
144 const security::EndpointSecurityAttributes& security_attributes() const
145 {
146 return security_attributes_;
147 }
148
149 security::EndpointSecurityAttributes& security_attributes()
150 {
151 return security_attributes_;
152 }
153
154#endif // HAVE_SECURITY
155
156 private:
157
159 int16_t m_userDefinedID = -1;
160
162 int16_t m_entityID = -1;
163
164#if HAVE_SECURITY
166 security::EndpointSecurityAttributes security_attributes_;
167#endif // HAVE_SECURITY
168
170 fastdds::dds::DataSharingQosPolicy datasharing_;
171};
172
173} // namespace rtps
174} // namespace fastdds
175} // namespace eprosima
176
177#endif // FASTDDS_RTPS_ATTRIBUTES__ENDPOINTATTRIBUTES_HPP
eprosima::fastdds::dds::DataSharingQosPolicy
Qos Policy to configure the data sharing.
Definition QosPolicies.hpp:2952
eprosima::fastdds::rtps::EndpointAttributes::unicastLocatorList
LocatorList_t unicastLocatorList
Unicast locator list.
Definition EndpointAttributes.hpp:65
eprosima::fastdds::rtps::EndpointAttributes::external_unicast_locators
ExternalLocators external_unicast_locators
The collection of external locators to use for communication.
Definition EndpointAttributes.hpp:59
eprosima::fastdds::rtps::EndpointAttributes::persistence_guid
GUID_t persistence_guid
GUID used for persistence.
Definition EndpointAttributes.hpp:56
eprosima::fastdds::rtps::EndpointAttributes::data_sharing_configuration
const fastdds::dds::DataSharingQosPolicy & data_sharing_configuration() const
Get the DataSharing configuration.
Definition EndpointAttributes.hpp:138
eprosima::fastdds::rtps::EndpointAttributes::~EndpointAttributes
virtual ~EndpointAttributes()=default
eprosima::fastdds::rtps::EndpointAttributes::properties
PropertyPolicy properties
Properties.
Definition EndpointAttributes.hpp:74
eprosima::fastdds::rtps::EndpointAttributes::reliabilityKind
ReliabilityKind_t reliabilityKind
Reliability kind, default value BEST_EFFORT.
Definition EndpointAttributes.hpp:50
eprosima::fastdds::rtps::EndpointAttributes::ownershipKind
fastdds::dds::OwnershipQosPolicyKind ownershipKind
Ownership.
Definition EndpointAttributes.hpp:77
eprosima::fastdds::rtps::EndpointAttributes::ignore_non_matching_locators
bool ignore_non_matching_locators
Whether locators that don't match with the announced locators should be kept.
Definition EndpointAttributes.hpp:62
eprosima::fastdds::rtps::EndpointAttributes::endpointKind
EndpointKind_t endpointKind
Endpoint kind, default value WRITER.
Definition EndpointAttributes.hpp:44
eprosima::fastdds::rtps::EndpointAttributes::remoteLocatorList
LocatorList_t remoteLocatorList
Remote locator list.
Definition EndpointAttributes.hpp:71
eprosima::fastdds::rtps::EndpointAttributes::EndpointAttributes
EndpointAttributes()
Definition EndpointAttributes.hpp:79
eprosima::fastdds::rtps::EndpointAttributes::getEntityID
int16_t getEntityID() const
Get the entity defined ID.
Definition EndpointAttributes.hpp:99
eprosima::fastdds::rtps::EndpointAttributes::topicKind
TopicKind_t topicKind
Topic kind, default value NO_KEY.
Definition EndpointAttributes.hpp:47
eprosima::fastdds::rtps::EndpointAttributes::getUserDefinedID
int16_t getUserDefinedID() const
Get the user defined ID.
Definition EndpointAttributes.hpp:90
eprosima::fastdds::rtps::EndpointAttributes::setUserDefinedID
void setUserDefinedID(int16_t id)
Set the user defined ID.
Definition EndpointAttributes.hpp:108
eprosima::fastdds::rtps::EndpointAttributes::setEntityID
void setEntityID(int16_t id)
Set the entity ID.
Definition EndpointAttributes.hpp:118
eprosima::fastdds::rtps::EndpointAttributes::durabilityKind
DurabilityKind_t durabilityKind
Durability kind, default value VOLATILE.
Definition EndpointAttributes.hpp:53
eprosima::fastdds::rtps::EndpointAttributes::set_data_sharing_configuration
void set_data_sharing_configuration(fastdds::dds::DataSharingQosPolicy cfg)
Set the DataSharing configuration.
Definition EndpointAttributes.hpp:128
eprosima::fastdds::rtps::EndpointAttributes::multicastLocatorList
LocatorList_t multicastLocatorList
Multicast locator list.
Definition EndpointAttributes.hpp:68
eprosima::fastdds::rtps::PropertyPolicy
Definition PropertyPolicy.hpp:30
eprosima::fastdds::dds::OwnershipQosPolicyKind
OwnershipQosPolicyKind
Enum OwnershipQosPolicyKind, different kinds of ownership for OwnershipQosPolicy.
Definition QosPolicies.hpp:631
eprosima::fastdds::dds::SHARED_OWNERSHIP_QOS
@ SHARED_OWNERSHIP_QOS
Indicates shared ownership for each instance.
Definition QosPolicies.hpp:636
eprosima::fastdds::rtps
Contains the RTPS protocol implementation.
eprosima::fastdds::rtps::LocatorList_t
eprosima::fastdds::rtps::LocatorList LocatorList_t
Definition LocatorList.hpp:478
eprosima::fastdds::rtps::ReliabilityKind_t
ReliabilityKind_t
Reliability enum used for internal purposes.
Definition Types.hpp:49
eprosima::fastdds::rtps::EndpointKind_t
EndpointKind_t
Endpoint kind.
Definition Types.hpp:65
eprosima::fastdds::rtps::ExternalLocators
std::map< uint8_t, std::map< uint8_t, std::vector< LocatorWithMask > >, std::greater< uint8_t > > ExternalLocators
A collection of LocatorWithMask grouped by externality and cost.
Definition ExternalLocators.hpp:34
eprosima::fastdds::rtps::TopicKind_t
TopicKind_t
Topic kind.
Definition Types.hpp:72
eprosima::fastdds::rtps::DurabilityKind_t
DurabilityKind_t
Durability kind.
Definition Types.hpp:56
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::rtps::GUID_t
Structure GUID_t, entity identifier, unique in DDS-RTPS Domain.
Definition Guid.hpp:40
eprosima::fastdds::rtps::security::EndpointSecurityAttributes
Definition EndpointSecurityAttributes.hpp:75