| Fast DDS Version 3.3.0 Fast DDS

Loading...
Searching...
No Matches
DataReaderListener.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_SUBSCRIBER__DATAREADERLISTENER_HPP
20#define FASTDDS_DDS_SUBSCRIBER__DATAREADERLISTENER_HPP
21
22#include <fastdds/dds/core/status/BaseStatus.hpp>
23#include <fastdds/dds/core/status/DeadlineMissedStatus.hpp>
24#include <fastdds/dds/core/status/IncompatibleQosStatus.hpp>
25#include <fastdds/dds/core/status/LivelinessChangedStatus.hpp>
26#include <fastdds/dds/core/status/SampleRejectedStatus.hpp>
27#include <fastdds/dds/core/status/SubscriptionMatchedStatus.hpp>
28#include <fastdds/fastdds_dll.hpp>
29
30 namespace eprosima {
31 namespace fastdds {
32 namespace dds {
33
34 class DataReader;
35
40 class DataReaderListener
41{
42 public:
43
47 FASTDDS_EXPORTED_API DataReaderListener()
48 {
49 }
50
54 FASTDDS_EXPORTED_API virtual ~DataReaderListener()
55 {
56 }
57
63 FASTDDS_EXPORTED_API virtual void on_data_available(
64 DataReader* reader)
65 {
66 (void)reader;
67 }
68
75 FASTDDS_EXPORTED_API virtual void on_subscription_matched(
76 DataReader* reader,
77 const fastdds::dds::SubscriptionMatchedStatus& info)
78 {
79 (void)reader;
80 (void)info;
81 }
82
89 FASTDDS_EXPORTED_API virtual void on_requested_deadline_missed(
90 DataReader* reader,
91 const RequestedDeadlineMissedStatus& status)
92 {
93 (void)reader;
94 (void)status;
95 }
96
103 FASTDDS_EXPORTED_API virtual void on_liveliness_changed(
104 DataReader* reader,
105 const LivelinessChangedStatus& status)
106 {
107 (void)reader;
108 (void)status;
109 }
110
117 FASTDDS_EXPORTED_API virtual void on_sample_rejected(
118 DataReader* reader,
119 const SampleRejectedStatus& status)
120 {
121 (void)reader;
122 (void)status;
123 }
124
131 FASTDDS_EXPORTED_API virtual void on_requested_incompatible_qos(
132 DataReader* reader,
133 const RequestedIncompatibleQosStatus& status)
134 {
135 (void)reader;
136 (void)status;
137 }
138
145 FASTDDS_EXPORTED_API virtual void on_sample_lost(
146 DataReader* reader,
147 const SampleLostStatus& status)
148 {
149 (void)reader;
150 (void)status;
151 }
152
153};
154
155} // namespace dds
156} // namespace fastdds
157} // namespace eprosima
158
159#endif // FASTDDS_DDS_SUBSCRIBER__DATAREADERLISTENER_HPP
eprosima::fastdds::dds::DataReader
Class DataReader, contains the actual implementation of the behaviour of the Subscriber.
Definition DataReader.hpp:83
eprosima::fastdds::dds::DataReaderListener::on_requested_deadline_missed
virtual FASTDDS_EXPORTED_API void on_requested_deadline_missed(DataReader *reader, const RequestedDeadlineMissedStatus &status)
Virtual method to be called when a topic misses the deadline period.
Definition DataReaderListener.hpp:89
eprosima::fastdds::dds::DataReaderListener::on_liveliness_changed
virtual FASTDDS_EXPORTED_API void on_liveliness_changed(DataReader *reader, const LivelinessChangedStatus &status)
Method called when the liveliness status associated to a subscriber changes.
Definition DataReaderListener.hpp:103
eprosima::fastdds::dds::DataReaderListener::on_sample_lost
virtual FASTDDS_EXPORTED_API void on_sample_lost(DataReader *reader, const SampleLostStatus &status)
Method called when a sample was lost.
Definition DataReaderListener.hpp:145
eprosima::fastdds::dds::DataReaderListener::~DataReaderListener
virtual FASTDDS_EXPORTED_API ~DataReaderListener()
Destructor.
Definition DataReaderListener.hpp:54
eprosima::fastdds::dds::DataReaderListener::DataReaderListener
FASTDDS_EXPORTED_API DataReaderListener()
Constructor.
Definition DataReaderListener.hpp:47
eprosima::fastdds::dds::DataReaderListener::on_data_available
virtual FASTDDS_EXPORTED_API void on_data_available(DataReader *reader)
Virtual function to be implemented by the user containing the actions to be performed when new Data M...
Definition DataReaderListener.hpp:63
eprosima::fastdds::dds::DataReaderListener::on_requested_incompatible_qos
virtual FASTDDS_EXPORTED_API void on_requested_incompatible_qos(DataReader *reader, const RequestedIncompatibleQosStatus &status)
Method called an incompatible QoS was requested.
Definition DataReaderListener.hpp:131
eprosima::fastdds::dds::DataReaderListener::on_subscription_matched
virtual FASTDDS_EXPORTED_API void on_subscription_matched(DataReader *reader, const fastdds::dds::SubscriptionMatchedStatus &info)
Virtual method to be called when the subscriber is matched with a new Writer (or unmatched); i....
Definition DataReaderListener.hpp:75
eprosima::fastdds::dds::DataReaderListener::on_sample_rejected
virtual FASTDDS_EXPORTED_API void on_sample_rejected(DataReader *reader, const SampleRejectedStatus &status)
Method called when a sample was rejected.
Definition DataReaderListener.hpp:117
eprosima::fastdds::dds
Definition BuiltinTopicKey.hpp:26
eprosima::fastdds::dds::RequestedIncompatibleQosStatus
IncompatibleQosStatus RequestedIncompatibleQosStatus
Alias of IncompatibleQosStatus.
Definition IncompatibleQosStatus.hpp:88
eprosima::fastdds::dds::RequestedDeadlineMissedStatus
DeadlineMissedStatus RequestedDeadlineMissedStatus
Typedef of DeadlineMissedStatus.
Definition DeadlineMissedStatus.hpp:59
eprosima::fastdds::dds::SampleLostStatus
BaseStatus SampleLostStatus
Alias of BaseStatus.
Definition BaseStatus.hpp:39
eprosima::fastdds
eprosima
eProsima namespace.
eprosima::fastdds::dds::LivelinessChangedStatus
A struct storing the liveliness changed status.
Definition LivelinessChangedStatus.hpp:30
eprosima::fastdds::dds::SampleRejectedStatus
A struct storing the sample rejected status.
Definition SampleRejectedStatus.hpp:45
eprosima::fastdds::dds::SubscriptionMatchedStatus
A structure storing the subscription status.
Definition SubscriptionMatchedStatus.hpp:33