| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
DomainParticipantQos.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_DDS_DOMAIN_QOS__DOMAINPARTICIPANTQOS_HPP
21#define FASTDDS_DDS_DOMAIN_QOS__DOMAINPARTICIPANTQOS_HPP
22
23#include <string>
24
25#include <fastdds/dds/core/policy/QosPolicies.hpp>
26#include <fastdds/rtps/attributes/BuiltinTransports.hpp>
27#include <fastdds/rtps/attributes/ThreadSettings.hpp>
28#include <fastdds/rtps/flowcontrol/FlowControllerDescriptor.hpp>
29#include <fastdds/fastdds_dll.hpp>
30
31 namespace eprosima {
32 namespace fastdds {
33 namespace dds {
34
41 class DomainParticipantQos
42{
43 public:
44
45 friend class DomainParticipantExtendedQos;
46
52 using FlowControllerDescriptorList = std::vector<std::shared_ptr<fastdds::rtps::FlowControllerDescriptor>>;
53
57 FASTDDS_EXPORTED_API DomainParticipantQos()
58 {
59#ifdef FASTDDS_STATISTICS
60 /*
61 * In the case of Statistics, the following properties are set with an empty value. This is because if these
62 * properties are set and empty during the enabling of the DomainParticipant, they are fill with the default
63 * mechanism
64 */
65 properties_.properties().emplace_back(parameter_policy_physical_data_host, "");
66 properties_.properties().emplace_back(parameter_policy_physical_data_user, "");
67 properties_.properties().emplace_back(parameter_policy_physical_data_process, "");
68#endif // ifdef FASTDDS_STATISTICS
69 }
70
74 FASTDDS_EXPORTED_API virtual ~DomainParticipantQos()
75 {
76 }
77
78 virtual bool operator ==(
79 const DomainParticipantQos& b) const
80 {
81 return (this->user_data_ == b.user_data()) &&
82 (this->entity_factory_ == b.entity_factory()) &&
83 (this->allocation_ == b.allocation()) &&
84 (this->properties_ == b.properties()) &&
85 (this->wire_protocol_ == b.wire_protocol()) &&
86 (this->transport_ == b.transport()) &&
87 (this->name_ == b.name()) &&
88 (this->builtin_controllers_sender_thread_ == b.builtin_controllers_sender_thread()) &&
89 (this->timed_events_thread_ == b.timed_events_thread()) &&
90 (this->discovery_server_thread_ == b.discovery_server_thread()) &&
91 (this->typelookup_service_thread_ == b.typelookup_service_thread()) &&
92#if HAVE_SECURITY
93 (this->security_log_thread_ == b.security_log_thread()) &&
94#endif // if HAVE_SECURITY
95 (compare_flow_controllers(b));
96 }
97
103 const UserDataQosPolicy& user_data() const
104 {
105 return user_data_;
106 }
107
113 UserDataQosPolicy& user_data()
114 {
115 return user_data_;
116 }
117
123 void user_data(
124 const UserDataQosPolicy& value)
125 {
126 user_data_ = value;
127 }
128
134 const EntityFactoryQosPolicy& entity_factory() const
135 {
136 return entity_factory_;
137 }
138
144 EntityFactoryQosPolicy& entity_factory()
145 {
146 return entity_factory_;
147 }
148
154 void entity_factory(
155 const EntityFactoryQosPolicy& value)
156 {
157 entity_factory_ = value;
158 }
159
165 const ParticipantResourceLimitsQos& allocation() const
166 {
167 return allocation_;
168 }
169
175 ParticipantResourceLimitsQos& allocation()
176 {
177 return allocation_;
178 }
179
185 void allocation(
186 const ParticipantResourceLimitsQos& allocation)
187 {
188 allocation_ = allocation;
189 }
190
196 const PropertyPolicyQos& properties() const
197 {
198 return properties_;
199 }
200
206 PropertyPolicyQos& properties()
207 {
208 return properties_;
209 }
210
216 void properties(
217 const PropertyPolicyQos& properties)
218 {
219 properties_ = properties;
220 }
221
227 const WireProtocolConfigQos& wire_protocol() const
228 {
229 return wire_protocol_;
230 }
231
237 WireProtocolConfigQos& wire_protocol()
238 {
239 return wire_protocol_;
240 }
241
247 void wire_protocol(
248 const WireProtocolConfigQos& wire_protocol)
249 {
250 wire_protocol_ = wire_protocol;
251 }
252
258 const TransportConfigQos& transport() const
259 {
260 return transport_;
261 }
262
268 TransportConfigQos& transport()
269 {
270 return transport_;
271 }
272
278 void transport(
279 const TransportConfigQos& transport)
280 {
281 transport_ = transport;
282 }
283
289 const fastcdr::string_255& name() const
290 {
291 return name_;
292 }
293
299 fastcdr::string_255& name()
300 {
301 return name_;
302 }
303
309 void name(
310 const fastcdr::string_255& value)
311 {
312 name_ = value;
313 }
314
320 FlowControllerDescriptorList& flow_controllers()
321 {
322 return flow_controllers_;
323 }
324
331 FASTDDS_EXPORTED_API bool compare_flow_controllers(
332 const DomainParticipantQos& qos) const;
333
339 const FlowControllerDescriptorList& flow_controllers() const
340 {
341 return flow_controllers_;
342 }
343
349 rtps::ThreadSettings& builtin_controllers_sender_thread()
350 {
351 return builtin_controllers_sender_thread_;
352 }
353
359 const rtps::ThreadSettings& builtin_controllers_sender_thread() const
360 {
361 return builtin_controllers_sender_thread_;
362 }
363
371 FASTDDS_EXPORTED_API void setup_transports(
372 rtps::BuiltinTransports transports,
373 const rtps::BuiltinTransportsOptions& options = rtps::BuiltinTransportsOptions());
374
380 void builtin_controllers_sender_thread(
381 const rtps::ThreadSettings& value)
382 {
383 builtin_controllers_sender_thread_ = value;
384 }
385
391 rtps::ThreadSettings& timed_events_thread()
392 {
393 return timed_events_thread_;
394 }
395
401 const rtps::ThreadSettings& timed_events_thread() const
402 {
403 return timed_events_thread_;
404 }
405
411 void timed_events_thread(
412 const rtps::ThreadSettings& value)
413 {
414 timed_events_thread_ = value;
415 }
416
422 rtps::ThreadSettings& discovery_server_thread()
423 {
424 return discovery_server_thread_;
425 }
426
432 const rtps::ThreadSettings& discovery_server_thread() const
433 {
434 return discovery_server_thread_;
435 }
436
442 void discovery_server_thread(
443 const rtps::ThreadSettings& value)
444 {
445 discovery_server_thread_ = value;
446 }
447
453 rtps::ThreadSettings& typelookup_service_thread()
454 {
455 return typelookup_service_thread_;
456 }
457
463 const rtps::ThreadSettings& typelookup_service_thread() const
464 {
465 return typelookup_service_thread_;
466 }
467
473 void typelookup_service_thread(
474 const rtps::ThreadSettings& value)
475 {
476 typelookup_service_thread_ = value;
477 }
478
479#if HAVE_SECURITY
485 rtps::ThreadSettings& security_log_thread()
486 {
487 return security_log_thread_;
488 }
489
495 const rtps::ThreadSettings& security_log_thread() const
496 {
497 return security_log_thread_;
498 }
499
505 void security_log_thread(
506 const rtps::ThreadSettings& value)
507 {
508 security_log_thread_ = value;
509 }
510
511#endif // if HAVE_SECURITY
512
513 private:
514
516 UserDataQosPolicy user_data_;
517
519 EntityFactoryQosPolicy entity_factory_;
520
522 ParticipantResourceLimitsQos allocation_;
523
525 PropertyPolicyQos properties_;
526
528 WireProtocolConfigQos wire_protocol_;
529
531 TransportConfigQos transport_;
532
534 fastcdr::string_255 name_ = "RTPSParticipant";
535
540 FlowControllerDescriptorList flow_controllers_;
541
543 rtps::ThreadSettings builtin_controllers_sender_thread_;
544
546 rtps::ThreadSettings timed_events_thread_;
547
549 rtps::ThreadSettings discovery_server_thread_;
550
552 rtps::ThreadSettings typelookup_service_thread_;
553
554#if HAVE_SECURITY
556 rtps::ThreadSettings security_log_thread_;
557#endif // if HAVE_SECURITY
558
559};
560
561FASTDDS_EXPORTED_API extern const DomainParticipantQos PARTICIPANT_QOS_DEFAULT;
562
563
564} // namespace dds
565} // namespace fastdds
566} // namespace eprosima
567
568#endif // FASTDDS_DDS_DOMAIN_QOS__DOMAINPARTICIPANTQOS_HPP
eprosima::fastdds::dds::DomainParticipantQos
Class DomainParticipantQos, contains all the possible Qos that can be set for a determined participan...
Definition DomainParticipantQos.hpp:42
eprosima::fastdds::dds::DomainParticipantQos::DomainParticipantExtendedQos
friend class DomainParticipantExtendedQos
Definition DomainParticipantQos.hpp:45
eprosima::fastdds::dds::DomainParticipantQos::typelookup_service_thread
const rtps::ThreadSettings & typelookup_service_thread() const
Getter for TypeLookup service ThreadSettings.
Definition DomainParticipantQos.hpp:463
eprosima::fastdds::dds::DomainParticipantQos::allocation
void allocation(const ParticipantResourceLimitsQos &allocation)
Setter for ParticipantResourceLimitsQos.
Definition DomainParticipantQos.hpp:185
eprosima::fastdds::dds::DomainParticipantQos::discovery_server_thread
rtps::ThreadSettings & discovery_server_thread()
Getter for discovery server ThreadSettings.
Definition DomainParticipantQos.hpp:422
eprosima::fastdds::dds::DomainParticipantQos::name
fastcdr::string_255 & name()
Getter for the Participant name.
Definition DomainParticipantQos.hpp:299
eprosima::fastdds::dds::DomainParticipantQos::setup_transports
FASTDDS_EXPORTED_API void setup_transports(rtps::BuiltinTransports transports, const rtps::BuiltinTransportsOptions &options=rtps::BuiltinTransportsOptions())
Provides a way of easily configuring transport related configuration on certain pre-defined scenarios...
eprosima::fastdds::dds::DomainParticipantQos::builtin_controllers_sender_thread
const rtps::ThreadSettings & builtin_controllers_sender_thread() const
Getter for builtin flow controllers sender threads ThreadSettings.
Definition DomainParticipantQos.hpp:359
eprosima::fastdds::dds::DomainParticipantQos::discovery_server_thread
void discovery_server_thread(const rtps::ThreadSettings &value)
Setter for the discovery server ThreadSettings.
Definition DomainParticipantQos.hpp:442
eprosima::fastdds::dds::DomainParticipantQos::entity_factory
const EntityFactoryQosPolicy & entity_factory() const
Getter for EntityFactoryQosPolicy.
Definition DomainParticipantQos.hpp:134
eprosima::fastdds::dds::DomainParticipantQos::operator==
virtual bool operator==(const DomainParticipantQos &b) const
Definition DomainParticipantQos.hpp:78
eprosima::fastdds::dds::DomainParticipantQos::entity_factory
void entity_factory(const EntityFactoryQosPolicy &value)
Setter for EntityFactoryQosPolicy.
Definition DomainParticipantQos.hpp:154
eprosima::fastdds::dds::DomainParticipantQos::flow_controllers
const FlowControllerDescriptorList & flow_controllers() const
Getter for FlowControllerDescriptorList.
Definition DomainParticipantQos.hpp:339
eprosima::fastdds::dds::DomainParticipantQos::flow_controllers
FlowControllerDescriptorList & flow_controllers()
Getter for FlowControllerDescriptorList.
Definition DomainParticipantQos.hpp:320
eprosima::fastdds::dds::DomainParticipantQos::builtin_controllers_sender_thread
rtps::ThreadSettings & builtin_controllers_sender_thread()
Getter for builtin flow controllers sender threads ThreadSettings.
Definition DomainParticipantQos.hpp:349
eprosima::fastdds::dds::DomainParticipantQos::wire_protocol
void wire_protocol(const WireProtocolConfigQos &wire_protocol)
Setter for WireProtocolConfigQos.
Definition DomainParticipantQos.hpp:247
eprosima::fastdds::dds::DomainParticipantQos::~DomainParticipantQos
virtual FASTDDS_EXPORTED_API ~DomainParticipantQos()
Destructor.
Definition DomainParticipantQos.hpp:74
eprosima::fastdds::dds::DomainParticipantQos::user_data
UserDataQosPolicy & user_data()
Getter for UserDataQosPolicy.
Definition DomainParticipantQos.hpp:113
eprosima::fastdds::dds::DomainParticipantQos::transport
TransportConfigQos & transport()
Getter for TransportConfigQos.
Definition DomainParticipantQos.hpp:268
eprosima::fastdds::dds::DomainParticipantQos::discovery_server_thread
const rtps::ThreadSettings & discovery_server_thread() const
Getter for discovery server ThreadSettings.
Definition DomainParticipantQos.hpp:432
eprosima::fastdds::dds::DomainParticipantQos::transport
void transport(const TransportConfigQos &transport)
Setter for TransportConfigQos.
Definition DomainParticipantQos.hpp:278
eprosima::fastdds::dds::DomainParticipantQos::timed_events_thread
rtps::ThreadSettings & timed_events_thread()
Getter for timed event ThreadSettings.
Definition DomainParticipantQos.hpp:391
eprosima::fastdds::dds::DomainParticipantQos::user_data
const UserDataQosPolicy & user_data() const
Getter for UserDataQosPolicy.
Definition DomainParticipantQos.hpp:103
eprosima::fastdds::dds::DomainParticipantQos::typelookup_service_thread
void typelookup_service_thread(const rtps::ThreadSettings &value)
Setter for the TypeLookup service ThreadSettings.
Definition DomainParticipantQos.hpp:473
eprosima::fastdds::dds::DomainParticipantQos::builtin_controllers_sender_thread
void builtin_controllers_sender_thread(const rtps::ThreadSettings &value)
Setter for the builtin flow controllers sender threads ThreadSettings.
Definition DomainParticipantQos.hpp:380
eprosima::fastdds::dds::DomainParticipantQos::compare_flow_controllers
FASTDDS_EXPORTED_API bool compare_flow_controllers(const DomainParticipantQos &qos) const
Compares the flow controllers of two DomainParticipantQos element-wise.
eprosima::fastdds::dds::DomainParticipantQos::entity_factory
EntityFactoryQosPolicy & entity_factory()
Getter for EntityFactoryQosPolicy.
Definition DomainParticipantQos.hpp:144
eprosima::fastdds::dds::DomainParticipantQos::DomainParticipantQos
FASTDDS_EXPORTED_API DomainParticipantQos()
Constructor.
Definition DomainParticipantQos.hpp:57
eprosima::fastdds::dds::DomainParticipantQos::allocation
const ParticipantResourceLimitsQos & allocation() const
Getter for ParticipantResourceLimitsQos.
Definition DomainParticipantQos.hpp:165
eprosima::fastdds::dds::DomainParticipantQos::user_data
void user_data(const UserDataQosPolicy &value)
Setter for UserDataQosPolicy.
Definition DomainParticipantQos.hpp:123
eprosima::fastdds::dds::DomainParticipantQos::allocation
ParticipantResourceLimitsQos & allocation()
Getter for ParticipantResourceLimitsQos.
Definition DomainParticipantQos.hpp:175
eprosima::fastdds::dds::DomainParticipantQos::wire_protocol
WireProtocolConfigQos & wire_protocol()
Getter for WireProtocolConfigQos.
Definition DomainParticipantQos.hpp:237
eprosima::fastdds::dds::DomainParticipantQos::FlowControllerDescriptorList
std::vector< std::shared_ptr< fastdds::rtps::FlowControllerDescriptor > > FlowControllerDescriptorList
User defined flow controllers to use alongside.
Definition DomainParticipantQos.hpp:52
eprosima::fastdds::dds::DomainParticipantQos::transport
const TransportConfigQos & transport() const
Getter for TransportConfigQos.
Definition DomainParticipantQos.hpp:258
eprosima::fastdds::dds::DomainParticipantQos::properties
const PropertyPolicyQos & properties() const
Getter for PropertyPolicyQos.
Definition DomainParticipantQos.hpp:196
eprosima::fastdds::dds::DomainParticipantQos::properties
PropertyPolicyQos & properties()
Getter for PropertyPolicyQos.
Definition DomainParticipantQos.hpp:206
eprosima::fastdds::dds::DomainParticipantQos::wire_protocol
const WireProtocolConfigQos & wire_protocol() const
Getter for WireProtocolConfigQos.
Definition DomainParticipantQos.hpp:227
eprosima::fastdds::dds::DomainParticipantQos::timed_events_thread
const rtps::ThreadSettings & timed_events_thread() const
Getter for timed event ThreadSettings.
Definition DomainParticipantQos.hpp:401
eprosima::fastdds::dds::DomainParticipantQos::properties
void properties(const PropertyPolicyQos &properties)
Setter for PropertyPolicyQos.
Definition DomainParticipantQos.hpp:216
eprosima::fastdds::dds::DomainParticipantQos::typelookup_service_thread
rtps::ThreadSettings & typelookup_service_thread()
Getter for TypeLookup service ThreadSettings.
Definition DomainParticipantQos.hpp:453
eprosima::fastdds::dds::DomainParticipantQos::name
void name(const fastcdr::string_255 &value)
Setter for the Participant name.
Definition DomainParticipantQos.hpp:309
eprosima::fastdds::dds::DomainParticipantQos::timed_events_thread
void timed_events_thread(const rtps::ThreadSettings &value)
Setter for the timed event ThreadSettings.
Definition DomainParticipantQos.hpp:411
eprosima::fastdds::dds::DomainParticipantQos::name
const fastcdr::string_255 & name() const
Getter for the Participant name.
Definition DomainParticipantQos.hpp:289
eprosima::fastdds::dds::EntityFactoryQosPolicy
Controls the behavior of the entity when acting as a factory for other entities.
Definition QosPolicies.hpp:189
eprosima::fastdds::dds::TransportConfigQos
Qos Policy to configure the transport layer.
Definition QosPolicies.hpp:2759
eprosima::fastdds::dds::WireProtocolConfigQos
Qos Policy that configures the wire protocol.
Definition QosPolicies.hpp:2637
eprosima::fastdds::dds::parameter_policy_physical_data_host
const char *const parameter_policy_physical_data_host
Parameter property value for Host physical data.
Definition ParameterTypes.hpp:1206
eprosima::fastdds::dds::parameter_policy_physical_data_process
const char *const parameter_policy_physical_data_process
Parameter property value for Process physical data.
Definition ParameterTypes.hpp:1220
eprosima::fastdds::dds::parameter_policy_physical_data_user
const char *const parameter_policy_physical_data_user
Parameter property value for User physical data.
Definition ParameterTypes.hpp:1213
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::PARTICIPANT_QOS_DEFAULT
FASTDDS_EXPORTED_API const DomainParticipantQos PARTICIPANT_QOS_DEFAULT
eprosima::fastdds::dds::PropertyPolicyQos
fastdds::rtps::PropertyPolicy PropertyPolicyQos
Property policies.
Definition QosPolicies.hpp:2633
eprosima::fastdds::dds::ParticipantResourceLimitsQos
fastdds::rtps::RTPSParticipantAllocationAttributes ParticipantResourceLimitsQos
Holds allocation limits affecting collections managed by a participant.
Definition QosPolicies.hpp:2630
eprosima::fastdds::rtps::BuiltinTransports
BuiltinTransports
Defines the kind of transports automatically instantiated upon the creation of a participant.
Definition BuiltinTransports.hpp:106
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::rtps::BuiltinTransportsOptions
Options for configuring the built-in transports when using LARGE_DATA mode.
Definition BuiltinTransports.hpp:37
eprosima::fastdds::rtps::ThreadSettings
Struct ThreadSettings to specify various thread settings.
Definition ThreadSettings.hpp:37