Fast DDS  Version 3.0.1
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
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
31namespace eprosima {
32namespace fastdds {
33namespace dds {
34
42{
43public:
44
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 (this->flow_controllers_ == b.flow_controllers());
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
124 const UserDataQosPolicy& value)
125 {
126 user_data_ = value;
127 }
128
135 {
136 return entity_factory_;
137 }
138
145 {
146 return entity_factory_;
147 }
148
155 const EntityFactoryQosPolicy& value)
156 {
157 entity_factory_ = value;
158 }
159
166 {
167 return allocation_;
168 }
169
176 {
177 return allocation_;
178 }
179
187 {
188 allocation_ = allocation;
189 }
190
197 {
198 return properties_;
199 }
200
207 {
208 return properties_;
209 }
210
218 {
219 properties_ = properties;
220 }
221
228 {
229 return wire_protocol_;
230 }
231
238 {
239 return wire_protocol_;
240 }
241
249 {
250 wire_protocol_ = wire_protocol;
251 }
252
259 {
260 return transport_;
261 }
262
269 {
270 return transport_;
271 }
272
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
321 {
322 return flow_controllers_;
323 }
324
331 {
332 return flow_controllers_;
333 }
334
341 {
342 return builtin_controllers_sender_thread_;
343 }
344
351 {
352 return builtin_controllers_sender_thread_;
353 }
354
362 FASTDDS_EXPORTED_API void setup_transports(
363 rtps::BuiltinTransports transports,
365
372 const rtps::ThreadSettings& value)
373 {
374 builtin_controllers_sender_thread_ = value;
375 }
376
383 {
384 return timed_events_thread_;
385 }
386
393 {
394 return timed_events_thread_;
395 }
396
403 const rtps::ThreadSettings& value)
404 {
405 timed_events_thread_ = value;
406 }
407
414 {
415 return discovery_server_thread_;
416 }
417
424 {
425 return discovery_server_thread_;
426 }
427
434 const rtps::ThreadSettings& value)
435 {
436 discovery_server_thread_ = value;
437 }
438
445 {
446 return typelookup_service_thread_;
447 }
448
455 {
456 return typelookup_service_thread_;
457 }
458
465 const rtps::ThreadSettings& value)
466 {
467 typelookup_service_thread_ = value;
468 }
469
470#if HAVE_SECURITY
476 rtps::ThreadSettings& security_log_thread()
477 {
478 return security_log_thread_;
479 }
480
486 const rtps::ThreadSettings& security_log_thread() const
487 {
488 return security_log_thread_;
489 }
490
496 void security_log_thread(
497 const rtps::ThreadSettings& value)
498 {
499 security_log_thread_ = value;
500 }
501
502#endif // if HAVE_SECURITY
503
504private:
505
507 UserDataQosPolicy user_data_;
508
510 EntityFactoryQosPolicy entity_factory_;
511
514
516 PropertyPolicyQos properties_;
517
519 WireProtocolConfigQos wire_protocol_;
520
522 TransportConfigQos transport_;
523
525 fastcdr::string_255 name_ = "RTPSParticipant";
526
531 FlowControllerDescriptorList flow_controllers_;
532
534 rtps::ThreadSettings builtin_controllers_sender_thread_;
535
537 rtps::ThreadSettings timed_events_thread_;
538
540 rtps::ThreadSettings discovery_server_thread_;
541
543 rtps::ThreadSettings typelookup_service_thread_;
544
545#if HAVE_SECURITY
547 rtps::ThreadSettings security_log_thread_;
548#endif // if HAVE_SECURITY
549
550};
551
552FASTDDS_EXPORTED_API extern const DomainParticipantQos PARTICIPANT_QOS_DEFAULT;
553
554
555} // namespace dds
556} // namespace fastdds
557} // namespace eprosima
558
559#endif // FASTDDS_DDS_DOMAIN_QOS__DOMAINPARTICIPANTQOS_HPP
Definition DomainParticipantExtendedQos.hpp:32
Class DomainParticipantQos, contains all the possible Qos that can be set for a determined participan...
Definition DomainParticipantQos.hpp:42
const rtps::ThreadSettings & typelookup_service_thread() const
Getter for TypeLookup service ThreadSettings.
Definition DomainParticipantQos.hpp:454
void allocation(const ParticipantResourceLimitsQos &allocation)
Setter for ParticipantResourceLimitsQos.
Definition DomainParticipantQos.hpp:185
rtps::ThreadSettings & discovery_server_thread()
Getter for discovery server ThreadSettings.
Definition DomainParticipantQos.hpp:413
fastcdr::string_255 & name()
Getter for the Participant name.
Definition DomainParticipantQos.hpp:299
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...
const rtps::ThreadSettings & builtin_controllers_sender_thread() const
Getter for builtin flow controllers sender threads ThreadSettings.
Definition DomainParticipantQos.hpp:350
void discovery_server_thread(const rtps::ThreadSettings &value)
Setter for the discovery server ThreadSettings.
Definition DomainParticipantQos.hpp:433
const EntityFactoryQosPolicy & entity_factory() const
Getter for EntityFactoryQosPolicy.
Definition DomainParticipantQos.hpp:134
virtual bool operator==(const DomainParticipantQos &b) const
Definition DomainParticipantQos.hpp:78
void entity_factory(const EntityFactoryQosPolicy &value)
Setter for EntityFactoryQosPolicy.
Definition DomainParticipantQos.hpp:154
const FlowControllerDescriptorList & flow_controllers() const
Getter for FlowControllerDescriptorList.
Definition DomainParticipantQos.hpp:330
FlowControllerDescriptorList & flow_controllers()
Getter for FlowControllerDescriptorList.
Definition DomainParticipantQos.hpp:320
rtps::ThreadSettings & builtin_controllers_sender_thread()
Getter for builtin flow controllers sender threads ThreadSettings.
Definition DomainParticipantQos.hpp:340
void wire_protocol(const WireProtocolConfigQos &wire_protocol)
Setter for WireProtocolConfigQos.
Definition DomainParticipantQos.hpp:247
virtual FASTDDS_EXPORTED_API ~DomainParticipantQos()
Destructor.
Definition DomainParticipantQos.hpp:74
UserDataQosPolicy & user_data()
Getter for UserDataQosPolicy.
Definition DomainParticipantQos.hpp:113
TransportConfigQos & transport()
Getter for TransportConfigQos.
Definition DomainParticipantQos.hpp:268
const rtps::ThreadSettings & discovery_server_thread() const
Getter for discovery server ThreadSettings.
Definition DomainParticipantQos.hpp:423
void transport(const TransportConfigQos &transport)
Setter for TransportConfigQos.
Definition DomainParticipantQos.hpp:278
rtps::ThreadSettings & timed_events_thread()
Getter for timed event ThreadSettings.
Definition DomainParticipantQos.hpp:382
const UserDataQosPolicy & user_data() const
Getter for UserDataQosPolicy.
Definition DomainParticipantQos.hpp:103
void typelookup_service_thread(const rtps::ThreadSettings &value)
Setter for the TypeLookup service ThreadSettings.
Definition DomainParticipantQos.hpp:464
void builtin_controllers_sender_thread(const rtps::ThreadSettings &value)
Setter for the builtin flow controllers sender threads ThreadSettings.
Definition DomainParticipantQos.hpp:371
EntityFactoryQosPolicy & entity_factory()
Getter for EntityFactoryQosPolicy.
Definition DomainParticipantQos.hpp:144
FASTDDS_EXPORTED_API DomainParticipantQos()
Constructor.
Definition DomainParticipantQos.hpp:57
const ParticipantResourceLimitsQos & allocation() const
Getter for ParticipantResourceLimitsQos.
Definition DomainParticipantQos.hpp:165
void user_data(const UserDataQosPolicy &value)
Setter for UserDataQosPolicy.
Definition DomainParticipantQos.hpp:123
ParticipantResourceLimitsQos & allocation()
Getter for ParticipantResourceLimitsQos.
Definition DomainParticipantQos.hpp:175
WireProtocolConfigQos & wire_protocol()
Getter for WireProtocolConfigQos.
Definition DomainParticipantQos.hpp:237
const TransportConfigQos & transport() const
Getter for TransportConfigQos.
Definition DomainParticipantQos.hpp:258
const PropertyPolicyQos & properties() const
Getter for PropertyPolicyQos.
Definition DomainParticipantQos.hpp:196
PropertyPolicyQos & properties()
Getter for PropertyPolicyQos.
Definition DomainParticipantQos.hpp:206
const WireProtocolConfigQos & wire_protocol() const
Getter for WireProtocolConfigQos.
Definition DomainParticipantQos.hpp:227
const rtps::ThreadSettings & timed_events_thread() const
Getter for timed event ThreadSettings.
Definition DomainParticipantQos.hpp:392
void properties(const PropertyPolicyQos &properties)
Setter for PropertyPolicyQos.
Definition DomainParticipantQos.hpp:216
rtps::ThreadSettings & typelookup_service_thread()
Getter for TypeLookup service ThreadSettings.
Definition DomainParticipantQos.hpp:444
void name(const fastcdr::string_255 &value)
Setter for the Participant name.
Definition DomainParticipantQos.hpp:309
void timed_events_thread(const rtps::ThreadSettings &value)
Setter for the timed event ThreadSettings.
Definition DomainParticipantQos.hpp:402
const fastcdr::string_255 & name() const
Getter for the Participant name.
Definition DomainParticipantQos.hpp:289
std::vector< std::shared_ptr< fastdds::rtps::FlowControllerDescriptor > > FlowControllerDescriptorList
User defined flow controllers to use alongside.
Definition DomainParticipantQos.hpp:52
Controls the behavior of the entity when acting as a factory for other entities.
Definition QosPolicies.hpp:187
Qos Policy to configure the transport layer.
Definition QosPolicies.hpp:2710
Qos Policy that configures the wire protocol.
Definition QosPolicies.hpp:2635
Definition PropertyPolicy.hpp:30
FASTDDS_EXPORTED_API const PropertySeq & properties() const
Get properties.
Definition PropertyPolicy.hpp:81
const char *const parameter_policy_physical_data_host
Parameter property value for Host physical data.
Definition ParameterTypes.hpp:1191
const char *const parameter_policy_physical_data_process
Parameter property value for Process physical data.
Definition ParameterTypes.hpp:1205
const char *const parameter_policy_physical_data_user
Parameter property value for User physical data.
Definition ParameterTypes.hpp:1198
Definition DomainParticipant.hpp:45
FASTDDS_EXPORTED_API const DomainParticipantQos PARTICIPANT_QOS_DEFAULT
fastdds::rtps::PropertyPolicy PropertyPolicyQos
Property policies.
Definition QosPolicies.hpp:2631
fastdds::rtps::RTPSParticipantAllocationAttributes ParticipantResourceLimitsQos
Holds allocation limits affecting collections managed by a participant.
Definition QosPolicies.hpp:2628
BuiltinTransports
Defines the kind of transports automatically instantiated upon the creation of a participant.
Definition BuiltinTransports.hpp:106
eProsima namespace.
Options for configuring the built-in transports when using LARGE_DATA mode.
Definition BuiltinTransports.hpp:37
Holds allocation limits affecting collections managed by a participant.
Definition RTPSParticipantAllocationAttributes.hpp:129
Struct ThreadSettings to specify various thread settings.
Definition ThreadSettings.hpp:37