Fast DDS  Version 3.6.1.0
Fast DDS
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 
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 
35 {
37  QosPolicyCount() = default;
38 
41  QosPolicyId_t id,
42  int32_t c)
43  : policy_id(id)
44  , count(c)
45  {
46  }
47 
50 
53  uint32_t count = 0;
54 };
55 
57 using QosPolicyCountSeq = std::vector<QosPolicyCount>;
58 
61 {
64  uint32_t total_count = 0;
65 
67  uint32_t total_count_change = 0;
68 
71 
74 
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 
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
Definition: DomainParticipant.hpp:46
QosPolicyId_t
The identifier for each QosPolicy.
Definition: QosPolicies.hpp:56
@ NEXT_QOS_POLICY_ID
Definition: QosPolicies.hpp:101
@ INVALID_QOS_POLICY_ID
Definition: QosPolicies.hpp:57
std::vector< QosPolicyCount > QosPolicyCountSeq
Alias of std::vector<QosPolicyCount>
Definition: IncompatibleQosStatus.hpp:57
A struct storing the requested incompatible QoS status.
Definition: IncompatibleQosStatus.hpp:61
QosPolicyCountSeq policies
A list of QosPolicyCount.
Definition: IncompatibleQosStatus.hpp:73
IncompatibleQosStatus()
Definition: IncompatibleQosStatus.hpp:75
uint32_t total_count
Total cumulative number of times the concerned writer discovered a reader for the same topic.
Definition: IncompatibleQosStatus.hpp:64
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
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
A struct storing the id of the incompatible QoS Policy and the number of times it fails.
Definition: IncompatibleQosStatus.hpp:35
QosPolicyCount(QosPolicyId_t id, int32_t c)
Constructor.
Definition: IncompatibleQosStatus.hpp:40
uint32_t count
Total number of times that the concerned writer discovered a reader for the same topic.
Definition: IncompatibleQosStatus.hpp:53
QosPolicyId_t policy_id
The id of the policy.
Definition: IncompatibleQosStatus.hpp:49
QosPolicyCount()=default
Constructor.