diff options
Diffstat (limited to 'TAO')
25 files changed, 3953 insertions, 50 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 82f1e09b52d..b7f7c71a6f7 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,32 @@ +Mon May 10 17:21:52 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * orbsvcs/orbsvcs/Event/EC_Event_Channel.h: + * orbsvcs/orbsvcs/Event/EC_Event_Channel.i: + * orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp: + New class TAO_EC_Event_Channel_Attributes used to initialize the + event channel. This will close the interface for the EC + constructor, yet will allow us to add more (optional or + mandatory) arguments. + + * orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp: + The event channel can be configured to support multiple + connect() calls to the same ProxyPushSupplier. + + * orbsvcs/Event_Service/Event_Service.cpp: + * orbsvcs/CosEvent_Service/CosEvent_Service.cpp: + * orbsvcs/examples/CosEC/Factory/FactoryCosEventChannel_i.cpp: + * orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp: + * orbsvcs/tests/Event_Latency/Event_Latency.cpp: + * orbsvcs/tests/EC_Mcast/EC_Mcast.cpp: + Use the TAO_EC_Event_Channel_Attributes class to initiliaze + TAO_EC_Event_Channel + + * orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp: + Minor cosmetic fixes. + + * orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp: + Removed dead code. + Mon May 10 16:46:41 1999 Nanbor Wang <nanbor@cs.wustl.edu> * TAO-INSTALL.html (href): Added a link to Barry Hoggard's CORBA diff --git a/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp index 73eedc93624..e8324ba31cb 100644 --- a/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp +++ b/TAO/orbsvcs/CosEvent_Service/CosEvent_Service.cpp @@ -179,7 +179,7 @@ CosEvent_Service::get_Rtec_viaNamingService (void) CORBA::Object_var rtEC_obj = this->naming_client_->resolve (rt_ref_name, - ACE_TRY_ENV); + ACE_TRY_ENV); ACE_TRY_CHECK; // The CORBA::Object_var object is downcast to @@ -271,10 +271,11 @@ CosEvent_Service::create_local_RtecService (void) ACE_DECLARE_NEW_CORBA_ENV; ACE_TRY { + TAO_EC_Event_Channel_Attributes attr (this->root_poa_.in (), + this->root_poa_.in ()); TAO_EC_Event_Channel* ec; ACE_NEW_RETURN (ec, - TAO_EC_Event_Channel (this->root_poa_.in (), - this->root_poa_.in ()), + TAO_EC_Event_Channel (attr), 1); this->ec_impl_ = ec; ec->activate (ACE_TRY_ENV); @@ -505,7 +506,7 @@ CosEvent_Service::register_CosEC (void) CosNaming::Name ec_obj_name (1); ec_obj_name.length (1); ec_obj_name[0].id = - CORBA::string_dup (this->service_name); + CORBA::string_dup (this->service_name); // Now, attach the object name to the context. this->naming_client_->rebind (ec_obj_name, diff --git a/TAO/orbsvcs/Event_Service/Event_Service.cpp b/TAO/orbsvcs/Event_Service/Event_Service.cpp index 24a2eabb401..93118609611 100644 --- a/TAO/orbsvcs/Event_Service/Event_Service.cpp +++ b/TAO/orbsvcs/Event_Service/Event_Service.cpp @@ -130,10 +130,11 @@ Event_Service::run (int argc, char* argv[]) { case ES_NEW: { + TAO_EC_Event_Channel_Attributes attr (root_poa.in (), + root_poa.in ()); TAO_EC_Event_Channel* ec; ACE_NEW_RETURN (ec, - TAO_EC_Event_Channel (root_poa.in (), - root_poa.in ()), + TAO_EC_Event_Channel (attr), 1); this->ec_impl_ = ec; ec->activate (ACE_TRY_ENV); @@ -182,7 +183,7 @@ Event_Service::run (int argc, char* argv[]) this->orb_->object_to_string (ec.in (), ACE_TRY_ENV); ACE_DEBUG ((LM_DEBUG, - "The EC IOR is <%s>\n", str.in ())); + "The EC IOR is <%s>\n", str.in ())); CosNaming::Name channel_name (1); channel_name.length (1); @@ -201,10 +202,10 @@ Event_Service::run (int argc, char* argv[]) ACE_TRY_CHECK; if (!CORBA::is_nil (scheduler.in ())) - { - naming_context->unbind (schedule_name, ACE_TRY_ENV); - ACE_TRY_CHECK; - } + { + naming_context->unbind (schedule_name, ACE_TRY_ENV); + ACE_TRY_CHECK; + } } ACE_CATCHANY @@ -234,10 +235,10 @@ Event_Service::parse_args (int argc, char *argv []) this->service_name_ = get_opt.optarg; break; - case 's': - // It could be just a flag (i.e. no "global" or "local" - // argument, but this is consistent with the EC_Multiple - // test and also allows for a runtime scheduling service. + case 's': + // It could be just a flag (i.e. no "global" or "local" + // argument, but this is consistent with the EC_Multiple + // test and also allows for a runtime scheduling service. if (ACE_OS::strcasecmp (get_opt.optarg, "global") == 0) { diff --git a/TAO/orbsvcs/examples/CosEC/Factory/FactoryCosEventChannel_i.cpp b/TAO/orbsvcs/examples/CosEC/Factory/FactoryCosEventChannel_i.cpp index 8622888f035..308de1fc7f2 100644 --- a/TAO/orbsvcs/examples/CosEC/Factory/FactoryCosEventChannel_i.cpp +++ b/TAO/orbsvcs/examples/CosEC/Factory/FactoryCosEventChannel_i.cpp @@ -51,10 +51,11 @@ FactoryCosEventChannel_i::init (PortableServer::POA_ptr poa, // @@ Pradeep: Please make sure that the POA policies are similar to // the RootPOA, this is the POA used by the RTEC to activate its // internal objects. + TAO_EC_Event_Channel_Attributes attr (this->poa_.in (), + this->poa_.in ()); TAO_EC_Event_Channel* _ec_servant; ACE_NEW_RETURN (_ec_servant, - TAO_EC_Event_Channel (this->poa_.in (), - this->poa_.in ()), + TAO_EC_Event_Channel (attr), -1); auto_ptr<TAO_EC_Event_Channel> auto_ec_servant_ (_ec_servant); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp index be3f712ea3c..bd221cfb3a7 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.cpp @@ -16,14 +16,15 @@ ACE_RCSID(Event, EC_Event_Channel, "$Id$") TAO_EC_Event_Channel:: -TAO_EC_Event_Channel (PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa, +TAO_EC_Event_Channel (const TAO_EC_Event_Channel_Attributes& attr, TAO_EC_Factory* factory, int own_factory) - : supplier_poa_ (PortableServer::POA::_duplicate (supplier_poa)), - consumer_poa_ (PortableServer::POA::_duplicate (consumer_poa)), + : supplier_poa_ (PortableServer::POA::_duplicate (attr.supplier_poa)), + consumer_poa_ (PortableServer::POA::_duplicate (attr.consumer_poa)), factory_ (factory), - own_factory_ (own_factory) + own_factory_ (own_factory), + consumer_reconnect_ (attr.consumer_reconnect), + supplier_reconnect_ (attr.supplier_reconnect) { if (this->factory_ == 0) { diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h index 5e92925203b..ee9509bd103 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.h @@ -35,6 +35,50 @@ #include "orbsvcs/RtecEventChannelAdminS.h" #include "EC_Factory.h" +class TAO_ORBSVCS_Export TAO_EC_Event_Channel_Attributes +{ + // = TITLE + // Defines the construction time attributes for the Event + // Channel. + // + // = DESCRIPTION + // The event channel implementation is controlled by two + // mechanisms: + // The EC_Factory that provides the strategies for the EC + // implementation. + // The EC attributes that define constants and values required + // by the EC construction. + // This class encapsulates those constants and values, providing + // an easy mechanism to extend the attributes without requiring + // changes in the EC constructor. + // +public: + TAO_EC_Event_Channel_Attributes (PortableServer::POA_ptr supplier_poa, + PortableServer::POA_ptr consumer_poa); + // The basic constructor. + // The attributes listed as arguments are *required* by the EC, and + // no appropiate defaults are available for them. + + // Most fields are public, there is no need to protect them, in fact + // the user should be able to set any values she wants. + + int consumer_reconnect; + int supplier_reconnect; + // Can consumers or suppliers invoke connect_push_* multiple times? + + int consumer_admin_busy_hwm; + int max_write_delay; + // Flags for the Consumer Admin + +private: + friend class TAO_EC_Event_Channel; + // Only the EC can read the private fields. + + PortableServer::POA_ptr supplier_poa; + PortableServer::POA_ptr consumer_poa; + // The POAs +}; + class TAO_ORBSVCS_Export TAO_EC_Event_Channel : public POA_RtecEventChannelAdmin::EventChannel { // = TITLE @@ -49,8 +93,7 @@ class TAO_ORBSVCS_Export TAO_EC_Event_Channel : public POA_RtecEventChannelAdmin // interface to the EC_Factory. // public: - TAO_EC_Event_Channel (PortableServer::POA_ptr supplier_poa, - PortableServer::POA_ptr consumer_poa, + TAO_EC_Event_Channel (const TAO_EC_Event_Channel_Attributes& attributes, TAO_EC_Factory* factory = 0, int own_factory = 0); // constructor @@ -134,6 +177,15 @@ public: // Used to inform the EC that a Supplier has connected or // disconnected from it. + // Simple flags to control the EC behavior, set by the application + // at construction time. + + int consumer_reconnect (void) const; + // Can the consumers reconnect to the EC? + + int supplier_reconnect (void) const; + // Can the suppliers reconnect to the EC? + // = The RtecEventChannelAdmin::EventChannel methods... virtual RtecEventChannelAdmin::ConsumerAdmin_ptr for_consumers (CORBA::Environment& env); @@ -150,7 +202,7 @@ public: virtual RtecEventChannelAdmin::Observer_Handle append_observer (RtecEventChannelAdmin::Observer_ptr, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException, RtecEventChannel::EventChannel::SYNCHRONIZATION_ERROR, RtecEventChannel::EventChannel::CANT_APPEND_OBSERVER)); @@ -195,6 +247,10 @@ private: TAO_EC_ObserverStrategy *observer_strategy_; // The observer strategy + + int consumer_reconnect_; + int supplier_reconnect_; + // Consumer/Supplier reconnection flags }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i index 471be7cfd9b..19c1be241ed 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Event_Channel.i @@ -1,5 +1,16 @@ // $Id$ +ACE_INLINE +TAO_EC_Event_Channel_Attributes:: +TAO_EC_Event_Channel_Attributes (PortableServer::POA_ptr s_poa, + PortableServer::POA_ptr c_poa) + : consumer_reconnect (0), + supplier_reconnect (0), + supplier_poa (s_poa), + consumer_poa (c_poa) +{ +} + ACE_INLINE TAO_EC_Dispatching* TAO_EC_Event_Channel::dispatching (void) const { @@ -131,3 +142,15 @@ TAO_EC_Event_Channel::destroy_supplier_admin_lock (ACE_Lock* x) { this->factory_->destroy_supplier_admin_lock (x); } + +ACE_INLINE int +TAO_EC_Event_Channel::consumer_reconnect (void) const +{ + return this->consumer_reconnect_; +} + +ACE_INLINE int +TAO_EC_Event_Channel::supplier_reconnect (void) const +{ + return this->consumer_reconnect_; +} diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp index d1384c41d72..9af16c805f7 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_ProxySupplier.cpp @@ -96,7 +96,50 @@ TAO_EC_ProxyPushSupplier::connect_push_consumer ( ACE_CHECK; if (this->is_connected_i ()) - ACE_THROW (RtecEventChannelAdmin::AlreadyConnected ()); + { + if (this->event_channel_->consumer_reconnect () == 0) + ACE_THROW (RtecEventChannelAdmin::AlreadyConnected ()); + + // Re-connections are allowed, go ahead and disconnect the + // consumer... + this->consumer_ = + RtecEventComm::PushConsumer::_nil (); + + // @@ Why don't we have a destroy() method in the + // filter_builder? + delete this->child_; + this->child_ = 0; + + // @@ Are there any race conditions here: + // + The lock is released, but the object is marked as + // disconnected already, so: + // - No events will be pushed + // - Any disconnects will just return + // + But another thread could invoke connect_push_consumer() + // again, notice that by the time the lock is acquired + // again the connected() call may still be running. + // It seems like we need delayed operations again, or + // something similar to what the POA does in this + // scenario. + // Meanwhile we can tell the users: "if it hurts don't do + // it". + // + TAO_EC_Unlock reverse_lock (*this->lock_); + + { + ACE_GUARD_THROW_EX ( + TAO_EC_Unlock, ace_mon, reverse_lock, + RtecEventChannelAdmin::EventChannel::SYNCHRONIZATION_ERROR ()); + ACE_CHECK; + + this->event_channel_->disconnected (this, ACE_TRY_ENV); + ACE_CHECK; + } + + // What if a second thread connected us after this? + if (this->is_connected_i ()) + return; + } this->consumer_ = RtecEventComm::PushConsumer::_duplicate (push_consumer); diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp index c714690164e..ab7bf213903 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Trivial_Supplier_Filter.cpp @@ -97,4 +97,3 @@ TAO_EC_Trivial_Supplier_Filter_Builder::destroy ( TAO_EC_SupplierFiltering*) { } - diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp index 0149c27795f..cd524449573 100644 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp +++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp @@ -118,8 +118,9 @@ ECM_Driver::run (int argc, char* argv[]) } } - TAO_EC_Event_Channel ec_impl (root_poa.in (), - root_poa.in ()); + TAO_EC_Event_Channel_Attributes attr (root_poa.in (), + root_poa.in ()); + TAO_EC_Event_Channel ec_impl (attr); // Register Event_Service with the Naming Service. RtecEventChannelAdmin::EventChannel_var ec = diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp index 020eaeba6df..235306bb1ca 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.cpp @@ -174,20 +174,6 @@ Test_Consumer::push (const RtecEventComm::EventSet& events, const ACE_hrtime_t now = ACE_OS::gethrtime (); const ACE_hrtime_t elapsed = now - creation; this->latency_.sample (elapsed); - -#if 0 - ACE_hrtime_t ec_recv; - ORBSVCS_Time::TimeT_to_hrtime (ec_recv, - e.header.ec_recv_time); - - ACE_hrtime_t ec_send; - ORBSVCS_Time::TimeT_to_hrtime (ec_send, - e.header.ec_send_time); - - this->driver_->supplier_to_ec (ec_recv - creation); - this->driver_->inside_ec (ec_send - ec_recv); - this->driver_->ec_to_consumer (now - ec_send); -#endif /* 0 */ } } } diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp index 0ca7de6c028..a1053859641 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Throughput.cpp @@ -240,9 +240,10 @@ ECT_Throughput::run (int argc, char* argv[]) } else { + TAO_EC_Event_Channel_Attributes attr (root_poa.in (), + root_poa.in ()); TAO_EC_Event_Channel *ec = - new TAO_EC_Event_Channel (root_poa.in (), - root_poa.in ()); + new TAO_EC_Event_Channel (attr); ec->consumer_admin ()->busy_hwm (this->ec_concurrency_hwm_); ec->activate (TAO_TRY_ENV); diff --git a/TAO/orbsvcs/tests/Event/Basic/Makefile b/TAO/orbsvcs/tests/Event/Basic/Makefile new file mode 100644 index 00000000000..fb1824a4493 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/Basic/Makefile @@ -0,0 +1,370 @@ +#---------------------------------------------------------------------------- +# +# $Id$ +# +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Local macros +#---------------------------------------------------------------------------- + +ifndef TAO_ROOT + TAO_ROOT = $(ACE_ROOT)/TAO +endif # ! TAO_ROOT + +BIN2 = Reconnect + +#### If the orbsvcs library wasn't built with all components, don't +#### try to build certain tests. +TAO_ORBSVCS := $(shell $(ACE_ROOT)/bin/ace_components --orbsvcs) +ifeq (Event2,$(findstring Event2,$(TAO_ORBSVCS))) + BIN = $(BIN2) +endif # Event2 + +SRC=$(addsuffix .cpp,$(BIN)) +LIBS += -lECTests -lorbsvcs -lTAO -lACE +CPPFLAGS += -I../lib -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs \ + $(foreach svc, $(TAO_ORBSVCS), -DTAO_ORBSVCS_HAS_$(svc)) + + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU + +# To build multiple executables in the same directory on AIX, it works +# best to wipe out any previously-created tempinc directory. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc) +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + +.obj/Reconnect.o .obj/Reconnect.so .shobj/Reconnect.o .shobj/Reconnect.so: Reconnect.cpp Reconnect.h ../lib/Driver.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseC.h \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/TimeBaseC.i \ + $(TAO_ROOT)/tao/TimeBaseS_T.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.i \ + $(TAO_ROOT)/tao/TimeBaseS_T.cpp \ + $(TAO_ROOT)/tao/TimeBaseS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.h \ + $(TAO_ROOT)/tao/corba.h \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Principal.i \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Context.h \ + $(TAO_ROOT)/tao/Context.i \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/varout.h \ + $(TAO_ROOT)/tao/varout.i \ + $(TAO_ROOT)/tao/varout.cpp \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/Servant_Base.i \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Active_Object_Map.h \ + $(TAO_ROOT)/tao/Key_Adapters.h \ + $(ACE_ROOT)/ace/Map.h \ + $(ACE_ROOT)/ace/Map.i \ + $(ACE_ROOT)/ace/Map_T.h \ + $(ACE_ROOT)/ace/Pair.h \ + $(ACE_ROOT)/ace/Pair.i \ + $(ACE_ROOT)/ace/Pair_T.h \ + $(ACE_ROOT)/ace/Pair_T.i \ + $(ACE_ROOT)/ace/Pair_T.cpp \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Active_Map_Manager.h \ + $(ACE_ROOT)/ace/Active_Map_Manager.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Map_T.i \ + $(ACE_ROOT)/ace/Map_T.cpp \ + $(TAO_ROOT)/tao/Key_Adapters.i \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(TAO_ROOT)/tao/Connect.h \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.i \ + $(ACE_ROOT)/ace/Svc_Handler.cpp \ + $(ACE_ROOT)/ace/Dynamic.h \ + $(ACE_ROOT)/ace/Dynamic.i \ + $(ACE_ROOT)/ace/Acceptor.i \ + $(ACE_ROOT)/ace/Acceptor.cpp \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Active_Object_Map.i \ + $(TAO_ROOT)/tao/POAManager.h \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/POAManager.i \ + $(TAO_ROOT)/tao/Object_Adapter.h \ + $(TAO_ROOT)/tao/Object_Adapter.i \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/MProfile.h \ + $(TAO_ROOT)/tao/MProfile.i \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/Policy_Manager.h \ + $(TAO_ROOT)/tao/Resource_Factory.h \ + $(TAO_ROOT)/tao/IIOP_Connector.h \ + $(ACE_ROOT)/ace/Connector.h \ + $(ACE_ROOT)/ace/Connector.i \ + $(ACE_ROOT)/ace/Connector.cpp \ + $(ACE_ROOT)/ace/SOCK_Connector.h \ + $(ACE_ROOT)/ace/SOCK_Connector.i \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Invocation.h \ + $(TAO_ROOT)/tao/Invocation.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ + $(TAO_ROOT)/tao/DynAny_i.h \ + $(TAO_ROOT)/tao/Union.h \ + $(TAO_ROOT)/tao/ValueBase.h \ + $(TAO_ROOT)/tao/ValueBase.i \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/ValueFactory.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminS.i \ + ../lib/Driver.i ../lib/Consumer.h ../lib/Supplier.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Factory.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event/EC_Event_Channel.i \ + $(ACE_ROOT)/ace/Get_Opt.h \ + $(ACE_ROOT)/ace/Get_Opt.i + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp b/TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp new file mode 100644 index 00000000000..795cdebc017 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/Basic/Reconnect.cpp @@ -0,0 +1,206 @@ +// $Id$ + +#include "Reconnect.h" +#include "Consumer.h" +#include "Supplier.h" +#include "orbsvcs/Event/EC_Event_Channel.h" +#include "ace/Get_Opt.h" + +ACE_RCSID(EC_Throughput, ECT_Throughput, "$Id$") + +int +main (int argc, char *argv []) +{ + EC_Reconnect driver; + return driver.run (argc, argv); +} + +// **************************************************************** + +EC_Reconnect::EC_Reconnect (void) + : allow_consumer_reconnect_ (0), + allow_supplier_reconnect_ (0) +{ +} + +int +EC_Reconnect::parse_args (int& argc, char* argv[]) +{ + if (this->EC_Driver::parse_args (argc, argv) != 0) + return -1; + + ACE_Get_Opt get_opt (argc, argv, "sc"); + int opt; + + while ((opt = get_opt ()) != EOF) + { + switch (opt) + { + case 'c': + this->allow_consumer_reconnect_ = 1; + break; + case 's': + this->allow_supplier_reconnect_ = 1; + break; + + case '?': + default: + this->print_usage (); + return -1; + } + } + + return 0; +} + +void +EC_Reconnect::print_usage (void) +{ + this->EC_Driver::print_usage (); + + ACE_DEBUG ((LM_DEBUG, "EC_Reconnect usage: [-s] [-c]\n")); +} + +void +EC_Reconnect::modify_attributes (TAO_EC_Event_Channel_Attributes& attr) +{ + attr.consumer_reconnect = this->allow_consumer_reconnect_; + attr.supplier_reconnect = this->allow_supplier_reconnect_; +} + +void +EC_Reconnect::consumer_push (void* consumer_cookie, + const RtecEventComm::EventSet& event, + CORBA::Environment& ACE_TRY_ENV) +{ + this->EC_Driver::consumer_push (consumer_cookie, + event, + ACE_TRY_ENV); +} + +void +EC_Reconnect::execute_test (CORBA::Environment& ACE_TRY_ENV) +{ + this->execute_consumer_test (ACE_TRY_ENV); + + this->execute_supplier_test (ACE_TRY_ENV); + + // ?? this->EC_Driver::execute_test (ACE_TRY_ENV); +} + +void +EC_Reconnect::execute_consumer_test (CORBA::Environment& ACE_TRY_ENV) +{ + RtecEventChannelAdmin::ConsumerQOS qos; + int shutdown_event_type; + this->build_consumer_qos (0, qos, shutdown_event_type); + + if (this->allow_consumer_reconnect_) + { + for (int i = 0; i < this->burst_count_; ++i) + { + ACE_hrtime_t start = ACE_OS::gethrtime (); + this->consumers_[0]->connect (qos, + shutdown_event_type, + ACE_TRY_ENV); + ACE_CHECK; + ACE_hrtime_t stop = ACE_OS::gethrtime (); + this->consumer_reconnect_.sample (stop - start); + } + } + else + { + ACE_TRY + { + this->consumers_[0]->connect (qos, + shutdown_event_type, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_ERROR, "Expected exception\n")); + } + ACE_CATCH (RtecEventChannelAdmin::AlreadyConnected, ex) + { + /* do nothing */ + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Expected AlreadyConnected exception"); + } + ACE_ENDTRY; + + for (int i = 0; i < this->burst_count_; ++i) + { + ACE_hrtime_t start = ACE_OS::gethrtime (); + this->consumers_[0]->disconnect (ACE_TRY_ENV); + ACE_CHECK; + this->consumers_[0]->connect (qos, shutdown_event_type, + ACE_TRY_ENV); + ACE_CHECK; + ACE_hrtime_t stop = ACE_OS::gethrtime (); + this->consumer_reconnect_.sample (stop - start); + } + } +} + +void +EC_Reconnect::execute_supplier_test (CORBA::Environment& ACE_TRY_ENV) +{ + RtecEventChannelAdmin::SupplierQOS qos; + int shutdown_event_type; + this->build_supplier_qos (0, qos, shutdown_event_type); + + if (this->allow_supplier_reconnect_) + { + for (int i = 0; i < this->burst_count_; ++i) + { + ACE_hrtime_t start = ACE_OS::gethrtime (); + this->suppliers_[0]->connect (qos, shutdown_event_type, + ACE_TRY_ENV); + ACE_CHECK; + ACE_hrtime_t stop = ACE_OS::gethrtime (); + this->supplier_reconnect_.sample (stop - start); + } + } + else + { + ACE_TRY + { + this->suppliers_[0]->connect (qos, shutdown_event_type, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + ACE_DEBUG ((LM_ERROR, "Expected exception\n")); + } + ACE_CATCH (RtecEventChannelAdmin::AlreadyConnected, ex) + { + /* do nothing */ + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Expected AlreadyConnected exception"); + } + ACE_ENDTRY; + + for (int i = 0; i < this->burst_count_; ++i) + { + ACE_hrtime_t start = ACE_OS::gethrtime (); + this->suppliers_[0]->disconnect (ACE_TRY_ENV); + ACE_CHECK; + this->suppliers_[0]->connect (qos, + shutdown_event_type, + ACE_TRY_ENV); + ACE_CHECK; + ACE_hrtime_t stop = ACE_OS::gethrtime (); + this->supplier_reconnect_.sample (stop - start); + } + } +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/Event/Basic/Reconnect.h b/TAO/orbsvcs/tests/Event/Basic/Reconnect.h new file mode 100644 index 00000000000..4f4ae15ba2d --- /dev/null +++ b/TAO/orbsvcs/tests/Event/Basic/Reconnect.h @@ -0,0 +1,78 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = LIBRARY +// ORBSVCS Real-time Event Channel testsuite +// +// = FILENAME +// Reconnect +// +// = AUTHOR +// Carlos O'Ryan (coryan@cs.wustl.edu) +// +// ============================================================================ + +#ifndef EC_RECONNECT_H +#define EC_RECONNECT_H + +#include "Driver.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class EC_Reconnect : public EC_Driver +{ + // + // = TITLE + // Test the EC reconnection feature + // + // = DESCRIPTION + // The EC can be configured to allow re-connection of suppliers + // and consumers, this test verifies that: + // + The EC does *not* allow reconnections if the feature is + // disabled (the default) + // + The EC does allow reconnections if the feature is enabled + // and: + // - The subscriptions are changed (eventually) + // - The are no memory leaks + // - Compares the time required for a reconnection vs a complete + // connect/disconnect cycle, specially as the number of + // suppliers and consumers increases. + // +public: + EC_Reconnect (void); + // Constructor + + // = The EC_Driver methods + virtual int parse_args (int& argc, char* argv[]); + virtual void print_usage (void); + // add some command line args to enable/disable reconnections + + virtual void modify_attributes (TAO_EC_Event_Channel_Attributes& attr); + // set the reconnection flags + + void execute_test (CORBA::Environment& ACE_TRY_ENV); + // Don't run the suppliers, just test connect and disconnect calls. + + void execute_consumer_test (CORBA::Environment& ACE_TRY_ENV); + void execute_supplier_test (CORBA::Environment& ACE_TRY_ENV); + // Separate the suppliers and consumers. + + virtual void consumer_push (void* consumer_cookie, + const RtecEventComm::EventSet& event, + CORBA::Environment& ACE_TRY_ENV); + // Verify that the subscription changes + +private: + int allow_consumer_reconnect_; + int allow_supplier_reconnect_; + // What aspect of reconnection are we going to test? + + EC_Driver::Latency_Stats consumer_reconnect_; + EC_Driver::Latency_Stats supplier_reconnect_; +}; + +#endif /* EC_RECONNECT_H */ diff --git a/TAO/orbsvcs/tests/Event/Makefile b/TAO/orbsvcs/tests/Event/Makefile new file mode 100644 index 00000000000..94d0224d5c2 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/Makefile @@ -0,0 +1,23 @@ +#---------------------------------------------------------------------------- +# +# $Id$ +# +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Local macros +#---------------------------------------------------------------------------- + +DIRS = lib \ + Basic + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU + diff --git a/TAO/orbsvcs/tests/Event/lib/Consumer.cpp b/TAO/orbsvcs/tests/Event/lib/Consumer.cpp new file mode 100644 index 00000000000..20140722f28 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Consumer.cpp @@ -0,0 +1,142 @@ +// $Id$ + +#include "Consumer.h" +#include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/Time_Utilities.h" + +ACE_RCSID(EC_Tests, EC_Consumer, "$Id$") + +EC_Consumer::EC_Consumer (EC_Driver *driver, + void *cookie) + : driver_ (driver), + cookie_ (cookie), + push_count_ (0), + shutdown_event_type_ (ACE_ES_EVENT_SHUTDOWN) +{ +} + +void +EC_Consumer::connect ( + RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, + const RtecEventChannelAdmin::ConsumerQOS& qos, + int shutdown_event_type, + CORBA::Environment &ACE_TRY_ENV) +{ + this->supplier_proxy_ = + consumer_admin->obtain_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + this->connect (qos, shutdown_event_type, ACE_TRY_ENV); +} + +void +EC_Consumer::connect ( + const RtecEventChannelAdmin::ConsumerQOS& qos, + int shutdown_event_type, + CORBA::Environment &ACE_TRY_ENV) +{ + this->shutdown_event_type_ = shutdown_event_type; + + RtecEventComm::PushConsumer_var objref = this->_this (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_->connect_push_consumer (objref.in (), + qos, + ACE_TRY_ENV); + ACE_CHECK; +} + +void +EC_Consumer::disconnect (CORBA::Environment &ACE_TRY_ENV) +{ + if (CORBA::is_nil (this->supplier_proxy_.in ())) + return; + + this->supplier_proxy_->disconnect_push_supplier (ACE_TRY_ENV); + ACE_CHECK; + + this->supplier_proxy_ = + RtecEventChannelAdmin::ProxyPushSupplier::_nil (); + + // Deactivate the servant + PortableServer::POA_var poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var id = + poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + poa->deactivate_object (id.in (), ACE_TRY_ENV); + ACE_CHECK; +} + +void +EC_Consumer::dump_results (const char* name) +{ + this->throughput_.dump_results ("EC_Consumers", name); + this->latency_.dump_results ("EC_Consumers", name); +} + +void +EC_Consumer::accumulate (EC_Driver::Throughput_Stats& throughput, + EC_Driver::Latency_Stats& latency) const +{ + throughput.accumulate (this->throughput_); + latency.accumulate (this->latency_); +} + +void +EC_Consumer::push (const RtecEventComm::EventSet& events, + CORBA::Environment &ACE_TRY_ENV) +{ + this->driver_->consumer_push (this->cookie_, events, ACE_TRY_ENV); + + if (events.length () == 0) + { + ACE_DEBUG ((LM_DEBUG, + "EC_Consumer (%P|%t) no events\n")); + return; + } + + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + + // We start the timer as soon as we receive the first event... + this->throughput_.sample (); + + this->push_count_ += events.length (); + + if (TAO_debug_level > 0 + && this->push_count_ % 100 == 0) + { + ACE_DEBUG ((LM_DEBUG, + "EC_Consumer (%P|%t): %d events received\n", + this->push_count_)); + } + + for (u_int i = 0; i < events.length (); ++i) + { + const RtecEventComm::Event& e = events[i]; + + ACE_hrtime_t creation; + ORBSVCS_Time::TimeT_to_hrtime (creation, + e.header.creation_time); + + const ACE_hrtime_t now = ACE_OS::gethrtime (); + const ACE_hrtime_t elapsed = now - creation; + this->latency_.sample (elapsed); + + if (e.header.type == this->shutdown_event_type_) + this->driver_->consumer_shutdown (this->cookie_, ACE_TRY_ENV); + } +} + +void +EC_Consumer::disconnect_push_consumer (CORBA::Environment &ACE_TRY_ENV) +{ + this->driver_->consumer_disconnect (this->cookie_, ACE_TRY_ENV); +} + +// **************************************************************** + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/Event/lib/Consumer.h b/TAO/orbsvcs/tests/Event/lib/Consumer.h new file mode 100644 index 00000000000..e44d12504fc --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Consumer.h @@ -0,0 +1,108 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = LIBRARY +// ORBSVCS Real-time Event Channel testsuite +// +// = FILENAME +// Consumer +// +// = AUTHOR +// Carlos O'Ryan (coryan@cs.wustl.edu) +// +// ============================================================================ + +#ifndef EC_CONSUMER_H +#define EC_CONSUMER_H + +#include "Driver.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "orbsvcs/RtecEventCommS.h" +#include "orbsvcs/RtecEventChannelAdminC.h" + +class EC_Consumer : public POA_RtecEventComm::PushConsumer +{ + // = TITLE + // Simple consumer object to implement EC tests. + // + // = DESCRIPTION + // This class is a consumer of events. + // The class is just a helper to simplify common tasks in EC + // tests, such as subscribing for a range of events, disconnecting + // from the EC, informing the driver of shutdown messages, etc. + // + // There are several ways to connect and disconnect this class, + // and it is up to the driver program to use the right one. + // +public: + EC_Consumer (EC_Driver* driver, + void* cookie); + + void connect ( + RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, + const RtecEventChannelAdmin::ConsumerQOS& qos, + int shutdown_event_type, + CORBA::Environment &ACE_TRY_ENV); + // The driver program can build the QoS attributes and obtain the + // ConsumerAdmin, we do the rest. + + void connect ( + const RtecEventChannelAdmin::ConsumerQOS& qos, + int shutdown_event_type, + CORBA::Environment &ACE_TRY_ENV); + // The driver program can build the QoS attributes and we use + // whatevet supplier_proxy we already have (useful for reconnection + // tests). + + void disconnect (CORBA::Environment& ACE_TRY_ENV); + // The application can invoke this method to disconnect from the EC + // and deactivate this class. + + void accumulate (EC_Driver::Throughput_Stats& throughput, + EC_Driver::Latency_Stats& latency) const; + // Accumulate our statistics to the totals. + + void dump_results (const char* name); + // Printout the statistics + + // = The RtecEventComm::PushConsumer methods + + virtual void push (const RtecEventComm::EventSet& events, + CORBA::Environment &_env); + virtual void disconnect_push_consumer (CORBA::Environment &); + // The skeleton methods. + +private: + EC_Driver* driver_; + // The main driver for the test. + + void* cookie_; + // A magic cookie passed by the driver that we pass back in our + // callbacks. + + RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; + // We talk to the EC using this proxy. + + ACE_SYNCH_MUTEX lock_; + // Protect internal state + + EC_Driver::Throughput_Stats throughput_; + // Used for reporting stats + + EC_Driver::Latency_Stats latency_; + // Used for reporting stats + + int push_count_; + // The number of push() calls + + int shutdown_event_type_; + // The type used to indicate shutdown +}; + +#endif /* ECT_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/Event/lib/Driver.cpp b/TAO/orbsvcs/tests/Event/lib/Driver.cpp new file mode 100644 index 00000000000..b50a5c7f2ab --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Driver.cpp @@ -0,0 +1,1047 @@ +// $Id$ + +#include "Driver.h" +#include "Consumer.h" +#include "Supplier.h" +#include "orbsvcs/Event_Service_Constants.h" +#include "orbsvcs/Event_Utilities.h" +#include "orbsvcs/Event/EC_Default_Factory.h" +#include "orbsvcs/Event/EC_Event_Channel.h" +#include "ace/Sched_Params.h" +#include "ace/Arg_Shifter.h" +#include "ace/High_Res_Timer.h" + +#if !defined(EC_DISABLE_OLD_EC) +#include "EC_Scheduler_Info.h" +#endif + +#if !defined (__ACE_INLINE__) +#include "Driver.i" +#endif /* __ACE_INLINE__ */ + +ACE_RCSID(EC_Tests, EC_Driver, "$Id$") + +EC_Driver::EC_Driver (void) + : n_consumers_ (1), + consumers_ (0), + n_suppliers_ (1), + suppliers_ (0), + burst_count_ (100), + burst_size_ (100), + payload_size_ (0), + burst_pause_ (10000), + consumer_type_start_ (ACE_ES_EVENT_UNDEFINED), + consumer_type_count_ (1), + consumer_type_shift_ (2), + supplier_type_start_ (ACE_ES_EVENT_UNDEFINED), + supplier_type_count_ (1), + supplier_type_shift_ (2), + pid_file_name_ (0), + verbose_ (0), + thr_create_flags_ (THR_NEW_LWP|THR_BOUND|THR_SCHED_FIFO), + use_remote_ec_ (0), + event_service_name_ ("EventService"), + use_old_ec_ (0), +#if !defined(TAO_EC_DISABLE_OLD_EC) + module_factory_ (0), + scheduler_impl_ (0), +#endif + ec_impl_ (0) +{ + TAO_EC_Default_Factory::init_svcs (); +} + +EC_Driver::~EC_Driver (void) +{ + delete this->ec_impl_; +#if !defined(EC_DISABLE_OLD_EC) + delete this->scheduler_impl_; + delete this->module_factory_; +#endif + if (this->tasks_ != 0) + { + for (int i = 0; i != this->n_suppliers_; ++i) + delete this->tasks_[i]; + delete[] this->tasks_; + } + if (this->suppliers_ != 0) + { + for (int i = 0; i != this->n_suppliers_; ++i) + delete this->suppliers_[i]; + delete[] this->suppliers_; + } + if (this->consumers_ != 0) + { + for (int i = 0; i != this->n_consumers_; ++i) + delete this->consumers_[i]; + delete[] this->consumers_; + } +} + +int +EC_Driver::run (int argc, char* argv[]) +{ + ACE_TRY_NEW_ENV + { + // Calibrate the high resolution timer *before* starting the + // test. + ACE_High_Res_Timer::calibrate (); + + this->initialize_orb_and_poa (argc, argv, ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (this->parse_args (argc, argv)) + return 1; + + if (this->verbose ()) + this->print_args (); + + if (this->pid_file_name_ != 0) + { + FILE* pid = ACE_OS::fopen (this->pid_file_name_, "w"); + if (pid != 0) + { + ACE_OS::fprintf (pid, "%d\n", ACE_OS::getpid ()); + ACE_OS::fclose (pid); + } + } + + if (this->move_to_rt_class () == -1) + return -1; + + this->initialize_ec_impl (ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (this->allocate_consumers () == -1) + return 1; + + this->connect_consumers (ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) connected consumer(s)\n")); + + if (this->allocate_suppliers () == -1) + return 1; + + this->connect_suppliers (ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) connected supplier(s)\n")); + + this->execute_test (ACE_TRY_ENV); + ACE_TRY_CHECK; + + this->dump_results (); + + this->deactivate_ec (ACE_TRY_ENV); + ACE_TRY_CHECK; + + this->disconnect_consumers (ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) consumers disconnected\n")); + + this->disconnect_suppliers (ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) suppliers disconnected\n")); + + this->event_channel_->destroy (ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) channel destroyed\n")); + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "EC_Driver::run"); + } + ACE_CATCHALL + { + ACE_ERROR ((LM_ERROR, "EC_Driver (%P|%t) non-corba exception raised\n")); + } + ACE_ENDTRY; + return 0; +} + +void +EC_Driver::initialize_orb_and_poa (int &argc, char* argv[], + CORBA::Environment& ACE_TRY_ENV) +{ + this->orb_ = + CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); + ACE_CHECK; + + CORBA::Object_var poa_object = + this->orb_->resolve_initial_references("RootPOA"); + if (CORBA::is_nil (poa_object.in ())) + { + ACE_ERROR ((LM_ERROR, + "EC_Driver (%P|%t) Unable to initialize the POA.\n")); + return; + } + + this->root_poa_ = + PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POAManager_var poa_manager = + this->root_poa_->the_POAManager (ACE_TRY_ENV); + ACE_CHECK; + + poa_manager->activate (ACE_TRY_ENV); + ACE_CHECK; +} + +void +EC_Driver::print_args (void) const +{ + ACE_DEBUG ((LM_DEBUG, + "Execution parameters:\n" + " consumers = <%d>\n" + " suppliers = <%d>\n" + " burst count = <%d>\n" + " burst size = <%d>\n" + " event size = <%d>\n" + " burst pause = <%d>\n" + " consumer type start = <%d>\n" + " consumer type count = <%d>\n" + " consumer type shift = <%d>\n" + " supplier type start = <%d>\n" + " supplier type count = <%d>\n" + " supplier type shift = <%d>\n" + " pid file name = <%s>\n", + + this->n_consumers_, + this->n_suppliers_, + this->burst_count_, + this->burst_size_, + this->payload_size_, + this->burst_pause_, + + this->consumer_type_start_, + this->consumer_type_count_, + this->consumer_type_shift_, + this->supplier_type_start_, + this->supplier_type_count_, + this->supplier_type_shift_, + + this->pid_file_name_?this->pid_file_name_:"nil" + ) ); +} + +int +EC_Driver::move_to_rt_class (void) +{ + int priority = + (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; + priority = ACE_Sched_Params::next_priority (ACE_SCHED_FIFO, + priority); + // Enable FIFO scheduling, e.g., RT scheduling class on Solaris. + + if (ACE_OS::sched_params (ACE_Sched_Params (ACE_SCHED_FIFO, + priority, + ACE_SCOPE_PROCESS)) != 0) + { + if (ACE_OS::last_error () == EPERM) + { + ACE_DEBUG ((LM_DEBUG, + "EC_Driver (%P|%t): user is not superuser, " + "so remain in time-sharing class\n")); + this->thr_create_flags_ = THR_NEW_LWP; + } + else + ACE_ERROR ((LM_ERROR, + "EC_Driver (%P|%t): sched_params failed\n")); + } + + if (ACE_OS::thr_setprio (priority) == -1) + { + ACE_ERROR ((LM_ERROR, "EC_Driver (%P|%t) main thr_setprio failed," + "no real-time features\n")); + } + return 0; +} + +void +EC_Driver::initialize_ec_impl (CORBA::Environment& ACE_TRY_ENV) +{ +#if !defined(EC_DISABLE_REMOTE_EC) + if (this->use_remote_ec_ == 1) + { + this->obtain_remote_ec (ACE_TRY_ENV); + return; + } +#endif + +#if !defined(EC_DISABLE_OLD_EC) + if (this->use_old_ec_ == 1) + { + this->initialize_old_ec (ACE_TRY_ENV); + return; + } +#endif + + this->initialize_new_ec (ACE_TRY_ENV); +} + +#if !defined(EC_DISABLE_REMOTE_EC) +void +EC_Driver::obtain_remote_ec (CORBA::Environment& ACE_TRY_ENV) +{ + CosNaming::NamingContext_var naming_context = + this->get_naming_context (ACE_TRY_ENV); + ACE_CHECK; + + CosNaming::Name channel_name (1); + channel_name.length (1); + channel_name[0].id = CORBA::string_dup (this->event_service_name_); + + CORBA::Object_var tmp = + naming_context->resolve (channel_name, ACE_TRY_ENV); + ACE_CHECK; + + this->event_channel_ = + RtecEventChannelAdmin::EventChannel::_narrow (tmp, ACE_TRY_ENV); + ACE_CHECK; +} + +CosNaming::NamingContext_ptr +EC_Driver::get_naming_context (CORBA::Environment &ACE_TRY_ENV) +{ + CORBA::Object_var naming_obj = + this->orb_->resolve_initial_references ("NameService", ACE_TRY_ENV); + ACE_CHECK_RETURN (CosNaming::NamingContext::_nil ()); + + if (CORBA::is_nil (naming_obj.in ())) + ACE_ERROR ((LM_ERROR, + "EC_Driver (%P|%t) Unable to obtain the " + "Naming Service.\n")); + + return CosNaming::NamingContext::_narrow (naming_obj.in (), ACE_TRY_ENV); +} +#endif + +#if !defined(EC_DISABLE_OLD_EC) +int +EC_Driver::initialize_old_ec (CORBA::Environment& ACE_TRY_ENV) +{ + CosNaming::NamingContext_var naming_context = + this->get_naming_context (ACE_TRY_ENV); + ACE_CHECK; + + // This is the name we (potentially) register the Scheduling + // Service in the Naming Service. + CosNaming::Name schedule_name (1); + schedule_name.length (1); + schedule_name[0].id = CORBA::string_dup ("ScheduleService"); + + if (this->use_runtime_scheduler_ == 1) + ACE_NEW (this->scheduler_impl_, + ACE_Runtime_Scheduler (runtime_configs_size, + runtime_configs, + runtime_infos_size, + runtime_infos)); + else + ACE_NEW (this->scheduler_impl_, + ACE_Config_Scheduler ()); + + + this->scheduler_ = + this->scheduler_impl_._this (ACE_TRY_ENV); + ACE_CHECK; + + CORBA::String_var str = + this->orb_->object_to_string (scheduler.in (), ACE_TRY_ENV); + ACE_CHECK; + ACE_DEBUG ((LM_DEBUG, + "EC_Driver (%P|%t) The (local) scheduler IOR is <%s>\n", + str.in ())); + + + if (this->reactive_ec_ == 1) + ACE_NEW_RETURN (this->module_factory_, + TAO_Reactive_Module_Factory, + -1); + else + ACE_NEW_RETURN (this->module_factory_, + TAO_Default_Module_Factory, + -1); + + ACE_NEW_RETURN (this->ec_impl_, + ACE_EventChannel (scheduler.in (), 1, + ACE_DEFAULT_EVENT_CHANNEL_TYPE, + this->module_factory_), + -1); + + this->event_channel_ = + this->ec_impl_->_this (ACE_TRY_ENV); + ACE_CHECK_RETURN (-1); +} +#endif /* */ + +void +EC_Driver::initialize_new_ec (CORBA::Environment& ACE_TRY_ENV) +{ + TAO_EC_Event_Channel_Attributes attr (this->root_poa_.in (), + this->root_poa_.in ()); + this->modify_attributes (attr); + + TAO_EC_Event_Channel *ec = + new TAO_EC_Event_Channel (attr); + this->ec_impl_ = ec; + + ec->activate (ACE_TRY_ENV); + ACE_CHECK; + + this->event_channel_ = + this->ec_impl_->_this (ACE_TRY_ENV); + ACE_CHECK; +} + +void +EC_Driver::deactivate_ec (CORBA::Environment& ACE_TRY_ENV) +{ +#if !defined(EC_DISABLE_REMOTE_EC) + if (this->use_remote_ec_ == 1) + return; +#endif + + { + // Deactivate the EC + PortableServer::POA_var poa = + this->ec_impl_->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var id = + poa->servant_to_id (this->ec_impl_, ACE_TRY_ENV); + ACE_CHECK; + poa->deactivate_object (id.in (), ACE_TRY_ENV); + ACE_CHECK; + } + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) EC deactivated\n")); + +#if !defined(EC_DISABLE_OLD_EC) + if (this->use_old_ec_ == 1) + { + // Deactivate the Scheduler + PortableServer::POA_var poa = + scheduler_impl._default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var id = + poa->servant_to_id (&scheduler_impl, ACE_TRY_ENV); + ACE_CHECK; + poa->deactivate_object (id.in (), ACE_TRY_ENV); + ACE_CHECK; + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) scheduler deactivated\n")); + } +#endif +} + +int +EC_Driver::allocate_consumers (void) +{ + ACE_NEW_RETURN (this->consumers_, + EC_Consumer*[this->n_consumers_], + -1); + for (int i = 0; i < this->n_consumers_; ++i) + this->consumers_[i] = + this->allocate_consumer (i); + return 0; +} + +int +EC_Driver::allocate_suppliers (void) +{ + ACE_NEW_RETURN (this->suppliers_, + EC_Supplier*[this->n_suppliers_], + -1); + for (int i = 0; i < this->n_suppliers_; ++i) + this->suppliers_[i] = + this->allocate_supplier (i); + return 0; +} + +EC_Consumer* +EC_Driver::allocate_consumer (int i) +{ + return new EC_Consumer (this, + this->consumers_ + i); +} + +EC_Supplier* +EC_Driver::allocate_supplier (int i) +{ + return new EC_Supplier (this, + this->suppliers_ + i); +} + +void +EC_Driver::connect_consumers (CORBA::Environment &ACE_TRY_ENV) +{ + RtecEventChannelAdmin::ConsumerAdmin_var consumer_admin = + this->event_channel_->for_consumers (ACE_TRY_ENV); + ACE_CHECK; + + for (int i = 0; i < this->n_consumers_; ++i) + { + this->connect_consumer (consumer_admin.in (), i, ACE_TRY_ENV); + ACE_CHECK; + } +} + +void +EC_Driver::connect_consumer ( + RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, + int i, + CORBA::Environment &ACE_TRY_ENV) +{ + RtecEventChannelAdmin::ConsumerQOS qos; + int shutdown_event_type; + this->build_consumer_qos (i, qos, shutdown_event_type); + + this->consumers_[i]->connect (consumer_admin, + qos, + shutdown_event_type, + ACE_TRY_ENV); +} + +void +EC_Driver::build_consumer_qos ( + int i, + RtecEventChannelAdmin::ConsumerQOS& qos, + int& shutdown_event_type) +{ + RtecScheduler::handle_t rt_info = 0; + + int type_start = + this->consumer_type_start_ + + i * this->consumer_type_shift_; + + shutdown_event_type = type_start + this->consumer_type_count_; + + ACE_ConsumerQOS_Factory qos_factory; + qos_factory.start_disjunction_group (); + qos_factory.insert_type (shutdown_event_type, rt_info); + + for (int i = 0; i != this->consumer_type_count_; ++i) + { + qos_factory.insert_type (type_start + i, rt_info); + } + + qos = qos_factory.get_ConsumerQOS (); +} + +void +EC_Driver::connect_suppliers (CORBA::Environment &TAO_IN_ENV) +{ + RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = + this->event_channel_->for_suppliers (ACE_TRY_ENV); + ACE_CHECK; + + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->connect_supplier (supplier_admin.in (), i, ACE_TRY_ENV); + ACE_CHECK; + } +} + +void +EC_Driver::connect_supplier ( + RtecEventChannelAdmin::SupplierAdmin_ptr supplier_admin, + int i, + CORBA::Environment &ACE_TRY_ENV) +{ + RtecEventChannelAdmin::SupplierQOS qos; + int shutdown_event_type; + this->build_supplier_qos (i, qos, shutdown_event_type); + + this->suppliers_[i]->connect (supplier_admin, + qos, + shutdown_event_type, + ACE_TRY_ENV); +} + +void +EC_Driver::build_supplier_qos ( + int i, + RtecEventChannelAdmin::SupplierQOS& qos, + int& shutdown_event_type) +{ + int type_start = this->supplier_type_start_ + i*this->supplier_type_shift_; + int supplier_id = i + 1; + shutdown_event_type = type_start + this->supplier_type_count_; + + RtecScheduler::handle_t rt_info = 0; + + ACE_SupplierQOS_Factory qos_factory; + for (int i = 0; i != this->supplier_type_count_; ++i) + { + qos_factory.insert (supplier_id, + type_start + i, + rt_info, 1); + } + qos_factory.insert (supplier_id, + shutdown_event_type, + rt_info, 1); +} + +void +EC_Driver::execute_test (CORBA::Environment &ACE_TRY_ENV) +{ + this->activate_suppliers (ACE_TRY_ENV); + ACE_CHECK; + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) suppliers are active\n")); + + // Wait for the supplier threads... + if (ACE_Thread_Manager::instance ()->wait () == -1) + { + ACE_ERROR ((LM_ERROR, "EC_Driver (%P|%t) Thread_Manager wait failed\n")); + } + + if (this->verbose ()) + ACE_DEBUG ((LM_DEBUG, "EC_Driver (%P|%t) suppliers finished\n")); +} + +ACE_Task_Base* +EC_Driver::allocate_task (int i) +{ + int start = this->supplier_type_start_ + i*this->supplier_type_shift_; + return new EC_Supplier_Task (this->suppliers_[i], + this, + this->suppliers_ + i, + this->burst_count_, + this->burst_size_, + this->burst_pause_, + this->payload_size_, + start + this->supplier_type_count_); +} + +void +EC_Driver::disconnect_suppliers (CORBA::Environment &ACE_TRY_ENV) +{ + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->suppliers_[i]->disconnect (TAO_IN_ENV); + ACE_CHECK; + } +} + +void +EC_Driver::disconnect_consumers (CORBA::Environment &ACE_TRY_ENV) +{ + for (int i = 0; i < this->n_consumers_; ++i) + { + this->consumers_[i]->disconnect (TAO_IN_ENV); + ACE_CHECK; + } +} + +void +EC_Driver::dump_results (void) +{ + EC_Driver::Throughput_Stats throughput; + EC_Driver::Latency_Stats latency; + for (int j = 0; j < this->n_consumers_; ++j) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "consumer_%02.2d", j); + + this->consumers_[j]->dump_results (buf); + this->consumers_[j]->accumulate (throughput, latency); + } + ACE_DEBUG ((LM_DEBUG, "\n")); + + EC_Driver::Throughput_Stats suppliers; + for (int i = 0; i < this->n_suppliers_; ++i) + { + char buf[BUFSIZ]; + ACE_OS::sprintf (buf, "supplier_%02.2d", i); + + this->suppliers_[i]->dump_results (buf); + this->suppliers_[i]->accumulate (suppliers); + } + + ACE_DEBUG ((LM_DEBUG, "\nTotals:\n")); + throughput.dump_results ("EC_Consumer", "throughput"); + latency.dump_results ("EC_Consumer", "latency"); + + ACE_DEBUG ((LM_DEBUG, "\n")); + suppliers.dump_results ("EC_Supplier", "accumulated"); +} + +int +EC_Driver::parse_args (int &argc, char *argv []) +{ + ACE_Arg_Shifter arg_shifter (argc, argv); + + while (arg_shifter.is_anything_left ()) + { + char *arg = arg_shifter.get_current (); + + if (ACE_OS::strcmp (arg, "-verbose") == 0) + { + arg_shifter.consume_arg (); + this->verbose_ = 1; + } + + else if (ACE_OS::strcmp (arg, "-remote") == 0) + { + arg_shifter.consume_arg (); + + this->use_remote_ec_ = 1; + if (arg_shifter.is_parameter_next ()) + { + this->event_service_name_ = arg_shifter.get_current (); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-old_reactive") == 0) + { + arg_shifter.consume_arg (); + this->use_old_ec_ = 1; + } + + else if (ACE_OS::strcmp (arg, "-old_threaded") == 0) + { + arg_shifter.consume_arg (); + this->use_old_ec_ = 1; + } + + else if (ACE_OS::strcmp (arg, "-suppliers") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->n_suppliers_ = ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-consumers") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->n_consumers_ = ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-burstcount") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->burst_count_ = ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-burstsize") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->burst_size_ = ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-payloadsize") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->payload_size_ = ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-burstpause") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->burst_pause_ = ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-consumer_tstart") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->consumer_type_start_ = + ACE_ES_EVENT_UNDEFINED + + ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-consumer_tcount") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->consumer_type_count_ = + ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-consumer_tshift") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->consumer_type_shift_ = + ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-supplier_tstart") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->supplier_type_start_ = + ACE_ES_EVENT_UNDEFINED + + ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-supplier_tcount") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->supplier_type_count_ = + ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else if (ACE_OS::strcmp (arg, "-supplier_tshift") == 0) + { + arg_shifter.consume_arg (); + + if (arg_shifter.is_parameter_next ()) + { + this->supplier_type_shift_ = + ACE_OS::atoi (arg_shifter.get_current ()); + arg_shifter.consume_arg (); + } + } + + else + { + arg_shifter.consume_arg (); + } + + } + return 0; +} + +void +EC_Driver::print_usage (void) +{ + ACE_DEBUG ((LM_DEBUG, + "EC_Driver Usage:\n" + " -verbose\n" + " -remote <ec_name>\n" + " -old_reactive\n" + " -old_threaded\n" + " -suppliers <nsuppliers>\n" + " -consumers <nsuppliers>\n" + " -burstcount <bursts>\n" + " -burstsize <size>\n" + " -payloadsize <size>\n" + " -burstpause <usecs>\n" + " -consumer_tstart <type>\n" + " -consumer_tcount <count>\n" + " -consumer_tshift <shift>\n" + " -supplier_tstart <type>\n" + " -supplier_tcount <count>\n" + " -supplier_tshift <shift>\n" + )); +} + +void +EC_Driver::modify_attributes (TAO_EC_Event_Channel_Attributes&) +{ +} + +void +EC_Driver::activate_suppliers (CORBA::Environment &) +{ + int priority = + (ACE_Sched_Params::priority_min (ACE_SCHED_FIFO) + + ACE_Sched_Params::priority_max (ACE_SCHED_FIFO)) / 2; + + ACE_NEW (this->tasks_, + ACE_Task_Base*[this->n_suppliers_]); + + for (int i = 0; i < this->n_suppliers_; ++i) + { + this->tasks_[i] = this->allocate_task (i); + + if (this->tasks_[i]->activate (this->thr_create_flags_, + 1, 0, priority) == -1) + { + ACE_ERROR ((LM_ERROR, + "Cannot activate thread for supplier %d\n", + i)); + } + } +} + +void +EC_Driver::consumer_push (void*, + const RtecEventComm::EventSet&, + CORBA::Environment&) +{ +} + +void +EC_Driver::consumer_shutdown (void*, + CORBA::Environment&) +{ +} + +void +EC_Driver::consumer_disconnect (void*, + CORBA::Environment&) +{ +} + +// **************************************************************** + +void +EC_Driver::Latency_Stats::dump_results (const char *test_name, + const char *sub_test) +{ + if (this->n_ <= 1) + return; + + ACE_hrtime_t avg = this->sum_ / this->n_; + ACE_hrtime_t dev = + this->sum2_ / this->n_ - avg*avg; + + ACE_UINT32 gsf = ACE_High_Res_Timer::global_scale_factor (); + + double min_usec = ACE_CU64_TO_CU32 (this->min_) / gsf; + double max_usec = ACE_CU64_TO_CU32 (this->max_) / gsf; + double avg_usec = ACE_CU64_TO_CU32 (avg) / gsf; + double dev_usec = ACE_CU64_TO_CU32 (dev) / (gsf * gsf); + ACE_DEBUG ((LM_DEBUG, + "%s/%s: %.2f/%.2f/%.2f/%.2f (min/avg/max/var^2) [usecs]\n", + test_name, sub_test, + min_usec, avg_usec, max_usec, dev_usec)); +} + +void +EC_Driver::Latency_Stats::accumulate (const Latency_Stats& rhs) +{ + if (rhs.n_ == 0) + return; + + if (this->n_ == 0) + { + *this = rhs; + return; + } + + if (this->min_ > rhs.min_) + this->min_ = rhs.min_; + if (this->max_ < rhs.max_) + this->max_ = rhs.max_; + + this->sum_ += rhs.sum_; + this->sum2_ += rhs.sum2_; + this->n_ += rhs.n_; +} + +// **************************************************************** + +void +EC_Driver::Throughput_Stats::accumulate (const Throughput_Stats& rhs) +{ + if (!this->done_) + { + this->done_ = 1; + this->start_ = rhs.start_; + this->stop_ = rhs.stop_; + this->n_ = rhs.n_; + return; + } + + if (this->start_ > rhs.start_) + this->start_ = rhs.start_; + + if (this->stop_ < rhs.stop_) + this->stop_ = rhs.stop_; + + this->n_ += rhs.n_; +} + +void +EC_Driver::Throughput_Stats::dump_results (const char *test_name, + const char *subtest) +{ + if (this->n_ == 0) + { + ACE_DEBUG ((LM_DEBUG, + "%s/%s: no events recorded\n", + test_name, subtest)); + return; + } + + if (this->done_ == 0) + { + this->stop (); + ACE_DEBUG ((LM_DEBUG, + "%s/%s: incomplete data," + " potentially skewed results\n", + test_name, subtest)); + } + + ACE_Time_Value tv; + ACE_High_Res_Timer::hrtime_to_tv (tv, this->stop_ - this->start_); + + double f = 1.0/(tv.sec () + tv.usec () / 1000000.0); + double events_per_second = this->n_ * f; + + ACE_DEBUG ((LM_DEBUG, + "%s/%s: " + "%d / %d.%06.6d = %.3f events/second\n", + test_name, subtest, + this->n_, + tv.sec (), tv.usec (), + events_per_second)); +} diff --git a/TAO/orbsvcs/tests/Event/lib/Driver.h b/TAO/orbsvcs/tests/Event/lib/Driver.h new file mode 100644 index 00000000000..5f6d5afb66b --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Driver.h @@ -0,0 +1,354 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = LIBRARY +// ORBSVCS Real-time Event Channel testsuite +// +// = FILENAME +// Driver +// +// = AUTHOR +// Carlos O'Ryan (coryan@cs.wustl.edu) +// +// ============================================================================ + +#ifndef EC_DRIVER_H +#define EC_DRIVER_H + +#include "orbsvcs/RtecEventChannelAdminS.h" + +class TAO_EC_Event_Channel_Attributes; +class TAO_Module_Factory; +class EC_Consumer; +class EC_Supplier; + +#define EC_DISABLE_REMOTE_EC +#define EC_DISABLE_OLD_EC + +#if !defined(EC_DISABLE_REMOTE_EC) +#include "orbsvcs/CosNamingC.h" +#endif + +#if !defined(EC_DISABLE_OLD_EC) +#include "orbsvcs/RtecSchedulerC.h" +#endif + +class EC_Driver +{ + // + // = TITLE + // Defines the interface of a test driver + // + // = DESCRIPTION + // Abstract base class for the test driver, this let us implement a + // collocated and a non-collocated test, and to write generic + // consumers and suppliers that can call back the driver. + // +public: + EC_Driver (void); + // Constructor + + virtual ~EC_Driver (void); + // Destructor + + int verbose (void) const; + // Flag to indicate in the test should be verbose. + + virtual int run (int argc, char* argv[]); + // Execute the test. + + virtual void initialize_orb_and_poa (int& argc, char* argv[], + CORBA::Environment& env); + // Initialize the ORB and obtain the RootPOA object + + virtual int parse_args (int& argc, char* argv[]); + // Parse the common command-line arguments for all tests + + virtual void print_usage (void); + // Print the usage method + + virtual void print_args (void) const; + // Print out the arguments + + virtual int move_to_rt_class (void); + // Run the test in the real-time class, return -1 on error. + + virtual void initialize_ec_impl (CORBA::Environment& env); + // Construct the EC and its helper objects, also activates the EC in + // the RootPOA. + + virtual void connect_consumers (CORBA::Environment& env); + // Connect all the consumers, by default it lets each consumer + // connect itself. + + virtual void connect_consumer ( + RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, + int i, + CORBA::Environment &ACE_TRY_ENV); + // Connect consumer number <i> using the consumer_admin provided. + + virtual void build_consumer_qos ( + int i, + RtecEventChannelAdmin::ConsumerQOS& qos, + int& shutdown_event_type); + // Build the QoS requirements for consumer <i> + + virtual void connect_suppliers (CORBA::Environment& env); + // Connect all the suppliers, by default it lets each supplier + // connect itself. + + virtual void connect_supplier ( + RtecEventChannelAdmin::SupplierAdmin_ptr supplier_admin, + int i, + CORBA::Environment &ACE_TRY_ENV); + // Connect supplier number <i> using the supplier_admin provided. + + virtual void build_supplier_qos ( + int i, + RtecEventChannelAdmin::SupplierQOS& qos, + int& shutdown_event_type); + // Build the QoS requirements for supplier <i> + + virtual void execute_test (CORBA::Environment &env); + // Execute the test, by default simply call activate_suppliers() + + virtual void dump_results (void); + // Dump the results, i.e. invoke dump_results on all the suppliers + // and consumers, collect the latency and throughput results for + // each and print the totals too. + + virtual void deactivate_ec (CORBA::Environment& env); + // De-activate the EC (and its helper classes). + + virtual void disconnect_consumers (CORBA::Environment& env); + // Disconnect all the consumers. + + virtual void disconnect_suppliers (CORBA::Environment& env); + // Disconnect all the suppliers. + + virtual void modify_attributes (TAO_EC_Event_Channel_Attributes& attr); + // Allow modifications of the default EC attributes + + virtual void activate_suppliers (CORBA::Environment& env); + // Activate all the suppliers, by default runs each supplier on its + // own thread. + + virtual void consumer_push (void* consumer_cookie, + const RtecEventComm::EventSet& event, + CORBA::Environment& ACE_TRY_ENV); + // One of the consumers in the test has received an event + + virtual void consumer_shutdown (void* consumer_cookie, + CORBA::Environment& ACE_TRY_ENV); + // One of the consumers has received a shutdown event + + virtual void consumer_disconnect (void* consumer_cookie, + CORBA::Environment& ACE_TRY_ENV); + // One of the consumers in the test has been disconnected from the EC + +#if !defined(EC_DISABLE_REMOTE_EC) + virtual void obtain_remote_ec (CORBA::Environment& ACE_TRY_ENV); + // Obtain the EC from the Naming service + + virtual CosNaming::NamingContext_var + get_naming_context (CORBA::Environment &ACE_TRY_ENV); +#endif + +#if !defined(EC_DISABLE_OLD_EC) + virtual void initialize_old_ec (CORBA::Environment& ACE_TRY_ENV); + // Initialize the EC using the old implementation +#endif + + virtual void initialize_new_ec (CORBA::Environment& ACE_TRY_ENV); + // Initialize the EC using the old implementation + + virtual int allocate_consumers (void); + virtual int allocate_suppliers (void); + // Allocate the suppliers and the consumers + + virtual EC_Consumer* allocate_consumer (int i); + virtual EC_Supplier* allocate_supplier (int i); + // Allocate one consumer or supplier + + virtual ACE_Task_Base* allocate_task (int i); + // Allocate one task for supplier number <i> + + class Latency_Stats + { + // = TITLE + // Maintains latency statistics. + // + // = DESCRIPTION + // This class is used to keep latency statistics, collected + // using the high resolution timers. + // + // = TODO + // Implement a version that keeps a histogram, with bounded + // memory requirements. + // + public: + Latency_Stats (void); + + void dump_results (const char* test_name, + const char* sub_test); + + void sample (ACE_hrtime_t sample); + + void accumulate (const Latency_Stats& stats); + // Useful to merge several Latency_Stats. + + private: + u_long n_; + ACE_hrtime_t sum_; + ACE_hrtime_t sum2_; + ACE_hrtime_t min_; + ACE_hrtime_t max_; + }; + + class Throughput_Stats + { + // = TITLE + // Maintains throughput statistics. + // + // = DESCRIPTION + // This class is used to keep throughput statistics, the data is + // collected using the High Resolution Timer. + // + public: + Throughput_Stats (void); + + void dump_results (const char* test_name, + const char* sub_test); + + void start (void); + // Start measuring the time. + + void stop (void); + // The test has completed + + void sample (void); + // An event has been received + + void accumulate (const Throughput_Stats& stats); + // Useful to merge several Throughput_Stats. + + private: + CORBA::ULong n_; + int done_; + ACE_hrtime_t start_; + ACE_hrtime_t stop_; + }; + +protected: + CORBA::ORB_var orb_; + // The ORB + + PortableServer::POA_var root_poa_; + // The Root POA + + int n_consumers_; + // The number of consumers + + EC_Consumer** consumers_; + // The consumers + + int n_suppliers_; + // The number of suppliers + + EC_Supplier** suppliers_; + // The suppliers + + ACE_Task_Base** tasks_; + // The tasks for each supplier + + int burst_count_; + // How many bursts we will send from each supplier. + + int burst_size_; + // The number of events + + int payload_size_; + // The size of the payload on each event. + + int burst_pause_; + // The time between each event burst, in microseconds. + + int consumer_type_start_; + int consumer_type_count_; + int consumer_type_shift_; + // The consumers subscribe to different sets of events, as follows: + // + // Consumer0: [start , start + count) + // Consumer1: [start + 1*shift, start + 1*shift + count) + // Consumer2: [start + 2*shift, start + 2*shift + count) + // ..... + // .... + // . + // Some sub-tests may choose other configurations, but this is good + // for many cases. + + int supplier_type_start_; + int supplier_type_count_; + int supplier_type_shift_; + // The suppliers generate different sets of events, as follows: + // + // Supplier0: [start , start + count) + // Supplier1: [start + 1*shift, start + 1*shift + count) + // Supplier2: [start + 2*shift, start + 2*shift + count) + // ..... + // .... + // . + // Some sub-tests may choose other configurations, but this is good + // for many cases. + + const char* pid_file_name_; + // The name of a file where the process stores its pid + + int verbose_; + // Verbosity flag + + int thr_create_flags_; + // The flags used to create threads, by default we attempt: + // + // THR_SCHED_FIFO|THR_BOUND|THR_NEW_LWP + // + // but if we don't have enough privileges we fall back to + // + // THR_NEW_LWP + // + + int use_remote_ec_; + // Use a remote event channel. If this flag is enabled it + // superseedes any options for the event channel implementation. + + const char* event_service_name_; + // The name of the remote event service + + int use_old_ec_; + // Use the old implementation of the event channel. + +#if !defined(TAO_EC_DISABLE_OLD_EC) + TAO_Module_Factory* module_factory_; + // The module factory for the OLD ec + + POA_RtecScheduler::Scheduler *scheduler_impl_; + // The scheduler implementation + + RtecScheduler::Scheduler_var scheduler_; + // The scheduler object reference +#endif + + POA_RtecEventChannelAdmin::EventChannel *ec_impl_; + // The event channel implementation + + RtecEventChannelAdmin::EventChannel_var event_channel_; + // The event channel object reference +}; + +#if defined (__ACE_INLINE__) +#include "Driver.i" +#endif /* __ACE_INLINE__ */ + +#endif /* ECT_CONSUMER_H */ diff --git a/TAO/orbsvcs/tests/Event/lib/Driver.i b/TAO/orbsvcs/tests/Event/lib/Driver.i new file mode 100644 index 00000000000..3c189faa883 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Driver.i @@ -0,0 +1,65 @@ +// $Id$ + +ACE_INLINE int +EC_Driver::verbose (void) const +{ + return this->verbose_; +} + +// **************************************************************** + +ACE_INLINE +EC_Driver::Latency_Stats::Latency_Stats (void) + : n_ (0), + sum_ (0), + sum2_ (0), + min_ (0), + max_ (0) +{ +} + +ACE_INLINE +void EC_Driver::Latency_Stats::sample (ACE_hrtime_t sample) +{ + this->sum_ += sample; + this->sum2_ += sample * sample; + if (this->n_ == 0) + { + this->min_ = sample; + this->max_ = sample; + } + else if (this->min_ > sample) + this->min_ = sample; + else if (this->max_ < sample) + this->max_ = sample; + this->n_++; +} + +// **************************************************************** + +ACE_INLINE +EC_Driver::Throughput_Stats::Throughput_Stats (void) + : n_ (0), + done_ (0) +{ +} + +ACE_INLINE void +EC_Driver::Throughput_Stats::start (void) +{ + this->done_ = 0; + this->start_ = ACE_OS::gethrtime (); +} + +ACE_INLINE void +EC_Driver::Throughput_Stats::stop (void) +{ + this->stop_ = ACE_OS::gethrtime (); + this->done_ = 1; +} + +ACE_INLINE void +EC_Driver::Throughput_Stats::sample (void) +{ + this->n_++; +} diff --git a/TAO/orbsvcs/tests/Event/lib/Makefile b/TAO/orbsvcs/tests/Event/lib/Makefile new file mode 100644 index 00000000000..47f26c888e9 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Makefile @@ -0,0 +1,936 @@ +#---------------------------------------------------------------------------- +# +# $Id$ +# +#---------------------------------------------------------------------------- + +ifndef TAO_ROOT + TAO_ROOT = $(ACE_ROOT)/TAO +endif # ! TAO_ROOT + +MAKEFILE = Makefile +LIBNAME = libECTests +LIB2 = $(LIBNAME).a +SHLIB2 = $(LIBNAME).$(SOEXT) + +TAO_ORBSVCS := $(shell $(ACE_ROOT)/bin/ace_components --orbsvcs) +ifeq (Event2,$(findstring Event2,$(TAO_ORBSVCS))) + LIB = $(LIB2) + SHLIB = $(SHLIB2) +endif # Event2 + +LIBS += -lorbsvcs -lTAO -lACE + +SRCS = Driver Consumer Supplier +FILES = $(SRCS) +DEFS = $(addsuffix .h,$(FILES)) +LSRC = $(addsuffix .cpp,$(FILES)) + + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(TAO_ROOT)/rules.tao.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU +include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU + +#---------------------------------------------------------------------------- +# Local targets (and local hacks) +#---------------------------------------------------------------------------- + +LDFLAGS += -L$(TAO_ROOT)/tao +CPPFLAGS += -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs $(TSS_ORB_FLAG) + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- + +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + +.obj/Driver.o .obj/Driver.so .shobj/Driver.o .shobj/Driver.so: Driver.cpp Driver.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ + $(TAO_ROOT)/tao/corba.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Principal.i \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Context.h \ + $(TAO_ROOT)/tao/Context.i \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/varout.h \ + $(TAO_ROOT)/tao/varout.i \ + $(TAO_ROOT)/tao/varout.cpp \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/Servant_Base.i \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Active_Object_Map.h \ + $(TAO_ROOT)/tao/Key_Adapters.h \ + $(ACE_ROOT)/ace/Map.h \ + $(ACE_ROOT)/ace/Map.i \ + $(ACE_ROOT)/ace/Map_T.h \ + $(ACE_ROOT)/ace/Pair.h \ + $(ACE_ROOT)/ace/Pair.i \ + $(ACE_ROOT)/ace/Pair_T.h \ + $(ACE_ROOT)/ace/Pair_T.i \ + $(ACE_ROOT)/ace/Pair_T.cpp \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Active_Map_Manager.h \ + $(ACE_ROOT)/ace/Active_Map_Manager.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Map_T.i \ + $(ACE_ROOT)/ace/Map_T.cpp \ + $(TAO_ROOT)/tao/Key_Adapters.i \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(TAO_ROOT)/tao/Connect.h \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.i \ + $(ACE_ROOT)/ace/Svc_Handler.cpp \ + $(ACE_ROOT)/ace/Dynamic.h \ + $(ACE_ROOT)/ace/Dynamic.i \ + $(ACE_ROOT)/ace/Acceptor.i \ + $(ACE_ROOT)/ace/Acceptor.cpp \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Active_Object_Map.i \ + $(TAO_ROOT)/tao/POAManager.h \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/POAManager.i \ + $(TAO_ROOT)/tao/Object_Adapter.h \ + $(TAO_ROOT)/tao/Object_Adapter.i \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/MProfile.h \ + $(TAO_ROOT)/tao/MProfile.i \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/Policy_Manager.h \ + $(TAO_ROOT)/tao/Resource_Factory.h \ + $(TAO_ROOT)/tao/IIOP_Connector.h \ + $(ACE_ROOT)/ace/Connector.h \ + $(ACE_ROOT)/ace/Connector.i \ + $(ACE_ROOT)/ace/Connector.cpp \ + $(ACE_ROOT)/ace/SOCK_Connector.h \ + $(ACE_ROOT)/ace/SOCK_Connector.i \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Invocation.h \ + $(TAO_ROOT)/tao/Invocation.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ + $(TAO_ROOT)/tao/DynAny_i.h \ + $(TAO_ROOT)/tao/Union.h \ + $(TAO_ROOT)/tao/ValueBase.h \ + $(TAO_ROOT)/tao/ValueBase.i \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/ValueFactory.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ + Driver.i \ + $(ACE_ROOT)/ace/High_Res_Timer.h \ + $(ACE_ROOT)/ace/High_Res_Timer.i +.obj/Consumer.o .obj/Consumer.so .shobj/Consumer.o .shobj/Consumer.so: Consumer.cpp Consumer.h Driver.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ + $(TAO_ROOT)/tao/corba.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Principal.i \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Context.h \ + $(TAO_ROOT)/tao/Context.i \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/varout.h \ + $(TAO_ROOT)/tao/varout.i \ + $(TAO_ROOT)/tao/varout.cpp \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/Servant_Base.i \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Active_Object_Map.h \ + $(TAO_ROOT)/tao/Key_Adapters.h \ + $(ACE_ROOT)/ace/Map.h \ + $(ACE_ROOT)/ace/Map.i \ + $(ACE_ROOT)/ace/Map_T.h \ + $(ACE_ROOT)/ace/Pair.h \ + $(ACE_ROOT)/ace/Pair.i \ + $(ACE_ROOT)/ace/Pair_T.h \ + $(ACE_ROOT)/ace/Pair_T.i \ + $(ACE_ROOT)/ace/Pair_T.cpp \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Active_Map_Manager.h \ + $(ACE_ROOT)/ace/Active_Map_Manager.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Map_T.i \ + $(ACE_ROOT)/ace/Map_T.cpp \ + $(TAO_ROOT)/tao/Key_Adapters.i \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(TAO_ROOT)/tao/Connect.h \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.i \ + $(ACE_ROOT)/ace/Svc_Handler.cpp \ + $(ACE_ROOT)/ace/Dynamic.h \ + $(ACE_ROOT)/ace/Dynamic.i \ + $(ACE_ROOT)/ace/Acceptor.i \ + $(ACE_ROOT)/ace/Acceptor.cpp \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Active_Object_Map.i \ + $(TAO_ROOT)/tao/POAManager.h \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/POAManager.i \ + $(TAO_ROOT)/tao/Object_Adapter.h \ + $(TAO_ROOT)/tao/Object_Adapter.i \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/MProfile.h \ + $(TAO_ROOT)/tao/MProfile.i \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/Policy_Manager.h \ + $(TAO_ROOT)/tao/Resource_Factory.h \ + $(TAO_ROOT)/tao/IIOP_Connector.h \ + $(ACE_ROOT)/ace/Connector.h \ + $(ACE_ROOT)/ace/Connector.i \ + $(ACE_ROOT)/ace/Connector.cpp \ + $(ACE_ROOT)/ace/SOCK_Connector.h \ + $(ACE_ROOT)/ace/SOCK_Connector.i \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Invocation.h \ + $(TAO_ROOT)/tao/Invocation.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ + $(TAO_ROOT)/tao/DynAny_i.h \ + $(TAO_ROOT)/tao/Union.h \ + $(TAO_ROOT)/tao/ValueBase.h \ + $(TAO_ROOT)/tao/ValueBase.i \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/ValueFactory.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ + Driver.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.i \ + $(TAO_ROOT)/tao/TimeBaseS_T.cpp \ + $(TAO_ROOT)/tao/TimeBaseS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i +.obj/Supplier.o .obj/Supplier.so .shobj/Supplier.o .shobj/Supplier.so: Supplier.cpp Supplier.h Driver.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.h \ + $(TAO_ROOT)/tao/corba.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Principal.i \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Context.h \ + $(TAO_ROOT)/tao/Context.i \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/varout.h \ + $(TAO_ROOT)/tao/varout.i \ + $(TAO_ROOT)/tao/varout.cpp \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/Servant_Base.i \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Active_Object_Map.h \ + $(TAO_ROOT)/tao/Key_Adapters.h \ + $(ACE_ROOT)/ace/Map.h \ + $(ACE_ROOT)/ace/Map.i \ + $(ACE_ROOT)/ace/Map_T.h \ + $(ACE_ROOT)/ace/Pair.h \ + $(ACE_ROOT)/ace/Pair.i \ + $(ACE_ROOT)/ace/Pair_T.h \ + $(ACE_ROOT)/ace/Pair_T.i \ + $(ACE_ROOT)/ace/Pair_T.cpp \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Active_Map_Manager.h \ + $(ACE_ROOT)/ace/Active_Map_Manager.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Map_T.i \ + $(ACE_ROOT)/ace/Map_T.cpp \ + $(TAO_ROOT)/tao/Key_Adapters.i \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(TAO_ROOT)/tao/Connect.h \ + $(ACE_ROOT)/ace/Acceptor.h \ + $(ACE_ROOT)/ace/Svc_Handler.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Svc_Handler.i \ + $(ACE_ROOT)/ace/Svc_Handler.cpp \ + $(ACE_ROOT)/ace/Dynamic.h \ + $(ACE_ROOT)/ace/Dynamic.i \ + $(ACE_ROOT)/ace/Acceptor.i \ + $(ACE_ROOT)/ace/Acceptor.cpp \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Active_Object_Map.i \ + $(TAO_ROOT)/tao/POAManager.h \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/POAManager.i \ + $(TAO_ROOT)/tao/Object_Adapter.h \ + $(TAO_ROOT)/tao/Object_Adapter.i \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(TAO_ROOT)/tao/MProfile.h \ + $(TAO_ROOT)/tao/MProfile.i \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/Policy_Manager.h \ + $(TAO_ROOT)/tao/Resource_Factory.h \ + $(TAO_ROOT)/tao/IIOP_Connector.h \ + $(ACE_ROOT)/ace/Connector.h \ + $(ACE_ROOT)/ace/Connector.i \ + $(ACE_ROOT)/ace/Connector.cpp \ + $(ACE_ROOT)/ace/SOCK_Connector.h \ + $(ACE_ROOT)/ace/SOCK_Connector.i \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Invocation.h \ + $(TAO_ROOT)/tao/Invocation.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ + $(TAO_ROOT)/tao/DynAny_i.h \ + $(TAO_ROOT)/tao/Union.h \ + $(TAO_ROOT)/tao/ValueBase.h \ + $(TAO_ROOT)/tao/ValueBase.i \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/ValueFactory.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommC.i \ + Driver.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.i \ + $(TAO_ROOT)/tao/TimeBaseS_T.cpp \ + $(TAO_ROOT)/tao/TimeBaseS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/TimeBaseS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventCommS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecSchedulerC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/RtecEventChannelAdminC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Time_Utilities.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Service_Constants.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Event_Utilities.i + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Event/lib/Supplier.cpp b/TAO/orbsvcs/tests/Event/lib/Supplier.cpp new file mode 100644 index 00000000000..928f00114d2 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Supplier.cpp @@ -0,0 +1,256 @@ +// $Id$ + +#include "Supplier.h" +#include "orbsvcs/Time_Utilities.h" +#include "orbsvcs/Event_Utilities.h" + +ACE_RCSID(EC_Tests, EC_Supplier, "$Id$") + +EC_Supplier::EC_Supplier (EC_Driver *driver, + void* cookie) + : driver_ (driver), + cookie_ (cookie), + push_count_ (0), + burst_count_ (0), + burst_size_ (0), + payload_size_ (0), + burst_pause_ (0), + shutdown_event_type_ (0) +{ +} + +void +EC_Supplier::send_event (int event_number, + CORBA::Environment &ACE_TRY_ENV) +{ + if (CORBA::is_nil (this->consumer_proxy_.in ())) + return; + + // Create the event... + + RtecEventComm::EventSet event (1); + event.length (1); + + event[0].header.ttl = 1; + + ACE_hrtime_t t = ACE_OS::gethrtime (); + ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, t); + event[0].header.ec_recv_time = ORBSVCS_Time::zero (); + event[0].header.ec_send_time = ORBSVCS_Time::zero (); + + event[0].data.x = 0; + event[0].data.y = 0; + + // We use replace to minimize the copies, this should result + // in just one memory allocation: + event[0].data.payload.length (this->payload_size_); + + this->event_type (event_number, event[0]); + + this->send_event (event, ACE_TRY_ENV); +} + +void +EC_Supplier::send_event (const RtecEventComm::EventSet& event, + CORBA::Environment &ACE_TRY_ENV) +{ + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + + // We start the timer as soon as we receive the first event... + this->throughput_.sample (); + + this->push_count_ += event.length (); + + if (TAO_debug_level > 0 + && this->push_count_ % 100 == 0) + { + ACE_DEBUG ((LM_DEBUG, + "EC_Consumer (%P|%t): %d events received\n", + this->push_count_)); + } + this->consumer_proxy_->push (event, ACE_TRY_ENV); +} + +void +EC_Supplier::event_type (int event_number, + RtecEventComm::Event &event) +{ + int i = event_number % this->qos_.publications.length (); + int type = this->qos_.publications[i].event.header.type; + if (type == this->shutdown_event_type_) + i = 0; + + RtecEventComm::EventHeader& header = + this->qos_.publications[i].event.header; + + event.header.source = header.source; + event.header.type = header.type; +} + +void +EC_Supplier::connect (RtecEventChannelAdmin::SupplierAdmin_ptr supplier_admin, + const RtecEventChannelAdmin::SupplierQOS& qos, + int shutdown_event_type, + CORBA::Environment &ACE_TRY_ENV) +{ + this->consumer_proxy_ = + supplier_admin->obtain_push_consumer (ACE_TRY_ENV); + ACE_CHECK; + + this->connect (qos, shutdown_event_type, ACE_TRY_ENV); + ACE_CHECK; +} + +void +EC_Supplier::connect (const RtecEventChannelAdmin::SupplierQOS& qos, + int shutdown_event_type, + CORBA::Environment &ACE_TRY_ENV) +{ + this->qos_ = qos; + this->shutdown_event_type_ = shutdown_event_type; + + RtecEventComm::PushSupplier_var objref = + this->_this (ACE_TRY_ENV); + ACE_CHECK; + + this->consumer_proxy_->connect_push_supplier (objref.in (), + qos, + ACE_TRY_ENV); + ACE_CHECK; +} + +void +EC_Supplier::disconnect (CORBA::Environment &ACE_TRY_ENV) +{ + if (CORBA::is_nil (this->consumer_proxy_.in ())) + return; + + this->consumer_proxy_->disconnect_push_consumer (ACE_TRY_ENV); + ACE_CHECK; + + this->consumer_proxy_ = + RtecEventChannelAdmin::ProxyPushConsumer::_nil (); + + // Deactivate the servant + PortableServer::POA_var poa = + this->_default_POA (ACE_TRY_ENV); + ACE_CHECK; + PortableServer::ObjectId_var id = + poa->servant_to_id (this, ACE_TRY_ENV); + ACE_CHECK; + poa->deactivate_object (id.in (), ACE_TRY_ENV); + ACE_CHECK; +} + +void +EC_Supplier::disconnect_push_supplier (CORBA::Environment &) +{ +} + +void +EC_Supplier::dump_results (const char* name) +{ + this->throughput_.dump_results ("EC_Supplier", name); +} + +void +EC_Supplier::accumulate (EC_Driver::Throughput_Stats& stats) const +{ + stats.accumulate (this->throughput_); +} + +// **************************************************************** + +EC_Supplier_Task::EC_Supplier_Task (EC_Supplier* supplier, + EC_Driver* driver, + void* cookie, + int burst_count, + int burst_size, + int burst_pause, + int payload_size, + int shutdown_event_type, + ACE_Thread_Manager* thr_mgr) + : ACE_Task_Base (thr_mgr), + supplier_ (supplier), + driver_ (driver), + cookie_ (cookie), + burst_count_ (burst_count), + burst_size_ (burst_size), + burst_pause_ (burst_pause), + payload_size_ (payload_size), + shutdown_event_type_ (shutdown_event_type) +{ +} + +int +EC_Supplier_Task::svc (void) +{ + ACE_TRY_NEW_ENV + { + // Initialize a time value to pace the test + ACE_Time_Value tv (0, this->burst_pause_); + + RtecEventComm::EventSet event (1); + event.length (1); + + event[0].header.ttl = 1; + + ACE_hrtime_t t = ACE_OS::gethrtime (); + ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, t); + event[0].header.ec_recv_time = ORBSVCS_Time::zero (); + event[0].header.ec_send_time = ORBSVCS_Time::zero (); + + event[0].data.x = 0; + event[0].data.y = 0; + + // We use replace to minimize the copies, this should result + // in just one memory allocation; + event[0].data.payload.length (this->payload_size_); + + for (int i = 0; i < this->burst_count_; ++i) + { + for (int j = 0; j < this->burst_size_; ++j) + { + this->supplier_->event_type (j, event[0]); + + ACE_hrtime_t now = ACE_OS::gethrtime (); + ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, + now); + // ACE_DEBUG ((LM_DEBUG, "(%t) supplier push event\n")); + + this->supplier_->send_event (event, ACE_TRY_ENV); + + ACE_TRY_CHECK; + } + + ACE_OS::sleep (tv); + } + + // Send one event shutdown from each supplier + event[0].header.type = this->shutdown_event_type_; + ACE_hrtime_t now = ACE_OS::gethrtime (); + ORBSVCS_Time::hrtime_to_TimeT (event[0].header.creation_time, + now); + this->supplier_->send_event (event, ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCH (CORBA::SystemException, sys_ex) + { + ACE_PRINT_EXCEPTION (sys_ex, "SYS_EX"); + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "SYS_EX"); + } + ACE_ENDTRY; + + ACE_DEBUG ((LM_DEBUG, + "Supplier task finished\n")); + return 0; +} + +// **************************************************************** + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +#elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/orbsvcs/tests/Event/lib/Supplier.h b/TAO/orbsvcs/tests/Event/lib/Supplier.h new file mode 100644 index 00000000000..41f160a2b50 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/lib/Supplier.h @@ -0,0 +1,178 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = LIBRARY +// ORBSVCS Real-time Event Channel testsuite +// +// = FILENAME +// Supplier +// +// = AUTHOR +// Carlos O'Ryan (coryan@cs.wustl.edu) +// +// ============================================================================ + +#ifndef EC_SUPPLIER_H +#define EC_SUPPLIER_H + +#include "Driver.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "orbsvcs/RtecEventCommS.h" +#include "orbsvcs/RtecEventChannelAdminC.h" +#include "ace/Task.h" + +class EC_Supplier : public POA_RtecEventComm::PushSupplier +{ + // + // = TITLE + // Simple supplier object to implement EC tests. + // + // = DESCRIPTION + // This class is a supplier of events. + // The class is just a helper to simplify common tasks in EC + // tests, such as subscribing for a range of events, disconnecting + // from the EC, informing the driver of shutdown messages, etc. + // + // There are several ways to connect and disconnect this class, + // and it is up to the driver program to use the right one. + // + // The driver can request that to this class to send a new event, + // a new shutdown event or to become "active" and send a number of + // events at a certain rate. + // +public: + EC_Supplier (EC_Driver *driver, + void* supplier_cookie); + // Constructor, specifies the types of events to send. + // Notice that the user can connect to the EC using other + // publications, this is useful for filtering tests. + + void send_event (int event_number, + CORBA::Environment& ACE_TRY_ENV); + // The types of the event is chosen by the driver, based on the + // cookie and the <event_number> + + void send_event (const RtecEventComm::EventSet& event, + CORBA::Environment& ACE_TRY_ENV); + // Send <event> to the EC. + + void send_event (int event_number, + const RtecEventComm::Event& event); + // Set the event type and source in <event> + + void send_shutdown (CORBA::Environment& ACE_TRY_ENV); + // Send a shutdown event. + + void connect (RtecEventChannelAdmin::SupplierAdmin_ptr supplier_admin, + const RtecEventChannelAdmin::SupplierQOS& qos, + int shutdown_event_type, + CORBA::Environment& ACE_TRY_ENV); + // Connect using a <supplier_admin> and publications (<qos>) + // computed by the user + + void connect (const RtecEventChannelAdmin::SupplierQOS& qos, + int shutdown_event_type, + CORBA::Environment& ACE_TRY_ENV); + // Connect using the current consumer_proxy (useful for reconnect test) + + void disconnect (CORBA::Environment &ACE_TRY_ENV); + // Disconnect from the EC, also deactivates the object + + void dump_results (const char* name); + // Dump the results... + + void accumulate (EC_Driver::Throughput_Stats& stats) const; + // Add our statistics to <stats> + + void event_type (int event_number, + RtecEventComm::Event& event); + // Return an event type to push.... + + // = The PushSupplier methods + virtual void disconnect_push_supplier (CORBA::Environment &); + +private: + EC_Driver *driver_; + // Class we forward to. + + void* cookie_; + // Magic cookie provided by the supplier to identify ourselves + + ACE_SYNCH_MUTEX lock_; + // Protect the internal state + + int push_count_; + // Count the number of push() calls + + RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; + // We talk to the EC (as a supplier) using this proxy. + + EC_Driver::Throughput_Stats throughput_; + // Measure the elapsed time spent while sending the events. + + int burst_count_; + int burst_size_; + int payload_size_; + int burst_pause_; + + int shutdown_event_type_; + // The test data. + + RtecEventChannelAdmin::SupplierQOS qos_; + // The publications, used to select the events. +}; + +// **************************************************************** + +class EC_Supplier_Task : public ACE_Task_Base +{ + // +public: + EC_Supplier_Task (EC_Supplier* supplier, + EC_Driver* driver, + void* cookie, + int burst_count, + int burst_size, + int burst_pause, + int payload_size, + int shutdown_event_type, + ACE_Thread_Manager* thr_mgr = 0); + // Constructor + + virtual int svc (void); + // The svc call + +private: + EC_Supplier* supplier_; + // The supplier + + EC_Driver* driver_; + // The driver program + + void* cookie_; + // The magic cookie assigned to the supplier + + int burst_count_; + // Number of events "bursts" + + int burst_size_; + // The number of events in a "burst", i.e. between two calls to + // sleep. + + int burst_pause_; + // The sleep time (in usecs) between each burst + + int payload_size_; + // The size of the payload in each event. + + int shutdown_event_type_; + // Define the shutdown event, invoked at the end of the loop. +}; + +#endif /* EC_SUPPLIER_H */ diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp index 1e88f59aec4..a8378f7aa59 100644 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp +++ b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.cpp @@ -900,11 +900,9 @@ main (int argc, char *argv []) TAO_TRY_ENV); TAO_CHECK_ENV; #else - TAO_EC_Basic_Factory ec_factory; - - TAO_EC_Event_Channel ec_impl (root_poa.in (), - root_poa.in (), - &ec_factory); + TAO_EC_Event_Channel_Attributes attr(root_poa.in (), + root_poa.in ()); + TAO_EC_Event_Channel ec_impl (attr); ec_impl.activate (TAO_TRY_ENV); TAO_CHECK_ENV; |