From 8172fee17b8818a80e31ad48fcf54eac407a8cac Mon Sep 17 00:00:00 2001 From: dengg Date: Thu, 26 Oct 2006 16:43:25 +0000 Subject: Merged from CIAO-events-3 branch. --- modules/CIAO/CIDLC/ServantHeaderGenerator.cpp | 11 + modules/CIAO/CIDLC/ServantSourceGenerator.cpp | 36 +- .../Events/CIAO_EventService_Factory_impl.cpp | 18 +- .../Events/CIAO_EventService_Factory_impl.h | 6 +- .../CIAO_Events_Base/CIAO_EventServiceBase.cpp | 13 + .../CIAO_Events_Base/CIAO_EventServiceBase.h | 12 + .../Events/CIAO_Events_Base/CIAO_Events.idl | 8 +- .../ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp | 392 ++++++++++++++++----- .../CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h | 97 +++-- .../ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl | 16 + .../ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc | 2 + .../Events/CIAO_RTEC/SimpleAddressServer.cpp | 33 ++ .../Events/CIAO_RTEC/SimpleAddressServer.h | 26 ++ modules/CIAO/docs/schema/CIAOEvents.xsd | 42 +-- modules/CIAO/docs/schema/SANet_Network.xsd | 98 ------ modules/CIAO/docs/schema/Task_Map.xsd | 90 ----- .../Quoter/Simple/Distributor/Distributor.cpp | 2 +- modules/CIAO/examples/BasicSP/EC/controller.cpp | 2 +- modules/CIAO/examples/BasicSP/RepoMan_Usage.html | 6 +- .../CIAO/examples/Display/RateGen/controller.cpp | 2 +- .../Hello/descriptors_events/NodeManagerMap.dat | 2 + .../ciao-events-example-with-federation.ced | 50 +++ .../ciao-events-example-with-filters.ced | 18 +- .../ciao-events-federation-mcast.ced | 58 +++ .../ciao-events-federation-udp.ced | 49 +++ .../flattened_deploymentplan_events.cdp | 4 +- .../flattened_deploymentplan_federation.cdp | 233 ++++++++++++ .../flattened_deploymentplan_federation_mcast.cdp | 231 ++++++++++++ .../flattened_deploymentplan_federation_udp.cdp | 231 ++++++++++++ .../flattened_deploymentplan_with_filters.cdp | 6 +- .../flattened_deploymentplan_with_filters_2.cdp | 322 +++++++++++++++++ .../flattened_deploymentplan_with_filters_3.cdp | 322 +++++++++++++++++ .../flattened_deploymentplan_with_filters_4.cdp | 322 +++++++++++++++++ .../examples/Hello/descriptors_events/rtec.conf | 1 + .../Hello/descriptors_events/run_NodeDaemons.pl | 42 +++ .../descriptors_events/run_NodeDaemons_svc_conf.pl | 42 +++ .../examples/Null_Component/Null_Component.cidl | 21 -- .../examples/Null_Component/Null_Component.idl | 36 -- .../examples/Null_Component/Null_Component.mpc | 63 ---- .../Null_Component/Null_Component_exec.cpp | 195 ---------- .../examples/Null_Component/Null_Component_exec.h | 154 -------- .../Null_Component/Null_Component_exec_export.h | 58 --- .../Null_Component/Null_Component_stub_export.h | 58 --- .../Null_Component/Null_Component_svnt_export.h | 58 --- .../examples/Null_Component/Null_Interface.idl | 20 -- .../examples/Null_Component/Null_Interface.mpc | 38 -- .../Null_Component/Null_Interface_stub_export.h | 58 --- .../Null_Component/Null_Interface_svnt_export.h | 58 --- .../examples/Null_Component/StaticDAnCEApp.cpp | 119 ------- .../examples/Null_Component/StaticDAnCEApp.mpc | 21 -- modules/CIAO/examples/Null_Component/plan.h | 33 -- 51 files changed, 2492 insertions(+), 1343 deletions(-) create mode 100644 modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.cpp create mode 100644 modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.h delete mode 100644 modules/CIAO/docs/schema/SANet_Network.xsd delete mode 100644 modules/CIAO/docs/schema/Task_Map.xsd create mode 100644 modules/CIAO/examples/Hello/descriptors_events/NodeManagerMap.dat create mode 100644 modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-federation.ced create mode 100644 modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-mcast.ced create mode 100644 modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-udp.ced create mode 100644 modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation.cdp create mode 100644 modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_mcast.cdp create mode 100644 modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_udp.cdp create mode 100644 modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_2.cdp create mode 100644 modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_3.cdp create mode 100644 modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_4.cdp create mode 100644 modules/CIAO/examples/Hello/descriptors_events/rtec.conf create mode 100755 modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons.pl create mode 100755 modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons_svc_conf.pl delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component.cidl delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component.idl delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component.mpc delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component_exec.cpp delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component_exec.h delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component_exec_export.h delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component_stub_export.h delete mode 100644 modules/CIAO/examples/Null_Component/Null_Component_svnt_export.h delete mode 100644 modules/CIAO/examples/Null_Component/Null_Interface.idl delete mode 100644 modules/CIAO/examples/Null_Component/Null_Interface.mpc delete mode 100644 modules/CIAO/examples/Null_Component/Null_Interface_stub_export.h delete mode 100644 modules/CIAO/examples/Null_Component/Null_Interface_svnt_export.h delete mode 100644 modules/CIAO/examples/Null_Component/StaticDAnCEApp.cpp delete mode 100644 modules/CIAO/examples/Null_Component/StaticDAnCEApp.mpc delete mode 100644 modules/CIAO/examples/Null_Component/plan.h diff --git a/modules/CIAO/CIDLC/ServantHeaderGenerator.cpp b/modules/CIAO/CIDLC/ServantHeaderGenerator.cpp index 7f10994648d..2c115143fa9 100644 --- a/modules/CIAO/CIDLC/ServantHeaderGenerator.cpp +++ b/modules/CIAO/CIDLC/ServantHeaderGenerator.cpp @@ -722,6 +722,17 @@ namespace << STRS[EXCP_SYS] << "," << endl << STRS[EXCP_BET] << "));" << endl; + // @@ GD added below code. + + os << "// CIAO-specific in " << STRS[COMP_ECB] << "." << endl + << "virtual void" << endl + << "ciao_push_event ( ::Components::EventBase *ev," << endl + << "const char * source_id" << endl + << STRS[ENV_HDR] << ")" << endl + << STRS[EXCP_START] << " " + << STRS[EXCP_SYS] << "," << endl + << STRS[EXCP_BET] << "));" << endl; + os << "// CIAO-specific in " << STRS[COMP_ECB] << "." << endl << "virtual CORBA::Boolean" << endl << "ciao_is_substitutable (" << endl diff --git a/modules/CIAO/CIDLC/ServantSourceGenerator.cpp b/modules/CIAO/CIDLC/ServantSourceGenerator.cpp index 5c5c2af43a6..98d9626d11f 100644 --- a/modules/CIAO/CIDLC/ServantSourceGenerator.cpp +++ b/modules/CIAO/CIDLC/ServantSourceGenerator.cpp @@ -822,6 +822,13 @@ namespace << "ACE_CHECK;" << endl << "}"; + // @@ GD Modified Code Below + + os << endl; + os << "ACE_CString source_id = this->_ciao_instance_id ();"; + os << "source_id += \"_\";" << endl; + os << "source_id += \"" << p.name () << "\";//port name" << endl << endl; + os << "for (ACE_Active_Map_Manager< " << endl << " " << STRS[COMP_ECB] << "_var>::iterator giter =" << endl << " this->ciao_publishes_" << p.name () @@ -830,8 +837,9 @@ namespace << "_generic_map_.end ();" << endl << "++giter)" << endl << "{" - << "(*giter).int_id_->push_event" << " (" << endl - << "ev" << endl + << "(*giter).int_id_->ciao_push_event" << " (" << endl + << "ev," << endl + << "source_id.c_str ()" << endl << STRS[ENV_ARG] << ");" << "ACE_CHECK;" << endl << "}" @@ -2218,6 +2226,30 @@ namespace << "ACE_THROW ( " << STRS[EXCP_BET] << " ());" << endl << "}"; + // GD Added below code + // Begin + + os << "// Inherited from " << STRS[COMP_ECB] << "." << endl + << "void" << endl + << scope_.name () << "_Servant::"; + + Traversal::ConsumerData::belongs (c, simple_belongs_); + + os << "Consumer_" << c.name () + << "_Servant::ciao_push_event (" << endl + << "::Components::EventBase *ev," << endl + << "const char * source_id" << endl + << STRS[ENV_SRC] << ")" << endl + << STRS[EXCP_START] << " " + << STRS[EXCP_SYS] << "," << endl + << STRS[EXCP_BET] << "))" << endl + << "{" + << "ACE_UNUSED_ARG (source_id);" << endl + << "this->push_event (ev);" << endl + << "}"; + + // End + os << "CORBA::Boolean" << endl << scope_.name () << "_Servant::"; diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp b/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp index a4a5fbf9c90..47f6370cf26 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp +++ b/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.cpp @@ -33,7 +33,8 @@ namespace CIAO } CIAO_Event_Service_ptr - EventService_Factory_impl::create (EventServiceType type) + EventService_Factory_impl::create (EventServiceType type, + const char * ec_name) { ACE_DEBUG ((LM_DEBUG, "CIAO::EventService_Factory_impl::create_event_service\n")); @@ -44,19 +45,28 @@ namespace CIAO case RTEC: ACE_NEW_RETURN (event_service, RTEventService (this->orb_.in (), - this->poa_.in ()), + this->poa_.in (), + ec_name), 0); break; default: ACE_ERROR_RETURN ((LM_ERROR, "CIAO::EventService_Factory_impl::" - "create_event_service: unsuppoted type.\n"), + "create_event_service: unsupported type.\n"), 0); } // Activate the servant - CIAO_Event_Service_var service = event_service->_this (); + PortableServer::ObjectId_var oid = + this->poa_->activate_object (event_service); + + CORBA::Object_var obj = poa_->id_to_reference (oid.in()); + + CIAO_Event_Service_var service = + CIAO_Event_Service::_narrow (obj.in ()); + + //CIAO_Event_Service_var service = event_service->_this (); return service._retn (); } diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h b/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h index 349a48aa09a..7ba36ac9a0d 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h +++ b/modules/CIAO/ciaosvcs/Events/CIAO_EventService_Factory_impl.h @@ -35,10 +35,14 @@ namespace CIAO EventService_Factory_impl (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa); + //void init (CORBA::ORB_ptr orb, + // PortableServer::POA_ptr poa); + virtual ~EventService_Factory_impl (void); /// A factory method which creates an CIAO_Event_Service object - virtual CIAO_Event_Service_ptr create (EventServiceType type); + virtual CIAO_Event_Service_ptr create (EventServiceType type, + const char * ec_name); virtual void initialize (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa); diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp b/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp index 6c06c5c8f27..58e7ee9c9e3 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp +++ b/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.cpp @@ -20,4 +20,17 @@ namespace CIAO EventServiceBase::~EventServiceBase (void) { } + + void + EventServiceBase::ciao_push_event ( + ::Components::EventBase * evt, + const char * source_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::BadEventType)) + { + ACE_UNUSED_ARG (evt); + ACE_UNUSED_ARG (source_id); + } } diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h b/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h index 90b9f872ca6..f20de7591b0 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h +++ b/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_EventServiceBase.h @@ -107,6 +107,18 @@ namespace CIAO ACE_ENV_ARG_DECL_WITH_DEFAULTS) ACE_THROW_SPEC (( CORBA::SystemException)) = 0; + + /** + * Pushes event @c ev to all consumers. The source id of the + * supplier is specified through @c source_id. + */ + virtual void ciao_push_event ( + ::Components::EventBase * evt, + const char * source_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::BadEventType)); }; class Event_Consumer_Config_Base : diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl b/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl index bcfcca9ef93..49393ede7a4 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl +++ b/modules/CIAO/ciaosvcs/Events/CIAO_Events_Base/CIAO_Events.idl @@ -18,7 +18,6 @@ module CIAO enum EventServiceType { - DIRECT, EC, RTEC, NOTIFY, @@ -34,9 +33,12 @@ module CIAO void destroy (); }; - interface Consumer_Config : Supplier_Config + interface Consumer_Config { attribute CONNECTION_ID consumer_id; + + readonly attribute EventServiceType service_type; + attribute Components::EventConsumerBase consumer; void start_conjunction_group (in long size); @@ -46,6 +48,8 @@ module CIAO void insert_source (in CONNECTION_ID source_id); void insert_type (in long event_type); + + void destroy (); }; interface CIAO_Event_Service : Components::EventConsumerBase diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp index e85c8f0ee4f..fb7edd91e05 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp +++ b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp @@ -13,18 +13,23 @@ #include "CIAO_RTEvent.h" #include "ciao/CIAO_common.h" +#include "SimpleAddressServer.h" +#include +#include + +#include namespace CIAO { + RTEventService::RTEventService (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa) : + PortableServer::POA_ptr poa, + const char * ec_name) : orb_ (CORBA::ORB::_duplicate (orb)), - root_poa_ (PortableServer::POA::_duplicate (poa)), - type_id_ (ACE_ES_EVENT_ANY), - source_id_ (ACE_ES_EVENT_SOURCE_ANY) + root_poa_ (PortableServer::POA::_duplicate (poa)) { - this->create_rt_event_channel (); + this->create_rt_event_channel (ec_name); } @@ -63,6 +68,8 @@ namespace CIAO } + // @@TODO: We might want to maintain a map for managing multiple proxy consumers + // to multiple event suppliers. void RTEventService::connect_event_supplier ( Supplier_Config_ptr supplier_config @@ -85,23 +92,13 @@ namespace CIAO ACE_THROW (CORBA::BAD_PARAM ()); } - ACE_Hash hasher; - this->source_id_ = hasher (supplier_config->supplier_id (ACE_ENV_SINGLE_ARG_PARAMETER)); - ACE_CHECK; - this->type_id_ = this->source_id_; - - if (CIAO::debug_level () > 11) - { - ACE_DEBUG ((LM_DEBUG, "connect source id: %i\n", this->source_id_)); - } - + // Get a proxy push consumer from the EventChannel. RtecEventChannelAdmin::SupplierAdmin_var supplier_admin = this->rt_event_channel_->for_suppliers (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->proxy_consumer_ = - supplier_admin->obtain_push_consumer (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + RtecEventChannelAdmin::ProxyPushConsumer_var proxy_push_consumer = + supplier_admin->obtain_push_consumer(); // Create and register supplier servant RTEventServiceSupplier_impl * supplier_servant = 0; @@ -115,10 +112,23 @@ namespace CIAO rt_config->rt_event_qos (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - this->proxy_consumer_->connect_push_supplier (push_supplier.in (), - qos.in () - ACE_ENV_ARG_PARAMETER); + ACE_SupplierQOS_Factory supplier_qos; + supplier_qos.insert (ACE_ES_EVENT_SOURCE_ANY, ACE_ES_EVENT_ANY, 0, 1); + + supplier_qos.insert (ACE_ES_EVENT_SOURCE_ANY, + ACE_ES_EVENT_ANY, + 0, // handle to the rt_info structure + 1); + + proxy_push_consumer->connect_push_supplier (push_supplier.in (), + supplier_qos.get_SupplierQOS () + ACE_ENV_ARG_PARAMETER); ACE_CHECK; + + + this->proxy_consumer_map_.bind ( + supplier_config->supplier_id (), + proxy_push_consumer._retn ()); } void @@ -168,17 +178,27 @@ namespace CIAO consumer_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - //@@@ - rt_config->start_disjunction_group (1); - - rt_config->insert_type (ACE_ES_EVENT_ANY); - RtecEventChannelAdmin::ConsumerQOS_var qos = rt_config->rt_event_qos (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; + ACE_DEBUG ((LM_DEBUG, "\n======== ConsumerQoS length is: %d\n\n", + qos->dependencies.length ())); + + if (qos->dependencies.length () == 0) + { + qos->dependencies.length (1); + qos->dependencies[0].event.header.type = ACE_ES_EVENT_ANY; + qos->dependencies[0].event.header.source = ACE_ES_EVENT_SOURCE_ANY; + qos->dependencies[0].rt_info = 0; + + ACE_DEBUG ((LM_DEBUG, "\n======== Normalized ConsumerQoS length is: %d\n\n", + qos->dependencies.length ())); + } + proxy_supplier->connect_push_consumer (push_consumer.in (), qos.in () + //qos_factory.get_ConsumerQOS () ACE_ENV_ARG_PARAMETER); ACE_CHECK; @@ -199,11 +219,13 @@ namespace CIAO { ACE_UNUSED_ARG (connection_id); - this->proxy_consumer_->disconnect_push_consumer ( + RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer; + + this->proxy_consumer_map_.unbind (connection_id, proxy_consumer); + + proxy_consumer->disconnect_push_consumer ( ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; - - // What to do with the consumers?! } void @@ -230,24 +252,57 @@ namespace CIAO ACE_THROW_SPEC (( CORBA::SystemException)) { + ACE_UNUSED_ARG (ev); if (CIAO::debug_level () > 10) { ACE_DEBUG ((LM_DEBUG, "------CIAO::RTEventService::push_event------\n")); } + } + void + RTEventService::ciao_push_event ( + Components::EventBase * ev, + const char * source_id + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + CORBA::SystemException, + Components::BadEventType)) + { + if (CIAO::debug_level () > 10) + { + ACE_DEBUG ((LM_DEBUG, "------CIAO::RTEventService::ciao_push_event------\n")); + } RtecEventComm::EventSet events (1); events.length (1); - events[0].header.source = ACE_ES_EVENT_SOURCE_ANY; //this->source_id_; + + ACE_Hash hasher; + + events[0].header.source = hasher (source_id); events[0].header.type = ACE_ES_EVENT_ANY; //this->type_id_; + events[0].header.ttl = 10; events[0].data.any_value <<= ev; - this->proxy_consumer_->push (events ACE_ENV_ARG_PARAMETER); + //events[0].data.any_value <<= CORBA::string_dup( "Hey! Junk Data"); + + ACE_DEBUG ((LM_DEBUG, "******* push event for source string: %s\n", source_id)); + ACE_DEBUG ((LM_DEBUG, "******* push event for source id: %i\n", events[0].header.source)); + + RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer; + + if (this->proxy_consumer_map_.find (source_id, proxy_consumer) != 0) + { + ACE_DEBUG ((LM_DEBUG, + "CIAO (%P|%t) - RTEventService::ciao_push_event, " + "Error in finding the proxy consumer object.\n")); + ACE_THROW (Components::BadEventType ()); + } + + proxy_consumer->push (events ACE_ENV_ARG_PARAMETER); ACE_CHECK; } void - RTEventService::create_rt_event_channel ( - ACE_ENV_SINGLE_ARG_DECL) + RTEventService::create_rt_event_channel (const char * ec_name) ACE_THROW_SPEC (( CORBA::SystemException)) { @@ -256,7 +311,6 @@ namespace CIAO ACE_DEBUG ((LM_DEBUG, "CIAO::EventService_Factory_impl::create_rt_event_channel\n")); } - // @@ (GD) Anything else to do to get the svc.conf file options? TAO_EC_Default_Factory::init_svcs (); TAO_EC_Event_Channel_Attributes attributes (this->root_poa_.in (), @@ -267,8 +321,185 @@ namespace CIAO ACE_CHECK; this->rt_event_channel_ = ec_servant->_this (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; + + if (false) + { + // Find the Naming Service. + CORBA::Object_var obj = orb_->resolve_initial_references("NameService"); + CosNaming::NamingContextExt_var root_context = CosNaming::NamingContextExt::_narrow(obj.in()); + + // Bind the Event Channel using Naming Services + CosNaming::Name_var name = root_context->to_name (ec_name); + ACE_DEBUG ((LM_DEBUG, "\nRegister naming: %s\n", ec_name)); + root_context->rebind (name.in(), rt_event_channel_.in()); + } + } + + ::CORBA::Boolean + RTEventService::create_addr_serv ( + const char * name, + ::CORBA::UShort port, + const char * address + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException)) + { + ACE_DEBUG ((LM_ERROR, "Create an address server using port [%d]\n", port)); + + // Initialize the address server with the desired address. + // This will be used by the sender object and the multicast + // receiver. + ACE_INET_Addr send_addr (port, address); + + //ACE_INET_Addr send_addr (10001, ACE_DEFAULT_MULTICAST_ADDR); + + SimpleAddressServer * addr_srv_impl = new SimpleAddressServer (send_addr); + + PortableServer::ObjectId_var addr_srv_oid = + this->root_poa_->activate_object (addr_srv_impl); + CORBA::Object_var addr_srv_obj = + this->root_poa_->id_to_reference (addr_srv_oid.in()); + RtecUDPAdmin::AddrServer_var addr_srv = + RtecUDPAdmin::AddrServer::_narrow (addr_srv_obj.in()); + + this->addr_serv_map_.bind ( + name, + RtecUDPAdmin::AddrServer::_duplicate (addr_srv.in ())); + + return true; } + ::CORBA::Boolean + RTEventService::create_sender ( + const char * addr_serv_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException)) + { + ACE_DEBUG ((LM_DEBUG, "Create a Sender object with addr_serv_id: %s\n",addr_serv_id )); + + // We need a local socket to send the data, open it and check + // that everything is OK: + TAO_ECG_Refcounted_Endpoint endpoint(new TAO_ECG_UDP_Out_Endpoint); + if (endpoint->dgram ().open (ACE_Addr::sap_any) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, "Cannot open send endpoint\n"), + 1); + } + + RtecUDPAdmin::AddrServer_var addr_srv; + if (this->addr_serv_map_.find (addr_serv_id, addr_srv) != 0) + return false; + + // Now we setup the sender: + TAO_EC_Servant_Var sender = TAO_ECG_UDP_Sender::create(); + sender->init (this->rt_event_channel_.in (), + addr_srv.in (), + endpoint + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + + // Setup the subscription and connect to the EC + ACE_ConsumerQOS_Factory cons_qos_fact; + cons_qos_fact.start_disjunction_group (); + cons_qos_fact.insert (ACE_ES_EVENT_SOURCE_ANY, ACE_ES_EVENT_ANY, 0); + RtecEventChannelAdmin::ConsumerQOS sub = cons_qos_fact.get_ConsumerQOS (); + sub.is_gateway = 1; + sender->connect (sub); + + return true; + } + + ::CORBA::Boolean + RTEventService::create_receiver ( + const char * addr_serv_id, + ::CORBA::Boolean is_multicast, + ::CORBA::UShort listen_port + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException)) + { + ACE_DEBUG ((LM_DEBUG, "Create a receiver object with addr_serv_id: %s\n",addr_serv_id )); + + // Create and initialize the receiver + TAO_EC_Servant_Var receiver = + TAO_ECG_UDP_Receiver::create(); + + // AddressServer is necessary when "multicast" is enabled, but not for "udp" + if (is_multicast) + { + TAO_ECG_UDP_Out_Endpoint endpoint; + if (endpoint.dgram ().open (ACE_Addr::sap_any) == -1) + { + ACE_DEBUG ((LM_ERROR, "Cannot open send endpoint\n")); + return false; + } + + // TAO_ECG_UDP_Receiver::init() takes a TAO_ECG_Refcounted_Endpoint. + // If we don't clone our endpoint and pass &endpoint, the receiver will + // attempt to delete endpoint during shutdown. + TAO_ECG_UDP_Out_Endpoint* clone; + ACE_NEW_RETURN (clone, + TAO_ECG_UDP_Out_Endpoint (endpoint), + false); + + RtecUDPAdmin::AddrServer_var addr_srv; + + if (this->addr_serv_map_.find (addr_serv_id, addr_srv) != 0) + return false; + + receiver->init (this->rt_event_channel_.in (), + clone, + addr_srv.in ()); + } + else + { + receiver->init (this->rt_event_channel_.in (), 0, 0); + } + + // Setup the registration and connect to the event channel + ACE_SupplierQOS_Factory supp_qos_fact; + supp_qos_fact.insert (ACE_ES_EVENT_SOURCE_ANY, ACE_ES_EVENT_ANY, 0, 1); + RtecEventChannelAdmin::SupplierQOS pub = supp_qos_fact.get_SupplierQOS (); + receiver->connect (pub); + + // Create the appropriate event handler and register it with the reactor + + if (is_multicast) + { + auto_ptr mcast_eh (new TAO_ECG_Mcast_EH (receiver.in())); + mcast_eh->reactor (this->orb_->orb_core ()->reactor ()); + mcast_eh->open (this->rt_event_channel_.in()); + mcast_eh.release(); + } + else + { + ACE_DEBUG ((LM_DEBUG, "\nUDP Event Handler Port [%d]\n", listen_port)); + + //auto_ptr udp_eh (new TAO_ECG_UDP_EH (receiver.in())); + TAO_ECG_UDP_EH * udp_eh = new TAO_ECG_UDP_EH (receiver.in()); + + udp_eh->reactor (this->orb_->orb_core ()->reactor ()); + + ACE_INET_Addr local_addr (listen_port); + if (udp_eh->open (local_addr) == -1) + { + ACE_DEBUG ((LM_ERROR, "Cannot open event handler on port [%d]\n", listen_port)); + return false; + } + //udp_eh.release (); + } + + return true; + } + + + ::RtecEventChannelAdmin::EventChannel_ptr + RTEventService::tao_rt_event_channel (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((::CORBA::SystemException)) + { + return this->rt_event_channel_; + } ////////////////////////////////////////////////////////////////////// /// Supplier Servant Implementation @@ -313,6 +544,13 @@ namespace CIAO for (size_t i = 0; i < events.length (); ++i) { + std::ostringstream out; + out << "Received event," + << " type: " << events[i].header.type + << " source: " << events[i].header.source; + + ACE_OS::printf("%s\n", out.str().c_str()); // printf is synchronized + Components::EventBase * ev = 0; if (events[i].data.any_value >>= ev) { @@ -366,22 +604,31 @@ namespace CIAO ACE_THROW_SPEC (( CORBA::SystemException)) { - if (CIAO::debug_level () > 11) + if (CIAO::debug_level () > 10) { ACE_DEBUG ((LM_DEBUG, "supplier's id: %s\n", supplier_id)); - } this->supplier_id_ = supplier_id; ACE_Hash hasher; + RtecEventComm::EventSourceID source_id = hasher (this->supplier_id_.c_str ()); - +/* this->qos_.insert (source_id, - source_id, + ACE_ES_EVENT_ANY, 0, 1); + +*/ + + this->qos_.insert (ACE_ES_EVENT_SOURCE_ANY, + ACE_ES_EVENT_ANY, + 0, // handle to the rt_info structure + 1); + + ACE_DEBUG ((LM_DEBUG, "supplier's source id is: %d\n", source_id)); } CONNECTION_ID @@ -448,6 +695,9 @@ namespace CIAO ACE_THROW_SPEC (( CORBA::SystemException)) { + ACE_DEBUG + ((LM_DEBUG, "RTEvent_Consumer_Config_impl::start_conjunction_group\n")); + this->qos_.start_conjunction_group (size); } @@ -458,7 +708,11 @@ namespace CIAO ACE_THROW_SPEC (( CORBA::SystemException)) { - this->qos_.start_disjunction_group (size); + // Note, since we only support basic builder here... + if (size == 0L) + this->qos_.start_disjunction_group (); + else + this->qos_.start_disjunction_group (size); } void @@ -468,13 +722,13 @@ namespace CIAO ACE_THROW_SPEC (( CORBA::SystemException)) { - ACE_Hash hasher; - RtecEventComm::EventSourceID int_source_id = - hasher (source_id); + RtecEventComm::EventSourceID int_source_id = hasher (source_id); - this->qos_.insert_source (int_source_id, - 0); + ACE_DEBUG ((LM_DEBUG, "******* the source string is: %s\n", source_id)); + ACE_DEBUG ((LM_DEBUG, "******* the source id is: %i\n", int_source_id)); + + this->qos_.insert_source (int_source_id, 0); } void @@ -483,8 +737,11 @@ namespace CIAO ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((::CORBA::SystemException)) { - this->qos_.insert_type (event_type, - 0); + if (event_type == 0L) + this->qos_.insert_type (ACE_ES_EVENT_ANY, 0); + else + this->qos_.insert_type (event_type, + 0); } void @@ -504,31 +761,6 @@ namespace CIAO this->consumer_id_ = consumer_id; } - void - RTEvent_Consumer_Config_impl::supplier_id ( - const char * supplier_id - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, - "RTEvent_Consumer_Config_impl::set_supplier_id:%s\n", - supplier_id)); - } - - this->supplier_id_ = supplier_id; - - ACE_Hash hasher; - RtecEventComm::EventSourceID source_id = - hasher (this->supplier_id_.c_str ()); - - this->qos_.start_disjunction_group (1); - this->qos_.insert (source_id, - source_id, - 0); - } void RTEvent_Consumer_Config_impl::consumer ( @@ -549,19 +781,6 @@ namespace CIAO return CORBA::string_dup (this->consumer_id_.c_str ()); } - CONNECTION_ID - RTEvent_Consumer_Config_impl::supplier_id ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( - CORBA::SystemException)) - { - if (CIAO::debug_level () > 10) - { - ACE_DEBUG ((LM_DEBUG, "RTEvent_Consumer_Config_impl::get_supplier_id\n")); - } - - return CORBA::string_dup (this->supplier_id_.c_str ()); - } EventServiceType RTEvent_Consumer_Config_impl::service_type ( @@ -597,11 +816,6 @@ namespace CIAO RtecEventChannelAdmin::ConsumerQOS (this->qos_.get_ConsumerQOS ()), 0); - - // @@@ Hard coded - this->qos_.start_disjunction_group (1); - this->qos_.insert_type (ACE_ES_EVENT_ANY, 0); - return consumer_qos; } diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h index 0ba65234b21..075f97b9531 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h +++ b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h @@ -28,6 +28,11 @@ #include "orbsvcs/orbsvcs/Event_Utilities.h" #include "orbsvcs/orbsvcs/Event/EC_Event_Channel.h" #include "orbsvcs/orbsvcs/Event/EC_Default_Factory.h" +#include "orbsvcs/Event/ECG_Mcast_EH.h" +#include "orbsvcs/Event/ECG_UDP_Sender.h" +#include "orbsvcs/Event/ECG_UDP_Receiver.h" +#include "orbsvcs/Event/ECG_UDP_Out_Endpoint.h" +#include "orbsvcs/Event/ECG_UDP_EH.h" #include "ace/Hash_Map_Manager.h" namespace CIAO @@ -44,12 +49,14 @@ namespace CIAO * first time initialized. */ class CIAO_RTEVENT_Export RTEventService : - public virtual EventServiceBase + public virtual EventServiceBase, + public virtual POA_CIAO::CIAO_RT_Event_Service { public: RTEventService (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa); + PortableServer::POA_ptr poa, + const char * ec_name); virtual ~RTEventService (void); @@ -94,11 +101,45 @@ namespace CIAO ACE_THROW_SPEC (( CORBA::SystemException)); + virtual void ciao_push_event ( + Components::EventBase * evt, + const char * source_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::BadEventType)); + + virtual ::CORBA::Boolean create_addr_serv ( + const char * name, + ::CORBA::UShort port, + const char * address + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException)); + + virtual ::CORBA::Boolean create_sender ( + const char * addr_serv_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException)); + + virtual ::CORBA::Boolean create_receiver ( + const char * addr_serv_id, + ::CORBA::Boolean is_multicast, + ::CORBA::UShort listen_port + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException)); + + virtual ::RtecEventChannelAdmin::EventChannel_ptr tao_rt_event_channel ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC ((::CORBA::SystemException)); + private: // @@ (GD) This is the place where use could provide a parameter // which specifies the event channel service configuration file. - void create_rt_event_channel ( - ACE_ENV_SINGLE_ARG_DECL) + void create_rt_event_channel (const char * ec_name) ACE_THROW_SPEC (( CORBA::SystemException)); @@ -118,38 +159,38 @@ namespace CIAO RtecEventChannelAdmin::EventChannel_var rt_event_channel_; /** - * @var RtecEventComm::EventType type_id_ - * - * The type of event. - */ - RtecEventComm::EventType type_id_; - - /** - * @var RtecEventComm::EventSourceID source_id_ - * @@@ Need to change this into a map, since multiple sources - * could be connected to the event channel. + * @var ACE_Hash_Map_Manager<> proxy_supplier_map_ * - * The supplier id. + * Mapping of each event sink to a proxy supplier for disconnect purposes. */ - RtecEventComm::EventSourceID source_id_; + ACE_Hash_Map_Manager_Ex, + ACE_Equal_To, + ACE_Null_Mutex> proxy_consumer_map_; /** - * @var RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_ + * @var ACE_Hash_Map_Manager<> proxy_supplier_map_ * - * The proxy consumer to which events are pushed. + * Mapping of each event sink to a proxy supplier for disconnect purposes. */ - RtecEventChannelAdmin::ProxyPushConsumer_var proxy_consumer_; + ACE_Hash_Map_Manager_Ex, + ACE_Equal_To, + ACE_Null_Mutex> proxy_supplier_map_; /** - * @var ACE_Hash_Map_Manager<> proxy_supplier_map_ + * @var ACE_Hash_Map_Manager<> addr_serv_map_ * - * Mapping of each event sink to a proxy supplier for disconnect purposes. + * A map which managers a set of address servers for event channel + * federation purpose. */ ACE_Hash_Map_Manager_Ex, ACE_Equal_To, - ACE_Null_Mutex> proxy_supplier_map_; + ACE_Null_Mutex> addr_serv_map_; }; @@ -244,11 +285,11 @@ namespace CIAO virtual CONNECTION_ID consumer_id (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual void supplier_id (const char * supplier_id ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); + //virtual void supplier_id (const char * supplier_id ACE_ENV_ARG_DECL) + // ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CONNECTION_ID supplier_id (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); + //virtual CONNECTION_ID supplier_id (ACE_ENV_SINGLE_ARG_DECL) + // ACE_THROW_SPEC ((CORBA::SystemException)); virtual void consumer (Components::EventConsumerBase_ptr consumer ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); @@ -272,8 +313,6 @@ namespace CIAO ACE_CString consumer_id_; - ACE_CString supplier_id_; - Components::EventConsumerBase_var consumer_; EventServiceType service_type_; diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl index b51d00ec07d..072bf1f89a1 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl +++ b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl @@ -35,4 +35,20 @@ module CIAO readonly attribute RtecEventChannelAdmin::SupplierQOS rt_event_qos; }; + interface CIAO_RT_Event_Service : + CIAO_Event_Service + { + boolean create_addr_serv (in string name, + in unsigned short port, + in string address); + + boolean create_sender (in string addr_serv_id); + + boolean create_receiver (in string addr_serv_id, + in boolean is_multicast, + in unsigned short listen_port); + + RtecEventChannelAdmin::EventChannel tao_rt_event_channel (); + }; + }; diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc index 457806b3ffb..97fbcfa8573 100644 --- a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc +++ b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.mpc @@ -15,11 +15,13 @@ project (CIAO_RTEvent) : rtevent_serv, ciao_events_base_dnc { CIAO_RTEvent.cpp CIAO_RTEventC.cpp CIAO_RTEventS.cpp + SimpleAddressServer.cpp } Header_Files { CIAO_RTEvent.h CIAO_RTEventC.h CIAO_RTEventS.h + SimpleAddressServer.h } } diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.cpp b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.cpp new file mode 100644 index 00000000000..b514413d982 --- /dev/null +++ b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.cpp @@ -0,0 +1,33 @@ +// SimpleAddressServer.cpp + +#include "SimpleAddressServer.h" +#include +#include + +SimpleAddressServer::SimpleAddressServer (const ACE_INET_Addr& address) { + this->address_.ipaddr = address.get_ip_address (); + this->address_.port = address.get_port_number (); +} + +void +SimpleAddressServer::get_addr (const RtecEventComm::EventHeader&, + RtecUDPAdmin::UDP_Addr& address) + throw (CORBA::SystemException) { + address = this->address_; +} +/* +void +SimpleAddressServer::get_ip_address (const RtecEventComm::EventHeader&, + RtecUDPAdmin::UDP_IP_Address_out address + ACE_ENV_ARG_DECL) + throw (CORBA::SystemException) { + address = new RtecUDPAdmin::UDP_IP_Address; + + ACE_INET_Addr x (this->address_.port, + static_cast(this->address_.ipaddr)); + address->length (x.get_addr_size ()); + ACE_OS::memcpy (address->get_buffer (), + x.get_addr (), + x.get_addr_size ()); +} +*/ diff --git a/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.h b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.h new file mode 100644 index 00000000000..4aea1678b7c --- /dev/null +++ b/modules/CIAO/ciaosvcs/Events/CIAO_RTEC/SimpleAddressServer.h @@ -0,0 +1,26 @@ +// SimpleAddressServer.h + +#ifndef SIMPLEADDRESSSERVER_H +#define SIMPLEADDRESSSERVER_H + +#include + +class ACE_INET_Addr; + +class SimpleAddressServer : public POA_RtecUDPAdmin::AddrServer { +public: + SimpleAddressServer (const ACE_INET_Addr& address); + virtual void get_addr (const RtecEventComm::EventHeader& header, + RtecUDPAdmin::UDP_Addr& address) + throw (CORBA::SystemException); +/* + virtual void get_ip_address (const RtecEventComm::EventHeader& header, + RtecUDPAdmin::UDP_IP_Address_out address + ACE_ENV_ARG_DECL) + throw (CORBA::SystemException); +*/ +private: + RtecUDPAdmin::UDP_Addr address_; +}; + +#endif diff --git a/modules/CIAO/docs/schema/CIAOEvents.xsd b/modules/CIAO/docs/schema/CIAOEvents.xsd index 6ea307609f3..645d7a6e530 100644 --- a/modules/CIAO/docs/schema/CIAOEvents.xsd +++ b/modules/CIAO/docs/schema/CIAOEvents.xsd @@ -43,12 +43,13 @@ + + + - - @@ -76,37 +77,28 @@ - + - - - + + + - - - - - - - - - - - + - + + - - + - - + + + + - - - + + diff --git a/modules/CIAO/docs/schema/SANet_Network.xsd b/modules/CIAO/docs/schema/SANet_Network.xsd deleted file mode 100644 index d614528b481..00000000000 --- a/modules/CIAO/docs/schema/SANet_Network.xsd +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/CIAO/docs/schema/Task_Map.xsd b/modules/CIAO/docs/schema/Task_Map.xsd deleted file mode 100644 index 2138f082d48..00000000000 --- a/modules/CIAO/docs/schema/Task_Map.xsd +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/CIAO/docs/tutorials/Quoter/Simple/Distributor/Distributor.cpp b/modules/CIAO/docs/tutorials/Quoter/Simple/Distributor/Distributor.cpp index 431f5c617b4..9332d1a3e0c 100644 --- a/modules/CIAO/docs/tutorials/Quoter/Simple/Distributor/Distributor.cpp +++ b/modules/CIAO/docs/tutorials/Quoter/Simple/Distributor/Distributor.cpp @@ -37,7 +37,7 @@ parse_args (int argc, char *argv[]) break; case 'r': - rate = ACE_OS::atoi (get_opts.opt_arg ()); + rate = atoi (get_opts.opt_arg ()); break; case '?': diff --git a/modules/CIAO/examples/BasicSP/EC/controller.cpp b/modules/CIAO/examples/BasicSP/EC/controller.cpp index 24cfc8bac83..d52ac54dba9 100644 --- a/modules/CIAO/examples/BasicSP/EC/controller.cpp +++ b/modules/CIAO/examples/BasicSP/EC/controller.cpp @@ -38,7 +38,7 @@ parse_args (int argc, char *argv[]) break; case 'r': - rate = ACE_OS::atoi (get_opts.opt_arg ()); + rate = atoi (get_opts.opt_arg ()); break; case '?': // display help for use of the server. diff --git a/modules/CIAO/examples/BasicSP/RepoMan_Usage.html b/modules/CIAO/examples/BasicSP/RepoMan_Usage.html index b0854d03b96..3b3c999fec8 100644 --- a/modules/CIAO/examples/BasicSP/RepoMan_Usage.html +++ b/modules/CIAO/examples/BasicSP/RepoMan_Usage.html @@ -44,12 +44,12 @@ about how to installed Packages into RepoMan.

  • Using ior file:
  •  Change the current directory into $CIAO_ROOT/DAnCE/RepositoryManager
    -RepositoryManagerDaemon -o  
    +RepositoryManagerDeamon -o  
     
  • Using Naming Service:
  •  Change the current directory into $CIAO_ROOT/DAnCE/RepositoryManager
    -RepositoryManagerDaemon -v [NameofRM]
    +RepositoryManagerDeamon -v [NameofRM]
     
    @@ -77,7 +77,7 @@ $CIAO_ROOT/DAnCE/Plan_Launcher/plan_launcher -p flattened_deploymentplan.cdp -k $CIAO_ROOT/DAnCE/Plan_Launcher/plan_launcher -p flattened_deploymentplan.cdp -a BasicSP -k file://EM.ior --l file://$CIAO_ROOT/DAnCE/RepositoryManager/RepositoryManagerDaemon.ior +-l file://$CIAO_ROOT/DAnCE/RepositoryManager/RepositoryManagerDeamon.ior
  • Using naming service to get RepoMan, providing the name of one composite componemt:
  • diff --git a/modules/CIAO/examples/Display/RateGen/controller.cpp b/modules/CIAO/examples/Display/RateGen/controller.cpp index e9cbfe7dd22..d28f92dac5e 100644 --- a/modules/CIAO/examples/Display/RateGen/controller.cpp +++ b/modules/CIAO/examples/Display/RateGen/controller.cpp @@ -36,7 +36,7 @@ parse_args (int argc, char *argv[]) rategen_ior_ = get_opts.opt_arg (); break; case 'r': - rate = ACE_OS::atoi (get_opts.opt_arg ()); + rate = atoi (get_opts.opt_arg ()); break; case '?': // display help for use of the server. default: diff --git a/modules/CIAO/examples/Hello/descriptors_events/NodeManagerMap.dat b/modules/CIAO/examples/Hello/descriptors_events/NodeManagerMap.dat new file mode 100644 index 00000000000..fe88523971e --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/NodeManagerMap.dat @@ -0,0 +1,2 @@ +SenderNode corbaloc:iiop:localhost:60001/NodeManager +ReceiverNode corbaloc:iiop:localhost:60002/NodeManager diff --git a/modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-federation.ced b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-federation.ced new file mode 100644 index 00000000000..d48aadd21e1 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-federation.ced @@ -0,0 +1,50 @@ + + + + + + ES_01 + SenderNode + RTEC + dummy.conf + + + + addr_serv_0 + 1234 +
    localhost
    +
    + + + upd_sender_1 + addr_serv_0 + +
    + + + + +
    diff --git a/modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-filters.ced b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-filters.ced index 916a9e465c7..affc0e49dc7 100644 --- a/modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-filters.ced +++ b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-example-with-filters.ced @@ -18,13 +18,27 @@ Hello-Sender-idd_click_out Hello-Sender-idd-02_click_out - + my_filter_02 + DISJUNCTION + Hello-Sender-idd_click_out + + + + my_filter_03 CONJUNCTION Hello-Sender-idd_click_out Hello-Sender-idd-02_click_out - + + + + my_filter_04 + CONJUNCTION + Hello-Sender-idd_click_out + + + diff --git a/modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-mcast.ced b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-mcast.ced new file mode 100644 index 00000000000..9fa450602ba --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-mcast.ced @@ -0,0 +1,58 @@ + + + + + + ES_01 + SenderNode + RTEC + dummy.conf + + + my_filter + DISJUNCTION + Hello-Sender-idd_click_out + + + + + addr_serv_0 + 1234 +
    224.9.9.2
    +
    + + + upd_sender_1 + addr_serv_0 + +
    + + + + + ES_02 + SenderNode + RTEC + dummy.conf + + + addr_serv_1 + 1234 +
    224.9.9.2
    +
    + + upd_receiver_1 + addr_serv_1 + true + + + 1234 + +
    + + +
    diff --git a/modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-udp.ced b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-udp.ced new file mode 100644 index 00000000000..3d2a9d3fbb4 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/ciao-events-federation-udp.ced @@ -0,0 +1,49 @@ + + + + + + ES_01 + SenderNode + RTEC + dummy.conf + + + + addr_serv_0 + 1234 +
    localhost
    +
    + + + upd_sender_1 + addr_serv_0 + +
    + + + + + ES_02 + ReceiverNode + RTEC + dummy.conf + + + addr_serv_1 + 1234 +
    localhost
    +
    + + upd_receiver_1 + addr_serv_1 + false + 1234 + +
    + +
    diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp index b2c75e78c02..c8e5ec022b4 100644 --- a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp @@ -153,7 +153,7 @@ hello_event_ec_publisher_connection click_out - rtecEventPublisher + EventPublisher Hello-Sender-idd @@ -165,7 +165,7 @@ hello_event_ec_consumer_connection click_in - rtecEventConsumer + EventConsumer Hello-Receiver-idd diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation.cdp new file mode 100644 index 00000000000..3f572c73e82 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation.cdp @@ -0,0 +1,233 @@ + + + + Hello_Plan_UUID_0001 + + + + c0965470-7b83-11d9-9669-0800200c9a66 + + IDL:BasicSP/EC:1.0 + + read_message + IDL:Hello/ReadMessage:1.0 + IDL:Hello/ReadMessage:1.0 + false + false + true + false + SimplexReceptacle + + + + + Hello-Sender-mdd + + Hello-Sender_exec + Hello-Sender_svnt + + + + + Hello-Receiver-mdd + + Hello-Receiver_exec + Hello-Receiver_svnt + + + + + + Hello-Sender-idd + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender.ior + + + + + + + local_message + + + tk_string + + + This is a test message passed in through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Receiver-idd + SenderNode + + Hello-Receiver-mdd + + ComponentIOR + + + tk_string + + + Receiver.ior + + + + + + + + hello_event_ec_publisher_connection + + click_out + EventPublisher + Hello-Sender-idd + + + ES_01 + + + + + + hello_event_ec_consumer_connection + + click_in + EventConsumer + Hello-Receiver-idd + + + ES_02 + + + + + + + Sender_exec + + + Sender_DnC_exec + + entryPoint + + + tk_string + + + createSenderHome_Impl + + + + + + + Sender_svnt + + + Sender_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_SenderHome_Servant + + + + + + + Receiver_exec + + + Receiver_DnC_exec + + entryPoint + + + tk_string + + + createReceiverHome_Impl + + + + + + + Receiver_svnt + + + Receiver_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_ReceiverHome_Servant + + + + + + + CIAOEvents + + + tk_string + + + ciao-events-example-with-federation.ced + + + + diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_mcast.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_mcast.cdp new file mode 100644 index 00000000000..b7a7d27aed0 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_mcast.cdp @@ -0,0 +1,231 @@ + + + + Hello_Plan_UUID_0001 + + + + c0965470-7b83-11d9-9669-0800200c9a66 + + IDL:BasicSP/EC:1.0 + + read_message + IDL:Hello/ReadMessage:1.0 + IDL:Hello/ReadMessage:1.0 + false + false + true + false + SimplexReceptacle + + + + + Hello-Sender-mdd + + Hello-Sender_exec + Hello-Sender_svnt + + + + + Hello-Receiver-mdd + + Hello-Receiver_exec + Hello-Receiver_svnt + + + + + + Hello-Sender-idd + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender.ior + + + + + + + local_message + + + tk_string + + + This is a test message passed in through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Receiver-idd + SenderNode + + Hello-Receiver-mdd + + ComponentIOR + + + tk_string + + + Receiver.ior + + + + + + + + hello_event_ec_publisher_connection + + click_out + EventPublisher + Hello-Sender-idd + + + ES_01 + + + + + hello_event_ec_consumer_connection + + click_in + EventConsumer + Hello-Receiver-idd + + + ES_02 + + + + + + Sender_exec + + + Sender_DnC_exec + + entryPoint + + + tk_string + + + createSenderHome_Impl + + + + + + + Sender_svnt + + + Sender_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_SenderHome_Servant + + + + + + + Receiver_exec + + + Receiver_DnC_exec + + entryPoint + + + tk_string + + + createReceiverHome_Impl + + + + + + + Receiver_svnt + + + Receiver_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_ReceiverHome_Servant + + + + + + + CIAOEvents + + + tk_string + + + ciao-events-federation-mcast.ced + + + + diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_udp.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_udp.cdp new file mode 100644 index 00000000000..f52555ca19b --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_federation_udp.cdp @@ -0,0 +1,231 @@ + + + + Hello_Plan_UUID_0001 + + + + c0965470-7b83-11d9-9669-0800200c9a66 + + IDL:BasicSP/EC:1.0 + + read_message + IDL:Hello/ReadMessage:1.0 + IDL:Hello/ReadMessage:1.0 + false + false + true + false + SimplexReceptacle + + + + + Hello-Sender-mdd + + Hello-Sender_exec + Hello-Sender_svnt + + + + + Hello-Receiver-mdd + + Hello-Receiver_exec + Hello-Receiver_svnt + + + + + + Hello-Sender-idd + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender.ior + + + + + + + local_message + + + tk_string + + + This is a test message passed in through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Receiver-idd + ReceiverNode + + Hello-Receiver-mdd + + ComponentIOR + + + tk_string + + + Receiver.ior + + + + + + + + hello_event_ec_publisher_connection + + click_out + EventPublisher + Hello-Sender-idd + + + ES_01 + + + + + hello_event_ec_consumer_connection + + click_in + EventConsumer + Hello-Receiver-idd + + + ES_02 + + + + + + Sender_exec + + + Sender_DnC_exec + + entryPoint + + + tk_string + + + createSenderHome_Impl + + + + + + + Sender_svnt + + + Sender_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_SenderHome_Servant + + + + + + + Receiver_exec + + + Receiver_DnC_exec + + entryPoint + + + tk_string + + + createReceiverHome_Impl + + + + + + + Receiver_svnt + + + Receiver_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_ReceiverHome_Servant + + + + + + + CIAOEvents + + + tk_string + + + ciao-events-federation-udp.ced + + + + diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters.cdp index 9ad178d6dfc..e39c8ab6a2a 100644 --- a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters.cdp +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters.cdp @@ -153,7 +153,7 @@ hello_event_ec_publisher_connection click_out - rtecEventPublisher + EventPublisher Hello-Sender-idd @@ -175,7 +175,7 @@ tk_string - my_filter + my_filter_01 @@ -183,7 +183,7 @@ click_in - rtecEventConsumer + EventConsumer Hello-Receiver-idd diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_2.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_2.cdp new file mode 100644 index 00000000000..7b382ef4720 --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_2.cdp @@ -0,0 +1,322 @@ + + + + Hello_Plan_UUID_0001 + + + + c0965470-7b83-11d9-9669-0800200c9a66 + + IDL:BasicSP/EC:1.0 + + read_message + IDL:Hello/ReadMessage:1.0 + IDL:Hello/ReadMessage:1.0 + false + false + true + false + SimplexReceptacle + + + + + Hello-Sender-mdd + + Hello-Sender_exec + Hello-Sender_svnt + + + + + Hello-Receiver-mdd + + Hello-Receiver_exec + Hello-Receiver_svnt + + + + + + Hello-Sender-idd + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender.ior + + + + + + + local_message + + + tk_string + + + This is a test message passed in through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Sender-idd-02 + ReceiverNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender_02.ior + + + + + + + local_message + + + tk_string + + + This is a another message through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Receiver-idd + SenderNode + + Hello-Receiver-mdd + + ComponentIOR + + + tk_string + + + Receiver.ior + + + + + + + + + + + hello_event_ec_publisher_connection + + click_out + EventPublisher + Hello-Sender-idd + + + ES_01 + + + + + + + + hello_event_ec_publisher_connection_02 + + click_out + EventPublisher + Hello-Sender-idd-02 + + + ES_01 + + + + + + hello_event_ec_consumer_connection + + + + EventFilter + my_filter_02 + + EventFilter + + + tk_string + + + my_filter_02 + + + + + + + click_in + EventConsumer + Hello-Receiver-idd + + + ES_01 + + + + + + Sender_exec + + + Sender_DnC_exec + + entryPoint + + + tk_string + + + createSenderHome_Impl + + + + + + + Sender_svnt + + + Sender_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_SenderHome_Servant + + + + + + + Receiver_exec + + + Receiver_DnC_exec + + entryPoint + + + tk_string + + + createReceiverHome_Impl + + + + + + + Receiver_svnt + + + Receiver_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_ReceiverHome_Servant + + + + + + + CIAOEvents + + + tk_string + + + ciao-events-example-with-filters.ced + + + + diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_3.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_3.cdp new file mode 100644 index 00000000000..beb8af87f0d --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_3.cdp @@ -0,0 +1,322 @@ + + + + Hello_Plan_UUID_0001 + + + + c0965470-7b83-11d9-9669-0800200c9a66 + + IDL:BasicSP/EC:1.0 + + read_message + IDL:Hello/ReadMessage:1.0 + IDL:Hello/ReadMessage:1.0 + false + false + true + false + SimplexReceptacle + + + + + Hello-Sender-mdd + + Hello-Sender_exec + Hello-Sender_svnt + + + + + Hello-Receiver-mdd + + Hello-Receiver_exec + Hello-Receiver_svnt + + + + + + Hello-Sender-idd + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender.ior + + + + + + + local_message + + + tk_string + + + This is a test message passed in through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Sender-idd-02 + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender_02.ior + + + + + + + local_message + + + tk_string + + + This is a another message through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Receiver-idd + SenderNode + + Hello-Receiver-mdd + + ComponentIOR + + + tk_string + + + Receiver.ior + + + + + + + + + + + hello_event_ec_publisher_connection + + click_out + EventPublisher + Hello-Sender-idd + + + ES_01 + + + + + + + + hello_event_ec_publisher_connection_02 + + click_out + EventPublisher + Hello-Sender-idd-02 + + + ES_01 + + + + + + hello_event_ec_consumer_connection + + + + EventFilter + my_filter_03 + + EventFilter + + + tk_string + + + my_filter_03 + + + + + + + click_in + EventConsumer + Hello-Receiver-idd + + + ES_01 + + + + + + Sender_exec + + + Sender_DnC_exec + + entryPoint + + + tk_string + + + createSenderHome_Impl + + + + + + + Sender_svnt + + + Sender_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_SenderHome_Servant + + + + + + + Receiver_exec + + + Receiver_DnC_exec + + entryPoint + + + tk_string + + + createReceiverHome_Impl + + + + + + + Receiver_svnt + + + Receiver_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_ReceiverHome_Servant + + + + + + + CIAOEvents + + + tk_string + + + ciao-events-example-with-filters.ced + + + + diff --git a/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_4.cdp b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_4.cdp new file mode 100644 index 00000000000..f01b77dcaac --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_with_filters_4.cdp @@ -0,0 +1,322 @@ + + + + Hello_Plan_UUID_0001 + + + + c0965470-7b83-11d9-9669-0800200c9a66 + + IDL:BasicSP/EC:1.0 + + read_message + IDL:Hello/ReadMessage:1.0 + IDL:Hello/ReadMessage:1.0 + false + false + true + false + SimplexReceptacle + + + + + Hello-Sender-mdd + + Hello-Sender_exec + Hello-Sender_svnt + + + + + Hello-Receiver-mdd + + Hello-Receiver_exec + Hello-Receiver_svnt + + + + + + Hello-Sender-idd + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender.ior + + + + + + + local_message + + + tk_string + + + This is a test message passed in through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Sender-idd-02 + SenderNode + + Hello-Sender-mdd + + + + ComponentIOR + + + tk_string + + + Sender_02.ior + + + + + + + local_message + + + tk_string + + + This is a another message through XML. + + + + + + + color + + + tk_enum + + COLOR_SELECTION + IDL:Hello/COLOR_SELECTION:1.0 + empty + white + red + yellow + + + + yellow + + + + + + + Hello-Receiver-idd + SenderNode + + Hello-Receiver-mdd + + ComponentIOR + + + tk_string + + + Receiver.ior + + + + + + + + + + + hello_event_ec_publisher_connection + + click_out + EventPublisher + Hello-Sender-idd + + + ES_01 + + + + + + + + hello_event_ec_publisher_connection_02 + + click_out + EventPublisher + Hello-Sender-idd-02 + + + ES_01 + + + + + + hello_event_ec_consumer_connection + + + + EventFilter + my_filter_04 + + EventFilter + + + tk_string + + + my_filter_04 + + + + + + + click_in + EventConsumer + Hello-Receiver-idd + + + ES_01 + + + + + + Sender_exec + + + Sender_DnC_exec + + entryPoint + + + tk_string + + + createSenderHome_Impl + + + + + + + Sender_svnt + + + Sender_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_SenderHome_Servant + + + + + + + Receiver_exec + + + Receiver_DnC_exec + + entryPoint + + + tk_string + + + createReceiverHome_Impl + + + + + + + Receiver_svnt + + + Receiver_DnC_svnt + + entryPoint + + + tk_string + + + create_Hello_ReceiverHome_Servant + + + + + + + CIAOEvents + + + tk_string + + + ciao-events-example-with-filters.ced + + + + diff --git a/modules/CIAO/examples/Hello/descriptors_events/rtec.conf b/modules/CIAO/examples/Hello/descriptors_events/rtec.conf new file mode 100644 index 00000000000..fbbadf78b0c --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/rtec.conf @@ -0,0 +1 @@ +static EC_Factory "-ECobserver basic" diff --git a/modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons.pl b/modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons.pl new file mode 100755 index 00000000000..7e5efa3b1ad --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons.pl @@ -0,0 +1,42 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +$ACE_ROOT=$ENV{'ACE_ROOT'}; + +use lib "../../../../../bin"; +use PerlACE::Run_Test; + +$status = 0; +$iorfile1 = PerlACE::LocalFile ("NodeApp1.ior"); +$iorfile2 = PerlACE::LocalFile ("NodeApp2.ior"); + +#for ($iter = 0; $iter <= $#ARGV; $iter++) { +# if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { +# print "Run_Test Perl script for NodeApplicationTest \n\n"; +# print "run_test \n"; +# print "\n"; +# print "-h -- prints this information\n"; +# exit 0; +# } +#} + + +unlink $iorfile1; +unlink $iorfile2; + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$SV1 = new PerlACE::Process ("$CIAO_ROOT/DAnCE/NodeManager/NodeManager", + "-ORBEndpoint iiop://localhost:60001 -s $CIAO_ROOT/DAnCE/NodeApplication/NodeApplication -d 500"); + +$SV2 = new PerlACE::Process ("$CIAO_ROOT/DAnCE/NodeManager/NodeManager", + "-ORBEndpoint iiop://localhost:60002 -s $CIAO_ROOT/DAnCE/NodeApplication/NodeApplication -d 500"); + +$SV1->Spawn (); +$SV2->Spawn (); + +sleep (99999999999); diff --git a/modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons_svc_conf.pl b/modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons_svc_conf.pl new file mode 100755 index 00000000000..dcd0eb229ba --- /dev/null +++ b/modules/CIAO/examples/Hello/descriptors_events/run_NodeDaemons_svc_conf.pl @@ -0,0 +1,42 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +$ACE_ROOT=$ENV{'ACE_ROOT'}; + +use lib "../../../../../bin"; +use PerlACE::Run_Test; + +$status = 0; +$iorfile1 = PerlACE::LocalFile ("NodeApp1.ior"); +$iorfile2 = PerlACE::LocalFile ("NodeApp2.ior"); + +#for ($iter = 0; $iter <= $#ARGV; $iter++) { +# if ($ARGV[$iter] eq "-h" || $ARGV[$iter] eq "-?") { +# print "Run_Test Perl script for NodeApplicationTest \n\n"; +# print "run_test \n"; +# print "\n"; +# print "-h -- prints this information\n"; +# exit 0; +# } +#} + + +unlink $iorfile1; +unlink $iorfile2; + +$CIAO_ROOT=$ENV{'CIAO_ROOT'}; + +$SV1 = new PerlACE::Process ("$CIAO_ROOT/DAnCE/NodeManager/NodeManager", + "-ORBEndpoint iiop://localhost:60001 -s $CIAO_ROOT/DAnCE/NodeApplication/NodeApplication -c rtec.conf"); + +$SV2 = new PerlACE::Process ("$CIAO_ROOT/DAnCE/NodeManager/NodeManager", + "-ORBEndpoint iiop://localhost:60002 -s $CIAO_ROOT/DAnCE/NodeApplication/NodeApplication -c rtec.conf"); + +$SV1->Spawn (); +$SV2->Spawn (); + +sleep (99999999999); diff --git a/modules/CIAO/examples/Null_Component/Null_Component.cidl b/modules/CIAO/examples/Null_Component/Null_Component.cidl deleted file mode 100644 index 85c4d2188c3..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component.cidl +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @file Null_Component.cidl - * - * @author Abdul Sowayan - */ - -#ifndef NULL_COMPONENT_CIDL -#define NULL_COMPONENT_CIDL - -#include "Null_Component.idl" - -composition session Null_Component_Impl -{ - home executor Null_Component_Home_Exec - { - implements Null_Component_Home; - manages Null_Component_Exec; - }; -}; - -#endif /* NULL_COMPONENT_CIDL */ diff --git a/modules/CIAO/examples/Null_Component/Null_Component.idl b/modules/CIAO/examples/Null_Component/Null_Component.idl deleted file mode 100644 index 086e3ac23d4..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component.idl +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @file Null_Component.idl - * - * @author Abdul Sowayan - */ - -#ifndef NULL_COMPONENT_IDL -#define NULL_COMPONENT_IDL - -#include -#include "Null_Interface.idl" - - -/** - * @class Null_Component - * - * This component is intentionally left blank. Its purpose - * is to measure the footprint of a component in CIAO. - */ -component Null_Component -{ - provides Null_Interface null_facet; -}; - -/** - * @class Null_Component_Home - * - * @brief home for Null_Component - */ -home Null_Component_Home manages Null_Component -{ -}; - -#endif /* NULL_COMPONENT_IDL */ - - diff --git a/modules/CIAO/examples/Null_Component/Null_Component.mpc b/modules/CIAO/examples/Null_Component/Null_Component.mpc deleted file mode 100644 index 087c7275063..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component.mpc +++ /dev/null @@ -1,63 +0,0 @@ -// $Id$ -// This file is generated with "generate_component_mpc.pl -p Null_Interface Null_Component" - -project(Null_Interface_Null_Component_stub): ciao_client_dnc { - after += Null_Interface_stub - sharedname = Null_Component_stub - libs += Null_Interface_stub - idlflags += -Wb,stub_export_macro=NULL_COMPONENT_STUB_Export -Wb,stub_export_include=Null_Component_stub_export.h -Wb,skel_export_macro=NULL_COMPONENT_SVNT_Export -Wb,skel_export_include=Null_Component_svnt_export.h - dynamicflags = NULL_COMPONENT_STUB_BUILD_DLL - - IDL_Files { - Null_Component.idl - } - - Source_Files { - Null_ComponentC.cpp - } -} - -project(Null_Interface_Null_Component_svnt) : ciao_servant_dnc { - after += Null_Interface_svnt Null_Interface_Null_Component_stub - sharedname = Null_Component_svnt - libs += Null_Component_stub Null_Interface_stub Null_Interface_svnt - - idlflags += -Wb,export_macro=NULL_COMPONENT_SVNT_Export -Wb,export_include=Null_Component_svnt_export.h - dynamicflags = NULL_COMPONENT_SVNT_BUILD_DLL - - CIDL_Files { - Null_Component.cidl - } - - IDL_Files { - Null_ComponentE.idl - } - - Source_Files { - Null_ComponentEC.cpp - Null_ComponentS.cpp - Null_Component_svnt.cpp - } -} - - -project(Null_Interface_Null_Component_exec) : ciao_component_dnc { - after += Null_Interface_Null_Component_svnt - sharedname = Null_Component_exec - libs += Null_Component_stub Null_Component_svnt Null_Interface_stub Null_Interface_svnt - - idlflags += -Wb,export_macro=NULL_COMPONENT_EXEC_Export -Wb,export_include=Null_Component_exec_export.h - dynamicflags = NULL_COMPONENT_EXEC_BUILD_DLL - - IDL_Files { - - } - - Source_Files { - - Null_Component_exec.cpp - } -} - - - diff --git a/modules/CIAO/examples/Null_Component/Null_Component_exec.cpp b/modules/CIAO/examples/Null_Component/Null_Component_exec.cpp deleted file mode 100644 index e52ce558dde..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component_exec.cpp +++ /dev/null @@ -1,195 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#include "Null_Component_exec.h" -#include "ciao/CIAO_common.h" - -namespace CIDL_Null_Component_Impl -{ - //================================================================== - // Facet Executor Implementation Class: Null_Interface_exec_i - //================================================================== - - Null_Interface_exec_i::Null_Interface_exec_i (void) - { - } - - Null_Interface_exec_i::~Null_Interface_exec_i (void) - { - } - - // Operations from ::Null_Interface - - void - Null_Interface_exec_i::null_operation ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( ::CORBA::SystemException)) - { - // Your code here. - } - - //================================================================== - // Component Executor Implementation Class: Null_Component_exec_i - //================================================================== - - Null_Component_exec_i::Null_Component_exec_i (void) - { - } - - Null_Component_exec_i::~Null_Component_exec_i (void) - { - } - - // Supported or inherited operations. - - // Attribute operations. - - // Port operations. - - ::CCM_Null_Interface_ptr - Null_Component_exec_i::get_null_facet ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( ::CORBA::SystemException)) - { - // Your code here. - return ::CCM_Null_Interface::_nil (); - } - - // Operations from Components::SessionComponent - - void - Null_Component_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC (( ::CORBA::SystemException, - ::Components::CCMException)) - { - this->context_ = - Null_Component_Context::_narrow ( - ctx - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - if (this->context_ == 0) - { - ACE_THROW ( ::CORBA::INTERNAL ()); - } - } - - void - Null_Component_exec_i::ciao_preactivate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - Null_Component_exec_i::ciao_postactivate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - Null_Component_exec_i::ccm_activate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - Null_Component_exec_i::ccm_passivate ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - void - Null_Component_exec_i::ccm_remove ( - ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (( ::CORBA::SystemException, - ::Components::CCMException)) - { - // Your code here. - } - - //================================================================== - // Home Executor Implementation Class: Null_Component_Home_exec_i - //================================================================== - - Null_Component_Home_exec_i::Null_Component_Home_exec_i (void) - { - } - - Null_Component_Home_exec_i::~Null_Component_Home_exec_i (void) - { - } - - // Supported or inherited operations. - - // Home operations. - - // Factory and finder operations. - - // Attribute operations. - - // Implicit operations. - - ::Components::EnterpriseComponent_ptr - Null_Component_Home_exec_i::create ( - ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC (( ::CORBA::SystemException, - ::Components::CCMException)) - { - ::Components::EnterpriseComponent_ptr retval = - ::Components::EnterpriseComponent::_nil (); - - ACE_NEW_THROW_EX ( - retval, - Null_Component_exec_i, - ::CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); - - return retval; - } - - extern "C" NULL_COMPONENT_EXEC_Export ::Components::HomeExecutorBase_ptr - create_Null_Component_Home_Impl (void) - { - ::Components::HomeExecutorBase_ptr retval = - ::Components::HomeExecutorBase::_nil (); - - ACE_NEW_RETURN ( - retval, - Null_Component_Home_exec_i, - ::Components::HomeExecutorBase::_nil ()); - - return retval; - } -} - diff --git a/modules/CIAO/examples/Null_Component/Null_Component_exec.h b/modules/CIAO/examples/Null_Component/Null_Component_exec.h deleted file mode 100644 index 4bfa913e20d..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component_exec.h +++ /dev/null @@ -1,154 +0,0 @@ -// $Id$ -// -// **** Code generated by the **** -// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** -// CIAO has been developed by: -// Center for Distributed Object Computing -// Washington University -// St. Louis, MO -// USA -// http://www.cs.wustl.edu/~schmidt/doc-center.html -// CIDL Compiler has been developed by: -// Institute for Software Integrated Systems -// Vanderbilt University -// Nashville, TN -// USA -// http://www.isis.vanderbilt.edu/ -// -// Information about CIAO is available at: -// http://www.dre.vanderbilt.edu/CIAO - -#ifndef CIAO_NULL_COMPONENT_EXEC_H -#define CIAO_NULL_COMPONENT_EXEC_H - -#include /**/ "ace/pre.h" - -#include "Null_Component_svnt.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "Null_Component_exec_export.h" -#include "tao/LocalObject.h" - -namespace CIDL_Null_Component_Impl -{ - class NULL_COMPONENT_EXEC_Export Null_Interface_exec_i - : public virtual ::CCM_Null_Interface, - public virtual TAO_Local_RefCounted_Object - { - public: - Null_Interface_exec_i (void); - virtual ~Null_Interface_exec_i (void); - - // Operations from ::Null_Interface - - virtual void - null_operation ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( ::CORBA::SystemException)); - }; - - class NULL_COMPONENT_EXEC_Export Null_Component_exec_i - : public virtual Null_Component_Exec, - public virtual TAO_Local_RefCounted_Object - { - public: - Null_Component_exec_i (void); - virtual ~Null_Component_exec_i (void); - - // Supported or inherited operations. - - // Attribute operations. - - // Port operations. - - virtual ::CCM_Null_Interface_ptr - get_null_facet ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( ::CORBA::SystemException)); - - // Operations from Components::SessionComponent - - virtual void - set_session_context ( - ::Components::SessionContext_ptr ctx - ACE_ENV_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ciao_preactivate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ciao_postactivate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ccm_activate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ccm_passivate ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - virtual void - ccm_remove ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - - protected: - Null_Component_Context *context_; - }; - - class NULL_COMPONENT_EXEC_Export Null_Component_Home_exec_i - : public virtual Null_Component_Home_Exec, - public virtual TAO_Local_RefCounted_Object - { - public: - Null_Component_Home_exec_i (void); - virtual ~Null_Component_Home_exec_i (void); - - // Supported or inherited operations. - - // Home operations. - - // Factory and finder operations. - - // Attribute operations. - - // Implicit operations. - - virtual ::Components::EnterpriseComponent_ptr - create ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) - ACE_THROW_SPEC (( - ::CORBA::SystemException, - ::Components::CCMException)); - }; - - extern "C" NULL_COMPONENT_EXEC_Export ::Components::HomeExecutorBase_ptr - create_Null_Component_Home_Impl (void); -} - -#include /**/ "ace/post.h" - -#endif /* CIAO_NULL_COMPONENT_EXEC_H */ - diff --git a/modules/CIAO/examples/Null_Component/Null_Component_exec_export.h b/modules/CIAO/examples/Null_Component/Null_Component_exec_export.h deleted file mode 100644 index d5157f448fe..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component_exec_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NULL_COMPONENT_EXEC -// ------------------------------ -#ifndef NULL_COMPONENT_EXEC_EXPORT_H -#define NULL_COMPONENT_EXEC_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NULL_COMPONENT_EXEC_HAS_DLL) -# define NULL_COMPONENT_EXEC_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NULL_COMPONENT_EXEC_HAS_DLL */ - -#if !defined (NULL_COMPONENT_EXEC_HAS_DLL) -# define NULL_COMPONENT_EXEC_HAS_DLL 1 -#endif /* ! NULL_COMPONENT_EXEC_HAS_DLL */ - -#if defined (NULL_COMPONENT_EXEC_HAS_DLL) && (NULL_COMPONENT_EXEC_HAS_DLL == 1) -# if defined (NULL_COMPONENT_EXEC_BUILD_DLL) -# define NULL_COMPONENT_EXEC_Export ACE_Proper_Export_Flag -# define NULL_COMPONENT_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NULL_COMPONENT_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NULL_COMPONENT_EXEC_BUILD_DLL */ -# define NULL_COMPONENT_EXEC_Export ACE_Proper_Import_Flag -# define NULL_COMPONENT_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NULL_COMPONENT_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NULL_COMPONENT_EXEC_BUILD_DLL */ -#else /* NULL_COMPONENT_EXEC_HAS_DLL == 1 */ -# define NULL_COMPONENT_EXEC_Export -# define NULL_COMPONENT_EXEC_SINGLETON_DECLARATION(T) -# define NULL_COMPONENT_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NULL_COMPONENT_EXEC_HAS_DLL == 1 */ - -// Set NULL_COMPONENT_EXEC_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NULL_COMPONENT_EXEC_NTRACE) -# if (ACE_NTRACE == 1) -# define NULL_COMPONENT_EXEC_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NULL_COMPONENT_EXEC_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NULL_COMPONENT_EXEC_NTRACE */ - -#if (NULL_COMPONENT_EXEC_NTRACE == 1) -# define NULL_COMPONENT_EXEC_TRACE(X) -#else /* (NULL_COMPONENT_EXEC_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NULL_COMPONENT_EXEC_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NULL_COMPONENT_EXEC_NTRACE == 1) */ - -#endif /* NULL_COMPONENT_EXEC_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/CIAO/examples/Null_Component/Null_Component_stub_export.h b/modules/CIAO/examples/Null_Component/Null_Component_stub_export.h deleted file mode 100644 index a8017fc235f..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component_stub_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NULL_COMPONENT_STUB -// ------------------------------ -#ifndef NULL_COMPONENT_STUB_EXPORT_H -#define NULL_COMPONENT_STUB_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NULL_COMPONENT_STUB_HAS_DLL) -# define NULL_COMPONENT_STUB_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NULL_COMPONENT_STUB_HAS_DLL */ - -#if !defined (NULL_COMPONENT_STUB_HAS_DLL) -# define NULL_COMPONENT_STUB_HAS_DLL 1 -#endif /* ! NULL_COMPONENT_STUB_HAS_DLL */ - -#if defined (NULL_COMPONENT_STUB_HAS_DLL) && (NULL_COMPONENT_STUB_HAS_DLL == 1) -# if defined (NULL_COMPONENT_STUB_BUILD_DLL) -# define NULL_COMPONENT_STUB_Export ACE_Proper_Export_Flag -# define NULL_COMPONENT_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NULL_COMPONENT_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NULL_COMPONENT_STUB_BUILD_DLL */ -# define NULL_COMPONENT_STUB_Export ACE_Proper_Import_Flag -# define NULL_COMPONENT_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NULL_COMPONENT_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NULL_COMPONENT_STUB_BUILD_DLL */ -#else /* NULL_COMPONENT_STUB_HAS_DLL == 1 */ -# define NULL_COMPONENT_STUB_Export -# define NULL_COMPONENT_STUB_SINGLETON_DECLARATION(T) -# define NULL_COMPONENT_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NULL_COMPONENT_STUB_HAS_DLL == 1 */ - -// Set NULL_COMPONENT_STUB_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NULL_COMPONENT_STUB_NTRACE) -# if (ACE_NTRACE == 1) -# define NULL_COMPONENT_STUB_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NULL_COMPONENT_STUB_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NULL_COMPONENT_STUB_NTRACE */ - -#if (NULL_COMPONENT_STUB_NTRACE == 1) -# define NULL_COMPONENT_STUB_TRACE(X) -#else /* (NULL_COMPONENT_STUB_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NULL_COMPONENT_STUB_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NULL_COMPONENT_STUB_NTRACE == 1) */ - -#endif /* NULL_COMPONENT_STUB_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/CIAO/examples/Null_Component/Null_Component_svnt_export.h b/modules/CIAO/examples/Null_Component/Null_Component_svnt_export.h deleted file mode 100644 index 14d8bb8c3b1..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Component_svnt_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NULL_COMPONENT_SVNT -// ------------------------------ -#ifndef NULL_COMPONENT_SVNT_EXPORT_H -#define NULL_COMPONENT_SVNT_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NULL_COMPONENT_SVNT_HAS_DLL) -# define NULL_COMPONENT_SVNT_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NULL_COMPONENT_SVNT_HAS_DLL */ - -#if !defined (NULL_COMPONENT_SVNT_HAS_DLL) -# define NULL_COMPONENT_SVNT_HAS_DLL 1 -#endif /* ! NULL_COMPONENT_SVNT_HAS_DLL */ - -#if defined (NULL_COMPONENT_SVNT_HAS_DLL) && (NULL_COMPONENT_SVNT_HAS_DLL == 1) -# if defined (NULL_COMPONENT_SVNT_BUILD_DLL) -# define NULL_COMPONENT_SVNT_Export ACE_Proper_Export_Flag -# define NULL_COMPONENT_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NULL_COMPONENT_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NULL_COMPONENT_SVNT_BUILD_DLL */ -# define NULL_COMPONENT_SVNT_Export ACE_Proper_Import_Flag -# define NULL_COMPONENT_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NULL_COMPONENT_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NULL_COMPONENT_SVNT_BUILD_DLL */ -#else /* NULL_COMPONENT_SVNT_HAS_DLL == 1 */ -# define NULL_COMPONENT_SVNT_Export -# define NULL_COMPONENT_SVNT_SINGLETON_DECLARATION(T) -# define NULL_COMPONENT_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NULL_COMPONENT_SVNT_HAS_DLL == 1 */ - -// Set NULL_COMPONENT_SVNT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NULL_COMPONENT_SVNT_NTRACE) -# if (ACE_NTRACE == 1) -# define NULL_COMPONENT_SVNT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NULL_COMPONENT_SVNT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NULL_COMPONENT_SVNT_NTRACE */ - -#if (NULL_COMPONENT_SVNT_NTRACE == 1) -# define NULL_COMPONENT_SVNT_TRACE(X) -#else /* (NULL_COMPONENT_SVNT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NULL_COMPONENT_SVNT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NULL_COMPONENT_SVNT_NTRACE == 1) */ - -#endif /* NULL_COMPONENT_SVNT_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/CIAO/examples/Null_Component/Null_Interface.idl b/modules/CIAO/examples/Null_Component/Null_Interface.idl deleted file mode 100644 index 98f539d6034..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Interface.idl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @file Null_Interface.idl - * - * @author Abdul Sowayan - */ - -#ifndef NULL_INTERFACE_IDL -#define NULL_INTERFACE_IDL - -/** - * @interface Null_Interface - * - * @brief - */ -interface Null_Interface -{ - void null_operation(); -}; - -#endif /* NULL_INTERFACE_IDL */ diff --git a/modules/CIAO/examples/Null_Component/Null_Interface.mpc b/modules/CIAO/examples/Null_Component/Null_Interface.mpc deleted file mode 100644 index e5eb5b31a1f..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Interface.mpc +++ /dev/null @@ -1,38 +0,0 @@ -// $Id$ -// This file is generated with "generate_component_mpc.pl -n Null_Interface" - -project(Null_Interface_stub): ciao_client_dnc { - - sharedname = Null_Interface_stub - idlflags += -Wb,stub_export_macro=NULL_INTERFACE_STUB_Export -Wb,stub_export_include=Null_Interface_stub_export.h -Wb,skel_export_macro=NULL_INTERFACE_SVNT_Export -Wb,skel_export_include=Null_Interface_svnt_export.h - dynamicflags = NULL_INTERFACE_STUB_BUILD_DLL - - IDL_Files { - Null_Interface.idl - } - - Source_Files { - Null_InterfaceC.cpp - } -} - -project(Null_Interface_svnt) : ciao_servant_dnc { - after += Null_Interface_stub - sharedname = Null_Interface_svnt - libs += Null_Interface_stub - - idlflags += -Wb,export_macro=NULL_INTERFACE_SVNT_Export -Wb,export_include=Null_Interface_svnt_export.h - dynamicflags = NULL_INTERFACE_SVNT_BUILD_DLL - - IDL_Files { - Null_Interface.idl - } - - Source_Files { - Null_InterfaceS.cpp - } -} - - - - diff --git a/modules/CIAO/examples/Null_Component/Null_Interface_stub_export.h b/modules/CIAO/examples/Null_Component/Null_Interface_stub_export.h deleted file mode 100644 index 09ad6ea7925..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Interface_stub_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NULL_INTERFACE_STUB -// ------------------------------ -#ifndef NULL_INTERFACE_STUB_EXPORT_H -#define NULL_INTERFACE_STUB_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NULL_INTERFACE_STUB_HAS_DLL) -# define NULL_INTERFACE_STUB_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NULL_INTERFACE_STUB_HAS_DLL */ - -#if !defined (NULL_INTERFACE_STUB_HAS_DLL) -# define NULL_INTERFACE_STUB_HAS_DLL 1 -#endif /* ! NULL_INTERFACE_STUB_HAS_DLL */ - -#if defined (NULL_INTERFACE_STUB_HAS_DLL) && (NULL_INTERFACE_STUB_HAS_DLL == 1) -# if defined (NULL_INTERFACE_STUB_BUILD_DLL) -# define NULL_INTERFACE_STUB_Export ACE_Proper_Export_Flag -# define NULL_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NULL_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NULL_INTERFACE_STUB_BUILD_DLL */ -# define NULL_INTERFACE_STUB_Export ACE_Proper_Import_Flag -# define NULL_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NULL_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NULL_INTERFACE_STUB_BUILD_DLL */ -#else /* NULL_INTERFACE_STUB_HAS_DLL == 1 */ -# define NULL_INTERFACE_STUB_Export -# define NULL_INTERFACE_STUB_SINGLETON_DECLARATION(T) -# define NULL_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NULL_INTERFACE_STUB_HAS_DLL == 1 */ - -// Set NULL_INTERFACE_STUB_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NULL_INTERFACE_STUB_NTRACE) -# if (ACE_NTRACE == 1) -# define NULL_INTERFACE_STUB_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NULL_INTERFACE_STUB_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NULL_INTERFACE_STUB_NTRACE */ - -#if (NULL_INTERFACE_STUB_NTRACE == 1) -# define NULL_INTERFACE_STUB_TRACE(X) -#else /* (NULL_INTERFACE_STUB_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NULL_INTERFACE_STUB_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NULL_INTERFACE_STUB_NTRACE == 1) */ - -#endif /* NULL_INTERFACE_STUB_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/CIAO/examples/Null_Component/Null_Interface_svnt_export.h b/modules/CIAO/examples/Null_Component/Null_Interface_svnt_export.h deleted file mode 100644 index 9d4455adcec..00000000000 --- a/modules/CIAO/examples/Null_Component/Null_Interface_svnt_export.h +++ /dev/null @@ -1,58 +0,0 @@ - -// -*- C++ -*- -// $Id$ -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl NULL_INTERFACE_SVNT -// ------------------------------ -#ifndef NULL_INTERFACE_SVNT_EXPORT_H -#define NULL_INTERFACE_SVNT_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (NULL_INTERFACE_SVNT_HAS_DLL) -# define NULL_INTERFACE_SVNT_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && NULL_INTERFACE_SVNT_HAS_DLL */ - -#if !defined (NULL_INTERFACE_SVNT_HAS_DLL) -# define NULL_INTERFACE_SVNT_HAS_DLL 1 -#endif /* ! NULL_INTERFACE_SVNT_HAS_DLL */ - -#if defined (NULL_INTERFACE_SVNT_HAS_DLL) && (NULL_INTERFACE_SVNT_HAS_DLL == 1) -# if defined (NULL_INTERFACE_SVNT_BUILD_DLL) -# define NULL_INTERFACE_SVNT_Export ACE_Proper_Export_Flag -# define NULL_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define NULL_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* NULL_INTERFACE_SVNT_BUILD_DLL */ -# define NULL_INTERFACE_SVNT_Export ACE_Proper_Import_Flag -# define NULL_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define NULL_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* NULL_INTERFACE_SVNT_BUILD_DLL */ -#else /* NULL_INTERFACE_SVNT_HAS_DLL == 1 */ -# define NULL_INTERFACE_SVNT_Export -# define NULL_INTERFACE_SVNT_SINGLETON_DECLARATION(T) -# define NULL_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* NULL_INTERFACE_SVNT_HAS_DLL == 1 */ - -// Set NULL_INTERFACE_SVNT_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (NULL_INTERFACE_SVNT_NTRACE) -# if (ACE_NTRACE == 1) -# define NULL_INTERFACE_SVNT_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define NULL_INTERFACE_SVNT_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !NULL_INTERFACE_SVNT_NTRACE */ - -#if (NULL_INTERFACE_SVNT_NTRACE == 1) -# define NULL_INTERFACE_SVNT_TRACE(X) -#else /* (NULL_INTERFACE_SVNT_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define NULL_INTERFACE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (NULL_INTERFACE_SVNT_NTRACE == 1) */ - -#endif /* NULL_INTERFACE_SVNT_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/CIAO/examples/Null_Component/StaticDAnCEApp.cpp b/modules/CIAO/examples/Null_Component/StaticDAnCEApp.cpp deleted file mode 100644 index 985173e5720..00000000000 --- a/modules/CIAO/examples/Null_Component/StaticDAnCEApp.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// $Id$ - -#include "Container_Base.h" -#include "NodeManager/NodeManager_Impl.h" -#include "ace/OS_NS_stdio.h" -#include "ace/streams.h" -#include "ace/Get_Opt.h" -#include "tao/IORTable/IORTable.h" -#include "tao/CDR.h" -#include "plan.h" - -int -ACE_TMAIN (int argc, ACE_TCHAR *argv[]) -{ - // Initialize the ORB so that CORBA::Any will work - // - CORBA::ORB_var orb = - CORBA::ORB_init (argc, - argv, - ""); - try - { - // Get reference to Root POA. - CORBA::Object_var obj - = orb->resolve_initial_references ("RootPOA" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POA_var poa - = PortableServer::POA::_narrow (obj.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // Activate POA manager - PortableServer::POAManager_var mgr - = poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - mgr->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - int homes_table_size = - sizeof (homes_table)/sizeof(HomeAttributes); - - CIAO::HOMECREATOR_FUNCPTR_MAP home_creator_fptr_map; - CIAO::HOMESERVANTCREATOR_FUNCPTR_MAP homesvnt_creator_fptr_map; - CIAO::Static_Config_EntryPoints_Maps static_config_entrypoints_maps; - static_config_entrypoints_maps.home_creator_funcptr_map_ = &home_creator_fptr_map; - static_config_entrypoints_maps.home_servant_creator_funcptr_map_ = &homesvnt_creator_fptr_map; - - int i=0; - for (i=0; iinit (); - - CORBA::Object_var table_object = - orb->resolve_initial_references ("IORTable" - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - IORTable::Table_var adapter = - IORTable::Table::_narrow (table_object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (adapter.in ())) - ACE_ERROR_RETURN ((LM_ERROR, "Nil IORTable\n"), -1); - - CIAO::NodeManagerDaemon_var manager = - static_node_manager_impl->_this (); - - CORBA::String_var str = - orb->object_to_string (manager.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - adapter->bind ("NodeManager", - str.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // Run the main event loop for the ORB. - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - catch (CORBA::Exception& ex) - { - ACE_PRINT_EXCEPTION (ex, "Caught CORBA Exception: "); - return -1; - } - - return 0; -} diff --git a/modules/CIAO/examples/Null_Component/StaticDAnCEApp.mpc b/modules/CIAO/examples/Null_Component/StaticDAnCEApp.mpc deleted file mode 100644 index be737fa37de..00000000000 --- a/modules/CIAO/examples/Null_Component/StaticDAnCEApp.mpc +++ /dev/null @@ -1,21 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project(StaticDAnCEApp *): ciao_static_dnc_app, iortable { - after += Null_Interface_Null_Component_exec - exename = StaticDAnCEApp - - libs += Null_Interface_stub - libs += Null_Interface_svnt - libs += Null_Component_stub - libs += Null_Component_svnt - libs += Null_Component_exec - - IDL_Files { - } - - Source_Files { - StaticDAnCEApp.cpp - } -} - diff --git a/modules/CIAO/examples/Null_Component/plan.h b/modules/CIAO/examples/Null_Component/plan.h deleted file mode 100644 index 300e43b9f80..00000000000 --- a/modules/CIAO/examples/Null_Component/plan.h +++ /dev/null @@ -1,33 +0,0 @@ -// $Id$ - -extern "C" ::Components::HomeExecutorBase_ptr create_Null_Component_Home_Impl (void); -extern "C" ::PortableServer::Servant create_Null_Component_Home_Servant - (::Components::HomeExecutorBase_ptr p, - ::CIAO::Session_Container *c, - const char* - ACE_ENV_ARG_DECL_WITH_DEFAULTS); - -struct HomeAttributes -{ - char const * component_instance_name_; - /// Specify the entrypoint to component executor DLL. - char const * executor_entrypt_; - ::CIAO::HomeFactory executor_fptr_; - /// Specify the entrypoint to component servant DLL. - char const * servant_entrypt_; - ::CIAO::ServantFactory servant_fptr_; -}; - -// Homes -static const HomeAttributes homes_table[] = -{ - { - "Null_Component_ComponentImplementations_Null_Assembly_Container_Null_Assembly_Null_Component", - "create_Null_Component_Home_Impl", - create_Null_Component_Home_Impl, - "create_Null_Component_Home_Servant", - create_Null_Component_Home_Servant - }, -}; - - -- cgit v1.2.1