| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
IncompatibleQosStatus.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
18
19#ifndef FASTDDS_DDS_CORE_STATUS__INCOMPATIBLEQOSSTATUS_HPP
20#define FASTDDS_DDS_CORE_STATUS__INCOMPATIBLEQOSSTATUS_HPP
21
22#include <cstdint>
23#include <vector>
24
25#include <fastdds/dds/core/policy/QosPolicies.hpp>
26
27 namespace eprosima {
28 namespace fastdds {
29 namespace dds {
30
34 struct QosPolicyCount
35{
37 QosPolicyCount() = default;
38
40 QosPolicyCount(
41 QosPolicyId_t id,
42 int32_t c)
43 : policy_id(id)
44 , count(c)
45 {
46 }
47
49 QosPolicyId_t policy_id = INVALID_QOS_POLICY_ID;
50
53 uint32_t count = 0;
54};
55
57 using QosPolicyCountSeq = std::vector<QosPolicyCount>;
58
60 struct IncompatibleQosStatus
61{
64 uint32_t total_count = 0;
65
67 uint32_t total_count_change = 0;
68
70 QosPolicyId_t last_policy_id = INVALID_QOS_POLICY_ID;
71
73 QosPolicyCountSeq policies;
74
75 IncompatibleQosStatus()
76 : policies(static_cast<size_t>(NEXT_QOS_POLICY_ID), QosPolicyCount(INVALID_QOS_POLICY_ID, 0))
77 {
78 for (uint32_t id = 0; id < NEXT_QOS_POLICY_ID; ++id)
79 {
80 policies[id].policy_id = static_cast<QosPolicyId_t>(id);
81 policies[id].count = 0;
82 }
83 }
84
85};
86
88 using RequestedIncompatibleQosStatus = IncompatibleQosStatus;
90 using OfferedIncompatibleQosStatus = IncompatibleQosStatus;
91
92} //end of namespace dds
93} //end of namespace fastdds
94} //end of namespace eprosima
95
96#endif // FASTDDS_DDS_CORE_STATUS__INCOMPATIBLEQOSSTATUS_HPP
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::QosPolicyId_t
QosPolicyId_t
The identifier for each QosPolicy.
Definition QosPolicies.hpp:56
eprosima::fastdds::dds::NEXT_QOS_POLICY_ID
@ NEXT_QOS_POLICY_ID
Definition QosPolicies.hpp:101
eprosima::fastdds::dds::INVALID_QOS_POLICY_ID
@ INVALID_QOS_POLICY_ID
Definition QosPolicies.hpp:57
eprosima::fastdds::dds::OfferedIncompatibleQosStatus
IncompatibleQosStatus OfferedIncompatibleQosStatus
Alias of IncompatibleQosStatus.
Definition IncompatibleQosStatus.hpp:90
eprosima::fastdds::dds::RequestedIncompatibleQosStatus
IncompatibleQosStatus RequestedIncompatibleQosStatus
Alias of IncompatibleQosStatus.
Definition IncompatibleQosStatus.hpp:88
eprosima::fastdds::dds::QosPolicyCountSeq
std::vector< QosPolicyCount > QosPolicyCountSeq
Alias of std::vector<QosPolicyCount>.
Definition IncompatibleQosStatus.hpp:57
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::dds::IncompatibleQosStatus
A struct storing the requested incompatible QoS status.
Definition IncompatibleQosStatus.hpp:61
eprosima::fastdds::dds::IncompatibleQosStatus::policies
QosPolicyCountSeq policies
A list of QosPolicyCount.
Definition IncompatibleQosStatus.hpp:73
eprosima::fastdds::dds::IncompatibleQosStatus::IncompatibleQosStatus
IncompatibleQosStatus()
Definition IncompatibleQosStatus.hpp:75
eprosima::fastdds::dds::IncompatibleQosStatus::total_count
uint32_t total_count
Total cumulative number of times the concerned writer discovered a reader for the same topic.
Definition IncompatibleQosStatus.hpp:64
eprosima::fastdds::dds::IncompatibleQosStatus::total_count_change
uint32_t total_count_change
The change in total_count since the last time the listener was called or the status was read.
Definition IncompatibleQosStatus.hpp:67
eprosima::fastdds::dds::IncompatibleQosStatus::last_policy_id
QosPolicyId_t last_policy_id
The id of the policy that was found to be incompatible the last time an incompatibility is detected.
Definition IncompatibleQosStatus.hpp:70
eprosima::fastdds::dds::QosPolicyCount
A struct storing the id of the incompatible QoS Policy and the number of times it fails.
Definition IncompatibleQosStatus.hpp:35
eprosima::fastdds::dds::QosPolicyCount::QosPolicyCount
QosPolicyCount(QosPolicyId_t id, int32_t c)
Constructor.
Definition IncompatibleQosStatus.hpp:40
eprosima::fastdds::dds::QosPolicyCount::count
uint32_t count
Total number of times that the concerned writer discovered a reader for the same topic.
Definition IncompatibleQosStatus.hpp:53
eprosima::fastdds::dds::QosPolicyCount::policy_id
QosPolicyId_t policy_id
The id of the policy.
Definition IncompatibleQosStatus.hpp:49
eprosima::fastdds::dds::QosPolicyCount::QosPolicyCount
QosPolicyCount()=default
Constructor.