Coverage Report

Created: 2025-06-13 06:46

/src/Fast-DDS/include/fastdds/dds/subscriber/qos/ReaderQos.hpp
Line
Count
Source (jump to first uncovered line)
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
15
/**
16
 * @file ReaderQos.hpp
17
 *
18
 */
19
20
#ifndef FASTDDS_DDS_SUBSCRIBER_QOS__READERQOS_HPP
21
#define FASTDDS_DDS_SUBSCRIBER_QOS__READERQOS_HPP
22
23
#include <fastdds/dds/core/policy/QosPolicies.hpp>
24
25
namespace eprosima {
26
namespace fastdds {
27
namespace dds {
28
29
/**
30
 * Class ReaderQos, contains all the possible Qos that can be set for a determined Subscriber.
31
 * Although these values can be set and are transmitted
32
 * during the Endpoint Discovery Protocol, not all of the behaviour associated with them has been implemented in the library.
33
 * Please consult each of them to check for implementation details and default values.
34
 * @ingroup FASTDDS_QOS_MODULE
35
 */
36
FASTDDS_TODO_BEFORE(4, 0, "Remove this class in favor of SubscriptionBuiltinTopicData");
37
class ReaderQos
38
{
39
public:
40
41
    FASTDDS_EXPORTED_API ReaderQos()
42
109k
    {
43
109k
    }
44
45
    FASTDDS_EXPORTED_API virtual ~ReaderQos()
46
107k
    {
47
107k
    }
48
49
    bool operator ==(
50
            const ReaderQos& b) const
51
0
    {
52
0
        return (m_durability == b.m_durability) &&
53
0
               (m_deadline == b.m_deadline) &&
54
0
               (m_latencyBudget == b.m_latencyBudget) &&
55
0
               (m_liveliness == b.m_liveliness) &&
56
0
               (m_reliability == b.m_reliability) &&
57
0
               (m_ownership == b.m_ownership) &&
58
0
               (m_destinationOrder == b.m_destinationOrder) &&
59
0
               (m_userData == b.m_userData) &&
60
0
               (m_timeBasedFilter == b.m_timeBasedFilter) &&
61
0
               (m_presentation == b.m_presentation) &&
62
0
               (m_partition == b.m_partition) &&
63
0
               (m_topicData == b.m_topicData) &&
64
0
               (m_groupData == b.m_groupData) &&
65
0
               (m_durabilityService == b.m_durabilityService) &&
66
0
               (m_lifespan == b.m_lifespan) &&
67
0
               (m_disablePositiveACKs == b.m_disablePositiveACKs) &&
68
0
               (type_consistency == b.type_consistency) &&
69
0
               (representation == b.representation) &&
70
0
               (data_sharing == b.data_sharing);
71
0
    }
72
73
    //!Durability Qos, implemented in the library.
74
    DurabilityQosPolicy m_durability;
75
76
    //!Deadline Qos, implemented in the library.
77
    DeadlineQosPolicy m_deadline;
78
79
    //!Latency Budget Qos, NOT implemented in the library.
80
    LatencyBudgetQosPolicy m_latencyBudget;
81
82
    //!Liveliness Qos, implemented in the library.
83
    LivelinessQosPolicy m_liveliness;
84
85
    //!ReliabilityQos, implemented in the library.
86
    ReliabilityQosPolicy m_reliability;
87
88
    //!Ownership Qos, implemented in the library.
89
    OwnershipQosPolicy m_ownership;
90
91
    //!Destinatio Order Qos, NOT implemented in the library.
92
    DestinationOrderQosPolicy m_destinationOrder;
93
94
    //!UserData Qos, NOT implemented in the library.
95
    UserDataQosPolicy m_userData;
96
97
    //!Time Based Filter Qos, NOT implemented in the library.
98
    TimeBasedFilterQosPolicy m_timeBasedFilter;
99
100
    //!Presentation Qos, NOT implemented in the library.
101
    PresentationQosPolicy m_presentation;
102
103
    //!Partition Qos, implemented in the library.
104
    PartitionQosPolicy m_partition;
105
106
    //!Topic Data Qos, NOT implemented in the library.
107
    TopicDataQosPolicy m_topicData;
108
109
    //!GroupData Qos, NOT implemented in the library.
110
    GroupDataQosPolicy m_groupData;
111
112
    //!Durability Service Qos, NOT implemented in the library.
113
    DurabilityServiceQosPolicy m_durabilityService;
114
115
    //!Lifespan Qos, NOT implemented in the library.
116
    LifespanQosPolicy m_lifespan;
117
118
    //!Data Representation Qos, implemented in the library.
119
    DataRepresentationQosPolicy representation;
120
121
    //!Type consistency enforcement Qos, NOT implemented in the library.
122
    TypeConsistencyEnforcementQosPolicy type_consistency;
123
124
    //!Disable positive ACKs QoS
125
    DisablePositiveACKsQosPolicy m_disablePositiveACKs;
126
127
    //!Information for data sharing compatibility check.
128
    DataSharingQosPolicy data_sharing;
129
130
    /**
131
     * Set Qos from another class
132
     * @param readerqos Reference from a ReaderQos object.
133
     * @param first_time Boolean indicating whether is the first time (If not some parameters cannot be set).
134
     *
135
     * @warning The use of this class and methods is discourgaed, consider using SubscriptionBuiltinTopicData instead.
136
     */
137
    FASTDDS_EXPORTED_API void setQos(
138
            const ReaderQos& readerqos,
139
            bool first_time);
140
141
    /**
142
     * Check if the Qos values are compatible between each other.
143
     * @return True if correct.
144
     *
145
     * @warning The use of this class and methods is discourgaed, consider using SubscriptionBuiltinTopicData instead.
146
     */
147
    FASTDDS_EXPORTED_API bool checkQos() const;
148
149
    /**
150
     * Check if the Qos can be update with the values provided. This method DOES NOT update anything.
151
     * @param qos Reference to the new qos.
152
     * @return True if they can be updated.
153
     *
154
     * @warning The use of this class and methods is discourgaed, consider using SubscriptionBuiltinTopicData instead.
155
     */
156
    FASTDDS_EXPORTED_API bool canQosBeUpdated(
157
            const ReaderQos& qos) const;
158
159
    /**
160
     * @warning The use of this class and methods is discourgaed, consider using SubscriptionBuiltinTopicData instead.
161
     */
162
    void clear();
163
};
164
165
} //namespace dds
166
} //namespace fastdds
167
} //namespace eprosima
168
169
#endif // FASTDDS_DDS_SUBSCRIBER_QOS__READERQOS_HPP