| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
StatusCondition.hpp
1// Copyright 2021 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
20#ifndef FASTDDS_DDS_CORE_CONDITION__STATUSCONDITION_HPP
21#define FASTDDS_DDS_CORE_CONDITION__STATUSCONDITION_HPP
22
23#include <fastdds/dds/core/condition/Condition.hpp>
24#include <fastdds/dds/core/ReturnCode.hpp>
25#include <fastdds/dds/core/status/StatusMask.hpp>
26#include <fastdds/fastdds_dll.hpp>
27
28 namespace eprosima {
29 namespace fastdds {
30 namespace dds {
31
32 namespace detail {
33
34 struct StatusConditionImpl;
35
36} // namespace detail
37
38 class Entity;
39
44 class StatusCondition final : public Condition
45{
46 public:
47
48 StatusCondition(
49 Entity* parent);
50
51 ~StatusCondition() final;
52
53 // Non-copyable
54 StatusCondition(
55 const StatusCondition&) = delete;
56 StatusCondition& operator =(
57 const StatusCondition&) = delete;
58
59 // Non-movable
60 StatusCondition(
61 StatusCondition&&) = delete;
62 StatusCondition& operator =(
63 StatusCondition&&) = delete;
64
69 FASTDDS_EXPORTED_API bool get_trigger_value() const override;
70
76 FASTDDS_EXPORTED_API ReturnCode_t set_enabled_statuses(
77 const StatusMask& mask);
78
83 FASTDDS_EXPORTED_API const StatusMask& get_enabled_statuses() const;
84
89 FASTDDS_EXPORTED_API Entity* get_entity() const;
90
91 detail::StatusConditionImpl* get_impl() const
92 {
93 return impl_.get();
94 }
95
96 protected:
97
99 Entity* entity_ = nullptr;
100
102 std::unique_ptr<detail::StatusConditionImpl> impl_;
103
104};
105
106} // namespace dds
107} // namespace fastdds
108} // namespace eprosima
109
110#endif // FASTDDS_DDS_CORE_CONDITION__STATUSCONDITION_HPP
eprosima::fastdds::dds::Condition::Condition
Condition()
eprosima::fastdds::dds::Entity
The Entity class is the abstract base class for all the objects that support QoS policies,...
Definition Entity.hpp:38
eprosima::fastdds::dds::StatusCondition::get_impl
detail::StatusConditionImpl * get_impl() const
Definition StatusCondition.hpp:91
eprosima::fastdds::dds::StatusCondition::get_enabled_statuses
FASTDDS_EXPORTED_API const StatusMask & get_enabled_statuses() const
Retrieves the list of communication statuses that are taken into account to determine the trigger_val...
eprosima::fastdds::dds::StatusCondition::entity_
Entity * entity_
DDS Entity for which this condition is monitoring the status.
Definition StatusCondition.hpp:99
eprosima::fastdds::dds::StatusCondition::get_trigger_value
FASTDDS_EXPORTED_API bool get_trigger_value() const override
Retrieves the trigger_value of the Condition.
eprosima::fastdds::dds::StatusCondition::impl_
std::unique_ptr< detail::StatusConditionImpl > impl_
Class implementation.
Definition StatusCondition.hpp:102
eprosima::fastdds::dds::StatusCondition::~StatusCondition
~StatusCondition() final
eprosima::fastdds::dds::StatusCondition::StatusCondition
StatusCondition(Entity *parent)
eprosima::fastdds::dds::StatusCondition::get_entity
FASTDDS_EXPORTED_API Entity * get_entity() const
Returns the Entity associated.
eprosima::fastdds::dds::StatusCondition::set_enabled_statuses
FASTDDS_EXPORTED_API ReturnCode_t set_enabled_statuses(const StatusMask &mask)
Defines the list of communication statuses that are taken into account to determine the trigger_value...
eprosima::fastdds::dds::StatusMask
StatusMask is a bitmap or bitset field.
Definition StatusMask.hpp:48
eprosima::fastdds::dds::detail
Definition Condition.hpp:34
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::ReturnCode_t
int32_t ReturnCode_t
Definition DDSReturnCode.hpp:59
eprosima::fastdds
eprosima
eProsima namespace.