Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Client_Group.h
blob9771c9565a044dbf2711fcfaaf4400b8b89e4a8d
1 /**
2 * @file Client_Group.h
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #ifndef TAO_PERF_RTEC_CLIENT_GROUP_H
8 #define TAO_PERF_RTEC_CLIENT_GROUP_H
10 #include "Servant_var.h"
12 #if !defined (ACE_LACKS_PRAGMA_ONCE)
13 # pragma once
14 #endif /* ACE_LACKS_PRAGMA_ONCE */
16 #include "Client_Pair.h"
17 #include "Loopback_Pair.h"
19 /**
20 * @class Client_Group
22 * @brief Simplify the initialization of a Supplier/Consumer pair
23 * connected through a Loopback.
25 class TAO_RTEC_Perf_Export Client_Group
27 public:
28 /// Constructor
29 /**
30 * We need a default constructor because this class is often used in
31 * arrays.
33 Client_Group ();
35 /// Initialize the consumer/supplier pair(s)
36 /**
37 * @param experiment_id For tests that run multiple experiments
38 * this number is changed on each iteration, guaranteeing
39 * better isolation.
40 * @param base_event_type The event type generated by the supplier.
41 * The Loopback_Consumer consumes the same event, the
42 * Loopback_Supplier generates (base_event_type + 1), and the
43 * consumer subscribes for that type too.
44 * @param iterations The number of iterations expected on the test.
45 * @param workload_in_usecs The consumer workload, in microseconds.
46 * @param gsf The high resolution timer global scale factor.
49 void init (CORBA::Long experiment_id,
50 CORBA::Long base_event_type,
51 CORBA::ULong iterations,
52 CORBA::Long workload_in_usecs,
53 ACE_High_Res_Timer::global_scale_factor_type gsf,
54 PortableServer::POA_ptr supplier_poa,
55 PortableServer::POA_ptr consumer_poa);
57 /// Initialize the consumer/supplier pair(s)
58 /**
59 * @param event_type_range The supplier declares more events than it
60 * generates.
62 void init (CORBA::Long experiment_id,
63 CORBA::Long base_event_type,
64 CORBA::Long base_event_type_range,
65 CORBA::ULong iterations,
66 CORBA::Long workload_in_usecs,
67 ACE_High_Res_Timer::global_scale_factor_type gsf,
68 PortableServer::POA_ptr supplier_poa,
69 PortableServer::POA_ptr consumer_poa);
71 /// Connect to the event channel
72 void connect (RtecEventChannelAdmin::EventChannel_ptr ec);
74 /// Disconnect from the event channel
75 void disconnect ();
77 //@{
78 /** @name Accessors
80 Supplier *supplier () const;
82 Consumer *consumer () const;
84 Loopback_Supplier *loopback_supplier () const;
86 Loopback_Consumer *loopback_consumer () const;
87 //@}
89 private:
90 Client_Pair client_pair_;
91 Loopback_Pair loopback_pair_;
94 #if defined(__ACE_INLINE__)
95 #include "Client_Group.inl"
96 #endif /* __ACE_INLINE__ */
98 #endif /* TAO_PERF_RTEC_CLIENT_GROUP_H */