Fast RTPS  Version 2.1.0
Fast RTPS
PublisherListener.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 PUBLISHERLISTENER_H_
20 #define PUBLISHERLISTENER_H_
21 
22 #include <fastrtps/rtps/common/MatchingInfo.h>
23 #include <fastrtps/qos/DeadlineMissedStatus.h>
24 #include <fastrtps/qos/LivelinessLostStatus.h>
25 
26 namespace eprosima {
27 namespace fastrtps {
28 
29 class Publisher;
30 
36 class RTPS_DllAPI PublisherListener
37 {
38 public:
40  virtual ~PublisherListener(){}
41 
47  virtual void onPublicationMatched(
48  Publisher* pub,
49  rtps::MatchingInfo& info)
50  {
51  (void)pub;
52  (void)info;
53  }
54 
61  Publisher* pub,
62  const OfferedDeadlineMissedStatus& status)
63  {
64  (void)pub;
65  (void)status;
66  }
67 
73  virtual void on_liveliness_lost(
74  Publisher* pub,
75  const LivelinessLostStatus& status)
76  {
77  (void)pub;
78  (void)status;
79  }
80 };
81 
82 } /* namespace rtps */
83 } /* namespace eprosima */
84 
85 #endif /* PUBLISHERLISTENER_H_ */
eprosima::fastrtps::Publisher
Class Publisher, used to send data to associated subscribers.
Definition: Publisher.h:47
eprosima::fastrtps::PublisherListener::onPublicationMatched
virtual void onPublicationMatched(Publisher *pub, rtps::MatchingInfo &info)
This method is called when the Publisher is matched (or unmatched) against an endpoint.
Definition: PublisherListener.h:47
eprosima::fastrtps::PublisherListener::~PublisherListener
virtual ~PublisherListener()
Definition: PublisherListener.h:40
eprosima::fastrtps::PublisherListener::on_offered_deadline_missed
virtual void on_offered_deadline_missed(Publisher *pub, const OfferedDeadlineMissedStatus &status)
A method called when a deadline is missed.
Definition: PublisherListener.h:60
eprosima::fastrtps::PublisherListener
Class PublisherListener, allows the end user to implement callbacks triggered by certain events.
Definition: PublisherListener.h:37
eprosima
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
eprosima::fastrtps::PublisherListener::PublisherListener
PublisherListener()
Definition: PublisherListener.h:39
eprosima::fastrtps::OfferedDeadlineMissedStatus
DeadlineMissedStatus OfferedDeadlineMissedStatus
Definition: DeadlineMissedStatus.h:31
eprosima::fastrtps::PublisherListener::on_liveliness_lost
virtual void on_liveliness_lost(Publisher *pub, const LivelinessLostStatus &status)
Method called when the livelivess of a publisher is lost.
Definition: PublisherListener.h:73