Coverage Report

Created: 2026-02-14 07:11

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/Fast-DDS/include/fastdds/dds/publisher/qos/WriterQos.hpp
Line
Count
Source
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 WriterQos.hpp
17
 *
18
 */
19
20
#ifndef FASTDDS_DDS_PUBLISHER_QOS__WRITERQOS_HPP
21
#define FASTDDS_DDS_PUBLISHER_QOS__WRITERQOS_HPP
22
23
#include <fastdds/dds/core/policy/QosPolicies.hpp>
24
25
namespace eprosima {
26
namespace fastdds {
27
namespace dds {
28
29
/**
30
 * Class WriterQos, containing all the possible Qos that can be set for a determined Publisher.
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 PublicationBuiltinTopicData");
37
class WriterQos
38
{
39
public:
40
41
    FASTDDS_EXPORTED_API WriterQos();
42
    FASTDDS_EXPORTED_API virtual ~WriterQos();
43
44
    bool operator ==(
45
            const WriterQos& b) const
46
0
    {
47
0
        return (this->m_durability == b.m_durability) &&
48
0
               (this->m_durabilityService == b.m_durabilityService) &&
49
0
               (this->m_deadline == b.m_deadline) &&
50
0
               (this->m_latencyBudget == b.m_latencyBudget) &&
51
0
               (this->m_liveliness == b.m_liveliness) &&
52
0
               (this->m_reliability == b.m_reliability) &&
53
0
               (this->m_lifespan == b.m_lifespan) &&
54
0
               (this->m_userData == b.m_userData) &&
55
0
               (this->m_timeBasedFilter == b.m_timeBasedFilter) &&
56
0
               (this->m_ownership == b.m_ownership) &&
57
0
               (this->m_ownershipStrength == b.m_ownershipStrength) &&
58
0
               (this->m_destinationOrder == b.m_destinationOrder) &&
59
0
               (this->m_presentation == b.m_presentation) &&
60
0
               (this->m_partition == b.m_partition) &&
61
0
               (this->m_topicData == b.m_topicData) &&
62
0
               (this->m_groupData == b.m_groupData) &&
63
0
               (this->m_publishMode == b.m_publishMode) &&
64
0
               (this->m_disablePositiveACKs == b.m_disablePositiveACKs) &&
65
0
               (this->representation == b.representation) &&
66
0
               (this->data_sharing == b.data_sharing) &&
67
0
               (this->transport_priority == b.transport_priority);
68
0
    }
69
70
    //!Durability Qos, implemented in the library.
71
    DurabilityQosPolicy m_durability;
72
73
    //!Durability Service Qos, NOT implemented in the library.
74
    DurabilityServiceQosPolicy m_durabilityService;
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
    //!Reliability Qos, implemented in the library.
86
    ReliabilityQosPolicy m_reliability;
87
88
    //!Lifespan Qos, NOT implemented in the library.
89
    LifespanQosPolicy m_lifespan;
90
91
    //!UserData Qos, NOT implemented in the library.
92
    UserDataQosPolicy m_userData;
93
94
    //!Time Based Filter Qos, NOT implemented in the library.
95
    TimeBasedFilterQosPolicy m_timeBasedFilter;
96
97
    //!Ownership Qos, implemented in the library.
98
    OwnershipQosPolicy m_ownership;
99
100
    //!Owenership Strength Qos, implemented in the library.
101
    OwnershipStrengthQosPolicy m_ownershipStrength;
102
103
    //!Destination Order Qos, NOT implemented in the library.
104
    DestinationOrderQosPolicy m_destinationOrder;
105
106
    //!Presentation Qos, NOT implemented in the library.
107
    PresentationQosPolicy m_presentation;
108
109
    //!Partition Qos, implemented in the library.
110
    PartitionQosPolicy m_partition;
111
112
    //!Topic Data Qos, NOT implemented in the library.
113
    TopicDataQosPolicy m_topicData;
114
115
    //!Group Data Qos, NOT implemented in the library.
116
    GroupDataQosPolicy m_groupData;
117
118
    //! Transport priority Qos, implemented in the library.
119
    TransportPriorityQosPolicy transport_priority;
120
121
    //!Publication Mode Qos, implemented in the library.
122
    PublishModeQosPolicy m_publishMode;
123
124
    //!Data Representation Qos, implemented in the library.
125
    DataRepresentationQosPolicy representation;
126
127
    //!Disable positive acks QoS, implemented in the library.
128
    DisablePositiveACKsQosPolicy m_disablePositiveACKs;
129
130
    //!Information for data sharing compatibility check.
131
    DataSharingQosPolicy data_sharing;
132
133
    //! Disable heartbeat piggyback mechanism.
134
    bool disable_heartbeat_piggyback = false;
135
136
    /**
137
     * Set Qos from another class
138
     * @param qos Reference from a WriterQos object.
139
     * @param first_time Boolean indicating whether is the first time (If not some parameters cannot be set).
140
     *
141
     * @warning The use of this class and methods is discourgaed, consider using PublicationBuiltinTopicData instead.
142
     */
143
    FASTDDS_EXPORTED_API void setQos(
144
            const WriterQos& qos,
145
            bool first_time);
146
147
    /**
148
     * Check if the Qos values are compatible between each other.
149
     * @return True if correct.
150
     *
151
     * @warning The use of this class and methods is discourgaed, consider using PublicationBuiltinTopicData instead.
152
     */
153
    FASTDDS_EXPORTED_API bool checkQos() const;
154
155
    /**
156
     * @warning The use of this class and methods is discourgaed, consider using PublicationBuiltinTopicData instead.
157
     */
158
    FASTDDS_EXPORTED_API bool canQosBeUpdated(
159
            const WriterQos& qos) const;
160
161
    /**
162
     * @warning The use of this class and methods is discourgaed, consider using PublicationBuiltinTopicData instead.
163
     */
164
    void clear();
165
};
166
167
//FASTDDS_EXPORTED_API extern const WriterQos DATAWRITER_QOS_DEFAULT;
168
169
} //namespace dds
170
} //namespace fastdds
171
} //namespace eprosima
172
173
#endif // FASTDDS_DDS_PUBLISHER_QOS__WRITERQOS_HPP