/src/Fast-DDS/include/fastdds/dds/subscriber/qos/DataReaderQos.hpp
Line | Count | Source (jump to first uncovered line) |
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 | | |
15 | | /** |
16 | | * @file DataReaderQos.hpp |
17 | | */ |
18 | | |
19 | | |
20 | | #ifndef _FASTDDS_DATAREADERQOS_HPP |
21 | | #define _FASTDDS_DATAREADERQOS_HPP |
22 | | |
23 | | #include <fastdds/dds/core/policy/QosPolicies.hpp> |
24 | | #include <fastdds/dds/subscriber/qos/ReaderQos.hpp> |
25 | | #include <fastdds/dds/subscriber/qos/SubscriberQos.hpp> |
26 | | #include <fastdds/dds/core/policy/ReaderDataLifecycleQosPolicy.hpp> |
27 | | |
28 | | #include <fastdds/rtps/attributes/ReaderAttributes.h> |
29 | | #include <fastrtps/attributes/TopicAttributes.h> |
30 | | |
31 | | |
32 | | namespace eprosima { |
33 | | namespace fastdds { |
34 | | namespace dds { |
35 | | |
36 | | using TopicAttributesQos = fastrtps::TopicAttributes; |
37 | | |
38 | | //! Qos Policy to configure the DisablePositiveACKsQos and the reader attributes |
39 | | class RTPSReliableReaderQos |
40 | | { |
41 | | public: |
42 | | |
43 | | /** |
44 | | * @brief Constructor |
45 | | */ |
46 | | RTPS_DllAPI RTPSReliableReaderQos() |
47 | 2 | { |
48 | 2 | } |
49 | | |
50 | | /** |
51 | | * @brief Destructor |
52 | | */ |
53 | 0 | virtual RTPS_DllAPI ~RTPSReliableReaderQos() = default; |
54 | | |
55 | | bool operator ==( |
56 | | const RTPSReliableReaderQos& b) const |
57 | 0 | { |
58 | 0 | return (this->times == b.times) && |
59 | 0 | (this->disable_positive_ACKs == b.disable_positive_ACKs); |
60 | 0 | } |
61 | | |
62 | | inline void clear() |
63 | 0 | { |
64 | 0 | RTPSReliableReaderQos reset = RTPSReliableReaderQos(); |
65 | 0 | std::swap(*this, reset); |
66 | 0 | } |
67 | | |
68 | | /*! |
69 | | * @brief Times associated with the Reliable Readers events. |
70 | | */ |
71 | | fastrtps::rtps::ReaderTimes times; |
72 | | |
73 | | /*! |
74 | | * @brief Control the sending of positive ACKs |
75 | | */ |
76 | | DisablePositiveACKsQosPolicy disable_positive_ACKs; |
77 | | }; |
78 | | |
79 | | //! Qos Policy to configure the limit of the reader resources |
80 | | class ReaderResourceLimitsQos |
81 | | { |
82 | | public: |
83 | | |
84 | | /** |
85 | | * @brief Constructor |
86 | | */ |
87 | 2 | RTPS_DllAPI ReaderResourceLimitsQos() = default; |
88 | | |
89 | | /** |
90 | | * @brief Destructor |
91 | | */ |
92 | 0 | virtual RTPS_DllAPI ~ReaderResourceLimitsQos() = default; |
93 | | |
94 | | bool operator ==( |
95 | | const ReaderResourceLimitsQos& b) const |
96 | 0 | { |
97 | 0 | return |
98 | 0 | (matched_publisher_allocation == b.matched_publisher_allocation) && |
99 | 0 | (sample_infos_allocation == b.sample_infos_allocation) && |
100 | 0 | (outstanding_reads_allocation == b.outstanding_reads_allocation) && |
101 | 0 | (max_samples_per_read == b.max_samples_per_read); |
102 | 0 | } |
103 | | |
104 | | inline void clear() |
105 | 0 | { |
106 | 0 | ReaderResourceLimitsQos reset = ReaderResourceLimitsQos(); |
107 | 0 | std::swap(*this, reset); |
108 | 0 | } |
109 | | |
110 | | //! Matched publishers allocation limits. |
111 | | fastrtps::ResourceLimitedContainerConfig matched_publisher_allocation; |
112 | | //! SampleInfo allocation limits. |
113 | | fastrtps::ResourceLimitedContainerConfig sample_infos_allocation{ 32u }; |
114 | | //! Loaned collections allocation limits. |
115 | | fastrtps::ResourceLimitedContainerConfig outstanding_reads_allocation{ 2u }; |
116 | | |
117 | | /** |
118 | | * Maximum number of samples to return on a single call to read / take. |
119 | | * |
120 | | * This attribute is a signed integer to be consistent with the @c max_samples argument of |
121 | | * @ref DataReader methods, but should always have a strict positive value. Bear in mind that |
122 | | * a big number here may cause the creation of the DataReader to fail due to pre-allocation of |
123 | | * internal resources. |
124 | | * |
125 | | * Default value: 32. |
126 | | */ |
127 | | int32_t max_samples_per_read = 32; |
128 | | }; |
129 | | |
130 | | //! Qos Policy to configure the XTypes Qos associated to the DataReader |
131 | | class TypeConsistencyQos : public QosPolicy |
132 | | { |
133 | | public: |
134 | | |
135 | | /** |
136 | | * @brief Constructor |
137 | | */ |
138 | | RTPS_DllAPI TypeConsistencyQos() |
139 | | : QosPolicy(false) |
140 | 2 | { |
141 | 2 | } |
142 | | |
143 | | /** |
144 | | * @brief Destructor |
145 | | */ |
146 | 0 | virtual RTPS_DllAPI ~TypeConsistencyQos() = default; |
147 | | |
148 | | bool operator ==( |
149 | | const TypeConsistencyQos& b) const |
150 | 0 | { |
151 | 0 | return (this->type_consistency == b.type_consistency) && |
152 | 0 | (this->representation == b.representation) && |
153 | 0 | QosPolicy::operator ==(b); |
154 | 0 | } |
155 | | |
156 | | inline void clear() override |
157 | 0 | { |
158 | 0 | TypeConsistencyQos reset = TypeConsistencyQos(); |
159 | 0 | std::swap(*this, reset); |
160 | 0 | } |
161 | | |
162 | | //!Type consistency enforcement Qos. |
163 | | TypeConsistencyEnforcementQosPolicy type_consistency; |
164 | | |
165 | | //!Data Representation Qos. |
166 | | DataRepresentationQosPolicy representation; |
167 | | }; |
168 | | |
169 | | /** |
170 | | * Class DataReaderQos, containing all the possible Qos that can be set for a determined DataReader. |
171 | | * Although these values can be set and are transmitted |
172 | | * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library. |
173 | | * Please consult each of them to check for implementation details and default values. |
174 | | * @ingroup FASTDDS_QOS_MODULE |
175 | | */ |
176 | | class DataReaderQos |
177 | | { |
178 | | public: |
179 | | |
180 | | /** |
181 | | * @brief Constructor |
182 | | */ |
183 | | RTPS_DllAPI DataReaderQos() |
184 | | : expects_inline_qos_(false) |
185 | 2 | { |
186 | 2 | } |
187 | | |
188 | | RTPS_DllAPI bool operator ==( |
189 | | const DataReaderQos& b) const |
190 | 0 | { |
191 | 0 | return (durability_ == b.durability()) && |
192 | 0 | (deadline_ == b.deadline()) && |
193 | 0 | (latency_budget_ == b.latency_budget()) && |
194 | 0 | (liveliness_ == b.liveliness()) && |
195 | 0 | (reliability_ == b.reliability()) && |
196 | 0 | (destination_order_ == b.destination_order()) && |
197 | 0 | (history_ == b.history()) && |
198 | 0 | (resource_limits_ == b.resource_limits()) && |
199 | 0 | (user_data_ == b.user_data()) && |
200 | 0 | (ownership_ == b.ownership()) && |
201 | 0 | (time_based_filter_ == b.time_based_filter()) && |
202 | 0 | (reader_data_lifecycle_ == b.reader_data_lifecycle()) && |
203 | 0 | (lifespan_ == b.lifespan()) && |
204 | 0 | (durability_service_ == b.durability_service()) && |
205 | 0 | (reliable_reader_qos_ == b.reliable_reader_qos()) && |
206 | 0 | (type_consistency_ == b.type_consistency()) && |
207 | 0 | (expects_inline_qos_ == b.expects_inline_qos()) && |
208 | 0 | (properties_ == b.properties()) && |
209 | 0 | (endpoint_ == b.endpoint()) && |
210 | 0 | (reader_resource_limits_ == b.reader_resource_limits()) && |
211 | 0 | (data_sharing_ == b.data_sharing()); |
212 | 0 | } |
213 | | |
214 | | RTPS_DllAPI ReaderQos get_readerqos( |
215 | | const SubscriberQos& sqos) const; |
216 | | |
217 | | /** |
218 | | * Getter for DurabilityQosPolicy |
219 | | * |
220 | | * @return DurabilityQosPolicy reference |
221 | | */ |
222 | | RTPS_DllAPI DurabilityQosPolicy& durability() |
223 | 0 | { |
224 | 0 | return durability_; |
225 | 0 | } |
226 | | |
227 | | /** |
228 | | * Getter for DurabilityQosPolicy |
229 | | * |
230 | | * @return DurabilityQosPolicy const reference |
231 | | */ |
232 | | RTPS_DllAPI const DurabilityQosPolicy& durability() const |
233 | 0 | { |
234 | 0 | return durability_; |
235 | 0 | } |
236 | | |
237 | | /** |
238 | | * Setter for DurabilityQosPolicy |
239 | | * |
240 | | * @param new_value new value for the DurabilityQosPolicy |
241 | | */ |
242 | | RTPS_DllAPI void durability( |
243 | | const DurabilityQosPolicy& new_value) |
244 | 0 | { |
245 | 0 | durability_ = new_value; |
246 | 0 | } |
247 | | |
248 | | /** |
249 | | * Getter for DeadlineQosPolicy |
250 | | * |
251 | | * @return DeadlineQosPolicy reference |
252 | | */ |
253 | | RTPS_DllAPI DeadlineQosPolicy& deadline() |
254 | 0 | { |
255 | 0 | return deadline_; |
256 | 0 | } |
257 | | |
258 | | /** |
259 | | * Getter for DeadlineQosPolicy |
260 | | * |
261 | | * @return DeadlineQosPolicy const reference |
262 | | */ |
263 | | RTPS_DllAPI const DeadlineQosPolicy& deadline() const |
264 | 0 | { |
265 | 0 | return deadline_; |
266 | 0 | } |
267 | | |
268 | | /** |
269 | | * Setter for DeadlineQosPolicy |
270 | | * |
271 | | * @param new_value new value for the DeadlineQosPolicy |
272 | | */ |
273 | | RTPS_DllAPI void deadline( |
274 | | const DeadlineQosPolicy& new_value) |
275 | 0 | { |
276 | 0 | deadline_ = new_value; |
277 | 0 | } |
278 | | |
279 | | /** |
280 | | * Getter for LatencyBudgetQosPolicy |
281 | | * |
282 | | * @return LatencyBudgetQosPolicy reference |
283 | | */ |
284 | | RTPS_DllAPI LatencyBudgetQosPolicy& latency_budget() |
285 | 0 | { |
286 | 0 | return latency_budget_; |
287 | 0 | } |
288 | | |
289 | | /** |
290 | | * Getter for LatencyBudgetQosPolicy |
291 | | * |
292 | | * @return LatencyBudgetQosPolicy const reference |
293 | | */ |
294 | | RTPS_DllAPI const LatencyBudgetQosPolicy& latency_budget() const |
295 | 0 | { |
296 | 0 | return latency_budget_; |
297 | 0 | } |
298 | | |
299 | | /** |
300 | | * Setter for LatencyBudgetQosPolicy |
301 | | * |
302 | | * @param new_value new value for the LatencyBudgetQosPolicy |
303 | | */ |
304 | | RTPS_DllAPI void latency_budget( |
305 | | const LatencyBudgetQosPolicy& new_value) |
306 | 0 | { |
307 | 0 | latency_budget_ = new_value; |
308 | 0 | } |
309 | | |
310 | | /** |
311 | | * Getter for LivelinessQosPolicy |
312 | | * |
313 | | * @return LivelinessQosPolicy reference |
314 | | */ |
315 | | RTPS_DllAPI LivelinessQosPolicy& liveliness() |
316 | 0 | { |
317 | 0 | return liveliness_; |
318 | 0 | } |
319 | | |
320 | | /** |
321 | | * Getter for LivelinessQosPolicy |
322 | | * |
323 | | * @return LivelinessQosPolicy const reference |
324 | | */ |
325 | | RTPS_DllAPI const LivelinessQosPolicy& liveliness() const |
326 | 0 | { |
327 | 0 | return liveliness_; |
328 | 0 | } |
329 | | |
330 | | /** |
331 | | * Setter for LivelinessQosPolicy |
332 | | * |
333 | | * @param new_value new value for the LivelinessQosPolicy |
334 | | */ |
335 | | RTPS_DllAPI void liveliness( |
336 | | const LivelinessQosPolicy& new_value) |
337 | 0 | { |
338 | 0 | liveliness_ = new_value; |
339 | 0 | } |
340 | | |
341 | | /** |
342 | | * Getter for ReliabilityQosPolicy |
343 | | * |
344 | | * @return ReliabilityQosPolicy reference |
345 | | */ |
346 | | RTPS_DllAPI ReliabilityQosPolicy& reliability() |
347 | 0 | { |
348 | 0 | return reliability_; |
349 | 0 | } |
350 | | |
351 | | /** |
352 | | * Getter for ReliabilityQosPolicy |
353 | | * |
354 | | * @return ReliabilityQosPolicy const reference |
355 | | */ |
356 | | RTPS_DllAPI const ReliabilityQosPolicy& reliability() const |
357 | 0 | { |
358 | 0 | return reliability_; |
359 | 0 | } |
360 | | |
361 | | /** |
362 | | * Setter for ReliabilityQosPolicy |
363 | | * |
364 | | * @param new_value new value for the ReliabilityQosPolicy |
365 | | */ |
366 | | RTPS_DllAPI void reliability( |
367 | | const ReliabilityQosPolicy& new_value) |
368 | 0 | { |
369 | 0 | reliability_ = new_value; |
370 | 0 | } |
371 | | |
372 | | /** |
373 | | * Getter for DestinationOrderQosPolicy |
374 | | * |
375 | | * @return DestinationOrderQosPolicy reference |
376 | | */ |
377 | | RTPS_DllAPI DestinationOrderQosPolicy& destination_order() |
378 | 0 | { |
379 | 0 | return destination_order_; |
380 | 0 | } |
381 | | |
382 | | /** |
383 | | * Getter for DestinationOrderQosPolicy |
384 | | * |
385 | | * @return DestinationOrderQosPolicy const reference |
386 | | */ |
387 | | RTPS_DllAPI const DestinationOrderQosPolicy& destination_order() const |
388 | 0 | { |
389 | 0 | return destination_order_; |
390 | 0 | } |
391 | | |
392 | | /** |
393 | | * Setter for DestinationOrderQosPolicy |
394 | | * |
395 | | * @param new_value new value for the DestinationOrderQosPolicy |
396 | | */ |
397 | | RTPS_DllAPI void destination_order( |
398 | | const DestinationOrderQosPolicy& new_value) |
399 | 0 | { |
400 | 0 | destination_order_ = new_value; |
401 | 0 | } |
402 | | |
403 | | /** |
404 | | * Getter for HistoryQosPolicy |
405 | | * |
406 | | * @return HistoryQosPolicy reference |
407 | | */ |
408 | | RTPS_DllAPI HistoryQosPolicy& history() |
409 | 0 | { |
410 | 0 | return history_; |
411 | 0 | } |
412 | | |
413 | | /** |
414 | | * Getter for HistoryQosPolicy |
415 | | * |
416 | | * @return HistoryQosPolicy const reference |
417 | | */ |
418 | | RTPS_DllAPI const HistoryQosPolicy& history() const |
419 | 0 | { |
420 | 0 | return history_; |
421 | 0 | } |
422 | | |
423 | | /** |
424 | | * Setter for HistoryQosPolicy |
425 | | * |
426 | | * @param new_value new value for the HistoryQosPolicy |
427 | | */ |
428 | | RTPS_DllAPI void history( |
429 | | const HistoryQosPolicy& new_value) |
430 | 0 | { |
431 | 0 | history_ = new_value; |
432 | 0 | } |
433 | | |
434 | | /** |
435 | | * Getter for ResourceLimitsQosPolicy |
436 | | * |
437 | | * @return ResourceLimitsQosPolicy reference |
438 | | */ |
439 | | RTPS_DllAPI ResourceLimitsQosPolicy& resource_limits() |
440 | 0 | { |
441 | 0 | return resource_limits_; |
442 | 0 | } |
443 | | |
444 | | /** |
445 | | * Getter for ResourceLimitsQosPolicy |
446 | | * |
447 | | * @return ResourceLimitsQosPolicy const reference |
448 | | */ |
449 | | RTPS_DllAPI const ResourceLimitsQosPolicy& resource_limits() const |
450 | 0 | { |
451 | 0 | return resource_limits_; |
452 | 0 | } |
453 | | |
454 | | /** |
455 | | * Setter for ResourceLimitsQosPolicy |
456 | | * |
457 | | * @param new_value new value for the ResourceLimitsQosPolicy |
458 | | */ |
459 | | RTPS_DllAPI void resource_limits( |
460 | | const ResourceLimitsQosPolicy& new_value) |
461 | 0 | { |
462 | 0 | resource_limits_ = new_value; |
463 | 0 | } |
464 | | |
465 | | /** |
466 | | * Getter for UserDataQosPolicy |
467 | | * |
468 | | * @return UserDataQosPolicy reference |
469 | | */ |
470 | | RTPS_DllAPI UserDataQosPolicy& user_data() |
471 | 0 | { |
472 | 0 | return user_data_; |
473 | 0 | } |
474 | | |
475 | | /** |
476 | | * Getter for UserDataQosPolicy |
477 | | * |
478 | | * @return UserDataQosPolicy const reference |
479 | | */ |
480 | | RTPS_DllAPI const UserDataQosPolicy& user_data() const |
481 | 0 | { |
482 | 0 | return user_data_; |
483 | 0 | } |
484 | | |
485 | | /** |
486 | | * Setter for UserDataQosPolicy |
487 | | * |
488 | | * @param new_value new value for the UserDataQosPolicy |
489 | | */ |
490 | | RTPS_DllAPI void user_data( |
491 | | const UserDataQosPolicy& new_value) |
492 | 0 | { |
493 | 0 | user_data_ = new_value; |
494 | 0 | } |
495 | | |
496 | | /** |
497 | | * Getter for OwnershipQosPolicy |
498 | | * |
499 | | * @return OwnershipQosPolicy reference |
500 | | */ |
501 | | RTPS_DllAPI OwnershipQosPolicy& ownership() |
502 | 0 | { |
503 | 0 | return ownership_; |
504 | 0 | } |
505 | | |
506 | | /** |
507 | | * Getter for OwnershipQosPolicy |
508 | | * |
509 | | * @return OwnershipQosPolicy const reference |
510 | | */ |
511 | | RTPS_DllAPI const OwnershipQosPolicy& ownership() const |
512 | 0 | { |
513 | 0 | return ownership_; |
514 | 0 | } |
515 | | |
516 | | /** |
517 | | * Setter for OwnershipQosPolicy |
518 | | * |
519 | | * @param new_value new value for the OwnershipQosPolicy |
520 | | */ |
521 | | RTPS_DllAPI void ownership( |
522 | | const OwnershipQosPolicy& new_value) |
523 | 0 | { |
524 | 0 | ownership_ = new_value; |
525 | 0 | } |
526 | | |
527 | | /** |
528 | | * Getter for TimeBasedFilterQosPolicy |
529 | | * |
530 | | * @return TimeBasedFilterQosPolicy reference |
531 | | */ |
532 | | RTPS_DllAPI TimeBasedFilterQosPolicy& time_based_filter() |
533 | 0 | { |
534 | 0 | return time_based_filter_; |
535 | 0 | } |
536 | | |
537 | | /** |
538 | | * Getter for TimeBasedFilterQosPolicy |
539 | | * |
540 | | * @return TimeBasedFilterQosPolicy const reference |
541 | | */ |
542 | | RTPS_DllAPI const TimeBasedFilterQosPolicy& time_based_filter() const |
543 | 0 | { |
544 | 0 | return time_based_filter_; |
545 | 0 | } |
546 | | |
547 | | /** |
548 | | * Setter for TimeBasedFilterQosPolicy |
549 | | * |
550 | | * @param new_value new value for the TimeBasedFilterQosPolicy |
551 | | */ |
552 | | RTPS_DllAPI void time_based_filter( |
553 | | const TimeBasedFilterQosPolicy& new_value) |
554 | 0 | { |
555 | 0 | time_based_filter_ = new_value; |
556 | 0 | } |
557 | | |
558 | | /** |
559 | | * Getter for ReaderDataLifecycleQosPolicy |
560 | | * |
561 | | * @return ReaderDataLifecycleQosPolicy reference |
562 | | */ |
563 | | RTPS_DllAPI ReaderDataLifecycleQosPolicy& reader_data_lifecycle() |
564 | 0 | { |
565 | 0 | return reader_data_lifecycle_; |
566 | 0 | } |
567 | | |
568 | | /** |
569 | | * Getter for ReaderDataLifecycleQosPolicy |
570 | | * |
571 | | * @return ReaderDataLifecycleQosPolicy const reference |
572 | | */ |
573 | | RTPS_DllAPI const ReaderDataLifecycleQosPolicy& reader_data_lifecycle() const |
574 | 0 | { |
575 | 0 | return reader_data_lifecycle_; |
576 | 0 | } |
577 | | |
578 | | /** |
579 | | * Setter for ReaderDataLifecycleQosPolicy |
580 | | * |
581 | | * @param new_value new value for the ReaderDataLifecycleQosPolicy |
582 | | */ |
583 | | RTPS_DllAPI void reader_data_lifecycle( |
584 | | const ReaderDataLifecycleQosPolicy& new_value) |
585 | 0 | { |
586 | 0 | reader_data_lifecycle_ = new_value; |
587 | 0 | } |
588 | | |
589 | | /** |
590 | | * Getter for LifespanQosPolicy |
591 | | * |
592 | | * @return LifespanQosPolicy reference |
593 | | */ |
594 | | RTPS_DllAPI LifespanQosPolicy& lifespan() |
595 | 0 | { |
596 | 0 | return lifespan_; |
597 | 0 | } |
598 | | |
599 | | /** |
600 | | * Getter for LifespanQosPolicy |
601 | | * |
602 | | * @return LifespanQosPolicy const reference |
603 | | */ |
604 | | RTPS_DllAPI const LifespanQosPolicy& lifespan() const |
605 | 0 | { |
606 | 0 | return lifespan_; |
607 | 0 | } |
608 | | |
609 | | /** |
610 | | * Setter for LifespanQosPolicy |
611 | | * |
612 | | * @param new_value new value for the LifespanQosPolicy |
613 | | */ |
614 | | RTPS_DllAPI void lifespan( |
615 | | const LifespanQosPolicy& new_value) |
616 | 0 | { |
617 | 0 | lifespan_ = new_value; |
618 | 0 | } |
619 | | |
620 | | /** |
621 | | * Getter for DurabilityServiceQosPolicy |
622 | | * |
623 | | * @return DurabilityServiceQosPolicy reference |
624 | | */ |
625 | | RTPS_DllAPI DurabilityServiceQosPolicy& durability_service() |
626 | 0 | { |
627 | 0 | return durability_service_; |
628 | 0 | } |
629 | | |
630 | | /** |
631 | | * Getter for DurabilityServiceQosPolicy |
632 | | * |
633 | | * @return DurabilityServiceQosPolicy const reference |
634 | | */ |
635 | | RTPS_DllAPI const DurabilityServiceQosPolicy& durability_service() const |
636 | 0 | { |
637 | 0 | return durability_service_; |
638 | 0 | } |
639 | | |
640 | | /** |
641 | | * Setter for DurabilityServiceQosPolicy |
642 | | * |
643 | | * @param new_value new value for the DurabilityServiceQosPolicy |
644 | | */ |
645 | | RTPS_DllAPI void durability_service( |
646 | | const DurabilityServiceQosPolicy& new_value) |
647 | 0 | { |
648 | 0 | durability_service_ = new_value; |
649 | 0 | } |
650 | | |
651 | | /** |
652 | | * Getter for RTPSReliableReaderQos |
653 | | * |
654 | | * @return RTPSReliableReaderQos reference |
655 | | */ |
656 | | RTPS_DllAPI RTPSReliableReaderQos& reliable_reader_qos() |
657 | 0 | { |
658 | 0 | return reliable_reader_qos_; |
659 | 0 | } |
660 | | |
661 | | /** |
662 | | * Getter for RTPSReliableReaderQos |
663 | | * |
664 | | * @return RTPSReliableReaderQos const reference |
665 | | */ |
666 | | RTPS_DllAPI const RTPSReliableReaderQos& reliable_reader_qos() const |
667 | 0 | { |
668 | 0 | return reliable_reader_qos_; |
669 | 0 | } |
670 | | |
671 | | /** |
672 | | * Setter for RTPSReliableReaderQos |
673 | | * |
674 | | * @param new_value new value for the RTPSReliableReaderQos |
675 | | */ |
676 | | RTPS_DllAPI void reliable_reader_qos( |
677 | | const RTPSReliableReaderQos& new_value) |
678 | 0 | { |
679 | 0 | reliable_reader_qos_ = new_value; |
680 | 0 | } |
681 | | |
682 | | /** |
683 | | * Getter for TypeConsistencyQos |
684 | | * |
685 | | * @return TypeConsistencyQos reference |
686 | | */ |
687 | | RTPS_DllAPI TypeConsistencyQos& type_consistency() |
688 | 0 | { |
689 | 0 | return type_consistency_; |
690 | 0 | } |
691 | | |
692 | | /** |
693 | | * Getter for TypeConsistencyQos |
694 | | * |
695 | | * @return TypeConsistencyQos const reference |
696 | | */ |
697 | | RTPS_DllAPI const TypeConsistencyQos& type_consistency() const |
698 | 0 | { |
699 | 0 | return type_consistency_; |
700 | 0 | } |
701 | | |
702 | | /** |
703 | | * Setter for TypeConsistencyQos |
704 | | * |
705 | | * @param new_value new value for the TypeConsistencyQos |
706 | | */ |
707 | | RTPS_DllAPI void type_consistency( |
708 | | const TypeConsistencyQos& new_value) |
709 | 0 | { |
710 | 0 | type_consistency_ = new_value; |
711 | 0 | } |
712 | | |
713 | | /** |
714 | | * Getter for expectsInlineQos |
715 | | * |
716 | | * @return expectsInlineQos |
717 | | */ |
718 | | RTPS_DllAPI bool expects_inline_qos() const |
719 | 0 | { |
720 | 0 | return expects_inline_qos_; |
721 | 0 | } |
722 | | |
723 | | /** |
724 | | * Setter for expectsInlineQos |
725 | | * |
726 | | * @param new_value new value for the expectsInlineQos |
727 | | */ |
728 | | RTPS_DllAPI void expects_inline_qos( |
729 | | bool new_value) |
730 | 0 | { |
731 | 0 | expects_inline_qos_ = new_value; |
732 | 0 | } |
733 | | |
734 | | /** |
735 | | * Getter for PropertyPolicyQos |
736 | | * |
737 | | * @return PropertyPolicyQos reference |
738 | | */ |
739 | | RTPS_DllAPI PropertyPolicyQos& properties() |
740 | 0 | { |
741 | 0 | return properties_; |
742 | 0 | } |
743 | | |
744 | | /** |
745 | | * Getter for PropertyPolicyQos |
746 | | * |
747 | | * @return PropertyPolicyQos const reference |
748 | | */ |
749 | | RTPS_DllAPI const PropertyPolicyQos& properties() const |
750 | 0 | { |
751 | 0 | return properties_; |
752 | 0 | } |
753 | | |
754 | | /** |
755 | | * Setter for PropertyPolicyQos |
756 | | * |
757 | | * @param new_value new value for the PropertyPolicyQos |
758 | | */ |
759 | | RTPS_DllAPI void properties( |
760 | | const PropertyPolicyQos& new_value) |
761 | 0 | { |
762 | 0 | properties_ = new_value; |
763 | 0 | } |
764 | | |
765 | | /** |
766 | | * Getter for RTPSEndpointQos |
767 | | * |
768 | | * @return RTPSEndpointQos reference |
769 | | */ |
770 | | RTPS_DllAPI RTPSEndpointQos& endpoint() |
771 | 0 | { |
772 | 0 | return endpoint_; |
773 | 0 | } |
774 | | |
775 | | /** |
776 | | * Getter for RTPSEndpointQos |
777 | | * |
778 | | * @return RTPSEndpointQos const reference |
779 | | */ |
780 | | RTPS_DllAPI const RTPSEndpointQos& endpoint() const |
781 | 0 | { |
782 | 0 | return endpoint_; |
783 | 0 | } |
784 | | |
785 | | /** |
786 | | * Setter for RTPSEndpointQos |
787 | | * |
788 | | * @param new_value new value for the RTPSEndpointQos |
789 | | */ |
790 | | RTPS_DllAPI void endpoint( |
791 | | const RTPSEndpointQos& new_value) |
792 | 0 | { |
793 | 0 | endpoint_ = new_value; |
794 | 0 | } |
795 | | |
796 | | /** |
797 | | * Getter for ReaderResourceLimitsQos |
798 | | * |
799 | | * @return ReaderResourceLimitsQos reference |
800 | | */ |
801 | | RTPS_DllAPI ReaderResourceLimitsQos& reader_resource_limits() |
802 | 0 | { |
803 | 0 | return reader_resource_limits_; |
804 | 0 | } |
805 | | |
806 | | /** |
807 | | * Getter for ReaderResourceLimitsQos |
808 | | * |
809 | | * @return ReaderResourceLimitsQos const reference |
810 | | */ |
811 | | RTPS_DllAPI const ReaderResourceLimitsQos& reader_resource_limits() const |
812 | 0 | { |
813 | 0 | return reader_resource_limits_; |
814 | 0 | } |
815 | | |
816 | | /** |
817 | | * Setter for ReaderResourceLimitsQos |
818 | | * |
819 | | * @param new_value new value for the ReaderResourceLimitsQos |
820 | | */ |
821 | | RTPS_DllAPI void reader_resource_limits( |
822 | | const ReaderResourceLimitsQos& new_value) |
823 | 0 | { |
824 | 0 | reader_resource_limits_ = new_value; |
825 | 0 | } |
826 | | |
827 | | /** |
828 | | * Getter for DataSharingQosPolicy |
829 | | * |
830 | | * @return DataSharingQosPolicy reference |
831 | | */ |
832 | | RTPS_DllAPI DataSharingQosPolicy& data_sharing() |
833 | 0 | { |
834 | 0 | return data_sharing_; |
835 | 0 | } |
836 | | |
837 | | /** |
838 | | * Getter for DataSharingQosPolicy |
839 | | * |
840 | | * @return DataSharingQosPolicy reference |
841 | | */ |
842 | | RTPS_DllAPI const DataSharingQosPolicy& data_sharing() const |
843 | 0 | { |
844 | 0 | return data_sharing_; |
845 | 0 | } |
846 | | |
847 | | /** |
848 | | * Setter for DataSharingQosPolicy |
849 | | * |
850 | | * @param data_sharing new value for the DataSharingQosPolicy |
851 | | */ |
852 | | RTPS_DllAPI void data_sharing( |
853 | | const DataSharingQosPolicy& data_sharing) |
854 | 0 | { |
855 | 0 | data_sharing_ = data_sharing; |
856 | 0 | } |
857 | | |
858 | | private: |
859 | | |
860 | | //!Durability Qos, implemented in the library. |
861 | | DurabilityQosPolicy durability_; |
862 | | |
863 | | //!Deadline Qos, implemented in the library. |
864 | | DeadlineQosPolicy deadline_; |
865 | | |
866 | | //!Latency Budget Qos, implemented in the library. |
867 | | LatencyBudgetQosPolicy latency_budget_; |
868 | | |
869 | | //!Liveliness Qos, implemented in the library. |
870 | | LivelinessQosPolicy liveliness_; |
871 | | |
872 | | //!Reliability Qos, implemented in the library. |
873 | | ReliabilityQosPolicy reliability_; |
874 | | |
875 | | //!Destination Order Qos, NOT implemented in the library. |
876 | | DestinationOrderQosPolicy destination_order_; |
877 | | |
878 | | //!History Qos, implemented in the library. |
879 | | HistoryQosPolicy history_; |
880 | | |
881 | | //!Resource Limits Qos, implemented in the library. |
882 | | ResourceLimitsQosPolicy resource_limits_; |
883 | | |
884 | | //!User Data Qos, implemented in the library. |
885 | | UserDataQosPolicy user_data_; |
886 | | |
887 | | //!Ownership Qos, implemented in the library. |
888 | | OwnershipQosPolicy ownership_; |
889 | | |
890 | | //!Time Based Filter Qos, NOT implemented in the library. |
891 | | TimeBasedFilterQosPolicy time_based_filter_; |
892 | | |
893 | | //!Reader Data Lifecycle Qos, NOT implemented in the library. |
894 | | ReaderDataLifecycleQosPolicy reader_data_lifecycle_; |
895 | | |
896 | | |
897 | | //!Lifespan Qos (Extension). |
898 | | LifespanQosPolicy lifespan_; |
899 | | |
900 | | //!Durability Service Qos (Extension). |
901 | | DurabilityServiceQosPolicy durability_service_; |
902 | | |
903 | | //!Reliable reader configuration (Extension) |
904 | | RTPSReliableReaderQos reliable_reader_qos_; |
905 | | |
906 | | //! Tipe consistency (Extension) |
907 | | TypeConsistencyQos type_consistency_; |
908 | | |
909 | | //!Expects Inline QOS (Extension). |
910 | | bool expects_inline_qos_; |
911 | | |
912 | | //!Properties (Extension). |
913 | | PropertyPolicyQos properties_; |
914 | | |
915 | | //!Endpoint configuration (Extension) |
916 | | RTPSEndpointQos endpoint_; |
917 | | |
918 | | //!ReaderResourceLimitsQos |
919 | | ReaderResourceLimitsQos reader_resource_limits_; |
920 | | |
921 | | //!DataSharing configuration (Extension) |
922 | | DataSharingQosPolicy data_sharing_; |
923 | | }; |
924 | | |
925 | | RTPS_DllAPI extern const DataReaderQos DATAREADER_QOS_DEFAULT; |
926 | | |
927 | | } // namespace dds |
928 | | } // namespace fastdds |
929 | | } // namespace eprosima |
930 | | |
931 | | #endif // _FASTDDS_DATAREADERQOS_HPP |