2 * @file Loopback_Supplier.h
4 * @author Carlos O'Ryan <coryan@uci.edu>
7 #ifndef TAO_RTEC_LOOPBACK_SUPPLIER_H
8 #define TAO_RTEC_LOOPBACK_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)
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
19 * @class Loopback_Supplier
21 * @brief Implement a simple supplier to keep track of the latency
23 class TAO_RTEC_Perf_Export Loopback_Supplier
24 : public virtual POA_RtecEventComm::PushSupplier
29 * The experiment ID is used to configure the supplier ID on the
32 Loopback_Supplier (CORBA::Long experiment_id
,
33 CORBA::Long response_type
,
34 PortableServer::POA_ptr poa
);
36 /// Connect to the event channel
37 void connect (RtecEventChannelAdmin::EventChannel_ptr ec
);
39 /// Disconnect from the event channel
40 void disconnect (void);
42 void push (const RtecEventComm::EventSet
&events
);
45 /** @name The RtecEventComm::PushSupplier methods
47 virtual void disconnect_push_supplier (void);
48 virtual PortableServer::POA_ptr
_default_POA (void);
53 /// Synchronize access to the internal data
54 TAO_SYNCH_MUTEX mutex_
;
57 CORBA::Long experiment_id_
;
59 /// The response event type
60 CORBA::Long response_type_
;
62 /// The proxy this object is connected to
63 RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_
;
66 PortableServer::POA_var default_POA_
;
68 /// Count the number of events processed
69 CORBA::ULong counter_
;
72 #endif /* TAO_RTEC_LOOPBACK_SUPPLIER_H */