Coverage Report

Created: 2025-06-13 06:46

/src/Fast-DDS/include/fastdds/dds/domain/qos/RequesterQos.hpp
Line
Count
Source (jump to first uncovered line)
1
// Copyright 2024 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 RequesterQos.hpp
17
 */
18
19
#ifndef FASTDDS_DDS_DOMAIN_QOS__REQUESTERQOS_HPP
20
#define FASTDDS_DDS_DOMAIN_QOS__REQUESTERQOS_HPP
21
22
#include <string>
23
24
#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
25
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>
26
#include <fastdds/fastdds_dll.hpp>
27
28
namespace eprosima {
29
namespace fastdds {
30
namespace dds {
31
32
class RequesterQos
33
{
34
public:
35
36
    /**
37
     * @brief Constructor
38
     */
39
    FASTDDS_EXPORTED_API RequesterQos()
40
0
    {
41
0
        // Set reliability to RELIABLE_RELIABILITY_QOS by default
42
0
        writer_qos.reliability().kind = RELIABLE_RELIABILITY_QOS;
43
0
        reader_qos.reliability().kind = RELIABLE_RELIABILITY_QOS;
44
0
45
0
        // Set durability to VOLATILE_DURABILITY_QOS by default
46
0
        writer_qos.durability().kind = VOLATILE_DURABILITY_QOS;
47
0
        reader_qos.durability().kind = VOLATILE_DURABILITY_QOS;
48
0
49
0
        // Set history to KEEP_ALL_HISTORY_QOS by default
50
0
        writer_qos.history().kind = KEEP_ALL_HISTORY_QOS;
51
0
        reader_qos.history().kind = KEEP_ALL_HISTORY_QOS;
52
0
    }
53
54
    /**
55
     * @brief Equal comparison operator
56
     */
57
    FASTDDS_EXPORTED_API bool operator ==(
58
            const RequesterQos& b) const
59
0
    {
60
0
        return (this->service_name == b.service_name) &&
61
0
               (this->request_topic_name == b.request_topic_name) &&
62
0
               (this->reply_topic_name == b.reply_topic_name) &&
63
0
               (this->writer_qos == b.writer_qos) &&
64
0
               (this->reader_qos == b.reader_qos);
65
0
    }
66
67
    //! Service name
68
    std::string service_name;
69
70
    //! Request type
71
    std::string request_type;
72
73
    //! Reply type
74
    std::string reply_type;
75
76
    //! Request topic name
77
    std::string request_topic_name;
78
79
    //! Reply topic name
80
    std::string reply_topic_name;
81
82
    //! DataWriter QoS for the request writer
83
    DataWriterQos writer_qos;
84
85
    //! DataReader QoS for the request reader
86
    DataReaderQos reader_qos;
87
};
88
89
} // namespace dds
90
} // namespace fastdds
91
} // namespace eprosima
92
93
#endif // FASTDDS_DDS_DOMAIN_QOS__REQUESTERQOS_HPP