| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
ReadCondition.hpp
1// Copyright 2022 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_SUBSCRIBER__READCONDITION_HPP
20#define FASTDDS_DDS_SUBSCRIBER__READCONDITION_HPP
21
22#include <cassert>
23
24#include <fastdds/dds/core/condition/Condition.hpp>
25#include <fastdds/dds/subscriber/InstanceState.hpp>
26#include <fastdds/dds/subscriber/SampleState.hpp>
27#include <fastdds/dds/subscriber/ViewState.hpp>
28#include <fastdds/fastdds_dll.hpp>
29
30 namespace eprosima {
31 namespace fastdds {
32 namespace dds {
33
34 namespace detail {
35
36 class ReadConditionImpl;
37
38} // namespace detail
39
40 class DataReader;
41
51 class ReadCondition : public Condition
52{
53 friend class detail::ReadConditionImpl;
54
55 public:
56
57 ReadCondition();
58
59 ~ReadCondition() override;
60
61 // Non-copyable
62 ReadCondition(
63 const ReadCondition&) = delete;
64 ReadCondition& operator =(
65 const ReadCondition&) = delete;
66
67 // Non-movable
68 ReadCondition(
69 ReadCondition&&) = delete;
70 ReadCondition& operator =(
71 ReadCondition&&) = delete;
72
77 FASTDDS_EXPORTED_API bool get_trigger_value() const noexcept override;
78
86 FASTDDS_EXPORTED_API DataReader* get_datareader() const noexcept;
87
93 FASTDDS_EXPORTED_API SampleStateMask get_sample_state_mask() const noexcept;
94
100 FASTDDS_EXPORTED_API ViewStateMask get_view_state_mask() const noexcept;
101
107 FASTDDS_EXPORTED_API InstanceStateMask get_instance_state_mask() const noexcept;
108
109 detail::ReadConditionImpl* get_impl() const noexcept
110 {
111 assert((bool)impl_);
112 return impl_.get();
113 }
114
115 protected:
116
118 std::shared_ptr<detail::ReadConditionImpl> impl_;
119
120};
121
122} // namespace dds
123} // namespace fastdds
124} // namespace eprosima
125
126#endif // FASTDDS_DDS_SUBSCRIBER__READCONDITION_HPP
eprosima::fastdds::dds::Condition::Condition
Condition()
eprosima::fastdds::dds::DataReader
Class DataReader, contains the actual implementation of the behaviour of the Subscriber.
Definition DataReader.hpp:83
eprosima::fastdds::dds::ReadCondition::ReadConditionImpl
friend class detail::ReadConditionImpl
Definition ReadCondition.hpp:53
eprosima::fastdds::dds::ReadCondition::impl_
std::shared_ptr< detail::ReadConditionImpl > impl_
Class implementation.
Definition ReadCondition.hpp:118
eprosima::fastdds::dds::ReadCondition::~ReadCondition
~ReadCondition() override
eprosima::fastdds::dds::ReadCondition::ReadCondition
ReadCondition()
eprosima::fastdds::dds::ReadCondition::get_instance_state_mask
FASTDDS_EXPORTED_API InstanceStateMask get_instance_state_mask() const noexcept
Retrieves the set of instance_states taken into account to determine the trigger_value of this condit...
eprosima::fastdds::dds::ReadCondition::ReadCondition
ReadCondition(ReadCondition &&)=delete
eprosima::fastdds::dds::ReadCondition::get_sample_state_mask
FASTDDS_EXPORTED_API SampleStateMask get_sample_state_mask() const noexcept
Retrieves the set of sample_states taken into account to determine the trigger_value of this conditio...
eprosima::fastdds::dds::ReadCondition::get_impl
detail::ReadConditionImpl * get_impl() const noexcept
Definition ReadCondition.hpp:109
eprosima::fastdds::dds::ReadCondition::ReadCondition
ReadCondition(const ReadCondition &)=delete
eprosima::fastdds::dds::ReadCondition::get_view_state_mask
FASTDDS_EXPORTED_API ViewStateMask get_view_state_mask() const noexcept
Retrieves the set of view_states taken into account to determine the trigger_value of this condition.
eprosima::fastdds::dds::ReadCondition::operator=
ReadCondition & operator=(const ReadCondition &)=delete
eprosima::fastdds::dds::ReadCondition::get_datareader
FASTDDS_EXPORTED_API DataReader * get_datareader() const noexcept
Retrieves the DataReader associated with the ReadCondition.
eprosima::fastdds::dds::ReadCondition::get_trigger_value
FASTDDS_EXPORTED_API bool get_trigger_value() const noexcept override
Retrieves the trigger_value of the Condition.
eprosima::fastdds::dds::detail
Definition Condition.hpp:34
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::SampleStateMask
uint16_t SampleStateMask
A bit-mask (list) of sample states, i.e. SampleStateKind.
Definition SampleState.hpp:51
eprosima::fastdds::dds::ViewStateMask
uint16_t ViewStateMask
A bit-mask (list) of view states, i.e. ViewStateKind.
Definition ViewState.hpp:62
eprosima::fastdds::dds::InstanceStateMask
uint16_t InstanceStateMask
A bit-mask (list) of instance states, i.e. InstanceStateKind.
Definition InstanceState.hpp:75
eprosima::fastdds
eprosima
eProsima namespace.