diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests/HomeDerived')
13 files changed, 2856 insertions, 0 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Base/Hello_Base.idl b/CIAO/connectors/dds4ccm/tests/HomeDerived/Base/Hello_Base.idl new file mode 100644 index 00000000000..52e2616135b --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Base/Hello_Base.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file Hello_Base.idl + * @author Marijke Hengstmengel (mhengstmengel@remedy.nl) + */ + +#ifndef HELLO_BASE_IDL +#define HELLO_BASE_IDL + +#pragma ndds typesupport "Base/Hello_BaseSupport.h" +#pragma opendds typesupport "Base/Hello_BaseTypeSupportImpl.h" + +#pragma DCPS_DATA_TYPE "DDSHello" + +struct DDSHello { + string hello; + short iterator; +}; + +#if defined DDS4CCM_NEEDS_SEQUENCES_DEFINED +typedef sequence<DDSHello> DDSHelloSeq; +#endif + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Base/Hello_Base.mpc b/CIAO/connectors/dds4ccm/tests/HomeDerived/Base/Hello_Base.mpc new file mode 100644 index 00000000000..450d2e2d5c9 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Base/Hello_Base.mpc @@ -0,0 +1,26 @@ +// $Id$ + +project (Home_Hello_Base_stub) : taoidldefaults, dds4ccm_ts_default { + sharedname = Home_Hello_Base_stub + dynamicflags += HELLO_BASE_STUB_BUILD_DLL + libout = ../lib + + idlflags += -SS -Sci \ + -Wb,stub_export_macro=HELLO_BASE_STUB_Export \ + -Wb,stub_export_include=Hello_Base_stub_export.h + + IDL_Files { + idlflags += -Gxhst + Hello_Base.idl + } + + opendds_ts_flags += --export=HELLO_BASE_STUB_Export + + DDSGenerator_Files { + Hello_Base.idl + } + + Source_Files { + } +} + diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector1/Hello_Connector.idl b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector1/Hello_Connector.idl new file mode 100644 index 00000000000..11c3fc64caa --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector1/Hello_Connector.idl @@ -0,0 +1,26 @@ +// $Id$ + +/** + * @file Hello_Connector.idl + * @author Marcel Smit (msmit@remedy.nl) + */ + +#ifndef HELLO_CONNECTOR_IDL_ +#define HELLO_CONNECTOR_IDL_ + +#include <Components.idl> +#include <ccm_dds.idl> + +#include "Base/Hello_Base.idl" + +#pragma ciao lem "Connector1/Hello_ConnectorE.idl" + +#if (CIAO_DDS4CCM_OPENDDS==1) +# include "Base/Hello_BaseTypeSupport.idl" +#endif + +module ::CCM_DDS::Typed < ::DDSHello, ::DDSHelloSeq> Foo_conn; + +#endif /* HELLO_CONNECTOR_IDL_ */ + + diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector1/Hello_Connector.mpc b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector1/Hello_Connector.mpc new file mode 100644 index 00000000000..b00bfd42628 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector1/Hello_Connector.mpc @@ -0,0 +1,151 @@ +// $Id$ + +project(Home_Hello_Connector_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen Home_Hello_Base_stub + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_CONNECTOR_STUB_Export \ + -Wb,stub_export_include=Hello_Connector_stub_export.h \ + -Wb,skel_export_macro=HELLO_CONNECTOR_SVNT_Export \ + -Wb,skel_export_include=Hello_Connector_svnt_export.h \ + -Wb,svnt_export_macro=HELLO_CONNECTOR_SVNT_Export \ + -Wb,svnt_export_include=Hello_Connector_svnt_export.h \ + -Wb,conn_export_macro=HELLO_CONNECTOR_CONN_Export \ + -Wb,conn_export_include=Hello_Connector_conn_export.h \ + -I .. + + IDL_Files { + Hello_Connector.idl + } +} + +project(Home_Hello_Connector_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += Home_Hello_Connector_idl_gen + idlflags += -Wb,stub_export_macro=HELLO_CONNECTOR_LEM_STUB_Export \ + -Wb,stub_export_include=Hello_Connector_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + Hello_ConnectorE.idl + } +} + +project(Home_Hello_Connector_lem_stub) : ccm_svnt, dds4ccm_lem_stub { + after += Home_Hello_Connector_lem_gen \ + Home_Hello_Connector_stub \ + Home_Hello_Base_stub + libs += Home_Hello_Base_stub \ + Home_Hello_Connector_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Home_Hello_Connector_lem_stub + dynamicflags += HELLO_CONNECTOR_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_ConnectorEC.cpp + } + + Header_Files { + Hello_ConnectorEC.h + Hello_Connector_lem_stub_export.h + } + + Inline_Files { + Hello_ConnectorEC.inl + } +} + +project(Home_Hello_Connector_stub) : ccm_stub, dds4ccm_base { + after += Home_Hello_Connector_idl_gen Home_Hello_Base_stub + libs += Home_Hello_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Home_Hello_Connector_stub + dynamicflags += HELLO_CONNECTOR_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_ConnectorC.cpp + } + + Header_Files { + Hello_ConnectorC.h + Hello_Connector_stub_export.h + } + + Inline_Files { + Hello_ConnectorC.inl + } +} + +project(Home_Hello_Connector_exec) : ciao_executor, dds4ccm_impl { + after += Home_Hello_Connector_lem_stub \ + Home_Hello_Connector_stub \ + Home_Hello_Base_stub + sharedname = Home_Hello_Connector_exec + libs += Home_Hello_Connector_stub \ + Home_Hello_Connector_lem_stub \ + Home_Hello_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += HELLO_CONNECTOR_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_Connector_conn.cpp + } + + Header_Files { + Hello_Connector_conn.h + Hello_Connector_conn_export.h + } + + Inline_Files { + } +} + + +project(Home_Hello_Connector_svnt) : ciao_servant, dds4ccm_impl { + after += Home_Hello_Connector_lem_stub \ + Home_Hello_Connector_exec \ + Home_Hello_Connector_stub + sharedname = Home_Hello_Connector_svnt + libs += Home_Hello_Connector_stub \ + Home_Hello_Connector_lem_stub \ + Home_Hello_Base_stub \ + Home_Hello_Connector_exec + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += HELLO_CONNECTOR_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_ConnectorS.cpp + Hello_Connector_svnt.cpp + } + + Header_Files { + Hello_ConnectorS.h + Hello_Connector_svnt.h + Hello_Connector_svnt_export.h + } + + Inline_Files { + } +} + + diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector2/Hello_Connector2.idl b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector2/Hello_Connector2.idl new file mode 100644 index 00000000000..ed1260cb883 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector2/Hello_Connector2.idl @@ -0,0 +1,26 @@ +// $Id$ + +/** + * @file Hello_Connector.idl + * @author Marcel Smit (msmit@remedy.nl) + */ + +#ifndef HELLO_CONNECTOR2_IDL_ +#define HELLO_CONNECTOR2_IDL_ + +#include <Components.idl> +#include <ccm_dds.idl> + +#include "Base/Hello_Base.idl" + +#pragma ciao lem "Connector2/Hello_Connector2E.idl" + +#if (CIAO_DDS4CCM_OPENDDS==1) +# include "Base/Hello_BaseTypeSupport.idl" +#endif + +module ::CCM_DDS::Typed < ::DDSHello, ::DDSHelloSeq> Bar_conn; + +#endif /* HELLO_CONNECTOR_IDL_ */ + + diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector2/Hello_Connector2.mpc b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector2/Hello_Connector2.mpc new file mode 100644 index 00000000000..d07ff4e51f2 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Connector2/Hello_Connector2.mpc @@ -0,0 +1,151 @@ +// $Id$ + +project(Home_Hello_Connector2_idl_gen) : connectoridldefaults, dds4ccm { + after += DDS4CCM_idl_gen Home_Hello_Base_stub + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_CONNECTOR2_STUB_Export \ + -Wb,stub_export_include=Hello_Connector2_stub_export.h \ + -Wb,skel_export_macro=HELLO_CONNECTOR2_SVNT_Export \ + -Wb,skel_export_include=Hello_Connector2_svnt_export.h \ + -Wb,svnt_export_macro=HELLO_CONNECTOR2_SVNT_Export \ + -Wb,svnt_export_include=Hello_Connector2_svnt_export.h \ + -Wb,conn_export_macro=HELLO_CONNECTOR2_CONN_Export \ + -Wb,conn_export_include=Hello_Connector2_conn_export.h \ + -I .. + + IDL_Files { + Hello_Connector2.idl + } +} + +project(Home_Hello_Connector2_lem_gen) : ciaoidldefaults, dds4ccm { + custom_only = 1 + after += Home_Hello_Connector2_idl_gen + idlflags += -Wb,stub_export_macro=HELLO_CONNECTOR2_LEM_STUB_Export \ + -Wb,stub_export_include=Hello_Connector2_lem_stub_export.h \ + -SS -Gxhst \ + -I .. + + IDL_Files { + Hello_Connector2E.idl + } +} + +project(Home_Hello_Connector2_lem_stub) : ccm_svnt, dds4ccm_lem_stub { + after += Home_Hello_Connector2_lem_gen \ + Home_Hello_Connector2_stub \ + Home_Hello_Base_stub + libs += Home_Hello_Base_stub \ + Home_Hello_Connector2_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Home_Hello_Connector2_lem_stub + dynamicflags += HELLO_CONNECTOR2_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_Connector2EC.cpp + } + + Header_Files { + Hello_Connector2EC.h + Hello_Connector2_lem_stub_export.h + } + + Inline_Files { + Hello_Connector2EC.inl + } +} + +project(Home_Hello_Connector2_stub) : ccm_stub, dds4ccm_base { + after += Home_Hello_Connector2_idl_gen Home_Hello_Base_stub + libs += Home_Hello_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Home_Hello_Connector2_stub + dynamicflags += HELLO_CONNECTOR2_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_Connector2C.cpp + } + + Header_Files { + Hello_Connector2C.h + Hello_Connector2_stub_export.h + } + + Inline_Files { + Hello_Connector2C.inl + } +} + +project(Home_Hello_Connector2_exec) : ciao_executor, dds4ccm_impl { + after += Home_Hello_Connector2_lem_stub \ + Home_Hello_Connector2_stub \ + Home_Hello_Base_stub + sharedname = Home_Hello_Connector2_exec + libs += Home_Hello_Connector2_stub \ + Home_Hello_Connector2_lem_stub \ + Home_Hello_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += HELLO_CONNECTOR2_CONN_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_Connector2_conn.cpp + } + + Header_Files { + Hello_Connector2_conn.h + Hello_Connector2_conn_export.h + } + + Inline_Files { + } +} + + +project(Home_Hello_Connector2_svnt) : ciao_servant, dds4ccm_impl { + after += Home_Hello_Connector2_lem_stub \ + Home_Hello_Connector2_exec \ + Home_Hello_Connector2_stub + sharedname = Home_Hello_Connector2_svnt + libs += Home_Hello_Connector2_stub \ + Home_Hello_Connector2_lem_stub \ + Home_Hello_Base_stub \ + Home_Hello_Connector2_exec + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += HELLO_CONNECTOR2_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_Connector2S.cpp + Hello_Connector2_svnt.cpp + } + + Header_Files { + Hello_Connector2S.h + Hello_Connector2_svnt.h + Hello_Connector2_svnt_export.h + } + + Inline_Files { + } +} + + diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender.idl b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender.idl new file mode 100644 index 00000000000..64be57d8ad9 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender.idl @@ -0,0 +1,56 @@ +// $Id$ + +/** + * @author Marijke Hengstmengel (mhengstmengel@remedy.nl) + */ + +#ifndef DDS_SENDER_IDL +#define DDS_SENDER_IDL + +#include "Connector1/Hello_Connector.idl" +#include "Connector2/Hello_Connector2.idl" + +module Hello +{ + interface Base_obj + { + }; + + interface Derived_obj : Base_obj + { + }; + + component Base_comp + { + provides Base_obj baseFacet; + uses Base_obj baseRecept; + port Foo_conn::DDS_Write fooPub; + port Foo_conn::DDS_Listen fooSub; + attribute short baseAttr; + }; + + home Base_compHome manages Base_comp { + }; + + component Derived_comp : Base_comp + { + provides Derived_obj derivedFacet; + uses Derived_obj derivedRecept; + attribute long long derivedAttr; + port Bar_conn::DDS_Write barPub; + port Bar_conn::DDS_Listen barSub; + + }; + + home Derived_compHome : Base_compHome manages Derived_comp { + }; + + component DerivedEmpty_comp : Base_comp { + }; + + + + +}; + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender.mpc b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender.mpc new file mode 100644 index 00000000000..6602efdff76 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender.mpc @@ -0,0 +1,147 @@ +// $Id$ + +project(DDS_Hello_Sender_idl_gen) : componentidldefaults, dds4ccm { + avoids += ace_for_tao + after += Home_Hello_Connector_idl_gen Home_Hello_Connector2_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_SENDER_STUB_Export \ + -Wb,stub_export_include=Sender_stub_export.h \ + -Wb,skel_export_macro=HELLO_SENDER_SVNT_Export \ + -Wb,skel_export_include=Sender_svnt_export.h \ + -Wb,svnt_export_macro=HELLO_SENDER_SVNT_Export \ + -Wb,svnt_export_include=Sender_svnt_export.h \ + -Wb,exec_export_macro=HELLO_SENDER_EXEC_Export \ + -Wb,exec_export_include=Sender_exec_export.h \ + -I .. + + IDL_Files { + Hello_Sender.idl + } +} + +project(DDS_Hello_Sender_lem_gen) : ciaoidldefaults, dds4ccm { + avoids += ace_for_tao + after += DDS_Hello_Sender_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=HELLO_SENDER_LEM_STUB_Export \ + -Wb,stub_export_include=Sender_lem_stub_export.h \ + -SS -Gxhst -I $CIAO_ROOT/connectors -I .. + + IDL_Files { + Hello_SenderE.idl + } +} + +project(DDS_Hello_Sender_lem_stub) : ccm_svnt, dds4ccm_base { + avoids += ace_for_tao + after += DDS_Hello_Sender_lem_gen DDS_Hello_Sender_stub Home_Hello_Base_stub + libs += Home_Hello_Base_stub Sender_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Sender_lem_stub + dynamicflags += HELLO_SENDER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_SenderEC.cpp + } + + Header_Files { + Hello_SenderEC.h + Sender_lem_stub_export.h + } + + Inline_Files { + Hello_SenderEC.inl + } +} + +project(DDS_Hello_Sender_stub) : ccm_stub, dds4ccm_base { + avoids += ace_for_tao + after += DDS_Hello_Sender_idl_gen Home_Hello_Base_stub Home_Hello_Connector_stub Home_Hello_Connector2_stub + libs += Home_Hello_Base_stub Home_Hello_Connector_stub Home_Hello_Connector2_stub + includes += .. + libpaths += ../lib + libout = ../lib + sharedname = Sender_stub + dynamicflags += HELLO_SENDER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_SenderC.cpp + } + + Header_Files { + Hello_SenderC.h + Sender_stub_export.h + } + + Inline_Files { + Hello_SenderC.inl + } +} + +project(DDS_Hello_Sender_exec) : ciao_executor, dds4ccm_lem_stub { + after += DDS_Hello_Sender_lem_stub DDS_Hello_Sender_stub Home_Hello_Connector_lem_stub Home_Hello_Connector_stub \ + Home_Hello_Connector2_lem_stub Home_Hello_Connector2_stub + sharedname = Sender_exec + libs += Sender_stub Sender_lem_stub Home_Hello_Base_stub Home_Hello_Connector_lem_stub Home_Hello_Connector_stub \ + Home_Hello_Connector2_lem_stub Home_Hello_Connector2_stub + libpaths += ../lib + includes += .. + libout = ../lib + dynamicflags += HELLO_SENDER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_Sender_exec.cpp + } + + Header_Files { + Hello_Sender_exec.h + Sender_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_Hello_Sender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { + avoids += ace_for_tao + after += Home_Hello_Base_stub DDS_Hello_Sender_lem_stub Home_Hello_Connector_stub Home_Hello_Connector_svnt Home_Hello_Connector_lem_stub \ + Home_Hello_Connector2_stub Home_Hello_Connector2_svnt Home_Hello_Connector2_lem_stub + sharedname = Sender_svnt + libs += Sender_stub Sender_lem_stub \ + Home_Hello_Base_stub Home_Hello_Connector_stub Home_Hello_Connector_svnt Home_Hello_Connector_lem_stub \ + Home_Hello_Connector2_svnt Home_Hello_Connector2_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags += HELLO_SENDER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Hello_SenderS.cpp + Hello_Sender_svnt.cpp + } + + Header_Files { + Hello_SenderS.h + Hello_Sender_svnt.h + Sender_svnt_export.h + } + + Inline_Files { + } +} + diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender_exec.cpp new file mode 100644 index 00000000000..7fdafcc78c4 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender_exec.cpp @@ -0,0 +1,725 @@ +// -*- C++ -*- +// $Id$ + +#include "Hello_Sender_exec.h" +#include "ace/Guard_T.h" +#include "ace/Log_Msg.h" +#include "tao/ORB_Core.h" +#include "ace/Date_Time.h" +#include "ace/OS_NS_unistd.h" +#include "ace/Reactor.h" + +namespace CIAO_Hello_Base_comp_Impl +{ + + fooSub_data_listener_exec_i::fooSub_data_listener_exec_i ( + ::Hello::CCM_Base_comp_Context_ptr ctx) + : ciao_context_ ( + ::Hello::CCM_Base_comp_Context::_duplicate (ctx)) + { + } + + fooSub_data_listener_exec_i::~fooSub_data_listener_exec_i (void) + { + } + + // Operations from Listener + void + fooSub_data_listener_exec_i::on_one_data ( + const ::DDSHello & /* datum */, + const ::CCM_DDS::ReadInfo & /* info */) + { + } + + void + fooSub_data_listener_exec_i::on_many_data ( + const ::DDSHelloSeq & /* data */, + const ::CCM_DDS::ReadInfoSeq & /* infos */) + { + /* Your code here. */ + } + + fooSub_status_exec_i::fooSub_status_exec_i ( + ::Hello::CCM_Base_comp_Context_ptr ctx) + : ciao_context_ ( + ::Hello::CCM_Base_comp_Context::_duplicate (ctx)) + { + } + + fooSub_status_exec_i::~fooSub_status_exec_i (void) + { + //ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("~fooSub_status_exec_i\n"))); + } + + void + fooSub_status_exec_i::on_requested_deadline_missed ( + ::DDS::DataReader_ptr /* the_reader */, + const ::DDS::RequestedDeadlineMissedStatus & /* status */) + { + /* Your code here. */ + } + + void + fooSub_status_exec_i::on_sample_lost ( + ::DDS::DataReader_ptr /* the_reader */, + const ::DDS::SampleLostStatus & /* status */) + { + //ACE_DEBUG ((LM_ERROR, ACE_TEXT("port status listener::on_sample_lost\n"))); + } + + //============================================================ + // Component Executor Implementation Class: Base_comp_exec_i + //============================================================ + + Base_comp_exec_i::Base_comp_exec_i (void) + : baseAttr_ (1) + { + ACE_DEBUG ((LM_DEBUG, "Base_comp: -2- Base_comp_exec_i::" + "Base_comp_exec_i \n")); + } + + Base_comp_exec_i::~Base_comp_exec_i (void) + { + ACE_DEBUG ((LM_DEBUG, "Base_comp: -10- Base_comp_exec_i::" + "~Base_comp_exec_i \n")); + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + ::CORBA::Short + Base_comp_exec_i::baseAttr (void) + { + return this->baseAttr_; + } + + void + Base_comp_exec_i::baseAttr ( + ::CORBA::Short baseAttr) + { + this->baseAttr_ = baseAttr; + } + + ::Foo_conn::CCM_Listener_ptr + Base_comp_exec_i::get_fooSub_data_listener (void) + { + if ( ::CORBA::is_nil (this->ciao_fooSub_data_listener_.in ())) + { + fooSub_data_listener_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + fooSub_data_listener_exec_i ( + this->ciao_context_.in ()), + ::Foo_conn::CCM_Listener::_nil ()); + + this->ciao_fooSub_data_listener_ = tmp; + } + + return + ::Foo_conn::CCM_Listener::_duplicate ( + this->ciao_fooSub_data_listener_.in ()); + } + + + + ::CCM_DDS::CCM_PortStatusListener_ptr + Base_comp_exec_i::get_fooSub_status (void) + { + if ( ::CORBA::is_nil (this->ciao_fooSub_status_.in ())) + { + fooSub_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + fooSub_status_exec_i ( + this->ciao_context_.in ()), + ::CCM_DDS::CCM_PortStatusListener::_nil ()); + + this->ciao_fooSub_status_ = tmp; + } + + return + ::CCM_DDS::CCM_PortStatusListener::_duplicate ( + this->ciao_fooSub_status_.in ()); + } + + ::Hello::CCM_Base_obj_ptr + Base_comp_exec_i::get_baseFacet (void) + { + return 0; + } + + // Operations from Components::SessionComponent. + void + Base_comp_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::Hello::CCM_Base_comp_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Base_comp_exec_i::configuration_complete (void) + { + ACE_DEBUG ((LM_DEBUG, "Base_comp: -3- Base_comp_exec_i::" + "configuration_complete \n")); + } + + void + Base_comp_exec_i::ccm_activate (void) + { + ACE_DEBUG ((LM_DEBUG, "Base_comp: -4- Base_comp_exec_i::" + "ccm_activate \n")); + } + + void + Base_comp_exec_i::ccm_passivate (void) + { + ACE_DEBUG ((LM_DEBUG, "Base_comp: -8- Base_comp_exec_i::" + "ccm_passivate \n")); + } + + void + Base_comp_exec_i::ccm_remove (void) + { + ACE_DEBUG ((LM_DEBUG, "Base_comp: -9- Base_comp_exec_i::" + "ccm_remove \n")); + } + + + extern "C" HELLO_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Hello_Base_comp_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Base_comp_exec_i); + + return retval; + } + +} +namespace CIAO_Hello_Base_comp_Impl +{ + //============================================================ + // Home Executor Implementation Class: SenderHome_exec_i + //============================================================ + + Base_compHome_exec_i::Base_compHome_exec_i () + { + ACE_DEBUG ((LM_DEBUG, " Base_compHome: -2- Base_compHome_exec_i::" + "Base_compHome_exec_i \n")); + } + + Base_compHome_exec_i::~Base_compHome_exec_i (void) + { + ACE_DEBUG ((LM_DEBUG, " Base_compHome: -11- Base_compHome_exec_i::" + "~Base_compHome_exec_i \n")); + } + + // All operations and attributes. + + // Factory operations. + + // Finder operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + Base_compHome_exec_i::create (void) + { + ACE_DEBUG ((LM_DEBUG, " Base_compHome: -3- Base_compHome_exec_i::create\n")); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) creating Base_compHome\n")); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + + ACE_NEW_THROW_EX ( + retval, + CIAO_Hello_Base_comp_Impl::Base_comp_exec_i (), + ::CORBA::NO_MEMORY ()); + return retval; + } + + extern "C" HELLO_SENDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Hello_SenderHome_Impl (void) + { + ACE_DEBUG ((LM_DEBUG, " Base_compHome: -1- create_Hello_Base_compHome_Impl \n")); + + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_NORETURN ( + retval, + Base_compHome_exec_i ()); + + return retval; + } +} + +//============================================================ + // Component Executor Implementation Class: Derived_comp_exec_i + //============================================================ +namespace CIAO_Hello_Derived_comp_Impl +{ + barSub_data_listener_exec_i::barSub_data_listener_exec_i ( + ::Hello::CCM_Derived_comp_Context_ptr ctx) + : ciao_context_ ( + ::Hello::CCM_Derived_comp_Context::_duplicate (ctx)) + { + } + + barSub_data_listener_exec_i::~barSub_data_listener_exec_i (void) + { + } + + // Operations from Listener + void + barSub_data_listener_exec_i::on_one_data ( + const ::DDSHello & /* datum */, + const ::CCM_DDS::ReadInfo & /* info */) + { + } + + void + barSub_data_listener_exec_i::on_many_data ( + const ::DDSHelloSeq & /* data */, + const ::CCM_DDS::ReadInfoSeq & /* infos */) + { + /* Your code here. */ + } + + + barSub_status_exec_i::barSub_status_exec_i ( + ::Hello::CCM_Base_comp_Context_ptr ctx) + : ciao_context_ ( + ::Hello::CCM_Base_comp_Context::_duplicate (ctx)) + { + } + + barSub_status_exec_i::~barSub_status_exec_i (void) + { + } + + // Operations from ::CCM_DDS::PortStatusListener + + void + barSub_status_exec_i::on_requested_deadline_missed ( + ::DDS::DataReader_ptr /* the_reader */, + const ::DDS::RequestedDeadlineMissedStatus & /* status */) + { + /* Your code here. */ + } + + void + barSub_status_exec_i::on_sample_lost ( + ::DDS::DataReader_ptr /* the_reader */, + const ::DDS::SampleLostStatus & /* status */) + { + } + + Derived_comp_exec_i::Derived_comp_exec_i (void) + : baseAttr_ (10), + derivedAttr_ (100) + { + ACE_DEBUG ((LM_DEBUG, "Derived_comp: -2- Derived_comp_exec_i::" + "Derived_comp_exec_i \n")); + } + + Derived_comp_exec_i::~Derived_comp_exec_i (void) + { + ACE_DEBUG ((LM_DEBUG, "Derived_comp: -10- Derived_comp_exec_i::" + "~Derived_comp_exec_i \n")); + } + + // Supported operations and attributes. + ::CORBA::LongLong + Derived_comp_exec_i::derivedAttr (void) + { + return this->derivedAttr_; + } + + void + Derived_comp_exec_i::derivedAttr ( + ::CORBA::LongLong derivedAttr) + { + this->derivedAttr_ = derivedAttr; + } + + + ::CORBA::Short + Derived_comp_exec_i::baseAttr (void) + { + return this->baseAttr_; + } + + void + Derived_comp_exec_i::baseAttr ( + ::CORBA::Short baseAttr) + { + this->baseAttr_ = baseAttr; + } + + // Component attributes and port operations. + + ::Foo_conn::CCM_Listener_ptr + Derived_comp_exec_i::get_fooSub_data_listener (void) + { + if ( ::CORBA::is_nil (this->ciao_fooSub_data_listener_.in ())) + { + CIAO_Hello_Base_comp_Impl::fooSub_data_listener_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + CIAO_Hello_Base_comp_Impl::fooSub_data_listener_exec_i ( + this->ciao_context_.in ()), + ::Foo_conn::CCM_Listener::_nil ()); + + this->ciao_fooSub_data_listener_ = tmp; + } + + return + ::Foo_conn::CCM_Listener::_duplicate ( + this->ciao_fooSub_data_listener_.in ()); + } + + ::CCM_DDS::CCM_PortStatusListener_ptr + Derived_comp_exec_i::get_fooSub_status (void) + { + if ( ::CORBA::is_nil (this->ciao_fooSub_status_.in ())) + { + CIAO_Hello_Base_comp_Impl::fooSub_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + CIAO_Hello_Base_comp_Impl::fooSub_status_exec_i ( + this->ciao_context_.in ()), + ::CCM_DDS::CCM_PortStatusListener::_nil ()); + + this->ciao_fooSub_status_ = tmp; + } + + return + ::CCM_DDS::CCM_PortStatusListener::_duplicate ( + this->ciao_fooSub_status_.in ()); + } + + ::Bar_conn::CCM_Listener_ptr + Derived_comp_exec_i::get_barSub_data_listener (void) + { + if ( ::CORBA::is_nil (this->ciao_barSub_data_listener_.in ())) + { + barSub_data_listener_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + barSub_data_listener_exec_i ( + this->ciao_context_.in ()), + ::Bar_conn::CCM_Listener::_nil ()); + + this->ciao_barSub_data_listener_ = tmp; + } + + return + ::Bar_conn::CCM_Listener::_duplicate ( + this->ciao_barSub_data_listener_.in ()); + } + + ::CCM_DDS::CCM_PortStatusListener_ptr + Derived_comp_exec_i::get_barSub_status (void) + { + if ( ::CORBA::is_nil (this->ciao_barSub_status_.in ())) + { + barSub_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + barSub_status_exec_i ( + this->ciao_context_.in ()), + ::CCM_DDS::CCM_PortStatusListener::_nil ()); + + this->ciao_barSub_status_ = tmp; + } + + return + ::CCM_DDS::CCM_PortStatusListener::_duplicate ( + this->ciao_barSub_status_.in ()); + } + + ::Hello::CCM_Base_obj_ptr + Derived_comp_exec_i::get_baseFacet (void) + { + return 0; + } + + ::Hello::CCM_Derived_obj_ptr + Derived_comp_exec_i::get_derivedFacet (void) + { + return 0; + } + + // Operations from Components::SessionComponent. + void + Derived_comp_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + ACE_DEBUG ((LM_DEBUG, "Derived_comp: -3- Derived_comp_exec_i::" + ":set_session_contexti \n")); + this->ciao_context_ = + ::Hello::CCM_Derived_comp_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Derived_comp_exec_i::configuration_complete (void) + { + ACE_DEBUG ((LM_DEBUG, "Derived_comp: -4- Derived_comp_exec_i::" + "configuration_complete \n")); + } + + void + Derived_comp_exec_i::ccm_activate (void) + { + ACE_DEBUG ((LM_DEBUG, "Derived_comp: -5- Derived_comp_exec_i::" + "ccm_activate \n")); + } + + void + Derived_comp_exec_i::ccm_passivate (void) + { + ACE_DEBUG ((LM_DEBUG, "Derived_comp: -8- Derived_comp_exec_i::" + "ccm_passivate \n")); + } + + void + Derived_comp_exec_i::ccm_remove (void) + { + ACE_DEBUG ((LM_DEBUG, "Derived_comp: -9- Derived_comp_exec_i::" + "ccm_remove \n")); + } + + + extern "C" HELLO_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Hello_Derived_comp_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Derived_comp_exec_i); + + return retval; + } + +} +namespace CIAO_Hello_Derived_comp_Impl +{ + //============================================================ + // Home Executor Implementation Class: Derived_compHome_exec_i + //============================================================ + + Derived_compHome_exec_i::Derived_compHome_exec_i () + { + ACE_DEBUG ((LM_DEBUG, "Derived_compHome: -2- Derived_compHome_exec_i::" + "Derived_compHome_exec_i \n")); + + //compare current and original thread + } + + Derived_compHome_exec_i::~Derived_compHome_exec_i (void) + { + ACE_DEBUG ((LM_DEBUG, "Derived_compHome: -11- Derived_compHome_exec_i::" + "~Derived_compHome_exec_i \n")); + } + + // All operations and attributes. + + // Factory operations. + + // Finder operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + Derived_compHome_exec_i::create (void) + { + ACE_DEBUG ((LM_DEBUG, "Derived_compHome: -3- Derived_compHome_exec_i::create\n")); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) creating Derived_compHome\n")); + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + + ACE_NEW_THROW_EX ( + retval, + CIAO_Hello_Derived_comp_Impl::Derived_comp_exec_i (), + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" HELLO_SENDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Hello_Derived_compHome_Impl (void) + { + + ACE_DEBUG ((LM_DEBUG, "Derived_compHome: -1- create_Hello_Derived_compHome_Impl \n")); + + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + + ACE_NEW_NORETURN ( + retval, + Derived_compHome_exec_i ()); + + return retval; + } +} +//============================================================ + // Component Executor Implementation Class: DerivedEmpty_comp_exec_i + //============================================================ +namespace CIAO_Hello_DerivedEmpty_comp_Impl +{ + DerivedEmpty_comp_exec_i::DerivedEmpty_comp_exec_i (void) + : baseAttr_ (1) + { + ACE_DEBUG ((LM_DEBUG, "DerivedEmpty_comp: -2- DerivedEmpty_comp_exec_i::" + "DerivedEmpty_comp_exec_i \n")); + } + + DerivedEmpty_comp_exec_i::~DerivedEmpty_comp_exec_i (void) + { + ACE_DEBUG ((LM_DEBUG, "DerivedEmpty_comp: -10- DerivedEmpty_comp_exec_i::" + "~DerivedEmpty_comp_exec_i \n")); + } + + // Supported operations and attributes. + + ::CORBA::Short + DerivedEmpty_comp_exec_i::baseAttr (void) + { + return this->baseAttr_; + } + + void + DerivedEmpty_comp_exec_i::baseAttr ( + ::CORBA::Short baseAttr) + { + this->baseAttr_ = baseAttr; + } + + // Component attributes and port operations. + + + ::Foo_conn::CCM_Listener_ptr + DerivedEmpty_comp_exec_i::get_fooSub_data_listener (void) + { + if ( ::CORBA::is_nil (this->ciao_fooSub_data_listener_.in ())) + { + CIAO_Hello_Base_comp_Impl::fooSub_data_listener_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + CIAO_Hello_Base_comp_Impl::fooSub_data_listener_exec_i ( + this->ciao_context_.in ()), + ::Foo_conn::CCM_Listener::_nil ()); + + this->ciao_fooSub_data_listener_ = tmp; + } + + return + ::Foo_conn::CCM_Listener::_duplicate ( + this->ciao_fooSub_data_listener_.in ()); + } + + ::CCM_DDS::CCM_PortStatusListener_ptr + DerivedEmpty_comp_exec_i::get_fooSub_status (void) + { + if ( ::CORBA::is_nil (this->ciao_fooSub_status_.in ())) + { + CIAO_Hello_Base_comp_Impl::fooSub_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + CIAO_Hello_Base_comp_Impl::fooSub_status_exec_i ( + this->ciao_context_.in ()), + ::CCM_DDS::CCM_PortStatusListener::_nil ()); + + this->ciao_fooSub_status_ = tmp; + } + + return + ::CCM_DDS::CCM_PortStatusListener::_duplicate ( + this->ciao_fooSub_status_.in ()); + } + + + ::Hello::CCM_Base_obj_ptr + DerivedEmpty_comp_exec_i::get_baseFacet (void) + { + return 0; + } + // Operations from Components::SessionComponent. + + void + DerivedEmpty_comp_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::Hello::CCM_DerivedEmpty_comp_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + DerivedEmpty_comp_exec_i::configuration_complete (void) + { + ACE_DEBUG ((LM_DEBUG, "DerivedEmpty_comp: -3- DerivedEmpty_comp_exec_i::" + "configuration_completei \n")); + /* Your code here. */ + } + + void + DerivedEmpty_comp_exec_i::ccm_activate (void) + { + ACE_DEBUG ((LM_DEBUG, "DerivedEmpty_comp: -4- DerivedEmpty_comp_exec_i::" + "ccm_activate \n")); + } + + void + DerivedEmpty_comp_exec_i::ccm_passivate (void) + { + ACE_DEBUG ((LM_DEBUG, "DerivedEmpty_comp: -8- DerivedEmpty_comp_exec_i::" + "ccm_passivate \n")); + } + + void + DerivedEmpty_comp_exec_i::ccm_remove (void) + { + ACE_DEBUG ((LM_DEBUG, "DerivedEmpty_comp: -9- DerivedEmpty_comp_exec_i::" + "ccm_remove \n")); + } + + + extern "C" HELLO_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Hello_DerivedEmpty_comp_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + DerivedEmpty_comp_exec_i); + + return retval; + } + +} diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender_exec.h new file mode 100644 index 00000000000..50e8140ed79 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/Sender/Hello_Sender_exec.h @@ -0,0 +1,367 @@ +// -*- C++ -*- +// $Id$ + +#ifndef CIAO_HELLO_SENDER_EXEC_YPB9XX_H_ +#define CIAO_HELLO_SENDER_EXEC_YPB9XX_H_ + +#include /**/ "ace/pre.h" + +#include "Hello_SenderEC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include /**/ "Sender_exec_export.h" +#include "tao/LocalObject.h" +#include <map> + +namespace CIAO_Hello_Base_comp_Impl +{ + + class HELLO_SENDER_EXEC_Export fooSub_data_listener_exec_i + : public virtual ::Foo_conn::CCM_Listener, + public virtual ::CORBA::LocalObject + { + public: + fooSub_data_listener_exec_i ( + ::Hello::CCM_Base_comp_Context_ptr ctx); + + virtual ~fooSub_data_listener_exec_i (void); + + // Operations and attributes from Hello::Listener + + virtual + void on_one_data ( + const ::DDSHello & datum, + const ::CCM_DDS::ReadInfo & info); + + virtual + void on_many_data ( + const ::DDSHelloSeq & data, + const ::CCM_DDS::ReadInfoSeq & infos); + + private: + ::Hello::CCM_Base_comp_Context_var ciao_context_; + }; + + class HELLO_SENDER_EXEC_Export fooSub_status_exec_i + : public virtual ::CCM_DDS::CCM_PortStatusListener, + public virtual ::CORBA::LocalObject + { + public: + fooSub_status_exec_i ( + ::Hello::CCM_Base_comp_Context_ptr ctx); + virtual ~fooSub_status_exec_i (void); + + // 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: + ::Hello::CCM_Base_comp_Context_var ciao_context_; + }; + + + class Base_comp_exec_i; + + class HELLO_SENDER_EXEC_Export Base_comp_exec_i + : public virtual Base_comp_Exec, + public virtual ::CORBA::LocalObject + { + public: + Base_comp_exec_i (void); + virtual ~Base_comp_exec_i (void); + + //@{ + /** Supported operations and attributes. */ + //@} + + //@{ + /** Component attributes and port operations. */ + virtual ::CORBA::Short + baseAttr (void); + + virtual void + baseAttr (::CORBA::Short baseAttr); + + virtual ::Foo_conn::CCM_Listener_ptr + get_fooSub_data_listener (void); + + virtual ::CCM_DDS::CCM_PortStatusListener_ptr + get_fooSub_status (void); + + virtual ::Hello::CCM_Base_obj_ptr + get_baseFacet (void); + + //@} + + //@{ + /** 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); + //@} + + private: + ::Hello::CCM_Base_comp_Context_var ciao_context_; + ::CCM_DDS::CCM_ConnectorStatusListener_var ciao_connector_status_; + ::Foo_conn::CCM_Listener_var ciao_fooSub_data_listener_; + ::CCM_DDS::CCM_PortStatusListener_var ciao_fooSub_status_; + CORBA::Short baseAttr_; + }; + + extern "C" HELLO_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Hello_Base_comp_Impl (void); +} +namespace CIAO_Hello_Base_comp_Impl +{ + class HELLO_SENDER_EXEC_Export Base_compHome_exec_i + : public virtual Base_compHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + Base_compHome_exec_i (void); + + virtual ~Base_compHome_exec_i (void); + + // All operations and attributes. + + // Factory operations. + + // Finder operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (void); + private: + + }; + + extern "C" HELLO_SENDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Hello_Base_compHome_Impl (void); +} + +namespace CIAO_Hello_Derived_comp_Impl +{ + + class HELLO_SENDER_EXEC_Export barSub_data_listener_exec_i + : public virtual ::Bar_conn::CCM_Listener, + public virtual ::CORBA::LocalObject + { + public: + barSub_data_listener_exec_i ( + ::Hello::CCM_Derived_comp_Context_ptr ctx); + + virtual ~barSub_data_listener_exec_i (void); + + // Operations and attributes from Hello::Listener + + virtual + void on_one_data ( + const ::DDSHello & datum, + const ::CCM_DDS::ReadInfo & info); + + virtual + void on_many_data ( + const ::DDSHelloSeq & data, + const ::CCM_DDS::ReadInfoSeq & infos); + + private: + ::Hello::CCM_Derived_comp_Context_var ciao_context_; + }; + + class HELLO_SENDER_EXEC_Export barSub_status_exec_i + : public virtual ::CCM_DDS::CCM_PortStatusListener, + public virtual ::CORBA::LocalObject + { + public: + barSub_status_exec_i ( + ::Hello::CCM_Base_comp_Context_ptr ctx); + virtual ~barSub_status_exec_i (void); + + // 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: + ::Hello::CCM_Base_comp_Context_var ciao_context_; + }; + + class HELLO_SENDER_EXEC_Export Derived_comp_exec_i + : public virtual Derived_comp_Exec, + public virtual ::CORBA::LocalObject + { + public: + Derived_comp_exec_i (void); + virtual ~Derived_comp_exec_i (void); + + //@{ + /** Component attributes and port operations. */ + virtual ::CORBA::LongLong + derivedAttr (void); + + virtual void + derivedAttr (::CORBA::LongLong); + + virtual ::CORBA::Short + baseAttr (void); + + virtual void + baseAttr (::CORBA::Short baseAttr); + + virtual ::Foo_conn::CCM_Listener_ptr + get_fooSub_data_listener (void); + + virtual ::CCM_DDS::CCM_PortStatusListener_ptr + get_fooSub_status (void); + + virtual ::Bar_conn::CCM_Listener_ptr + get_barSub_data_listener (void); + + virtual ::CCM_DDS::CCM_PortStatusListener_ptr + get_barSub_status (void); + + virtual ::Hello::CCM_Base_obj_ptr + get_baseFacet (void); + + virtual ::Hello::CCM_Derived_obj_ptr + get_derivedFacet (void); + + //@} + + //@{ + /** 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); + //@} + + private: + ::Hello::CCM_Derived_comp_Context_var ciao_context_; + ::Foo_conn::CCM_Listener_var ciao_fooSub_data_listener_; + ::CCM_DDS::CCM_PortStatusListener_var ciao_fooSub_status_; + ::Bar_conn::CCM_Listener_var ciao_barSub_data_listener_; + ::CCM_DDS::CCM_PortStatusListener_var ciao_barSub_status_; + + CORBA::Short baseAttr_; + CORBA::ULongLong derivedAttr_; + // Atomic_Boolean ready_to_start_; + }; + + extern "C" HELLO_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Hello_Derived_comp_Impl (void); +} + + +namespace CIAO_Hello_Derived_comp_Impl +{ + class HELLO_SENDER_EXEC_Export Derived_compHome_exec_i + : public virtual Derived_compHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + Derived_compHome_exec_i (void); + + virtual ~Derived_compHome_exec_i (void); + + // All operations and attributes. + + // Factory operations. + // Finder operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (void); + private: + + }; + + extern "C" HELLO_SENDER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Hello_Derived_compHome_Impl (void); +} + +namespace CIAO_Hello_DerivedEmpty_comp_Impl +{ + class HELLO_SENDER_EXEC_Export DerivedEmpty_comp_exec_i + : public virtual DerivedEmpty_comp_Exec, + public virtual ::CORBA::LocalObject + { + public: + DerivedEmpty_comp_exec_i (void); + virtual ~DerivedEmpty_comp_exec_i (void); + + //@{ + /** Component attributes and port operations. */ + virtual ::CORBA::Short + baseAttr (void); + + virtual void + baseAttr (::CORBA::Short baseAttr); + + virtual ::Foo_conn::CCM_Listener_ptr + get_fooSub_data_listener (void); + + virtual ::CCM_DDS::CCM_PortStatusListener_ptr + get_fooSub_status (void); + + virtual ::Hello::CCM_Base_obj_ptr + get_baseFacet (void); + + //@} + + //@{ + /** 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); + //@} + + private: + ::Hello::CCM_DerivedEmpty_comp_Context_var ciao_context_; + ::Foo_conn::CCM_Listener_var ciao_fooSub_data_listener_; + ::CCM_DDS::CCM_PortStatusListener_var ciao_fooSub_status_; + CORBA::Short baseAttr_; + CORBA::ULongLong derivedAttr_; + }; + + extern "C" HELLO_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Hello_DerivedEmpty_comp_Impl (void); +} + +#include /**/ "ace/post.h" + +#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/DeploymentPlan.cdp b/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/DeploymentPlan.cdp new file mode 100644 index 00000000000..22a78a961bc --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/DeploymentPlan.cdp @@ -0,0 +1,841 @@ +<!-- $Id$ --> +<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>Hello_Depl_1</label> + <UUID>Hello_Depl_1</UUID> + + <implementation xmi:id="DerivedEmpty_compComponentImplementation"> + <name>DerivedEmpty_compComponentImplementation</name> + <source/> + <artifact xmi:idref="DerivedEmpty_comp_ExecArtifact" /> + <artifact xmi:idref="DerivedEmpty_comp_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_DerivedEmpty_comp_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_DerivedEmpty_comp_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>DerivedEmpty_comp_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>DerivedEmpty_comp_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Foo_ConnectorComponentImplementation"> + <name>Foo_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="Foo_Connector_ExecArtifact" /> + <artifact xmi:idref="Foo_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_Foo_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_Foo_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>Foo_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Foo_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Bar_ConnectorComponentImplementation"> + <name>Bar_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="Bar_Connector_ExecArtifact" /> + <artifact xmi:idref="Bar_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_Bar_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_Bar_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>Bar_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Bar_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + + + <implementation xmi:id="Base_compHomeComponentImplementation"> + <name>Base_compHomeComponentImplementation</name> + <source/> + <artifact xmi:idref="Base_compHome_ExecArtifact" /> + <artifact xmi:idref="Base_compHome_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_Base_compHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_Base_compHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Base_compHome_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Base_compHome_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Base_compComponentImplementation"> + <name>Base_compComponentImplementation</name> + <source/> + <artifact xmi:idref="Base_compHome_ExecArtifact" /> + <artifact xmi:idref="Base_compHome_SvntArtifact" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Derived_compHomeComponentImplementation"> + <name>Derived_compHomeComponentImplementation</name> + <source/> + <artifact xmi:idref="Derived_compHome_ExecArtifact" /> + <artifact xmi:idref="Derived_compHome_SvntArtifact" /> + <execParameter> + <name>home factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_Derived_compHome_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_Derived_compHome_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Derived_compHome_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Derived_compHome_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="Derived_compComponentImplementation"> + <name>Derived_compComponentImplementation</name> + <source/> + <artifact xmi:idref="Derived_compHome_ExecArtifact" /> + <artifact xmi:idref="Derived_compHome_SvntArtifact" /> + <execParameter> + <name>edu.vanderbilt.dre.DAnCE.ImplementationType</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>edu.vanderbilt.dre.CCM.HomedComponent</string> + </value> + </value> + </execParameter> + </implementation> + + + <instance xmi:id="Foo_Connector_1_ComponentInstance"> + <name>Foo_Connector_1_Component</name> + <node>Node1</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Foo_ConnectorComponentImplementation" /> + <configProperty> + <name>domain_id</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>9</long> + </value> + </value> + </configProperty> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Foo_Connector_2_ComponentInstance"> + <name>Foo_Connector_2_Component</name> + <node>Node1</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Foo_ConnectorComponentImplementation" /> + <configProperty> + <name>domain_id</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>9</long> + </value> + </value> + </configProperty> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Bar_Connector_1_ComponentInstance"> + <name>Bar_Connector_1_Component</name> + <node>Node1</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Bar_ConnectorComponentImplementation" /> + <configProperty> + <name>domain_id</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>99</long> + </value> + </value> + </configProperty> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Bar_Connector_2_ComponentInstance"> + <name>Bar_Connector_2_Component</name> + <node>Node1</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Bar_ConnectorComponentImplementation" /> + <configProperty> + <name>domain_id</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>99</long> + </value> + </value> + </configProperty> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>HelloTest_Library#HelloProfile</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Derived_comp_1_ComponentInstance"> + <name>Derived_comp_1_Component</name> + <node>Node1</node> + <source/> + <implementation xmi:idref="Derived_compComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.CIAO.ComponentHomeId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Derived_compHome_1_Component</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Derived_comp_2_ComponentInstance"> + <name>Derived_comp_2_Component</name> + <node>Node1</node> + <source/> + <implementation xmi:idref="Derived_compComponentImplementation" /> + <configProperty> + <name>edu.vanderbilt.dre.CIAO.ComponentHomeId</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Derived_compHome_2_Component</string> + </value> + </value> + </configProperty> + </instance> + + <instance xmi:id="Derived_compHome_1_ComponentInstance"> + <name>Derived_compHome_1_Component</name> + <node>Node1</node> + <source/> + <implementation xmi:idref="Derived_compHomeComponentImplementation" /> + </instance> + + <instance xmi:id="Derived_compHome_2_ComponentInstance"> + <name>Derived_compHome_2_Component</name> + <node>Node1</node> + <source/> + <implementation xmi:idref="Derived_compHomeComponentImplementation" /> + </instance> + + <instance xmi:id="DerivedEmpty_compComponentInstance"> + <name>DerivedEmpty_compComponent</name> + <node>Node1</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="DerivedEmpty_compComponentImplementation" /> + </instance> + + + <connection> + <name>writer_1_foo_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>fooPub_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_1_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>supplier_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Foo_Connector_1_ComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>writer_2_foo_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>fooPub_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_2_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>supplier_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Foo_Connector_2_ComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>writer_1_bar_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>barPub_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_1_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>supplier_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Bar_Connector_1_ComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>writer_2_bar_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>barPub_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_2_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>supplier_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Bar_Connector_2_ComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>MessageConnection1</name> + <internalEndpoint> + <portName>baseRecept</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_1_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>baseFacet</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Derived_comp_2_ComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>MessageConnection2</name> + <internalEndpoint> + <portName>baseRecept</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_2_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>baseFacet</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Derived_comp_1_ComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>MessageConnectionDerived1</name> + <internalEndpoint> + <portName>derivedRecept</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_1_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>derivedFacet</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Derived_comp_2_ComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> + <name>MessageConnectionDerived2</name> + <internalEndpoint> + <portName>derivedRecept</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Derived_comp_2_ComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>derivedFacet</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="Derived_comp_1_ComponentInstance" /> + </internalEndpoint> + </connection> + + + <artifact xmi:id="Base_compHome_ExecArtifact"> + <name>Base_compHome_exec</name> + <source/> + <node/> + <location>Sender_exec</location> + </artifact> + <artifact xmi:id="Base_compHome_SvntArtifact"> + <name>Base_compHome_svnt</name> + <source/> + <node/> + <location>Sender_svnt</location> + </artifact> + <artifact xmi:id="Base_compHome_StubArtifact"> + <name>Base_compHome_stub</name> + <source/> + <node/> + <location>Sender_stub</location> + </artifact> + + + <artifact xmi:id="Derived_compHome_ExecArtifact"> + <name>Derived_compHome_exec</name> + <source/> + <node/> + <location>Sender_exec</location> + </artifact> + <artifact xmi:id="Derived_compHome_SvntArtifact"> + <name>Derived_compHome_svnt</name> + <source/> + <node/> + <location>Sender_svnt</location> + </artifact> + <artifact xmi:id="Derived_compHome_StubArtifact"> + <name>Derived_compHome_stub</name> + <source/> + <node/> + <location>Sender_stub</location> + </artifact> + + + + <artifact xmi:id="Foo_Connector_ExecArtifact"> + <name>Foo_Connector_exec</name> + <source/> + <node/> + <location>Home_Hello_Connector_exec</location> + </artifact> + <artifact xmi:id="Foo_Connector_SvntArtifact"> + <name>Foo_Connector_svnt</name> + <source/> + <node/> + <location>Home_Hello_Connector_svnt</location> + </artifact> + <artifact xmi:id="Foo_Connector_StubArtifact"> + <name>Foo_Connector_stub</name> + <source/> + <node/> + <location>Home_Hello_Connector_stub</location> + </artifact> + + <artifact xmi:id="Bar_Connector_ExecArtifact"> + <name>Bar_Connector_exec</name> + <source/> + <node/> + <location>Home_Hello_Connector2_exec</location> + </artifact> + <artifact xmi:id="Bar_Connector_SvntArtifact"> + <name>Bar_Connector_svnt</name> + <source/> + <node/> + <location>Home_Hello_Connector2_svnt</location> + </artifact> + <artifact xmi:id="Bar_Connector_StubArtifact"> + <name>Bar_Connector_stub</name> + <source/> + <node/> + <location>Home_Hello_Connector2_stub</location> + </artifact> + + + + <artifact xmi:id="DerivedEmpty_comp_ExecArtifact"> + <name>DerivedEmpty_comp_exec</name> + <source/> + <node/> + <location>Sender_exec</location> + </artifact> + <artifact xmi:id="DerivedEmpty_comp_SvntArtifact"> + <name>DerivedEmpty_comp_svnt</name> + <source/> + <node/> + <location>Sender_svnt</location> + </artifact> + <artifact xmi:id="DerivedEmpty_comp_StubArtifact"> + <name>DerivedEmpty_comp_stub</name> + <source/> + <node/> + <location>Sender_stub</location> + </artifact> + + <localityConstraint> + <constraint>DifferentProcess</constraint> + <constrainedInstance xmi:idref="Derived_comp_1_ComponentInstance" /> + <constrainedInstance xmi:idref="Derived_comp_2_ComponentInstance" /> + </localityConstraint> + + <localityConstraint> + <constraint>SameProcess</constraint> + <constrainedInstance xmi:idref="Derived_comp_1_ComponentInstance" /> + <constrainedInstance xmi:idref="Foo_Connector_1_ComponentInstance" /> + <constrainedInstance xmi:idref="Bar_Connector_1_ComponentInstance" /> + <constrainedInstance xmi:idref="Derived_compHome_1_ComponentInstance" /> + </localityConstraint> + + <localityConstraint> + <constraint>SameProcess</constraint> + <constrainedInstance xmi:idref="Derived_comp_2_ComponentInstance" /> + <constrainedInstance xmi:idref="Foo_Connector_2_ComponentInstance" /> + <constrainedInstance xmi:idref="Bar_Connector_2_ComponentInstance" /> + <constrainedInstance xmi:idref="Derived_compHome_2_ComponentInstance" /> + </localityConstraint> + +</Deployment:DeploymentPlan> diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/USER_QOS_PROFILES.xml b/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/USER_QOS_PROFILES.xml new file mode 100644 index 00000000000..e770400775f --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/USER_QOS_PROFILES.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- $Id$ --> + +<!-- + +Description +XML QoS Profile + +The QoS configuration of the DDS entities in the generated example is +loaded from this file. + +This file is used only when it is in the current working directory +or when the enviroment variable +NDDS_QOS_PROFILES is defined and points to this file. + +For more information about XML QoS Profiles see Chapter 15 in the +RTI Data Distribution Service user manual. +--> +<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:/ndds/ndds.4.5d/scripts/../resource/rtiddsgen/../qos_profiles_4.5d/schema/rti_dds_qos_profiles.xsd" version="4.5d"> + <!-- QoS Library containing the QoS profile used in the generated example. + + A QoS library is a named set of QoS profiles. + --> + <qos_library name="HelloTest_Library"> + <!-- QoS profile used to configure reliable communication between the DataWriter + and DataReader created in the example code. + + A QoS profile groups a set of related QoS. + --> + <qos_profile name="HelloProfile" is_default_qos="true"> + <!-- QoS used to configure the data writer created in the example code --> + <datawriter_qos> + <reliability> + <kind>BEST_EFFORT_RELIABILITY_QOS</kind> + </reliability> + <durability> + <kind>TRANSIENT_DURABILITY_QOS</kind> + </durability> + <history> + <kind>KEEP_ALL_HISTORY_QOS</kind> + </history> + <protocol> + <rtps_reliable_writer> + <max_heartbeat_retries>10</max_heartbeat_retries> + </rtps_reliable_writer> + </protocol> + </datawriter_qos> + <!-- QoS used to configure the data reader created in the example code --> + <datareader_qos> + <reliability> + <kind>BEST_EFFORT_RELIABILITY_QOS</kind> + </reliability> + <history> + <kind>KEEP_ALL_HISTORY_QOS</kind> + </history> + <durability> + <kind>TRANSIENT_DURABILITY_QOS</kind> + </durability> + </datareader_qos> + + </qos_profile> + </qos_library> +</dds>
\ No newline at end of file diff --git a/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/run_test.pl new file mode 100755 index 00000000000..b3e3cff142c --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/HomeDerived/descriptors/run_test.pl @@ -0,0 +1,251 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- 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'}"; +$DDS4CCM_TRACE_ENABLE = "$ENV{'DDS4CCM_TRACE_ENABLE'}"; + +#$ENV{'DANCE_LOG_LEVEL'}=10; +#$ENV{'CIAO_LOG_LEVEL'}=10; +#$ENV{'DANCE_TRACE_ENABLE'}=1; +#$ENV{'CIAO_TRACE_ENABLE'}=1; + +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; + +$nr_daemon = 3; +@ports = ( 60001, 60002 ); +@iorbases = ( "Node1.ior", "Node2.ior" ); +@iorfiles = 0; +@nodenames = ( "Node1", "Node2" ); + +# 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 = "DeploymentPlan.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 10 seconds to allow task to complete\n"; +sleep (10); + +# 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 (2 * $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; |