OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
DataReaderListener.hpp
Go to the documentation of this file.
1 #ifndef OMG_DDS_SUB_DATA_READER_LISTENER_HPP_
2 #define OMG_DDS_SUB_DATA_READER_LISTENER_HPP_
3 
4 /* Copyright 2010, Object Management Group, Inc.
5  * Copyright 2010, PrismTech, Corp.
6  * Copyright 2010, Real-Time Innovations, Inc.
7  * All rights reserved.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
23 
24 namespace dds
25 {
26 namespace sub
27 {
28 template <typename T>
29 class DataReaderListener;
30 
31 template <typename T>
33 }
34 }
35 
127 template <typename T>
129 {
130 public:
132  typedef typename ::dds::core::smart_ptr_traits<DataReaderListener>::ref_type ref_type;
135 public:
137  virtual ~DataReaderListener() { }
140 public:
158  virtual void on_requested_deadline_missed(
159  DataReader<T>& reader,
161 
185  virtual void on_requested_incompatible_qos(
186  DataReader<T>& reader,
188 
209  virtual void on_sample_rejected(
210  DataReader<T>& reader,
211  const dds::core::status::SampleRejectedStatus& status) = 0;
212 
231  virtual void on_liveliness_changed(
232  DataReader<T>& reader,
234 
265  virtual void on_data_available(DataReader<T>& reader) = 0;
266 
293  virtual void on_subscription_matched(
294  DataReader<T>& reader,
296 
305  virtual void on_sample_lost(
306  DataReader<T>& reader,
307  const dds::core::status::SampleLostStatus& status) = 0;
308 };
309 
310 
327 template <typename T>
329 {
334 public:
335  typedef typename ::dds::core::smart_ptr_traits<NoOpDataReaderListener>::ref_type ref_type;
336 
337 public:
338  virtual ~NoOpDataReaderListener() { }
339 
340 public:
341  virtual void on_requested_deadline_missed(
342  DataReader<T>& reader,
344 
345  virtual void on_requested_incompatible_qos(
346  DataReader<T>& reader,
348 
349  virtual void on_sample_rejected(
350  DataReader<T>& reader,
351  const dds::core::status::SampleRejectedStatus& status) { }
352 
353  virtual void on_liveliness_changed(
354  DataReader<T>& reader,
356 
357  virtual void on_data_available(DataReader<T>& reader) { }
358 
359  virtual void on_subscription_matched(
360  DataReader<T>& reader,
362 
363  virtual void on_sample_lost(
364  DataReader<T>& reader,
365  const dds::core::status::SampleLostStatus& status) { }
367 };
368 
369 #endif /* OMG_DDS_SUB_DATA_READER_LISTENER_HPP_ */
DataReader events Listener.
Definition: DataReader.hpp:37
DataReader events Listener.
virtual void on_data_available(DataReader< T > &reader)=0
virtual void on_sample_rejected(DataReader< T > &reader, const dds::core::status::SampleRejectedStatus &status)=0
virtual void on_requested_deadline_missed(DataReader< T > &reader, const dds::core::status::RequestedDeadlineMissedStatus &status)=0
DataReader allows the applicatin to access published sample data.
Definition: DataReader.hpp:34
virtual void on_requested_incompatible_qos(DataReader< T > &reader, const dds::core::status::RequestedIncompatibleQosStatus &status)=0
virtual void on_liveliness_changed(DataReader< T > &reader, const dds::core::status::LivelinessChangedStatus &status)=0
virtual void on_sample_lost(DataReader< T > &reader, const dds::core::status::SampleLostStatus &status)=0
Definition: array.hpp:23
virtual void on_subscription_matched(DataReader< T > &reader, const dds::core::status::SubscriptionMatchedStatus &status)=0