OpenDDS  Snapshot(2023/04/28-20:55)
MonitorFactoryImpl.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_MONITOR_MONITORFACTORYIMPL_H
9 #define OPENDDS_MONITOR_MONITORFACTORYIMPL_H
10 
11 #include "monitor_export.h"
13 #include "monitorTypeSupportImpl.h"
14 
15 #if !defined (ACE_LACKS_PRAGMA_ONCE)
16 #pragma once
17 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 
20 
21 namespace OpenDDS {
22 namespace DCPS {
23 
24 class Monitor;
25 /**
26 * @class MonitorFactoryImpl
27 *
28 * @brief Full implementation of the MonitorFactoryImpl
29 *
30 * Full version of this library is implemented by the monitor lib.
31 */
33  : public MonitorFactory {
34 public:
36 
37  virtual ~MonitorFactoryImpl();
38 
39  /// Factory function to create a service participant monitor object
40  virtual Monitor* create_sp_monitor(Service_Participant* sp);
41 
42  /// Factory function to create a domain participant monitor object
43  virtual Monitor* create_dp_monitor(DomainParticipantImpl* dp);
44 
45  /// Factory function to create a topic monitor object
46  virtual Monitor* create_topic_monitor(TopicImpl* topic);
47 
48  /// Factory function to create a publisher monitor object
49  virtual Monitor* create_publisher_monitor(PublisherImpl* publisher);
50 
51  /// Factory function to create a subscriber monitor object
52  virtual Monitor* create_subscriber_monitor(SubscriberImpl* subscriber);
53 
54  /// Factory function to create a data writer monitor object
55  virtual Monitor* create_data_writer_monitor(DataWriterImpl* dw);
56 
57  /// Factory function to create a data writer periodic monitor object
58  virtual Monitor* create_data_writer_periodic_monitor(DataWriterImpl* dw);
59 
60  /// Factory function to create a data reader monitor object
61  virtual Monitor* create_data_reader_monitor(DataReaderImpl* dr);
62 
63  /// Factory function to create a data reader periodic monitor object
64  virtual Monitor* create_data_reader_periodic_monitor(DataReaderImpl* dr);
65 
66  /// Factory function to create a transport monitor object
67  virtual Monitor* create_transport_monitor(TransportImpl* transport);
68 
69  virtual void initialize();
70 
71  virtual void deinitialize();
72 
73  ServiceParticipantReportDataWriter_ptr get_sp_writer();
74 
75  static int service_initialize();
76 
77 private:
78  DDS::DataWriter_ptr create_data_writer(DDS::DomainParticipant_ptr participant,
79  DDS::Publisher_ptr publisher,
80  const char* type_name,
81  const char* topic_name,
82  const DDS::DataWriterQos& dw_qos);
83 
84  DDS::DomainParticipant_var participant_;
85  ServiceParticipantReportDataWriter_var sp_writer_;
86  DomainParticipantReportDataWriter_var dp_writer_;
87  TopicReportDataWriter_var topic_writer_;
88  PublisherReportDataWriter_var pub_writer_;
89  SubscriberReportDataWriter_var sub_writer_;
90  DataWriterReportDataWriter_var dw_writer_;
91  DataWriterPeriodicReportDataWriter_var dw_per_writer_;
92  DataReaderReportDataWriter_var dr_writer_;
93  DataReaderPeriodicReportDataWriter_var dr_per_writer_;
94  TransportReportDataWriter_var transport_writer_;
95 };
96 
99 
100 } // namespace DCPS
101 } // namespace OpenDDS
102 
103 
105 ACE_FACTORY_DECLARE (OpenDDS_monitor, MonitorFactoryImpl)
106 
108 
109 #endif /* OPENDDS_DCPS_MONITOR_FACTORY_IMPL_H */
Implements the OpenDDS::DCPS::DomainParticipant interfaces.
Null implementation of the MonitorFactory.
PublisherReportDataWriter_var pub_writer_
DataReaderPeriodicReportDataWriter_var dr_per_writer_
DomainParticipantReportDataWriter_var dp_writer_
ServiceParticipantReportDataWriter_var sp_writer_
#define ACE_STATIC_SVC_DECLARE(SERVICE_CLASS)
DDS::DomainParticipant_var participant_
DataReaderReportDataWriter_var dr_writer_
Implements the OpenDDS::DCPS::Publisher interfaces.
Definition: PublisherImpl.h:38
Implements the DDS::Topic interface.
Definition: TopicImpl.h:37
TransportReportDataWriter_var transport_writer_
DataWriterPeriodicReportDataWriter_var dw_per_writer_
Implements the OpenDDS::DCPS::DataWriterRemote interfaces and DDS::DataWriter interfaces.
#define OpenDDS_monitor_Export
static int OpenDDS_Requires_MonitorFactoryImpl_Initializer
Implements the DDS::DataReader interface.
DataWriterReportDataWriter_var dw_writer_
TopicReportDataWriter_var topic_writer_
#define ACE_FACTORY_DECLARE(CLS, SERVICE_CLASS)
Full implementation of the MonitorFactoryImpl.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
SubscriberReportDataWriter_var sub_writer_
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28