diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests/CollocatedPubSub')
14 files changed, 0 insertions, 2237 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.idl deleted file mode 100644 index 9fe01e52f7f..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.idl +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef COLLACATED_BASE_ -#define COLLACATED_BASE_ - -#pragma ndds typesupport "Base/Collocated_BaseSupport.h" -#pragma opendds typesupport "Base/Collocated_BaseTypeSupportImpl.h" - -#pragma DCPS_DATA_TYPE "CoPubSub::Test_msg" - -module CoPubSub { - struct Test_msg { - string hello; - long msgId; - }; - -#if defined DDS4CCM_NEEDS_SEQUENCES_DEFINED -typedef sequence <Test_msg> Test_msgSeq; -#endif -}; - - -#endif // COLLACATED_BASE_ - diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.mpc deleted file mode 100644 index d939fdc6348..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.mpc +++ /dev/null @@ -1,24 +0,0 @@ -project (Collocated_Base_stub) : taoidldefaults, dds4ccm_ts_default { - sharedname = Collocated_Base_stub - dynamicflags += COLLACATED_BASE_STUB_BUILD_DLL - libout = ../lib - - idlflags += -SS -Sci \ - -Wb,stub_export_macro=COLLACATED_BASE_STUB_Export \ - -Wb,stub_export_include=Collocated_Base_stub_export.h - - IDL_Files { - idlflags += -Gxhst - Collocated_Base.idl - } - - opendds_ts_flags += --export=COLLACATED_BASE_STUB_Export - - DDSGenerator_Files { - Collocated_Base.idl - } - - Source_Files { - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.idl deleted file mode 100644 index 28225040991..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.idl +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef COLLACATED_CONNECTOR_ -#define COLLACATED_CONNECTOR_ - -#include <Components.idl> -#include <ccm_dds.idl> - -#include "Base/Collocated_Base.idl" - -#pragma ciao lem "Connector/Collocated_ConnectorE.idl" - -#if (CIAO_DDS4CCM_OPENDDS==1) -# include "Base/Collocated_BaseTypeSupport.idl" -#endif - -module CoPubSub { - module CCM_DDS::Typed <Test_msg, Test_msgSeq> Test_conn; -}; - -#endif // COLLACATED_CONNECTOR_ - diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.mpc deleted file mode 100644 index 8555202b1e6..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.mpc +++ /dev/null @@ -1,144 +0,0 @@ -project(Collocated_Connector_idl_gen) : connectoridldefaults, dds4ccm { - after += DDS4CCM_idl_gen Collocated_Base_stub - custom_only = 1 - idlflags += -Wb,stub_export_macro=COLLACATED_CONNECTOR_STUB_Export \ - -Wb,stub_export_include=Collocated_Connector_stub_export.h \ - -Wb,skel_export_macro=COLLACATED_CONNECTOR_SVNT_Export \ - -Wb,skel_export_include=Collocated_Connector_svnt_export.h \ - -Wb,svnt_export_macro=COLLACATED_CONNECTOR_SVNT_Export \ - -Wb,svnt_export_include=Collocated_Connector_svnt_export.h \ - -Wb,conn_export_macro=COLLACATED_CONNECTOR_CONN_Export \ - -Wb,conn_export_include=Collocated_Connector_conn_export.h \ - -I .. - - IDL_Files { - Collocated_Connector.idl - } -} - -project(Collocated_Connector_lem_gen) : ciaoidldefaults, dds4ccm { - custom_only = 1 - after += Collocated_Connector_idl_gen - idlflags += -Wb,stub_export_macro=COLLACATED_CONNECTOR_LEM_STUB_Export \ - -Wb,stub_export_include=Collocated_Connector_lem_stub_export.h \ - -SS -Gxhst -Sci \ - -I .. - - IDL_Files { - Collocated_ConnectorE.idl - } -} - -project(Collocated_Connector_lem_stub) : ccm_svnt, dds4ccm_lem_stub { - after += Collocated_Connector_lem_gen Collocated_Connector_stub Collocated_Base_stub - libs += Collocated_Base_stub Collocated_Connector_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Collocated_Connector_lem_stub - dynamicflags += COLLACATED_CONNECTOR_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Collocated_ConnectorEC.cpp - } - - Header_Files { - Collocated_ConnectorEC.h - Collocated_Connector_lem_stub_export.h - } - - Inline_Files { - Collocated_ConnectorEC.inl - } -} - -project(Collocated_Connector_stub) : ccm_stub, dds4ccm_base { - after += Collocated_Connector_idl_gen Collocated_Base_stub - libs += Collocated_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Collocated_Connector_stub - dynamicflags += COLLACATED_CONNECTOR_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Collocated_ConnectorC.cpp - } - - Header_Files { - Collocated_ConnectorC.h - Collocated_Connector_stub_export.h - } - - Inline_Files { - Collocated_ConnectorC.inl - } -} - -project(Collocated_Connector_exec) : ciao_executor, dds4ccm_impl { - after += Collocated_Connector_lem_stub Collocated_Connector_stub \ - Collocated_Base_stub - sharedname = Collocated_Connector_exec - libs += Collocated_Connector_stub Collocated_Connector_lem_stub \ - Collocated_Base_stub Collocated_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += COLLACATED_CONNECTOR_CONN_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Collocated_Connector_conn.cpp - } - - Header_Files { - Collocated_Connector_conn.h - Collocated_Connector_conn_export.h - } - - Inline_Files { - } -} - - -project(Collocated_Connector_svnt) : ciao_servant, dds4ccm_impl { - after += Collocated_Connector_lem_stub \ - Collocated_Connector_exec \ - Collocated_Connector_stub - sharedname = Collocated_Connector_svnt - libs += Collocated_Connector_stub \ - Collocated_Connector_lem_stub \ - Collocated_Base_stub \ - Collocated_Connector_exec - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += COLLACATED_CONNECTOR_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Collocated_ConnectorS.cpp - Collocated_Connector_svnt.cpp - } - - Header_Files { - Collocated_ConnectorS.h - Collocated_Connector_svnt.h - Collocated_Connector_svnt_export.h - } - - Inline_Files { - } -} - - diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.idl deleted file mode 100644 index 4471ce44144..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.idl +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef PUBSUB_COMPONENT_ -#define PUBSUB_COMPONENT_ - -#include <Components.idl> -#include "Connector/Collocated_Connector.idl" - -module CoPubSub { - component PubSub_comp { - port Test_conn::DDS_Write TestPub; - port Test_conn::DDS_Listen TestSub; - }; -}; - -#endif // PUBSUB_COMPONENT_ diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.mpc deleted file mode 100644 index 1aa98495166..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.mpc +++ /dev/null @@ -1,143 +0,0 @@ -project(PubSubComponent_idl_gen) : componentidldefaults, dds4ccm { - after += Collocated_Connector_idl_gen DDS_Starter_idl_gen - custom_only = 1 - idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_STUB_Export \ - -Wb,stub_export_include=PubSub_Component_stub_export.h \ - -Wb,skel_export_macro=PUBSUB_COMPONENT_SVNT_Export \ - -Wb,skel_export_include=PubSub_Component_svnt_export.h \ - -Wb,svnt_export_macro=PUBSUB_COMPONENT_SVNT_Export \ - -Wb,svnt_export_include=PubSub_Component_svnt_export.h \ - -Wb,exec_export_macro=PUBSUB_COMPONENT_EXEC_Export \ - -Wb,exec_export_include=PubSub_Component_exec_export.h \ - -I .. - - IDL_Files { - PubSub_Component.idl - } -} - -project(PubSubComponent_lem_gen) : ciaoidldefaults, dds4ccm { - after += PubSubComponent_idl_gen - custom_only = 1 - idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_LEM_STUB_Export \ - -Wb,stub_export_include=PubSubComponent_lem_stub_export.h \ - -SS -Gxhst -I $CIAO_ROOT/connectors -I .. - - IDL_Files { - PubSub_ComponentE.idl - } -} - -project(PubSubComponent_lem_stub) : ccm_svnt, dds4ccm_base { - after += PubSubComponent_lem_gen PubSubComponent_stub \ - Collocated_Base_stub - libs += Collocated_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = PubSub_Component_lem_stub - dynamicflags += PUBSUB_COMPONENT_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - PubSub_ComponentEC.cpp - } - - Header_Files { - PubSub_ComponentEC.h - PubSub_Component_lem_stub_export.h - } - - Inline_Files { - PubSub_ComponentEC.inl - } -} - -project(PubSubComponent_stub) : ccm_stub, dds4ccm_base { - after += PubSubComponent_idl_gen Collocated_Base_stub \ - Collocated_Connector_stub - libs += Collocated_Base_stub Collocated_Connector_stub - includes += .. - libpaths += ../lib - libout = ../lib - sharedname = PubSub_Component_stub - dynamicflags += PUBSUB_COMPONENT_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - PubSub_ComponentC.cpp - } - - Header_Files { - PubSub_ComponentC.h - PubSub_Component_stub_export.h - } - - Inline_Files { - PubSub_ComponentC.inl - } -} - -project(PubSubComponent_exec) : ciao_executor, dds4ccm_lem_stub { - after += PubSubComponent_lem_stub PubSubComponent_stub \ - Collocated_Connector_lem_stub Collocated_Connector_stub - sharedname = PubSub_Component_exec - libs += PubSub_Component_stub PubSub_Component_lem_stub Collocated_Base_stub \ - Collocated_Connector_lem_stub Collocated_Connector_stub - libpaths += ../lib - includes += .. - libout = ../lib - dynamicflags += PUBSUB_COMPONENT_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - PubSub_Component_exec.cpp - } - - Header_Files { - PubSub_Component_exec.h - PubSub_Component_exec_export.h - } - - Inline_Files { - } -} - - -project(PubSubComponent_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { - after += Collocated_Base_stub PubSubComponent_lem_stub \ - Collocated_Connector_stub \ - Collocated_Connector_svnt Collocated_Connector_lem_stub - sharedname = PubSub_Component_svnt - libs += PubSub_Component_stub PubSub_Component_lem_stub Collocated_Base_stub \ - Collocated_Connector_stub Collocated_Connector_svnt \ - Collocated_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += PUBSUB_COMPONENT_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - PubSub_ComponentS.cpp - PubSub_Component_svnt.cpp - } - - Header_Files { - PubSub_ComponentS.h - PubSub_Component_svnt.h - PubSub_Component_svnt_export.h - } - - Inline_Files { - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.cpp b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.cpp deleted file mode 100644 index 462f0ebbdf4..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.cpp +++ /dev/null @@ -1,301 +0,0 @@ -// -*- C++ -*- -#include "PubSub_Component_exec.h" -#include "tao/ORB_Core.h" -#include "ace/Reactor.h" - -namespace CIAO_CoPubSub_PubSub_comp_Impl -{ - - - /** - * WriteHandler - */ - WriteHandler::WriteHandler (PubSub_comp_exec_i &callback) - : callback_ (callback) - { - } - - int - WriteHandler::handle_timeout (const ACE_Time_Value &, const void *) - { - return this->callback_.tick (); - } - - /** - * Facet Executor Implementation Class: TestSub_data_listener_exec_i - */ - - TestSub_data_listener_exec_i::TestSub_data_listener_exec_i ( - ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx) - : ciao_context_ ( - ::CoPubSub::CCM_PubSub_comp_Context::_duplicate (ctx)) - { - } - - TestSub_data_listener_exec_i::~TestSub_data_listener_exec_i (void) - { - } - - // Operations from ::CoPubSub::Test_conn::Listener - - void - TestSub_data_listener_exec_i::on_one_data ( - const ::CoPubSub::Test_msg & datum, - const ::CCM_DDS::ReadInfo & /* info */) - { - ACE_DEBUG ((LM_DEBUG, "TestSub_data_listener_exec_i::on_one_data - " - "New data received: <%C> - <%d>\n", - datum.hello.in (), datum.msgId)); - } - - void - TestSub_data_listener_exec_i::on_many_data ( - const ::CoPubSub::Test_msgSeq & /* data */, - const ::CCM_DDS::ReadInfoSeq & /* infos */) - { - /* Your code here. */ - } - - /** - * Facet Executor Implementation Class: TestSub_status_exec_i - */ - - TestSub_status_exec_i::TestSub_status_exec_i ( - ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx) - : ciao_context_ ( - ::CoPubSub::CCM_PubSub_comp_Context::_duplicate (ctx)) - { - } - - TestSub_status_exec_i::~TestSub_status_exec_i (void) - { - } - - // Operations from ::CCM_DDS::PortStatusListener - - void - TestSub_status_exec_i::on_requested_deadline_missed ( - ::DDS::DataReader_ptr /* the_reader */, - const ::DDS::RequestedDeadlineMissedStatus & /* status */) - { - /* Your code here. */ - } - - void - TestSub_status_exec_i::on_sample_lost ( - ::DDS::DataReader_ptr /* the_reader */, - const ::DDS::SampleLostStatus & /* status */) - { - /* Your code here. */ - } - - /** - * Component Executor Implementation Class: PubSub_comp_exec_i - */ - - PubSub_comp_exec_i::PubSub_comp_exec_i (void) - : count_(-3) - { - ticker_ = new WriteHandler (*this); - } - - PubSub_comp_exec_i::~PubSub_comp_exec_i (void) - { - delete this->ticker_; - } - - // Supported operations and attributes. - ACE_Reactor* - PubSub_comp_exec_i::reactor (void) - { - ACE_Reactor* reactor = 0; - ::CORBA::Object_var ccm_object = - this->ciao_context_->get_CCM_object(); - if (! ::CORBA::is_nil (ccm_object.in ())) - { - ::CORBA::ORB_var orb = ccm_object->_get_orb (); - if (! ::CORBA::is_nil (orb.in ())) - { - reactor = orb->orb_core ()->reactor (); - } - } - if (reactor == 0) - { - throw ::CORBA::INTERNAL (); - } - return reactor; - } - - int - PubSub_comp_exec_i::tick (void) - { - CoPubSub::Test_msg sample; - sample.hello = CORBA::string_dup("CoPubSub Test Message"); - sample.msgId = ++this->count_; - - // Reference to the writer interface for the DDS4CCM connector for msg type - ::CoPubSub::Test_conn::Writer_var writer; - - writer = ciao_context_->get_connection_TestPub_data(); - - if (CORBA::is_nil(writer.in())) - { - ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::tick - Writer seems nil.\n")); - return -1; // Don't reschedule timer - } - - try - { - writer->write_one(sample, DDS::HANDLE_NIL); - ACE_DEBUG ((LM_DEBUG, "PubSub_comp_exec_i::tick - " - "Sample has been written: <%C> - <%d>\n", - sample.hello.in (), sample.msgId)); - } - catch (const CCM_DDS::InternalError &) // catch "normal" exception - { - ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::tick - " - "ERROR: caught InternalError.\n")); - - return -1; // Don't reschedule timer - } - catch (const CORBA::Exception & ex) - { - ex._tao_print_exception("PubSub_comp_exec_i::tick - ERROR: "); - return -1; // Don't reschedule timer - } - catch (...) // catch everything else. If this is called something is wrong - { - ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::tick - " - "ERROR: caught unknown exception.\n")); - return -1; // Don't reschedule timer - } - return 0; - } - - // Component attributes and port operations. - - ::CoPubSub::Test_conn::CCM_Listener_ptr - PubSub_comp_exec_i::get_TestSub_data_listener (void) - { - if ( ::CORBA::is_nil (this->ciao_TestSub_data_listener_.in ())) - { - TestSub_data_listener_exec_i *tmp = 0; - ACE_NEW_RETURN ( - tmp, - TestSub_data_listener_exec_i ( - this->ciao_context_.in ()), - ::CoPubSub::Test_conn::CCM_Listener::_nil ()); - - this->ciao_TestSub_data_listener_ = tmp; - } - - return - ::CoPubSub::Test_conn::CCM_Listener::_duplicate ( - this->ciao_TestSub_data_listener_.in ()); - } - - ::CCM_DDS::CCM_PortStatusListener_ptr - PubSub_comp_exec_i::get_TestSub_status (void) - { - if ( ::CORBA::is_nil (this->ciao_TestSub_status_.in ())) - { - TestSub_status_exec_i *tmp = 0; - ACE_NEW_RETURN ( - tmp, - TestSub_status_exec_i ( - this->ciao_context_.in ()), - ::CCM_DDS::CCM_PortStatusListener::_nil ()); - - this->ciao_TestSub_status_ = tmp; - } - - return - ::CCM_DDS::CCM_PortStatusListener::_duplicate ( - this->ciao_TestSub_status_.in ()); - } - - // Operations from Components::SessionComponent. - - void - PubSub_comp_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->ciao_context_ = - ::CoPubSub::CCM_PubSub_comp_Context::_narrow (ctx); - - if ( ::CORBA::is_nil (this->ciao_context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - PubSub_comp_exec_i::configuration_complete (void) - { - /* Your code here. */ - } - - void - PubSub_comp_exec_i::ccm_activate (void) - { - CCM_DDS::DataListenerControl_var control = - ciao_context_->get_connection_TestSub_data_control(); - - if (! CORBA::is_nil(control.in())) - { - try - { - control->mode(CCM_DDS::ONE_BY_ONE); - } - catch (const CORBA::Exception & ex) - { - ex._tao_print_exception("PubSub_comp_exec_i::ccm_activate - ERROR: "); - } - } - else - { - ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::ccm_activate - " - "ERROR: Data listener control seems nil.\n")); - } - - ACE_Time_Value delay(3, 0); // timer = 3 seconds + 0 usec = 3 sec - ACE_Time_Value repeat(3, 0); // timer = 3 seconds + 0 usec = 3 sec - - if (this->reactor()->schedule_timer(this->ticker_, - 0, - delay, - repeat) == -1) - { - ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::ccm_activate - " - "ERROR: Unable to schedule timer.\n")); - } - else - ACE_DEBUG ((LM_DEBUG, "PubSub_comp_exec_i::ccm_activate - " - "Timer is up and running.\n")); - } - - void - PubSub_comp_exec_i::ccm_passivate (void) - { - this->reactor()->cancel_timer(this->ticker_); - } - - void - PubSub_comp_exec_i::ccm_remove (void) - { - /* Your code here. */ - } - - extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr - create_CoPubSub_PubSub_comp_Impl (void) - { - ::Components::EnterpriseComponent_ptr retval = - ::Components::EnterpriseComponent::_nil (); - - ACE_NEW_NORETURN ( - retval, - PubSub_comp_exec_i); - - return retval; - } -} diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.h b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.h deleted file mode 100644 index 7391ebf1357..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.h +++ /dev/null @@ -1,169 +0,0 @@ -// -*- C++ -*- -#ifndef CIAO_PUBSUB_COMPONENT_EXEC_VCU9KR_H_ -#define CIAO_PUBSUB_COMPONENT_EXEC_VCU9KR_H_ - -#include /**/ "ace/pre.h" - -#include "PubSub_ComponentEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include /**/ "PubSub_Component_exec_export.h" -#include "tao/LocalObject.h" - -namespace CIAO_CoPubSub_PubSub_comp_Impl -{ - class PubSub_comp_exec_i; - - /** - * WriteHandler - */ - class WriteHandler : - public ACE_Event_Handler - { - public: - WriteHandler (PubSub_comp_exec_i &callback); - virtual int handle_timeout (const ACE_Time_Value &, const void *); - private: - PubSub_comp_exec_i &callback_; - }; - - - /** - * Provider Executor Implementation Class: TestSub_data_listener_exec_i - */ - - class TestSub_data_listener_exec_i - : public virtual ::CoPubSub::Test_conn::CCM_Listener, - public virtual ::CORBA::LocalObject - { - public: - TestSub_data_listener_exec_i ( - ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx); - virtual ~TestSub_data_listener_exec_i (void); - - /** @name Operations and attributes from CoPubSub::Test_conn::Listener */ - //@{ - - virtual - void on_one_data ( - const ::CoPubSub::Test_msg & datum, - const ::CCM_DDS::ReadInfo & info); - - virtual - void on_many_data ( - const ::CoPubSub::Test_msgSeq & data, - const ::CCM_DDS::ReadInfoSeq & infos); - //@} - - private: - ::CoPubSub::CCM_PubSub_comp_Context_var ciao_context_; - }; - - /** - * Provider Executor Implementation Class: TestSub_status_exec_i - */ - - class TestSub_status_exec_i - : public virtual ::CCM_DDS::CCM_PortStatusListener, - public virtual ::CORBA::LocalObject - { - public: - TestSub_status_exec_i ( - ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx); - virtual ~TestSub_status_exec_i (void); - - /** @name Operations and attributes from CCM_DDS::PortStatusListener */ - //@{ - - virtual - void on_requested_deadline_missed ( - ::DDS::DataReader_ptr the_reader, - const ::DDS::RequestedDeadlineMissedStatus & status); - - virtual - void on_sample_lost ( - ::DDS::DataReader_ptr the_reader, - const ::DDS::SampleLostStatus & status); - //@} - - private: - ::CoPubSub::CCM_PubSub_comp_Context_var ciao_context_; - }; - - /** - * Component Executor Implementation Class: PubSub_comp_exec_i - */ - - class PubSub_comp_exec_i - : public virtual PubSub_comp_Exec, - public virtual ::CORBA::LocalObject - { - public: - PubSub_comp_exec_i (void); - virtual ~PubSub_comp_exec_i (void); - - /** @name Supported operations and attributes. */ - //@{ - - //@} - - /** @name Component attributes and port operations. */ - //@{ - - virtual ::CoPubSub::Test_conn::CCM_Listener_ptr - get_TestSub_data_listener (void); - - virtual ::CCM_DDS::CCM_PortStatusListener_ptr - get_TestSub_status (void); - //@} - - /** @name Operations from Components::SessionComponent. */ - //@{ - virtual void set_session_context (::Components::SessionContext_ptr ctx); - virtual void configuration_complete (void); - virtual void ccm_activate (void); - virtual void ccm_passivate (void); - virtual void ccm_remove (void); - //@} - - /** @name User defined public operations. */ - //@{ - int tick (void); - - //@} - - private: - ::CoPubSub::CCM_PubSub_comp_Context_var ciao_context_; - - /** @name Component attributes. */ - //@{ - ::CoPubSub::Test_conn::CCM_Listener_var ciao_TestSub_data_listener_; - ::CCM_DDS::CCM_PortStatusListener_var ciao_TestSub_status_; - //@} - - /** @name User defined members. */ - //@{ - WriteHandler *ticker_; - - ::CORBA::Long count_; - //@} - - /** @name User defined private operations. */ - //@{ - - //@} - - /// Get the ACE_Reactor - ACE_Reactor* reactor (void); - }; - - extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr - create_CoPubSub_PubSub_comp_Impl (void); -} - -#include /**/ "ace/post.h" - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.idl deleted file mode 100644 index 791e62294f0..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.idl +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef SUB_COMPONENT_ -#define SUB_COMPONENT_ - -#include <Components.idl> -#include "Connector/Collocated_Connector.idl" - -module CoPubSub { - component Sub_comp { - port Test_conn::DDS_Listen TestSub; - }; -}; - -#endif // SUB_COMPONENT_ diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.mpc deleted file mode 100644 index 371880ecee3..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.mpc +++ /dev/null @@ -1,143 +0,0 @@ -project(SubComponent_idl_gen) : componentidldefaults, dds4ccm { - after += Collocated_Connector_idl_gen DDS_Starter_idl_gen - custom_only = 1 - idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_STUB_Export \ - -Wb,stub_export_include=Sub_Component_stub_export.h \ - -Wb,skel_export_macro=PUBSUB_COMPONENT_SVNT_Export \ - -Wb,skel_export_include=Sub_Component_svnt_export.h \ - -Wb,svnt_export_macro=PUBSUB_COMPONENT_SVNT_Export \ - -Wb,svnt_export_include=Sub_Component_svnt_export.h \ - -Wb,exec_export_macro=PUBSUB_COMPONENT_EXEC_Export \ - -Wb,exec_export_include=Sub_Component_exec_export.h \ - -I .. - - IDL_Files { - Sub_Component.idl - } -} - -project(SubComponent_lem_gen) : ciaoidldefaults, dds4ccm { - after += SubComponent_idl_gen - custom_only = 1 - idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_LEM_STUB_Export \ - -Wb,stub_export_include=SubComponent_lem_stub_export.h \ - -SS -Gxhst -I $CIAO_ROOT/connectors -I .. - - IDL_Files { - Sub_ComponentE.idl - } -} - -project(SubComponent_lem_stub) : ccm_svnt, dds4ccm_base { - after += SubComponent_lem_gen SubComponent_stub \ - Collocated_Base_stub - libs += Collocated_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Sub_Component_lem_stub - dynamicflags += PUBSUB_COMPONENT_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Sub_ComponentEC.cpp - } - - Header_Files { - Sub_ComponentEC.h - Sub_Component_lem_stub_export.h - } - - Inline_Files { - Sub_ComponentEC.inl - } -} - -project(SubComponent_stub) : ccm_stub, dds4ccm_base { - after += SubComponent_idl_gen Collocated_Base_stub \ - Collocated_Connector_stub - libs += Collocated_Base_stub Collocated_Connector_stub - includes += .. - libpaths += ../lib - libout = ../lib - sharedname = Sub_Component_stub - dynamicflags += PUBSUB_COMPONENT_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Sub_ComponentC.cpp - } - - Header_Files { - Sub_ComponentC.h - Sub_Component_stub_export.h - } - - Inline_Files { - Sub_ComponentC.inl - } -} - -project(SubComponent_exec) : ciao_executor, dds4ccm_lem_stub { - after += SubComponent_lem_stub SubComponent_stub \ - Collocated_Connector_lem_stub Collocated_Connector_stub - sharedname = Sub_Component_exec - libs += Sub_Component_stub Sub_Component_lem_stub Collocated_Base_stub \ - Collocated_Connector_lem_stub Collocated_Connector_stub - libpaths += ../lib - includes += .. - libout = ../lib - dynamicflags += PUBSUB_COMPONENT_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Sub_Component_exec.cpp - } - - Header_Files { - Sub_Component_exec.h - Sub_Component_exec_export.h - } - - Inline_Files { - } -} - - -project(SubComponent_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { - after += Collocated_Base_stub SubComponent_lem_stub \ - Collocated_Connector_stub \ - Collocated_Connector_svnt Collocated_Connector_lem_stub - sharedname = Sub_Component_svnt - libs += Sub_Component_stub Sub_Component_lem_stub Collocated_Base_stub \ - Collocated_Connector_stub Collocated_Connector_svnt \ - Collocated_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += PUBSUB_COMPONENT_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Sub_ComponentS.cpp - Sub_Component_svnt.cpp - } - - Header_Files { - Sub_ComponentS.h - Sub_Component_svnt.h - Sub_Component_svnt_export.h - } - - Inline_Files { - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.cpp b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.cpp deleted file mode 100644 index a644b08d8cd..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.cpp +++ /dev/null @@ -1,199 +0,0 @@ -// -*- C++ -*- -#include "Sub_Component_exec.h" - -namespace CIAO_CoPubSub_Sub_comp_Impl -{ - - /** - * Facet Executor Implementation Class: TestSub_data_listener_exec_i - */ - - TestSub_data_listener_exec_i::TestSub_data_listener_exec_i ( - ::CoPubSub::CCM_Sub_comp_Context_ptr ctx) - : ciao_context_ ( - ::CoPubSub::CCM_Sub_comp_Context::_duplicate (ctx)) - { - } - - TestSub_data_listener_exec_i::~TestSub_data_listener_exec_i (void) - { - } - - // Operations from ::CoPubSub::Test_conn::Listener - - void - TestSub_data_listener_exec_i::on_one_data ( - const ::CoPubSub::Test_msg & datum, - const ::CCM_DDS::ReadInfo & /* info */) - { - ACE_DEBUG ((LM_DEBUG, "TestSub_data_listener_exec_i::on_one_data - " - "New data received: <%C> - <%d>\n", - datum.hello.in (), datum.msgId)); - } - - void - TestSub_data_listener_exec_i::on_many_data ( - const ::CoPubSub::Test_msgSeq & /* data */, - const ::CCM_DDS::ReadInfoSeq & /* infos */) - { - /* Your code here. */ - } - - /** - * Facet Executor Implementation Class: TestSub_status_exec_i - */ - - TestSub_status_exec_i::TestSub_status_exec_i ( - ::CoPubSub::CCM_Sub_comp_Context_ptr ctx) - : ciao_context_ ( - ::CoPubSub::CCM_Sub_comp_Context::_duplicate (ctx)) - { - } - - TestSub_status_exec_i::~TestSub_status_exec_i (void) - { - } - - // Operations from ::CCM_DDS::PortStatusListener - - void - TestSub_status_exec_i::on_requested_deadline_missed ( - ::DDS::DataReader_ptr /* the_reader */, - const ::DDS::RequestedDeadlineMissedStatus & /* status */) - { - /* Your code here. */ - } - - void - TestSub_status_exec_i::on_sample_lost ( - ::DDS::DataReader_ptr /* the_reader */, - const ::DDS::SampleLostStatus & /* status */) - { - /* Your code here. */ - } - - /** - * Component Executor Implementation Class: Sub_comp_exec_i - */ - - Sub_comp_exec_i::Sub_comp_exec_i (void){ - } - - Sub_comp_exec_i::~Sub_comp_exec_i (void) - { - } - - // Supported operations and attributes. - - // Component attributes and port operations. - - ::CoPubSub::Test_conn::CCM_Listener_ptr - Sub_comp_exec_i::get_TestSub_data_listener (void) - { - if ( ::CORBA::is_nil (this->ciao_TestSub_data_listener_.in ())) - { - TestSub_data_listener_exec_i *tmp = 0; - ACE_NEW_RETURN ( - tmp, - TestSub_data_listener_exec_i ( - this->ciao_context_.in ()), - ::CoPubSub::Test_conn::CCM_Listener::_nil ()); - - this->ciao_TestSub_data_listener_ = tmp; - } - - return - ::CoPubSub::Test_conn::CCM_Listener::_duplicate ( - this->ciao_TestSub_data_listener_.in ()); - } - - ::CCM_DDS::CCM_PortStatusListener_ptr - Sub_comp_exec_i::get_TestSub_status (void) - { - if ( ::CORBA::is_nil (this->ciao_TestSub_status_.in ())) - { - TestSub_status_exec_i *tmp = 0; - ACE_NEW_RETURN ( - tmp, - TestSub_status_exec_i ( - this->ciao_context_.in ()), - ::CCM_DDS::CCM_PortStatusListener::_nil ()); - - this->ciao_TestSub_status_ = tmp; - } - - return - ::CCM_DDS::CCM_PortStatusListener::_duplicate ( - this->ciao_TestSub_status_.in ()); - } - - // Operations from Components::SessionComponent. - - void - Sub_comp_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->ciao_context_ = - ::CoPubSub::CCM_Sub_comp_Context::_narrow (ctx); - - if ( ::CORBA::is_nil (this->ciao_context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - Sub_comp_exec_i::configuration_complete (void) - { - /* Your code here. */ - } - - void - Sub_comp_exec_i::ccm_activate (void) - { - CCM_DDS::DataListenerControl_var control = - ciao_context_->get_connection_TestSub_data_control(); - - if (! CORBA::is_nil(control.in())) - { - try - { - control->mode(CCM_DDS::ONE_BY_ONE); - } - catch (const CORBA::Exception & ex) - { - ex._tao_print_exception("Sub_comp_exec_i::ccm_activate - ERROR: "); - } - } - else - { - ACE_ERROR ((LM_ERROR, "Sub_comp_exec_i::ccm_activate - " - "ERROR: Listener control is nil.\n")); - } - } - - void - Sub_comp_exec_i::ccm_passivate (void) - { - /* Your code here. */ - } - - void - Sub_comp_exec_i::ccm_remove (void) - { - /* Your code here. */ - } - - extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr - create_CoPubSub_Sub_comp_Impl (void) - { - ::Components::EnterpriseComponent_ptr retval = - ::Components::EnterpriseComponent::_nil (); - - ACE_NEW_NORETURN ( - retval, - Sub_comp_exec_i); - - return retval; - } -} diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.h b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.h deleted file mode 100644 index 4b6c45083f7..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.h +++ /dev/null @@ -1,148 +0,0 @@ -// -*- C++ -*- -#ifndef CIAO_SUB_COMPONENT_EXEC_SXAYYT_H_ -#define CIAO_SUB_COMPONENT_EXEC_SXAYYT_H_ - -#include /**/ "ace/pre.h" - -#include "Sub_ComponentEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include /**/ "Sub_Component_exec_export.h" -#include "tao/LocalObject.h" - -namespace CIAO_CoPubSub_Sub_comp_Impl -{ - - /** - * Provider Executor Implementation Class: TestSub_data_listener_exec_i - */ - - class TestSub_data_listener_exec_i - : public virtual ::CoPubSub::Test_conn::CCM_Listener, - public virtual ::CORBA::LocalObject - { - public: - TestSub_data_listener_exec_i ( - ::CoPubSub::CCM_Sub_comp_Context_ptr ctx); - virtual ~TestSub_data_listener_exec_i (void); - - /** @name Operations and attributes from CoPubSub::Test_conn::Listener */ - //@{ - - virtual - void on_one_data ( - const ::CoPubSub::Test_msg & datum, - const ::CCM_DDS::ReadInfo & info); - - virtual - void on_many_data ( - const ::CoPubSub::Test_msgSeq & data, - const ::CCM_DDS::ReadInfoSeq & infos); - //@} - - private: - ::CoPubSub::CCM_Sub_comp_Context_var ciao_context_; - }; - - /** - * Provider Executor Implementation Class: TestSub_status_exec_i - */ - - class TestSub_status_exec_i - : public virtual ::CCM_DDS::CCM_PortStatusListener, - public virtual ::CORBA::LocalObject - { - public: - TestSub_status_exec_i ( - ::CoPubSub::CCM_Sub_comp_Context_ptr ctx); - virtual ~TestSub_status_exec_i (void); - - /** @name Operations and attributes from CCM_DDS::PortStatusListener */ - //@{ - - virtual - void on_requested_deadline_missed ( - ::DDS::DataReader_ptr the_reader, - const ::DDS::RequestedDeadlineMissedStatus & status); - - virtual - void on_sample_lost ( - ::DDS::DataReader_ptr the_reader, - const ::DDS::SampleLostStatus & status); - //@} - - private: - ::CoPubSub::CCM_Sub_comp_Context_var ciao_context_; - }; - - /** - * Component Executor Implementation Class: Sub_comp_exec_i - */ - - class Sub_comp_exec_i - : public virtual Sub_comp_Exec, - public virtual ::CORBA::LocalObject - { - public: - Sub_comp_exec_i (void); - virtual ~Sub_comp_exec_i (void); - - /** @name Supported operations and attributes. */ - //@{ - - //@} - - /** @name Component attributes and port operations. */ - //@{ - - virtual ::CoPubSub::Test_conn::CCM_Listener_ptr - get_TestSub_data_listener (void); - - virtual ::CCM_DDS::CCM_PortStatusListener_ptr - get_TestSub_status (void); - //@} - - /** @name Operations from Components::SessionComponent. */ - //@{ - virtual void set_session_context (::Components::SessionContext_ptr ctx); - virtual void configuration_complete (void); - virtual void ccm_activate (void); - virtual void ccm_passivate (void); - virtual void ccm_remove (void); - //@} - - /** @name User defined public operations. */ - //@{ - - //@} - - private: - ::CoPubSub::CCM_Sub_comp_Context_var ciao_context_; - - /** @name Component attributes. */ - //@{ - ::CoPubSub::Test_conn::CCM_Listener_var ciao_TestSub_data_listener_; - ::CCM_DDS::CCM_PortStatusListener_var ciao_TestSub_status_; - //@} - - /** @name User defined members. */ - //@{ - - //@} - - /** @name User defined private operations. */ - //@{ - - //@} - }; - - extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr - create_CoPubSub_Sub_comp_Impl (void); -} - -#include /**/ "ace/post.h" - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/Plan.cdp deleted file mode 100644 index c8b624d3b41..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/Plan.cdp +++ /dev/null @@ -1,654 +0,0 @@ -<!-- --> -<Deployment:DeploymentPlan - xmlns:Deployment="http://www.omg.org/Deployment" - xmlns:xmi="http://www.omg.org/XMI" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> - <label>CollocatedDepl_1</label> - <UUID>CollocatedDepl_1</UUID> - - <implementation xmi:id="SubComponentImplementation"> - <name>SubComponentImplementation</name> - <source/> - <artifact xmi:idref="Sub_Component_ExecArtifact" /> - <artifact xmi:idref="Sub_Component_SvntArtifact" /> - <execParameter> - <!-- entrypoint as exec parameter (see 10.6.1) --> - <name>component factory</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CoPubSub_Sub_comp_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CoPubSub_Sub_comp_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Sub_Component_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Sub_Component_exec</string> - </value> - </value> - </execParameter> - </implementation> - - <implementation xmi:id="PubSubComponentImplementation"> - <name>PubSubComponentImplementation</name> - <source/> - <artifact xmi:idref="PubSub_Component_ExecArtifact" /> - <artifact xmi:idref="PubSub_Component_SvntArtifact" /> - <execParameter> - <!-- entrypoint as exec parameter (see 10.6.1) --> - <name>component factory</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CoPubSub_PubSub_comp_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CoPubSub_PubSub_comp_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>PubSub_Component_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>PubSub_Component_exec</string> - </value> - </value> - </execParameter> - </implementation> - - <implementation xmi:id="CollocatedConnectorComponentImplementation"> - <name>CollocatedConnectorComponentImplementation</name> - <source/> - <artifact xmi:idref="Collocated_Connector_ExecArtifact" /> - <artifact xmi:idref="Collocated_Connector_SvntArtifact" /> - <execParameter> - <!-- entrypoint as exec parameter (see 10.6.1) --> - <name>component factory</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CoPubSub_Test_conn_DDS_Event_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_CoPubSub_Test_conn_DDS_Event_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Collocated_Connector_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Collocated_Connector_exec</string> - </value> - </value> - </execParameter> - </implementation> - - <!-- SubComponent1 and its connector --> - <instance xmi:id="SubComponentInstance1"> - <name>SubComponent1</name> - <node>Node</node> - <source/> - <implementation xmi:idref="SubComponentImplementation" /> - </instance> - - <instance xmi:id="SubComponent1Connector"> - <name>SubComponent1Connector</name> - <node>Node</node> - <source/> - <implementation xmi:idref="CollocatedConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>CollocatedTopic</string> - </value> - </value> - </configProperty> - <configProperty> - <name>push_consumer_filter</name> - <value> - <type> - <kind>tk_struct</kind> - <struct> - <name>QueryFilter</name> - <typeId>IDL:CCM_DDS/QueryFilter:1.0</typeId> - <member> - <name>expression</name> - <type> - <kind>tk_string</kind> - </type> - </member> - <member> - <name>parameters</name> - <type> - <kind>tk_sequence</kind> - <sequence> - <elementType> - <kind>tk_string</kind> - </elementType> - </sequence> - </type> - </member> - </struct> - </type> - <value> - <member> - <name>expression</name> - <value> - <string>msgId < %0</string> - </value> - </member> - <member> - <name>parameters</name> - <value> - <element> - <string>1</string> - </element> - </value> - </member> - </value> - </value> - </configProperty> - </instance> - - <!-- SubComponent2 and its connector --> - <instance xmi:id="SubComponentInstance2"> - <name>SubComponent2</name> - <node>Node</node> - <source/> - <implementation xmi:idref="SubComponentImplementation" /> - </instance> - - <instance xmi:id="SubComponent2Connector"> - <name>SubComponent2Connector</name> - <node>Node</node> - <source/> - <implementation xmi:idref="CollocatedConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>CollocatedTopic</string> - </value> - </value> - </configProperty> - <configProperty> - <name>push_consumer_filter</name> - <value> - <type> - <kind>tk_struct</kind> - <struct> - <name>QueryFilter</name> - <typeId>IDL:CCM_DDS/QueryFilter:1.0</typeId> - <member> - <name>expression</name> - <type> - <kind>tk_string</kind> - </type> - </member> - <member> - <name>parameters</name> - <type> - <kind>tk_sequence</kind> - <sequence> - <elementType> - <kind>tk_string</kind> - </elementType> - </sequence> - </type> - </member> - </struct> - </type> - <value> - <member> - <name>expression</name> - <value> - <string>msgId < %0</string> - </value> - </member> - <member> - <name>parameters</name> - <value> - <element> - <string>1</string> - </element> - </value> - </member> - </value> - </value> - </configProperty> - </instance> - - <!-- PubSubComponent and its connector --> - <instance xmi:id="PubSubComponentInstance"> - <name>PubSubComponent</name> - <node>Node</node> - <source/> - <implementation xmi:idref="PubSubComponentImplementation" /> - </instance> - - <instance xmi:id="PubSubComponentConnector"> - <name>PubSubComponentConnector</name> - <node>Node</node> - <source/> - <implementation xmi:idref="CollocatedConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>CollocatedTopic</string> - </value> - </value> - </configProperty> - <configProperty> - <name>push_consumer_filter</name> - <value> - <type> - <kind>tk_struct</kind> - <struct> - <name>QueryFilter</name> - <typeId>IDL:CCM_DDS/QueryFilter:1.0</typeId> - <member> - <name>expression</name> - <type> - <kind>tk_string</kind> - </type> - </member> - <member> - <name>parameters</name> - <type> - <kind>tk_sequence</kind> - <sequence> - <elementType> - <kind>tk_string</kind> - </elementType> - </sequence> - </type> - </member> - </struct> - </type> - <value> - <member> - <name>expression</name> - <value> - <string>msgId < %0</string> - </value> - </member> - <member> - <name>parameters</name> - <value> - <element> - <string>1</string> - </element> - </value> - </member> - </value> - </value> - </configProperty> - </instance> - - <!-- pubsub writer connection --> - <connection> - <name>writer_connection</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestPub_data</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="PubSubComponentInstance"/> - </internalEndpoint> - <internalEndpoint> - <portName>supplier_data</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="PubSubComponentConnector"/> - </internalEndpoint> - </connection> - - <!-- pub sub listener connections --> - <connection> - <name>pubsub_listener_filter</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_filter_config</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="PubSubComponentInstance"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_filter_config</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="PubSubComponentConnector"/> - </internalEndpoint> - </connection> - - <connection> - <name>pubsub_data_listener</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_data_listener</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="PubSubComponentInstance"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_data_listener</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="PubSubComponentConnector"/> - </internalEndpoint> - </connection> - - <connection> - <name>pubsub_listener_control</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_data_control</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="PubSubComponentInstance"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_data_control</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="PubSubComponentConnector"/> - </internalEndpoint> - </connection> - - <!-- sub1 listener connections --> - <connection> - <name>sub1_listener_filter</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_filter_config</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SubComponentInstance1"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_filter_config</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SubComponent1Connector"/> - </internalEndpoint> - </connection> - - <connection> - <name>sub1_data_listener</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_data_listener</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SubComponentInstance1"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_data_listener</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SubComponent1Connector"/> - </internalEndpoint> - </connection> - - <connection> - <name>sub1_listener_control</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_data_control</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SubComponentInstance1"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_data_control</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SubComponent1Connector"/> - </internalEndpoint> - </connection> - - <!-- sub2 listener connections --> - <connection> - <name>sub2_listener_filter</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_filter_config</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SubComponentInstance2"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_filter_config</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SubComponent2Connector"/> - </internalEndpoint> - </connection> - - <connection> - <name>sub2_data_listener</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_data_listener</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SubComponentInstance2"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_data_listener</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SubComponent2Connector"/> - </internalEndpoint> - </connection> - - <connection> - <name>sub2_listener_control</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>TestSub_data_control</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SubComponentInstance2"/> - </internalEndpoint> - <internalEndpoint> - <portName>push_consumer_data_control</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SubComponent2Connector"/> - </internalEndpoint> - </connection> - - <artifact xmi:id="Collocated_Connector_ExecArtifact"> - <name>Collocated_Connector_exec</name> - <source/> - <node/> - <location>Collocated_Connector_exec</location> - </artifact> - <artifact xmi:id="Collocated_Connector_SvntArtifact"> - <name>Collocated_Connector_svnt</name> - <source/> - <node/> - <location>Collocated_Connector_svnt</location> - </artifact> - <artifact xmi:id="Collocated_Connector_StubArtifact"> - <name>Collocated_Connector_stub</name> - <source/> - <node/> - <location>Collocated_Connector_stub</location> - </artifact> - - <artifact xmi:id="Sub_Component_ExecArtifact"> - <name>Sub_Component_exec</name> - <source/> - <node/> - <location>Sub_Component_exec</location> - </artifact> - <artifact xmi:id="Sub_Component_SvntArtifact"> - <name>Sub_Component_svnt</name> - <source/> - <node/> - <location>Sub_Component_svnt</location> - </artifact> - <artifact xmi:id="Sub_Component_StubArtifact"> - <name>Sub_Component_stub</name> - <source/> - <node/> - <location>Sub_Component_stub</location> - </artifact> - - <artifact xmi:id="PubSub_Component_ExecArtifact"> - <name>PubSub_Component_exec</name> - <source/> - <node/> - <location>PubSub_Component_exec</location> - </artifact> - <artifact xmi:id="PubSub_Component_SvntArtifact"> - <name>PubSub_Component_svnt</name> - <source/> - <node/> - <location>PubSub_Component_svnt</location> - </artifact> - <artifact xmi:id="PubSub_Component_StubArtifact"> - <name>PubSub_Component_stub</name> - <source/> - <node/> - <location>PubSub_Component_stub</location> - </artifact> - - <localityConstraint> - <constraint>SameProcess</constraint> - <constrainedInstance xmi:idref="PubSubComponentInstance"/> - <constrainedInstance xmi:idref="PubSubComponentConnector"/> - </localityConstraint> - - <localityConstraint> - <constraint>SameProcess</constraint> - <constrainedInstance xmi:idref="SubComponentInstance1"/> - <constrainedInstance xmi:idref="SubComponent1Connector"/> - <constrainedInstance xmi:idref="SubComponentInstance2"/> - <constrainedInstance xmi:idref="SubComponent2Connector"/> - </localityConstraint> - -</Deployment:DeploymentPlan> diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/run_test.pl deleted file mode 100755 index 255dca278d1..00000000000 --- a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/run_test.pl +++ /dev/null @@ -1,243 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# -*- perl -*- - -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::TestTarget; - -$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; -$TAO_ROOT = "$ENV{'TAO_ROOT'}"; -$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; - -$daemons_running = 0; -$em_running = 0; -$ns_running = 0; - -$nr_daemon = 1; -@ports = ( 60001 ); -@iorbases = ( "NodeApp.ior" ); -@iorfiles = 0; -@nodenames = ( "Node" ); - -# ior files other than daemon -# ior files other than daemon -$ior_nsbase = "ns.ior"; -$ior_nsfile = 0; -$ior_embase = "EM.ior"; -$ior_emfile = 0; - -# Processes -$E = 0; -$EM = 0; -$NS = 0; -@DEAMONS = 0; - -# targets -@tg_daemons = 0; -$tg_naming = 0; -$tg_exe_man = 0; -$tg_executor = 0; - -$status = 0; -$cdp_file = "Plan.cdp"; - -sub create_targets { - # naming service - $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n"; - $tg_naming->AddLibPath ('../lib'); - # daemon - for ($i = 0; $i < $nr_daemon; ++$i) { - $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n"; - $tg_daemons[$i]->AddLibPath ('../lib'); - } - # execution manager - $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n"; - $tg_exe_man->AddLibPath ('../lib'); - # executor (plan_launcher) - $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n"; - $tg_executor->AddLibPath ('../lib'); -} - -sub init_ior_files { - $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase); - $ior_emfile = $tg_exe_man->LocalFile ($ior_embase); - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); - } - delete_ior_files (); -} - -# Delete if there are any .ior files. -sub delete_ior_files { - for ($i = 0; $i < $nr_daemon; ++$i) { - $tg_daemons[$i]->DeleteFile ($iorbases[$i]); - } - $tg_naming->DeleteFile ($ior_nsbase); - $tg_exe_man->DeleteFile ($ior_embase); - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]); - } -} - -sub kill_node_daemon { - for ($i = 0; $i < $nr_daemon; ++$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } -} - -sub kill_open_processes { - if ($daemons_running == 1) { - kill_node_daemon (); - } - - if ($em_running == 1) { - $EM->Kill (); $EM->TimedWait (1); - } - - if ($ns_running == 1) { - $NS->Kill (); $NS->TimedWait (1); - } - # in case shutdown did not perform as expected - $tg_executor->KillAll ('dance_locality_manager'); -} - -sub run_node_daemons { - for ($i = 0; $i < $nr_daemon; ++$i) { - $iorbase = $iorbases[$i]; - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager"; - - $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - - print "Run dance_node_manager with $d_param\n"; - - $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); - $DEAMONS[$i]->Spawn (); - - if ($tg_daemons[$i]->WaitForFileTimed($iorbase, - $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); - } - return -1; - } - } - return 0; -} - -create_targets (); -init_ior_files (); - -# Invoke naming service - -$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); - -$ns_status = $NS->Spawn (); - -if ($ns_status != 0) { - print STDERR "ERROR: Unable to execute the naming service\n"; - kill_open_processes (); - exit 1; -} - -print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n"; - -if ($tg_naming->WaitForFileTimed ($ior_nsbase, - $tg_naming->ProcessStartWaitInterval ()) == -1) { - print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); $NS->TimedWait (1); - exit 1; -} - -$ns_running = 1; -# Set up NamingService environment -$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; - -# Invoke node daemon. -print "Invoking node daemon\n"; -$status = run_node_daemons (); - -if ($status != 0) { - print STDERR "ERROR: Unable to execute the node daemon\n"; - kill_open_processes (); - exit 1; -} - -$daemons_running = 1; - -# Invoke execution manager. -print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n"; -$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", - "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); -$em_status = $EM->Spawn (); - -if ($em_status != 0) { - print STDERR "ERROR: dance_execution_manager returned $em_status"; - exit 1; -} - -if ($tg_exe_man->WaitForFileTimed ($ior_embase, - $tg_exe_man->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior file of execution manager could not be found\n"; - kill_open_processes (); - exit 1; -} - -$em_running = 1; - -# Invoke executor - start the application -. -print "Invoking executor - launch the application -\n"; - -print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n"; -$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", - "-x $cdp_file -k file://$ior_emfile"); -$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ()); - -if ($pl_status != 0) { - print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; - kill_open_processes (); - exit 1; -} - -for ($i = 0; $i < $nr_daemon; ++$i) { - if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i], - $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) { - print STDERR "ERROR: The ior file of daemon $i could not be found\n"; - kill_open_processes (); - exit 1; - } -} - -print "Sleeping 30 seconds to allow task to complete\n"; -sleep (30); - -# Invoke executor - stop the application -. -print "Invoking executor - stop the application -\n"; -print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n"; - -$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", - "-k file://$ior_emfile -x $cdp_file -s"); -$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ()); - -if ($pl_status != 0) { - print STDERR "ERROR: dance_plan_launcher returned $pl_status\n"; - kill_open_processes (); - exit 1; -} - -print "Executor returned.\n"; -print "Shutting down rest of the processes.\n"; - -delete_ior_files (); -kill_open_processes (); - -exit $status; |