2 * @file Loopback_Pair.cpp
4 * @author Carlos O'Ryan <coryan@uci.edu>
7 #include "Loopback_Pair.h"
8 #include "Auto_Disconnect.h"
10 #if !defined(__ACE_INLINE__)
11 #include "Loopback_Pair.inl"
12 #endif /* __ACE_INLINE__ */
15 Loopback_Pair::init (CORBA::Long experiment_id
,
16 CORBA::Long base_event_type
,
17 PortableServer::POA_ptr supplier_poa
,
18 PortableServer::POA_ptr consumer_poa
)
20 this->loopback_supplier_
= new Loopback_Supplier (experiment_id
,
23 this->loopback_consumer_
= new Loopback_Consumer (experiment_id
,
25 loopback_supplier_
.in (),
30 Loopback_Pair::connect (RtecEventChannelAdmin::EventChannel_ptr ec
)
32 this->loopback_supplier_
->connect (ec
);
33 Auto_Disconnect
<Loopback_Supplier
> loopback_supplier_disconnect (this->loopback_supplier_
);
35 this->loopback_consumer_
->connect (ec
);
36 Auto_Disconnect
<Loopback_Consumer
> loopback_consumer_disconnect (this->loopback_consumer_
);
38 loopback_consumer_disconnect
.release ();
39 loopback_supplier_disconnect
.release ();
43 Loopback_Pair::disconnect ()
45 Auto_Disconnect
<Loopback_Supplier
> loopback_supplier_disconnect (this->loopback_supplier_
);
46 Auto_Disconnect
<Loopback_Consumer
> loopback_consumer_disconnect (this->loopback_consumer_
);