Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Client_Group.cpp
blob9e69761b5289e64725e7b3b522ed38ea1d0874b1
1 /**
2 * @file Client_Group.cpp
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #include "Client_Group.h"
8 #include "Auto_Disconnect.h"
10 #if !defined(__ACE_INLINE__)
11 #include "Client_Group.inl"
12 #endif /* __ACE_INLINE__ */
14 void
15 Client_Group::init (CORBA::Long experiment_id,
16 CORBA::Long base_event_type,
17 CORBA::ULong iterations,
18 CORBA::Long workload_in_usecs,
19 ACE_High_Res_Timer::global_scale_factor_type gsf,
20 PortableServer::POA_ptr supplier_poa,
21 PortableServer::POA_ptr consumer_poa)
23 this->init (experiment_id, base_event_type, 1,
24 iterations, workload_in_usecs, gsf,
25 supplier_poa, consumer_poa);
28 void
29 Client_Group::init (CORBA::Long experiment_id,
30 CORBA::Long base_event_type,
31 CORBA::Long event_type_range,
32 CORBA::ULong iterations,
33 CORBA::Long workload_in_usecs,
34 ACE_High_Res_Timer::global_scale_factor_type gsf,
35 PortableServer::POA_ptr supplier_poa,
36 PortableServer::POA_ptr consumer_poa)
38 this->client_pair_.init (experiment_id,
39 base_event_type,
40 event_type_range,
41 iterations,
42 workload_in_usecs,
43 gsf,
44 supplier_poa,
45 consumer_poa);
46 this->loopback_pair_.init (experiment_id, base_event_type,
47 supplier_poa, consumer_poa);
50 void
51 Client_Group::connect (RtecEventChannelAdmin::EventChannel_ptr ec)
53 this->client_pair_.connect (ec);
54 Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_);
56 this->loopback_pair_.connect (ec);
57 Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_);
59 loopback_pair_disconnect.release ();
60 client_pair_disconnect.release ();
63 void
64 Client_Group::disconnect (void)
66 Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_);
67 Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_);