2 * @file Client_Pair.cpp
4 * @author Carlos O'Ryan <coryan@uci.edu>
7 #include "Client_Pair.h"
8 #include "Auto_Disconnect.h"
10 #if !defined(__ACE_INLINE__)
11 #include "Client_Pair.inl"
12 #endif /* __ACE_INLINE__ */
15 Client_Pair::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 const CORBA::Long source_event_range
= 1;
24 this->init (experiment_id
,
35 Client_Pair::init (CORBA::Long experiment_id
,
36 CORBA::Long base_event_type
,
37 CORBA::Long source_event_range
,
38 CORBA::ULong iterations
,
39 CORBA::Long workload_in_usecs
,
40 ACE_High_Res_Timer::global_scale_factor_type gsf
,
41 PortableServer::POA_ptr supplier_poa
,
42 PortableServer::POA_ptr consumer_poa
)
44 this->supplier_
= new Supplier (experiment_id
,
45 base_event_type
, source_event_range
,
47 this->consumer_
= new Consumer (experiment_id
,
56 Client_Pair::connect (RtecEventChannelAdmin::EventChannel_ptr ec
)
58 this->supplier_
->connect (ec
);
59 Auto_Disconnect
<Supplier
> supplier_disconnect (this->supplier_
);
61 this->consumer_
->connect (ec
);
62 Auto_Disconnect
<Consumer
> consumer_disconnect (this->consumer_
);
64 consumer_disconnect
.release ();
65 supplier_disconnect
.release ();
69 Client_Pair::disconnect ()
71 Auto_Disconnect
<Supplier
> supplier_disconnect (this->supplier_
);
72 Auto_Disconnect
<Consumer
> consumer_disconnect (this->consumer_
);