2 * @file Loopback_Pair.h
4 * @author Carlos O'Ryan <coryan@uci.edu>
7 #ifndef TAO_PERF_RTEC_LOOPBACK_PAIR_H
8 #define TAO_PERF_RTEC_LOOPBACK_PAIR_H
10 #include "Servant_var.h"
12 #if !defined (ACE_LACKS_PRAGMA_ONCE)
14 #endif /* ACE_LACKS_PRAGMA_ONCE */
16 #include "Loopback_Supplier.h"
17 #include "Loopback_Consumer.h"
20 * @class Loopback_Pair
22 * @brief Simplify the initialization of a Loopback connection through
25 class TAO_RTEC_Perf_Export Loopback_Pair
30 * We need a default constructor because this class is often used in
36 * @param experiment_id For tests that run multiple experiments
37 * this number is changed on each iteration, guaranteeing
39 * @param base_event_type The event type generated by the supplier.
40 * The Loopback_Consumer consumes the same event, the
41 * Loopback_Supplier generates (base_event_type + 1), and the
42 * consumer subscribes for that type too.
43 * @param iterations The number of iterations expected on the test.
44 * @param workload_in_usecs The consumer workload, in microseconds.
45 * @param gsf The high resolution timer global scale factor.
48 void init (CORBA::Long experiment_id
,
49 CORBA::Long base_event_type
,
50 PortableServer::POA_ptr supplier_poa
,
51 PortableServer::POA_ptr consumer_poa
);
53 /// Connect to the event channel
54 void connect (RtecEventChannelAdmin::EventChannel_ptr ec
);
56 /// Disconnect from the event channel
57 void disconnect (void);
62 Loopback_Supplier
*loopback_supplier (void) const;
64 Loopback_Consumer
*loopback_consumer (void) const;
68 Servant_var
<Loopback_Supplier
> loopback_supplier_
;
69 Servant_var
<Loopback_Consumer
> loopback_consumer_
;
72 #if defined(__ACE_INLINE__)
73 #include "Loopback_Pair.inl"
74 #endif /* __ACE_INLINE__ */
76 #endif /* TAO_PERF_RTEC_LOOPBACK_PAIR_H */