Fast DDS  Version 3.1.2
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
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
30namespace eprosima {
31namespace fastdds {
32namespace dds {
33
34class DataReader;
35
41{
42public:
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,
78 {
79 (void)reader;
80 (void)info;
81 }
82
89 FASTDDS_EXPORTED_API virtual void on_requested_deadline_missed(
90 DataReader* reader,
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
Class DataReader, contains the actual implementation of the behaviour of the Subscriber.
Definition DataReader.hpp:82
Class DataReaderListener, it should be used by the end user to implement specific callbacks to certai...
Definition DataReaderListener.hpp:41
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
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
virtual FASTDDS_EXPORTED_API void on_sample_lost(DataReader *reader, const SampleLostStatus &status)
Method called when a sample was lost.
Definition DataReaderListener.hpp:145
virtual FASTDDS_EXPORTED_API ~DataReaderListener()
Destructor.
Definition DataReaderListener.hpp:54
FASTDDS_EXPORTED_API DataReaderListener()
Constructor.
Definition DataReaderListener.hpp:47
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
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
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
virtual FASTDDS_EXPORTED_API void on_sample_rejected(DataReader *reader, const SampleRejectedStatus &status)
Method called when a sample was rejected.
Definition DataReaderListener.hpp:117
Definition DomainParticipant.hpp:45
eProsima namespace.
A struct storing the base status.
Definition BaseStatus.hpp:30
A struct storing the deadline status.
Definition DeadlineMissedStatus.hpp:31
A struct storing the requested incompatible QoS status.
Definition IncompatibleQosStatus.hpp:61
A struct storing the liveliness changed status.
Definition LivelinessChangedStatus.hpp:30
A struct storing the sample rejected status.
Definition SampleRejectedStatus.hpp:45
A structure storing the subscription status.
Definition SubscriptionMatchedStatus.hpp:33