-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataReaderListener.h
More file actions
executable file
·74 lines (57 loc) · 1.83 KB
/
DataReaderListener.h
File metadata and controls
executable file
·74 lines (57 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
*
*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/
#ifndef DATAREADER_LISTENER_IMPL
#define DATAREADER_LISTENER_IMPL
#include "MessengerTypeSupportImpl.h"
#include <dds/DdsDcpsSubscriptionC.h>
#if !defined(ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
class DataReaderListenerImpl
: public virtual OpenDDS::DCPS::LocalObject<DDS::DataReaderListener>
{
public:
DataReaderListenerImpl(Messenger::MessageDataWriter_var *dataWriter);
DataReaderListenerImpl();
virtual ~DataReaderListenerImpl();
virtual void on_requested_deadline_missed(
DDS::DataReader_ptr reader,
const DDS::RequestedDeadlineMissedStatus &status);
virtual void on_requested_incompatible_qos(
DDS::DataReader_ptr reader,
const DDS::RequestedIncompatibleQosStatus &status);
virtual void on_liveliness_changed(
DDS::DataReader_ptr reader,
const DDS::LivelinessChangedStatus &status);
virtual void on_subscription_matched(
DDS::DataReader_ptr reader,
const DDS::SubscriptionMatchedStatus &status);
virtual void on_sample_rejected(
DDS::DataReader_ptr reader,
const DDS::SampleRejectedStatus &status);
virtual void on_data_available(
DDS::DataReader_ptr reader);
virtual void on_sample_lost(
DDS::DataReader_ptr reader,
const DDS::SampleLostStatus &status);
long num_reads() const
{
return num_reads_;
}
static bool is_reliable();
private:
typedef std::set<CORBA::Long> Counts;
DDS::DataReader_var reader_;
long num_reads_;
Counts counts_;
bool valid_;
const bool reliable_;
Messenger::MessageDataWriter_var *m_dataWriter;
Messenger::Message message;
DDS::SampleInfo si;
};
#endif /* DATAREADER_LISTENER_IMPL */