Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
SubscriberListener.h
1// Copyright 2016 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 SUBLISTENER_H_
20#define SUBLISTENER_H_
21
22#include <fastrtps/fastrtps_dll.h>
23#include <fastrtps/qos/DeadlineMissedStatus.h>
24#include <fastrtps/qos/LivelinessChangedStatus.h>
25
26namespace eprosima {
27namespace fastrtps {
28
29namespace rtps {
30class MatchingInfo;
31} /* namespace rtps */
32
33class Subscriber;
34
40class RTPS_DllAPI SubscriberListener
41{
42 public:
43
45
47
52 virtual void onNewDataMessage(Subscriber* sub)
53 {
54 (void)sub;
55 }
56
63 Subscriber* sub,
64 rtps::MatchingInfo& info)
65 {
66 (void)sub;
67 (void)info;
68 }
69
76 Subscriber* sub,
78 {
79 (void)sub;
80 (void)status;
81 }
82
89 Subscriber* sub,
90 const LivelinessChangedStatus& status)
91 {
92 (void)sub;
93 (void)status;
94 }
95
96};
97
98} /* namespace fastrtps */
99} /* namespace eprosima */
100
101#endif /* LISTENER_H_ */
Class Subscriber, contains the public API that allows the user to control the reception of messages.
Definition Subscriber.h:44
Class SubscriberListener, it should be used by the end user to implement specific callbacks to certai...
Definition SubscriberListener.h:41
virtual void on_requested_deadline_missed(Subscriber *sub, const RequestedDeadlineMissedStatus &status)
Virtual method to be called when a topic misses the deadline period.
Definition SubscriberListener.h:75
virtual void onSubscriptionMatched(Subscriber *sub, rtps::MatchingInfo &info)
Virtual method to be called when the subscriber is matched with a new Writer (or unmatched); i....
Definition SubscriberListener.h:62
virtual void on_liveliness_changed(Subscriber *sub, const LivelinessChangedStatus &status)
Method called when the liveliness status associated to a subscriber changes.
Definition SubscriberListener.h:88
SubscriberListener()
Definition SubscriberListener.h:44
virtual void onNewDataMessage(Subscriber *sub)
Virtual function to be implemented by the user containing the actions to be performed when a new Data...
Definition SubscriberListener.h:52
virtual ~SubscriberListener()
Definition SubscriberListener.h:46
DeadlineMissedStatus RequestedDeadlineMissedStatus
Definition DeadlineMissedStatus.h:30
fastdds::dds::LivelinessChangedStatus LivelinessChangedStatus
Definition LivelinessChangedStatus.h:27
eProsima namespace.
Definition LibrarySettingsAttributes.h:23