Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Supplier.h
blobb60a44281bc23931264cab13dcec5f15d6119cb7
1 /**
2 * @file Supplier.h
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #ifndef TAO_PERF_RTEC_SUPPLIER_H
8 #define TAO_PERF_RTEC_SUPPLIER_H
10 #include "rtec_perf_export.h"
11 #include "orbsvcs/RtecEventCommS.h"
12 #include "orbsvcs/RtecEventChannelAdminC.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 # pragma once
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 /**
19 * @class Supplier
21 * @brief Implement a simple supplier to keep track of the latency
23 class TAO_RTEC_Perf_Export Supplier
24 : public virtual POA_RtecEventComm::PushSupplier
26 public:
27 /// Constructor
28 /**
29 * The experiment ID is used to configure the supplier ID on the
30 * publication.
32 Supplier (CORBA::Long experiment_id,
33 CORBA::Long event_type,
34 CORBA::Long event_range,
35 PortableServer::POA_ptr poa);
37 /// Connect to the event channel
38 void connect (RtecEventChannelAdmin::EventChannel_ptr ec);
40 /// Disconnect from the event channel
41 void disconnect (void);
43 void push (const RtecEventComm::EventSet &events);
45 //@{
46 /** @name The RtecEventComm::PushSupplier methods
48 virtual void disconnect_push_supplier (void);
49 virtual PortableServer::POA_ptr _default_POA (void);
50 //@}
52 private:
53 /// The experiment id
54 /// Synchronize access to the internal data
55 TAO_SYNCH_MUTEX mutex_;
57 /// The experiment id
58 CORBA::Long experiment_id_;
60 /// The event type
61 CORBA::Long event_type_;
63 /// The event type
64 CORBA::Long event_range_;
66 /// The proxy this object is connected to
67 RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_;
69 /// The default poa
70 PortableServer::POA_var default_POA_;
73 #endif /* TAO_PERF_RTEC_SUPPLIER_H */