forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTransportMonitorImpl.h
48 lines (37 loc) · 1.13 KB
/
TransportMonitorImpl.h
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
/*
*
*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/
#ifndef OPENDDS_MONITOR_TRANSPORTMONITORIMPL_H
#define OPENDDS_MONITOR_TRANSPORTMONITORIMPL_H
#include "monitor_export.h"
#include "dds/DCPS/MonitorFactory.h"
#include "monitorTypeSupportImpl.h"
#include "ace/Recursive_Thread_Mutex.h"
#include <vector>
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
namespace OpenDDS {
namespace DCPS {
class TransportMonitorImpl : public Monitor {
public:
TransportMonitorImpl(TransportImpl* transport,
OpenDDS::DCPS::TransportReportDataWriter_ptr transport_writer);
virtual ~TransportMonitorImpl();
virtual void report();
private:
OpenDDS::DCPS::TransportReportDataWriter_var transport_writer_;
std::string hostname_;
pid_t pid_;
typedef std::vector<TransportReport> TransportReportVec;
static ACE_Recursive_Thread_Mutex queue_lock_;
static TransportReportVec queue_;
};
} // namespace DCPS
} // namespace OpenDDS
OPENDDS_END_VERSIONED_NAMESPACE_DECL
#endif /* OPENDDS_DCPS_TRANSPORT_MONITOR_IMPL_H */