1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/**
* @file Client_Group.cpp
*
* $Id$
*
* @author Carlos O'Ryan <coryan@uci.edu>
*/
#include "Client_Group.h"
#include "Auto_Disconnect.h"
#if !defined(__ACE_INLINE__)
#include "Client_Group.inl"
#endif /* __ACE_INLINE__ */
void
Client_Group::init (CORBA::Long experiment_id,
CORBA::Long base_event_type,
CORBA::ULong iterations,
CORBA::Long workload_in_usecs,
ACE_High_Res_Timer::global_scale_factor_type gsf,
PortableServer::POA_ptr supplier_poa,
PortableServer::POA_ptr consumer_poa)
{
this->init (experiment_id, base_event_type, 1,
iterations, workload_in_usecs, gsf,
supplier_poa, consumer_poa);
}
void
Client_Group::init (CORBA::Long experiment_id,
CORBA::Long base_event_type,
CORBA::Long event_type_range,
CORBA::ULong iterations,
CORBA::Long workload_in_usecs,
ACE_High_Res_Timer::global_scale_factor_type gsf,
PortableServer::POA_ptr supplier_poa,
PortableServer::POA_ptr consumer_poa)
{
this->client_pair_.init (experiment_id,
base_event_type,
event_type_range,
iterations,
workload_in_usecs,
gsf,
supplier_poa,
consumer_poa);
this->loopback_pair_.init (experiment_id, base_event_type,
supplier_poa, consumer_poa);
}
void
Client_Group::connect (RtecEventChannelAdmin::EventChannel_ptr ec)
{
this->client_pair_.connect (ec);
Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_);
this->loopback_pair_.connect (ec);
Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_);
loopback_pair_disconnect.release ();
client_pair_disconnect.release ();
}
void
Client_Group::disconnect (void)
{
Auto_Disconnect<Client_Pair> client_pair_disconnect (&this->client_pair_);
Auto_Disconnect<Loopback_Pair> loopback_pair_disconnect (&this->loopback_pair_);
}
|