diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests/SLManyByMany')
18 files changed, 0 insertions, 2880 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/.gitignore b/CIAO/connectors/dds4ccm/tests/SLManyByMany/.gitignore deleted file mode 100644 index 502167fa0b8..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/lib diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Base/SL_ManyByMany_Base.idl b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Base/SL_ManyByMany_Base.idl deleted file mode 100644 index 6723cc83f06..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Base/SL_ManyByMany_Base.idl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file SL_ManyByMany_Base.idl - * @author Marijke Hengstmengel (mhengstmengel@remedy.nl) - */ - -#ifndef SL_MANYBYMANY_BASE_IDL -#define SL_MANYBYMANY_BASE_IDL - -#pragma ndds typesupport "Base/SL_ManyByMany_BaseSupport.h" -#pragma opendds typesupport "Base/SL_ManyByMany_BaseTypeSupportImpl.h" - -#pragma DCPS_DATA_TYPE "TestTopic" -#pragma DCPS_DATA_KEY "TestTopic key" - -struct TestTopic { - string key; //@key - long x; -}; - -#if defined DDS4CCM_NEEDS_SEQUENCES_DEFINED -typedef sequence<TestTopic> TestTopicSeq; -#endif - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Base/SL_ManyByMany_Base.mpc b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Base/SL_ManyByMany_Base.mpc deleted file mode 100644 index f530b760e3c..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Base/SL_ManyByMany_Base.mpc +++ /dev/null @@ -1,24 +0,0 @@ -project (DDS_SL_ManyByMany_Base_stub) : taoidldefaults, dds4ccm_ts_default { - sharedname = DDS_SL_ManyByMany_Base_stub - dynamicflags += SL_MANYBYMANY_BASE_STUB_BUILD_DLL - libout = ../lib - - idlflags += -SS -Sci \ - -Wb,stub_export_macro=SL_MANYBYMANY_BASE_STUB_Export \ - -Wb,stub_export_include=SL_ManyByMany_Base_stub_export.h - - IDL_Files { - idlflags += -Gxhst - SL_ManyByMany_Base.idl - } - - opendds_ts_flags += --export=SL_MANYBYMANY_BASE_STUB_Export - - DDSGenerator_Files { - SL_ManyByMany_Base.idl - } - - Source_Files { - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Connector/SL_ManyByMany_Connector.idl b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Connector/SL_ManyByMany_Connector.idl deleted file mode 100644 index a5204526af8..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Connector/SL_ManyByMany_Connector.idl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file SL_ManyByMany_Connector.idl - * @author Marijke Hengstmengel (mhengstmengel@remedy.nl) - */ - -#ifndef SL_MANYBYMANY_CONNECTOR_IDL_ -#define SL_MANYBYMANY_CONNECTOR_IDL_ - -#include <Components.idl> -#include <ccm_dds.idl> -#include "Base/SL_ManyByMany_Base.idl" - -#pragma ciao lem "Connector/SL_ManyByMany_ConnectorE.idl" - -#if (CIAO_DDS4CCM_OPENDDS==1) -# include "Base/SL_ManyByMany_BaseTypeSupport.idl" -#endif - -module SL_ManyByMany -{ - module ::CCM_DDS::Typed < ::TestTopic, ::TestTopicSeq> SLManyByManyConnector; -}; - -#endif /* SL_ManyByMany_CONNECTOR_IDL_ */ diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Connector/SL_ManyByMany_Connector.mpc b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Connector/SL_ManyByMany_Connector.mpc deleted file mode 100644 index 78de5f326c2..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Connector/SL_ManyByMany_Connector.mpc +++ /dev/null @@ -1,142 +0,0 @@ -// This file is generated with "generate_component_mpc.pl -p DDS_SL_ManyByMany_Base -l .. -o ../lib -u DDS SL_ManyByMany_Connector" - -project(DDS_SL_MBM_Connector_idl_gen) : connectoridldefaults, dds4ccm { - after += DDS4CCM_idl_gen DDS_SL_ManyByMany_Base_stub - custom_only = 1 - idlflags += -Wb,stub_export_macro=SL_MANYBYMANY_CONNECTOR_STUB_Export \ - -Wb,stub_export_include=SL_ManyByMany_Connector_stub_export.h \ - -Wb,skel_export_macro=SL_MANYBYMANY_CONNECTOR_SVNT_Export \ - -Wb,skel_export_include=SL_ManyByMany_Connector_svnt_export.h \ - -Wb,svnt_export_macro=SL_MANYBYMANY_CONNECTOR_SVNT_Export \ - -Wb,svnt_export_include=SL_ManyByMany_Connector_svnt_export.h \ - -Wb,conn_export_macro=SL_MANYBYMANY_CONNECTOR_CONN_Export \ - -Wb,conn_export_include=SL_ManyByMany_Connector_conn_export.h \ - -I .. - - IDL_Files { - SL_ManyByMany_Connector.idl - } -} - -project(DDS_SL_MBM_Connector_lem_gen) : ciaoidldefaults, dds4ccm { - custom_only = 1 - after += DDS_SL_MBM_Connector_idl_gen - idlflags += -Wb,stub_export_macro=SL_MANYBYMANY_CONNECTOR_LEM_STUB_Export \ - -Wb,stub_export_include=SL_ManyByMany_Connector_lem_stub_export.h \ - -SS -Gxhst \ - -I .. - - IDL_Files { - SL_ManyByMany_ConnectorE.idl - } -} - -project(DDS_SL_MBM_Connector_lem_stub) : ccm_svnt, dds4ccm_lem_stub { - after += DDS_SL_MBM_Connector_lem_gen DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Base_stub - libs += DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = DDS_SL_MBM_Connector_lem_stub - dynamicflags += SL_MANYBYMANY_CONNECTOR_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_ConnectorEC.cpp - } - - Header_Files { - SL_ManyByMany_ConnectorEC.h - SL_ManyByMany_Connector_lem_stub_export.h - } - - Inline_Files { - SL_ManyByMany_ConnectorEC.inl - } -} - -project(DDS_SL_ManyByMany_Connector_stub) : ccm_stub, dds4ccm_base { - after += DDS_SL_MBM_Connector_idl_gen DDS_SL_ManyByMany_Base_stub - libs += DDS_SL_ManyByMany_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = DDS_SL_ManyByMany_Connector_stub - dynamicflags += SL_MANYBYMANY_CONNECTOR_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_ConnectorC.cpp - } - - Header_Files { - SL_ManyByMany_ConnectorC.h - SL_ManyByMany_Connector_stub_export.h - } - - Inline_Files { - SL_ManyByMany_ConnectorC.inl - } -} - -project(DDS_SL_ManyByMany_Connector_exec) : ciao_executor, dds4ccm_impl { - after += DDS_SL_MBM_Connector_lem_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Base_stub - sharedname = DDS_SL_ManyByMany_Connector_exec - libs += DDS_SL_ManyByMany_Connector_stub DDS_SL_MBM_Connector_lem_stub DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += SL_MANYBYMANY_CONNECTOR_CONN_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_Connector_conn.cpp - } - - Header_Files { - SL_ManyByMany_Connector_conn.h - SL_ManyByMany_Connector_conn_export.h - } - - Inline_Files { - } -} - - -project(DDS_SL_ManyByMany_Connector_svnt) : ciao_servant, dds4ccm_impl { - after += DDS_SL_MBM_Connector_lem_stub DDS_SL_ManyByMany_Connector_exec DDS_SL_ManyByMany_Connector_stub - sharedname = DDS_SL_ManyByMany_Connector_svnt - libs += DDS_SL_ManyByMany_Connector_stub \ - DDS_SL_MBM_Connector_lem_stub \ - DDS_SL_ManyByMany_Base_stub \ - DDS_SL_ManyByMany_Connector_exec - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += SL_MANYBYMANY_CONNECTOR_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_ConnectorS.cpp - SL_ManyByMany_Connector_svnt.cpp - } - - Header_Files { - SL_ManyByMany_ConnectorS.h - SL_ManyByMany_Connector_svnt.h - SL_ManyByMany_Connector_svnt_export.h - } - - Inline_Files { - } -} - - diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/README b/CIAO/connectors/dds4ccm/tests/SLManyByMany/README deleted file mode 100644 index 622b15df743..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/README +++ /dev/null @@ -1,26 +0,0 @@ - - -This is a test for the StateListener when the StateListenerControl is in the MANY_BY_MANY mode. - -The test uses the Updater to sent samples. -With a create_one ( 1 sample) and create_many (3 samples) of the Updater, -the on_creation must be triggered ( 4 times 1 sample). - -With a delete_one ( 1 sample) and a delete_many (3 samples) of the Updater, - the on_deletion must betriggered( 4 times 1 sample). - -With update_one ( 1 sample) and update_many (3 samples) of the Updater, - the on_many_updates must ideal be triggered 2 times (1 and 3 samples), -but it is possible through timing problems that the 3 samples are nor received at one time. - -Because of the MANY_BY_MANY mode, the on_one_update must not be triggered, -even if the Updater does a update_one. - -In on_deletion, the returning dataum.key is tested . The key shouldn't be empty, but have a valid value -because of the <serialize_key_with_dispose> and <propagate_dispose_of_unregistered_instances> settings in the QoS . - - -Beccause the StateListener performs a get, a read_all of a Reader shouldn't receive any samples -after the Statelistener has received his triggers. - - diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver.idl b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver.idl deleted file mode 100644 index f80d7e5ab1c..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver.idl +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file - * @author Marijke Hengstmengel (mhengstmengel@remedy.nl) - */ - -#ifndef RECEIVER_IDL -#define RECEIVER_IDL - -#include "Connector/SL_ManyByMany_Connector.idl" - -module SL_ManyByMany -{ - component Receiver - { - port SLManyByManyConnector::DDS_StateListen info_out; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver.mpc deleted file mode 100644 index 8b0fb7a0ef8..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver.mpc +++ /dev/null @@ -1,136 +0,0 @@ -project(DDS_SL_ManyByMany_Receiver_idl_gen) : componentidldefaults, dds4ccm { - custom_only = 1 - after += DDS_SL_MBM_Connector_idl_gen - idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export \ - -Wb,stub_export_include=Receiver_stub_export.h \ - -Wb,skel_export_macro=RECEIVER_SVNT_Export \ - -Wb,skel_export_include=Receiver_svnt_export.h \ - -Wb,svnt_export_macro=RECEIVER_SVNT_Export \ - -Wb,svnt_export_include=Receiver_svnt_export.h \ - -Wb,exec_export_macro=RECEIVER_EXEC_Export \ - -Wb,exec_export_include=Receiver_exec_export.h \ - -I.. - - IDL_Files { - SL_ManyByMany_Receiver.idl - } -} - -project(DDS_SL_ManyByMany_Receiver_lem_gen) : ciaoidldefaults, dds4ccm { - after += DDS_SL_ManyByMany_Receiver_idl_gen - custom_only = 1 - idlflags += -Wb,stub_export_macro=RECEIVER_LEM_STUB_Export \ - -Wb,stub_export_include=Receiver_lem_stub_export.h \ - -SS -Gxhst -I.. - - IDL_Files { - SL_ManyByMany_ReceiverE.idl - } -} - -project(DDS_SL_MBM_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_SL_ManyByMany_Receiver_lem_gen DDS_SL_ManyByMany_Receiver_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Base_stub - libs += Receiver_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_lem_stub - dynamicflags += RECEIVER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_ReceiverEC.cpp - } - - Header_Files { - SL_ManyByMany_ReceiverEC.h - Receiver_lem_stub_export.h - } - - Inline_Files { - SL_ManyByMany_ReceiverEC.inl - } -} - -project(DDS_SL_ManyByMany_Receiver_stub) : ccm_stub, dds4ccm_base { - after += DDS_SL_ManyByMany_Receiver_idl_gen DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Base_stub DDS_SL_MBM_Connector_lem_gen - libs += DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_stub - dynamicflags += RECEIVER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_ReceiverC.cpp - } - - Header_Files { - SL_ManyByMany_ReceiverC.h - Receiver_stub_export.h - } - - Inline_Files { - SL_ManyByMany_ReceiverC.inl - } -} - -project(DDS_SL_ManyByMany_Receiver_exec) : ciao_executor, dds4ccm_lem_stub { - after += DDS_SL_MBM_Receiver_lem_stub DDS_SL_ManyByMany_Receiver_stub DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_MBM_Connector_lem_stub - sharedname = Receiver_exec - libs += Receiver_stub Receiver_lem_stub DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_MBM_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += RECEIVER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_Receiver_exec.cpp - } - - Header_Files { - SL_ManyByMany_Receiver_exec.h - Receiver_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_SL_ManyByMany_Receiver_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { - after += DDS_SL_MBM_Receiver_lem_stub DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Connector_svnt DDS_SL_ManyByMany_Receiver_exec DDS_SL_MBM_Connector_lem_stub - sharedname = Receiver_svnt - libs += Receiver_stub Receiver_lem_stub DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Connector_svnt Receiver_exec DDS_SL_MBM_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += RECEIVER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_ReceiverS.cpp - SL_ManyByMany_Receiver_svnt.cpp - } - - Header_Files { - SL_ManyByMany_ReceiverS.h - SL_ManyByMany_Receiver_svnt.h - Receiver_svnt_export.h - } - - Inline_Files { - } -} - - diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp deleted file mode 100644 index 938b46a013e..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.cpp +++ /dev/null @@ -1,612 +0,0 @@ -// -*- C++ -*- -#include "SL_ManyByMany_Receiver_exec.h" -#include "tao/ORB_Core.h" -#include "ace/Reactor.h" - -#include "dds4ccm/impl/TimeUtilities.h" - -#define ON_CREATION_EXPECTED 4 -#define ON_MANY_EXPECTED 4 -#define ON_MANY_TRIGGERED 2 -#define ON_DELETION_EXPECTED 4 -#define ON_READER_EXPECTED 0 - -namespace CIAO_SL_ManyByMany_Receiver_Impl -{ - /** - * Facet Executor Implementation Class: info_out_data_listener_exec_i - */ - - read_action_Generator::read_action_Generator (Receiver_exec_i &callback) - : pulse_callback_ (callback) - { - } - - read_action_Generator::~read_action_Generator () - { - } - - int - read_action_Generator::handle_timeout (const ACE_Time_Value &, const void *) - { - this->pulse_callback_.read_all(); - return 0; - } - - /** - * Facet Executor Implementation Class: info_out_data_listener_exec_i - */ - - info_out_data_listener_exec_i::info_out_data_listener_exec_i ( - ::SL_ManyByMany::CCM_Receiver_Context_ptr ctx, - Atomic_Long &no_operation, - Atomic_Long &on_creation, - Atomic_Long &on_many_update, - Atomic_Long &on_many_upd_trigger, - Atomic_Long &on_deletion, - Atomic_Bool &create_data, - Atomic_Bool &update_data, - Atomic_Long &samples_read) - : ciao_context_ ( - ::SL_ManyByMany::CCM_Receiver_Context::_duplicate (ctx)) - , no_operation_ (no_operation) - , on_creation_ (on_creation) - , on_many_update_ (on_many_update) - , on_many_upd_trigger_ (on_many_upd_trigger) - , on_deletion_ (on_deletion) - , create_data_ (create_data) - , update_data_ (update_data) - , samples_read_ (samples_read) - { - } - - info_out_data_listener_exec_i::~info_out_data_listener_exec_i (void) - { - } - - // Operations from ::SL_ManyByMany::SLManyByManyConnector::StateListener - - void - info_out_data_listener_exec_i::on_creation (const ::TestTopic & datum, - const ::CCM_DDS::ReadInfo & info) - { - ++this->on_creation_; - ACE_Time_Value tv; - tv <<= info.source_timestamp; - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("on_creation ReadInfo ") - ACE_TEXT ("-> UTC date =%#T\n"), - &tv)); - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Statelistener:on_creation : ") - ACE_TEXT ("Received datum for <%C> at %u\n"), - datum.key.in (), - datum.x)); - // One of the data must have the key 'KEY_1' with x == 1 - if (ACE_OS::strcmp (datum.key.in(), "KEY_1") == 0 && datum.x == 1L) - { - this->create_data_ = true; - } - } - - void - info_out_data_listener_exec_i::on_one_update (const ::TestTopic & /* datum */, - const ::CCM_DDS::ReadInfo & /* info */) - { - ++this->no_operation_; - } - - void - info_out_data_listener_exec_i::on_many_updates (const ::TestTopicSeq & data, - const ::CCM_DDS::ReadInfoSeq & infos) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("on_many_update triggered,") - ACE_TEXT (" received sequence of ") - ACE_TEXT ("<%u> samples\n"), - infos.length())); - //number of times this is triggered - this->on_many_upd_trigger_ ++; - - //number of total samples received - this->on_many_update_ += infos.length(); - for(CORBA::ULong i = 0; i < infos.length(); ++i) - { - if (infos[i].instance_status != CCM_DDS::INSTANCE_UPDATED) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: did not receive the expected ") - ACE_TEXT ("info.instance_status ") - ACE_TEXT ("'CCM_DDS::INSTANCE_UPDATED' ") - ACE_TEXT ("with operation 'on_many_updates' ") - ACE_TEXT ("from StateListener in Receiver\n") - )); - - } - ACE_Time_Value tv; - tv <<= infos[i].source_timestamp; - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("on_many_updates ReadInfo ") - ACE_TEXT ("-> UTC date =%#T\n"), - &tv)); - } - for (CORBA::ULong i = 0; i < data.length(); ++i) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("on_many_updates info : Number <%d> :") - ACE_TEXT (" received TestTopic_info ") - ACE_TEXT ("for <%C> at %u\n"), - i, - data[i].key.in (), - data[i].x)); - // one of the data must have the key 'KEY_1' with x == 2 - if (ACE_OS::strcmp(data[i].key,"KEY_1") == 0 && data[i].x == 2L) - { - this->update_data_ = true; - } - } - - // When we have received all updates, check if there is - // something left in the cache - if(this->on_many_update_.value () == ON_MANY_EXPECTED) - { - try - { - SL_ManyByMany::SLManyByManyConnector::Reader_var reader = - this->ciao_context_->get_connection_info_out_data (); - if (::CORBA::is_nil (reader.in ())) - { - ACE_ERROR ((LM_ERROR, "info_out_data_listener_exec_i::on_many_updates - " - "ERROR: Reader seems nil\n")); - } - ::TestTopicSeq seq; - ::CCM_DDS::ReadInfoSeq infos; - reader->read_all (seq, infos); - this->samples_read_ += seq.length (); - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("info_out_data_listener_exec_i::on_many_updates - ") - ACE_TEXT ("Read <%u> samples\n"), - seq.length ())); - } - catch (const CCM_DDS::InternalError& ex) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") - ACE_TEXT ("when using reader->read_all: index <%d> - retval <%d>\n"), - ex.index, ex.error_code)); - } - } - } - - void - info_out_data_listener_exec_i::on_deletion (const ::TestTopic & datum, - const ::CCM_DDS::ReadInfo & info) - { - if (info.instance_status != CCM_DDS::INSTANCE_DELETED) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: did not receive the expected ") - ACE_TEXT ("info.instance_status ") - ACE_TEXT ("'CCM_DDS::INSTANCE_DELETED' with operation ") - ACE_TEXT ("'on_deletion' from StateListener in Receiver\n") - )); - - } - else - { - // Because of the settings <serialize_key_with_dispose> and - // <propagate_dispose_of_unregistered_instances> in the QoS , we expect - // an existing datum.key - // Since these are RTI DDS specific QOS settings, we only need to test - // this in case RTI DDS -#if (CIAO_DDS4CCM_NDDS==1) - if ((ACE_OS::strncmp (datum.key.in(), "KEY", 3) == 0 ) || - (ACE_OS::strncmp (datum.key.in(), "many", 4) == 0 )) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Statelistener:on_deletion : ") - ACE_TEXT ("Received datum for <%C> \n"), - datum.key.in ())); - ++this->on_deletion_; - } - else - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR Statelistener:on_deletion : did not ") - ACE_TEXT ("receive the expected datum, received <%C>") - ACE_TEXT (", expected <KEY_.> or <many_.>\n"), - datum.key.in ())); - } -#else - ++this->on_deletion_; - ACE_UNUSED_ARG (datum); - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Statelistener:on_deletion : ") - ACE_TEXT ("Received on_deletion event\n"))); - -#endif - } - } - - /** - * Facet Executor Implementation Class: info_out_status_exec_i - */ - - info_out_status_exec_i::info_out_status_exec_i ( - ::SL_ManyByMany::CCM_Receiver_Context_ptr ctx) - : ciao_context_ ( - ::SL_ManyByMany::CCM_Receiver_Context::_duplicate (ctx)) - { - } - - info_out_status_exec_i::~info_out_status_exec_i (void) - { - } - - // Operations from ::CCM_DDS::PortStatusListener - - void - info_out_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */, - const ::DDS::RequestedDeadlineMissedStatus & /* status */) - { - /* Your code here. */ - } - - void - info_out_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */, - const ::DDS::SampleLostStatus & /* status */) - { - /* Your code here. */ - } - - /** - * Component Executor Implementation Class: Receiver_exec_i - */ - - Receiver_exec_i::Receiver_exec_i (void) - : no_operation_ (0) - , on_creation_ (0) - , on_many_update_ (0) - , on_many_upd_trigger_ (0) - , on_deletion_ (0) - , create_data_ (false) - , update_data_ (false) - , reader_data_ (0) - , samples_read_ (0) - { - ACE_NEW_THROW_EX (this->ticker_, - read_action_Generator (*this), - ::CORBA::NO_MEMORY ()); - } - - Receiver_exec_i::~Receiver_exec_i (void) - { - delete this->ticker_; - } - - // Supported operations and attributes. - ACE_Reactor* - Receiver_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; - } - - void - Receiver_exec_i::read_all (void) - { - ::SL_ManyByMany::SLManyByManyConnector::Reader_var reader = - this->ciao_context_->get_connection_info_out_data (); - - if ( ::CORBA::is_nil (reader.in ())) - { - ACE_ERROR ((LM_ERROR, "Receiver_exec_i::read_all - " - "Reader seems nil\n")); - return; - } - try - { - TestTopicSeq TestTopic_infos; - ::CCM_DDS::ReadInfoSeq readinfoseq; - reader->read_all (TestTopic_infos, readinfoseq); - this->reader_data_ += TestTopic_infos.length (); - for (CORBA::ULong i = 0; i < readinfoseq.length (); ++i) - { - ACE_Time_Value tv; - tv <<= readinfoseq[i].source_timestamp; - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ") - ACE_TEXT ("-> UTC date =%#T\n"), - &tv)); - } - for (CORBA::ULong i = 0; i < TestTopic_infos.length (); ++i) - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL info : ") - ACE_TEXT ("Number <%d> : received TestTopic_info for <%C> at %u\n"), - i, - TestTopic_infos[i].key.in (), - TestTopic_infos[i].x)); - } - } - catch (const CCM_DDS::InternalError& ) - { - ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::read_all - " - "internal error or no data\n")); - } - } - // Component attributes and port operations. - - ::SL_ManyByMany::SLManyByManyConnector::CCM_StateListener_ptr - Receiver_exec_i::get_info_out_data_listener (void) - { - if ( ::CORBA::is_nil (this->ciao_info_out_data_listener_.in ())) - { - info_out_data_listener_exec_i *tmp = 0; - ACE_NEW_RETURN ( - tmp, - info_out_data_listener_exec_i ( - this->ciao_context_.in (), - this->no_operation_, - this->on_creation_, - this->on_many_update_, - this->on_many_upd_trigger_, - this->on_deletion_, - this->create_data_, - this->update_data_, - this->samples_read_), - ::SL_ManyByMany::SLManyByManyConnector::CCM_StateListener::_nil ()); - - this->ciao_info_out_data_listener_ = tmp; - } - - return - ::SL_ManyByMany::SLManyByManyConnector::CCM_StateListener::_duplicate ( - this->ciao_info_out_data_listener_.in ()); - } - - ::CCM_DDS::CCM_PortStatusListener_ptr - Receiver_exec_i::get_info_out_status (void) - { - if ( ::CORBA::is_nil (this->ciao_info_out_status_.in ())) - { - info_out_status_exec_i *tmp = 0; - ACE_NEW_RETURN ( - tmp, - info_out_status_exec_i ( - this->ciao_context_.in ()), - ::CCM_DDS::CCM_PortStatusListener::_nil ()); - - this->ciao_info_out_status_ = tmp; - } - - return - ::CCM_DDS::CCM_PortStatusListener::_duplicate ( - this->ciao_info_out_status_.in ()); - } - - // Operations from Components::SessionComponent. - - void - Receiver_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->ciao_context_ = - ::SL_ManyByMany::CCM_Receiver_Context::_narrow (ctx); - - if ( ::CORBA::is_nil (this->ciao_context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - Receiver_exec_i::configuration_complete (void) - { - /* Your code here. */ - } - - void - Receiver_exec_i::ccm_activate (void) - { - ::CCM_DDS::StateListenerControl_var lc = - this->ciao_context_->get_connection_info_out_data_control (); - - if (::CORBA::is_nil (lc.in ())) - { - ACE_ERROR ((LM_INFO, "Receiver_exec_i::ccm_activate - " - "ERROR: Listener control receptacle is null!\n")); - throw ::CORBA::INTERNAL (); - } - - lc->mode (::CCM_DDS::MANY_BY_MANY); - if (this->reactor ()->schedule_timer (this->ticker_, - 0, - ACE_Time_Value(18, 0), - ACE_Time_Value(1, 0)) == -1) - // ACE_Time_Value(1, 0), - // ACE_Time_Value(1, 0)) == -1) - { - ACE_ERROR ((LM_INFO, "Receiver_exec_i::ccm_activate - " - "ERROR: Unable to schedule timer!\n")); - } - } - - void - Receiver_exec_i::ccm_passivate (void) - { - this->reactor ()->cancel_timer (this->ticker_); - } - - void - Receiver_exec_i::ccm_remove (void) - { - if (this->no_operation_.value () > 0) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: did receive an unexpected ") - ACE_TEXT ("operation 'on_one_update' from ") - ACE_TEXT ("StateListener in Receiver\n") - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: did not receive an unexpected ") - ACE_TEXT ("operation 'on_one_update' from ") - ACE_TEXT ("StateListener in Receiver\n") - )); - } - - if (this->on_creation_.value () != ON_CREATION_EXPECTED) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ") - ACE_TEXT ("number of 'on_creation' calls: ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_CREATION_EXPECTED, - this->on_creation_.value () - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: did receive the expected ") - ACE_TEXT ("number of 'on_creation' calls: ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_CREATION_EXPECTED, - this->on_creation_.value () - )); - } - - if (!this->create_data_ .value ()) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ") - ACE_TEXT ("sample in 'on_creation' from ") - ACE_TEXT ("StateListener in Receiver\n") - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: did receive the expected ") - ACE_TEXT ("sample in 'on_creation' from ") - ACE_TEXT ("StateListener in Receiver\n") - )); - } - - if(this->on_many_upd_trigger_.value () < ON_MANY_TRIGGERED) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't trigger the expected ") - ACE_TEXT ("number of 'on_many_update': ") - ACE_TEXT ("expected minimum <%d> - received <%d>\n"), - ON_MANY_TRIGGERED, - this->on_many_upd_trigger_.value () - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: did trigger the minimum expected ") - ACE_TEXT ("number of 'on_many_update': ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_MANY_TRIGGERED, - this->on_many_upd_trigger_.value () - )); - } - if(this->on_many_update_.value () != ON_MANY_EXPECTED) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ") - ACE_TEXT ("number of 'on_many_update' samples: ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_MANY_EXPECTED, - this->on_many_update_.value () - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: did receive the expected ") - ACE_TEXT ("number of 'on_many_update' samples: ") - ACE_TEXT ("expected <%d> - received <%d>, ") - ACE_TEXT ("on_many_update triggered at <%d> times.\n"), - ON_MANY_EXPECTED, - this->on_many_update_.value (), - ON_MANY_TRIGGERED - )); - } - - if (!this->update_data_.value ()) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR:didn't receive the expected ") - ACE_TEXT (" data with 'on_many_updates' from ") - ACE_TEXT ("StateListener in Receiver\n") - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: did receive the expected ") - ACE_TEXT ("sample in 'on_many_updates' from ") - ACE_TEXT ("StateListener in Receiver\n") - )); - } - - if (this->on_deletion_.value () != ON_DELETION_EXPECTED) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't receive the expected ") - ACE_TEXT ("number of 'on_deletion' calls: ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_DELETION_EXPECTED, - this->on_deletion_.value () - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: did receive the expected ") - ACE_TEXT ("number of 'on_deletion' calls: ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_DELETION_EXPECTED, - this->on_deletion_.value () - )); - } - - if (this->reader_data_.value () != ON_READER_EXPECTED) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: didn't read the expected ") - ACE_TEXT ("number of samples: ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_READER_EXPECTED, - this->reader_data_.value () - )); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: read the expected ") - ACE_TEXT ("number of samples: ") - ACE_TEXT ("expected <%d> - received <%d>\n"), - ON_READER_EXPECTED, - this->reader_data_.value () - )); - } - if (this->samples_read_.value () == 0) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: read no samples\n"))); - } - else - { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("OK: read <%u> samples\n"), - this->samples_read_.value ())); - } - } - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_SL_ManyByMany_Receiver_Impl (void) - { - ::Components::EnterpriseComponent_ptr retval = - ::Components::EnterpriseComponent::_nil (); - - ACE_NEW_NORETURN ( - retval, - Receiver_exec_i); - - return retval; - } -} diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.h deleted file mode 100644 index 03cb9f7ed7e..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Receiver/SL_ManyByMany_Receiver_exec.h +++ /dev/null @@ -1,208 +0,0 @@ -// -*- C++ -*- -#ifndef CIAO_SL_MANYBYMANY_RECEIVER_EXEC_4U4QJF_H_ -#define CIAO_SL_MANYBYMANY_RECEIVER_EXEC_4U4QJF_H_ - -#include /**/ "ace/pre.h" - -#include "SL_ManyByMany_ReceiverEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include /**/ "Receiver_exec_export.h" -#include "tao/LocalObject.h" - -namespace CIAO_SL_ManyByMany_Receiver_Impl -{ - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong > Atomic_Long; - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Bool; - - class Receiver_exec_i; - - /** - * Read action generator - */ - - class read_action_Generator - : public ACE_Event_Handler - { - public: - read_action_Generator (Receiver_exec_i &callback); - - ~read_action_Generator (); - - /// Handle the timeout. - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); - - private: - /// Maintains a handle that actually process the event - Receiver_exec_i &pulse_callback_; - - }; - - /** - * Provider Executor Implementation Class: info_out_data_listener_exec_i - */ - - class info_out_data_listener_exec_i - : public virtual ::SL_ManyByMany::SLManyByManyConnector::CCM_StateListener, - public virtual ::CORBA::LocalObject - { - public: - info_out_data_listener_exec_i ( - ::SL_ManyByMany::CCM_Receiver_Context_ptr ctx, - Atomic_Long &no_operation, - Atomic_Long &on_creation, - Atomic_Long &on_many_update, - Atomic_Long &on_many_upd_trigger, - Atomic_Long &on_deletion, - Atomic_Bool &create_data, - Atomic_Bool &update_data, - Atomic_Long &samples_read); - virtual ~info_out_data_listener_exec_i (void); - - //@{ - /** Operations and attributes from SL_ManyByMany::SLManyByManyConnector::StateListener. */ - - virtual - void on_creation (const ::TestTopic & datum, - const ::CCM_DDS::ReadInfo & info); - - virtual - void on_one_update (const ::TestTopic & datum, - const ::CCM_DDS::ReadInfo & info); - - virtual - void on_many_updates (const ::TestTopicSeq & data, - const ::CCM_DDS::ReadInfoSeq & infos); - - virtual - void on_deletion (const ::TestTopic & datum, - const ::CCM_DDS::ReadInfo & info); - //@} - - private: - ::SL_ManyByMany::CCM_Receiver_Context_var ciao_context_; - Atomic_Long &no_operation_; - Atomic_Long &on_creation_; - Atomic_Long &on_many_update_; - Atomic_Long &on_many_upd_trigger_; - Atomic_Long &on_deletion_; - Atomic_Bool &create_data_; - Atomic_Bool &update_data_; - Atomic_Long &samples_read_; - }; - - /** - * Provider Executor Implementation Class: info_out_status_exec_i - */ - - class info_out_status_exec_i - : public virtual ::CCM_DDS::CCM_PortStatusListener, - public virtual ::CORBA::LocalObject - { - public: - info_out_status_exec_i ( - ::SL_ManyByMany::CCM_Receiver_Context_ptr ctx); - virtual ~info_out_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: - ::SL_ManyByMany::CCM_Receiver_Context_var ciao_context_; - }; - - /** - * Component Executor Implementation Class: Receiver_exec_i - */ - - class Receiver_exec_i - : public virtual Receiver_Exec, - public virtual ::CORBA::LocalObject - { - public: - Receiver_exec_i (void); - virtual ~Receiver_exec_i (void); - - //@{ - /** Supported operations and attributes. */ - - //@} - - //@{ - /** Component attributes and port operations. */ - - virtual ::SL_ManyByMany::SLManyByManyConnector::CCM_StateListener_ptr - get_info_out_data_listener (void); - - virtual ::CCM_DDS::CCM_PortStatusListener_ptr - get_info_out_status (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); - //@} - - //@{ - /** User defined public operations. */ - void read_all(void); - - //@} - - private: - ::SL_ManyByMany::CCM_Receiver_Context_var ciao_context_; - - //@{ - /** Component attributes. */ - ::SL_ManyByMany::SLManyByManyConnector::CCM_StateListener_var ciao_info_out_data_listener_; - ::CCM_DDS::CCM_PortStatusListener_var ciao_info_out_status_; - //@} - - //@{ - /** User defined members. */ - read_action_Generator * ticker_; - - Atomic_Long no_operation_; - Atomic_Long on_creation_; - Atomic_Long on_many_update_; - Atomic_Long on_many_upd_trigger_; - Atomic_Long on_deletion_; - Atomic_Bool create_data_; - Atomic_Bool update_data_; - Atomic_Long reader_data_; - Atomic_Long samples_read_; - //@} - - //@{ - /** User defined private operations. */ - - //@} - - /// Get the ACE_Reactor - ACE_Reactor* reactor (void); - }; - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_SL_ManyByMany_Receiver_Impl (void); -} - -#include /**/ "ace/post.h" - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender.idl b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender.idl deleted file mode 100644 index b823417508f..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender.idl +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @author Marijke Hengstmengel (mhengstmengel@remedy.nl) - */ - -#ifndef DDS_SL_MANYBYMANY_SENDER_IDL -#define DDS_SL_MANYBYMANY_SENDER_IDL - -#include "Connector/SL_ManyByMany_Connector.idl" - -module SL_ManyByMany -{ - component Sender - { - port ::SL_ManyByMany::SLManyByManyConnector::DDS_Update test_topic_update; - provides CCM_DDS::ConnectorStatusListener test_topic_connector_status; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender.mpc b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender.mpc deleted file mode 100644 index 4b24d1979fe..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender.mpc +++ /dev/null @@ -1,138 +0,0 @@ -// This file is generated with "generate_component_mpc.pl -p DDS_SL_ManyByMany_Base -l ../lib -o ../lib -c controller -u DDS Sender" - -project(DDS_SL_ManyByMany_Sender_idl_gen) : componentidldefaults, dds4ccm { - after += DDS_SL_MBM_Connector_idl_gen - custom_only = 1 - idlflags += -Wb,stub_export_macro=SENDER_STUB_Export \ - -Wb,stub_export_include=Sender_stub_export.h \ - -Wb,skel_export_macro=SENDER_SVNT_Export \ - -Wb,skel_export_include=Sender_svnt_export.h \ - -Wb,svnt_export_macro=SENDER_SVNT_Export \ - -Wb,svnt_export_include=Sender_svnt_export.h \ - -Wb,exec_export_macro=SENDER_EXEC_Export \ - -Wb,exec_export_include=Sender_exec_export.h \ - -I.. - - IDL_Files { - SL_ManyByMany_Sender.idl - } -} - -project(DDS_SL_ManyByMany_Sender_lem_gen) : ciaoidldefaults, dds4ccm { - after += DDS_SL_ManyByMany_Sender_idl_gen - custom_only = 1 - idlflags += -Wb,stub_export_macro=SENDER_LEM_STUB_Export \ - -Wb,stub_export_include=Sender_lem_stub_export.h \ - -SS -Gxhst -I $CIAO_ROOT/connectors -I .. - - IDL_Files { - SL_ManyByMany_SenderE.idl - } -} - -project(DDS_SL_ManyByMany_Sender_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_SL_ManyByMany_Sender_lem_gen DDS_SL_ManyByMany_Sender_stub DDS_SL_ManyByMany_Base_stub - libs += DDS_SL_ManyByMany_Base_stub Sender_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Sender_lem_stub - dynamicflags += SENDER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_SenderEC.cpp - } - - Header_Files { - SL_ManyByMany_SenderEC.h - Sender_lem_stub_export.h - } - - Inline_Files { - SL_ManyByMany_SenderEC.inl - } -} - -project(DDS_SL_ManyByMany_Sender_stub) : ccm_stub, dds4ccm_base { - after += DDS_SL_ManyByMany_Sender_idl_gen DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub - libs += DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub - includes += .. - libpaths += ../lib - libout = ../lib - sharedname = Sender_stub - dynamicflags += SENDER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_SenderC.cpp - } - - Header_Files { - SL_ManyByMany_SenderC.h - Sender_stub_export.h - } - - Inline_Files { - SL_ManyByMany_SenderC.inl - } -} - -project(DDS_SL_ManyByMany_Sender_exec) : ciao_executor, dds4ccm_lem_stub { - after += DDS_SL_ManyByMany_Sender_lem_stub DDS_SL_ManyByMany_Sender_stub DDS_SL_MBM_Connector_lem_stub DDS_SL_ManyByMany_Connector_stub - sharedname = Sender_exec - libs += Sender_stub Sender_lem_stub DDS_SL_ManyByMany_Base_stub DDS_SL_MBM_Connector_lem_stub DDS_SL_ManyByMany_Connector_stub - libpaths += ../lib - includes += .. - libout = ../lib - dynamicflags += SENDER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_Sender_exec.cpp - } - - Header_Files { - SL_ManyByMany_Sender_exec.h - Sender_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_SL_ManyByMany_Sender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { - after += DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Sender_lem_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Connector_svnt DDS_SL_MBM_Connector_lem_stub - sharedname = Sender_svnt - libs += Sender_stub Sender_lem_stub \ - DDS_SL_ManyByMany_Base_stub DDS_SL_ManyByMany_Connector_stub DDS_SL_ManyByMany_Connector_svnt DDS_SL_MBM_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += SENDER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - SL_ManyByMany_SenderS.cpp - SL_ManyByMany_Sender_svnt.cpp - } - - Header_Files { - SL_ManyByMany_SenderS.h - SL_ManyByMany_Sender_svnt.h - Sender_svnt_export.h - } - - Inline_Files { - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender_exec.cpp deleted file mode 100644 index 95900c0c10e..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender_exec.cpp +++ /dev/null @@ -1,544 +0,0 @@ -// -*- C++ -*- -/** - * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 - * TAO and the TAO IDL Compiler have been developed by: - * Center for Distributed Object Computing - * Washington University - * St. Louis, MO - * USA - * http://www.cs.wustl.edu/~schmidt/doc-center.html - * and - * Distributed Object Computing Laboratory - * University of California at Irvine - * Irvine, CA - * USA - * and - * Institute for Software Integrated Systems - * Vanderbilt University - * Nashville, TN - * USA - * http://www.isis.vanderbilt.edu/ - * - * Information about TAO is available at: - * http://www.dre.vanderbilt.edu/~schmidt/TAO.html - **/ - -#include "SL_ManyByMany_Sender_exec.h" -#include "tao/ORB_Core.h" -#include "ace/Reactor.h" - -namespace CIAO_SL_ManyByMany_Sender_Impl -{ - /** - * Write action generator - */ - pulse_Generator::pulse_Generator (Sender_exec_i &callback) - : pulse_callback_ (callback) - { - } - - int - pulse_Generator::handle_timeout (const ACE_Time_Value &, const void *) - { - this->pulse_callback_.tick (); - return 0; - } - - /** - * ConnectorStatusListener_exec_i - */ - - ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i ( - Sender_exec_i &callback) - : callback_ (callback) - { - } - - ConnectorStatusListener_exec_i::~ConnectorStatusListener_exec_i (void) - { - } - - // Operations from ::CCM_DDS::ConnectorStatusListener - void ConnectorStatusListener_exec_i::on_inconsistent_topic ( - ::DDS::Topic_ptr /*the_topic*/, - const DDS::InconsistentTopicStatus & /*status*/) - { - } - - void ConnectorStatusListener_exec_i::on_requested_incompatible_qos ( - ::DDS::DataReader_ptr /*the_reader*/, - const DDS::RequestedIncompatibleQosStatus & /*status*/) - { - } - - void ConnectorStatusListener_exec_i::on_sample_rejected ( - ::DDS::DataReader_ptr /*the_reader*/, - const DDS::SampleRejectedStatus & /*status*/) - { - } - - void ConnectorStatusListener_exec_i::on_offered_deadline_missed( - ::DDS::DataWriter_ptr /*the_writer*/, - const DDS::OfferedDeadlineMissedStatus & /*status*/) - { - } - - void ConnectorStatusListener_exec_i::on_offered_incompatible_qos( - ::DDS::DataWriter_ptr /*the_writer*/, - const DDS::OfferedIncompatibleQosStatus & /*status*/) - { - } - - void ConnectorStatusListener_exec_i::on_unexpected_status( - ::DDS::Entity_ptr /*the_entity*/, - ::DDS::StatusKind status_kind) - { - if (status_kind == ::DDS::PUBLICATION_MATCHED_STATUS) - { - this->callback_.get_started (); - } - } - - - /** - * Component Executor Implementation Class: Sender_exec_i - */ - - Sender_exec_i::Sender_exec_i (void) - : test_nr_(UPDATE_CREATE) - , test_ok_(true) - , started_ (false) - { - ACE_NEW_THROW_EX (this->ticker_, - pulse_Generator (*this), - ::CORBA::NO_MEMORY ()); - } - - Sender_exec_i::~Sender_exec_i (void) - { - delete this->ticker_; - } - - ::CCM_DDS::CCM_ConnectorStatusListener_ptr - Sender_exec_i::get_test_topic_connector_status (void) - { - return new ConnectorStatusListener_exec_i (*this); - } - - // Supported operations and attributes. - ACE_Reactor* - Sender_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; - } - - ::CORBA::Boolean - Sender_exec_i::create_one (void) - { - TestTopic i = this->topic_seq_one_[0]; - try - { - ::SL_ManyByMany::SLManyByManyConnector::Updater_var updater = - this->ciao_context_->get_connection_test_topic_update_data (); - if (::CORBA::is_nil (updater.in ())) - { - ACE_ERROR ((LM_ERROR, "Sender_exec_i::create_one - " - "ERROR: Updater seems nil\n")); - return false; - } - updater->create_one (i); - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("SL_ManyByMany: create_one with instance key ") - ACE_TEXT (" <%C>\n"), - i.key.in ())); - } - catch (const CCM_DDS::AlreadyCreated &) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: AlreadyCreated ") - ACE_TEXT ("with test updater create_one <%C>.\n"), - i.key.in ())); - return false; - } - catch (const CCM_DDS::InternalError& ) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("Internal Error while create_one for <%C>.\n"), - i.key.in ())); - return false; - } - return true; - } - - ::CORBA::Boolean - Sender_exec_i::update_one (void) - { - //update already created instance with handle nil - TestTopic i = this->topic_seq_one_[0]; - try - { - ::SL_ManyByMany::SLManyByManyConnector::Updater_var updater = - this->ciao_context_->get_connection_test_topic_update_data (); - if (::CORBA::is_nil (updater.in ())) - { - ACE_ERROR ((LM_ERROR, "Sender_exec_i::update_one - " - "ERROR: Updater seems nil\n")); - return false; - } - i.x++; - updater->update_one (i, DDS::HANDLE_NIL); - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("Updater: update_one with already existing ") - ACE_TEXT ("instance with DDS::HANDLE_NIL, key <%C>\n"), - i.key.in ())); - } - catch (const CCM_DDS::NonExistent &) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent ") - ACE_TEXT ("with test updater update_one <%C>.\n"), - i.key.in ())); - return false; - } - catch (const CCM_DDS::InternalError& ) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("Internal Error while update_one for <%C>.\n"), - i.key.in ())); - return false; - } - return true; - } - - ::CORBA::Boolean - Sender_exec_i::delete_one (void) - { - //delete registered instance with DDS::HANDLE_NIL - TestTopic i = this->topic_seq_one_[0]; - try - { - ::SL_ManyByMany::SLManyByManyConnector::Updater_var updater = - this->ciao_context_->get_connection_test_topic_update_data (); - if (::CORBA::is_nil (updater.in ())) - { - ACE_ERROR ((LM_ERROR, "Sender_exec_i::delete_one - " - "ERROR: Updater seems nil\n")); - return false; - } - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: delete_one with registered ") - ACE_TEXT ("instance with DDS::HANDLE_NIL, ") - ACE_TEXT ("key <%C>\n"), - i.key.in ())); - updater->delete_one(i, DDS::HANDLE_NIL); - } - catch (const CCM_DDS::NonExistent &) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent ") - ACE_TEXT ("with test updater delete_one <%C>.\n"), - i.key.in ())); - return false; - } - catch (const CCM_DDS::InternalError& ) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("Internal Error while delete_one for <%C>.\n"), - i.key.in ())); - return false; - } - return true; - } - - ::CORBA::Boolean - Sender_exec_i::create_many (void) - { - //create many with no exception - try - { - ::SL_ManyByMany::SLManyByManyConnector::Updater_var updater = - this->ciao_context_->get_connection_test_topic_update_data (); - if (::CORBA::is_nil (updater.in ())) - { - ACE_ERROR ((LM_ERROR, "Sender_exec_i::create_many - " - "ERROR: Updater seems nil\n")); - return false; - } - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("create_many : <%u> samples\n"), - this->topic_seq_many_.length ())); - updater->create_many (this->topic_seq_many_); - } - catch (const CCM_DDS::NonExistent& ) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: ") - ACE_TEXT ("NonExistent with test updater create_many\n"))); - return false; - } - catch (const CCM_DDS::InternalError& ex) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") - ACE_TEXT ("in updater: create_many: index <%d> - retval <%d>\n"), - ex.index, ex.error_code)); - return false; - - } - return true; - } - - ::CORBA::Boolean - Sender_exec_i::update_many (void) - { - try - { - ::SL_ManyByMany::SLManyByManyConnector::Updater_var updater = - this->ciao_context_->get_connection_test_topic_update_data (); - if (::CORBA::is_nil (updater.in ())) - { - ACE_ERROR ((LM_ERROR, "Sender_exec_i::update_many - " - "ERROR: Updater seems nil\n")); - return false; - } - for(CORBA::ULong i = 0; i < this->topic_seq_many_.length(); i++) - { - this->topic_seq_many_[i].x= i+ 10; - } - updater->update_many (this->topic_seq_many_); - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("update_many : written <%u> samples\n"), - this->topic_seq_many_.length ())); - updater->is_coherent_write (false); - - } - catch (const CCM_DDS::NonExistent& ) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater update_many.\n"))); - return false; - } - catch (const CCM_DDS::InternalError& ex) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") - ACE_TEXT ("with update_many: index <%d> - retval <%d>\n"), - ex.index, ex.error_code)); - return false; - } - return true; - } - - ::CORBA::Boolean - Sender_exec_i::delete_many (void) - { - try - { - ::SL_ManyByMany::SLManyByManyConnector::Updater_var updater = - this->ciao_context_->get_connection_test_topic_update_data (); - if (::CORBA::is_nil (updater.in ())) - { - ACE_ERROR ((LM_ERROR, "Sender_exec_i::delete_many - " - "ERROR: Updater seems nil\n")); - return false; - } - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_many : deleted <%u> samples\n"), - this->topic_seq_many_.length ())); - updater->delete_many (this->topic_seq_many_); - } - catch (const CCM_DDS::NonExistent& ) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent ") - ACE_TEXT ("with test updater delete_many\n"))); - return false; - } - catch (const CCM_DDS::InternalError& ex) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") - ACE_TEXT ("with test updater delete_many:") - ACE_TEXT ("index <%d> - retval <%d>\n"), - ex.index, ex.error_code)); - return false; - } - - return true; - } - - void - Sender_exec_i::add_instances_of_topic (void) - { - CORBA::UShort total = 3; - this->topic_seq_one_.length (total); - //sequence for tests with .._one - for (int i = 1; i < (total + 1); i++) - { - char key[7]; - TestTopic new_key; - ACE_OS::sprintf (key, "KEY_%d", i); - new_key.key = CORBA::string_dup(key); - new_key.x = i; - this->topic_seq_one_[i-1] = new_key; - } - //sequence for tests with .._many - this->topic_seq_many_.length (total); - for (int i = 1; i < (total + 1); i++) - { - char key[7]; - TestTopic new_key; - ACE_OS::sprintf (key, "many_%d", i); - new_key.key = CORBA::string_dup(key); - new_key.x = i; - this->topic_seq_many_[i-1] = new_key; - } - } - - void - Sender_exec_i::tick (void) - { - if (this->test_ok_.value ()) - { - switch (this->test_nr_) - { - case UPDATE_CREATE: - this->test_ok_ = this->create_one (); - if(this->test_ok_.value ()) - { - this->test_nr_ = UPDATE_ONE; - } - else - { - this->test_nr_ = END_TEST; - } - break; - case UPDATE_ONE: - this->test_ok_ = this->update_one (); - this->test_nr_ = DELETE_ONE; - break; - case DELETE_ONE: - this->test_ok_ = this->delete_one (); - this->test_nr_ = CREATE_MANY; - break; - case CREATE_MANY: - this->test_ok_ = this->create_many (); - if(this->test_ok_.value ()) - { - this->test_nr_ = UPDATE_MANY; - } - else - { - this->test_nr_ = END_TEST; - } - this->test_nr_ = UPDATE_MANY; - break; - case UPDATE_MANY: - this->test_ok_ = this->update_many (); - this->test_nr_ = DELETE_MANY; - break; - case DELETE_MANY: - this->test_ok_ = this->delete_many (); - this->test_nr_ = END_TEST; - break; - default: - break; - } - } - } - - void - Sender_exec_i::get_started (void) - { - this->started_ = true; - this->add_instances_of_topic (); - this->start (); - } - - void - Sender_exec_i::start (void) - { - long sec = 2L; - long const usec = 0L; - if (this->reactor ()->schedule_timer ( - this->ticker_, - 0, - ACE_Time_Value (sec, usec), - ACE_Time_Value (sec, usec)) == -1) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ") - ACE_TEXT ("Error scheduling timer"))); - } - } - - void - Sender_exec_i::stop (void) - { - this->reactor ()->cancel_timer (this->ticker_); - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Sender_exec_i::stop : Timer canceled.\n"))); - } - - // Component attributes and port operations. - - // Operations from Components::SessionComponent. - - void - Sender_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->ciao_context_ = - ::SL_ManyByMany::CCM_Sender_Context::_narrow (ctx); - - if ( ::CORBA::is_nil (this->ciao_context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - Sender_exec_i::configuration_complete (void) - { - /* Your code here. */ - } - - void - Sender_exec_i::ccm_activate (void) - { - /* Your code here. */ - } - - void - Sender_exec_i::ccm_passivate (void) - { - this->stop (); - - if (!this->started_) - { - ACE_ERROR ((LM_ERROR, - "Sender_exec_i::ccm_passivate - " - "ERROR: No publication matched received. " - "Test didn't run\n")); - } - } - - void - Sender_exec_i::ccm_remove (void) - { - /* Your code here. */ - } - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_SL_ManyByMany_Sender_Impl (void) - { - ::Components::EnterpriseComponent_ptr retval = - ::Components::EnterpriseComponent::_nil (); - - ACE_NEW_NORETURN ( - retval, - Sender_exec_i); - - return retval; - } -} diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender_exec.h deleted file mode 100644 index 0c5b23f1ad4..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/Sender/SL_ManyByMany_Sender_exec.h +++ /dev/null @@ -1,187 +0,0 @@ -// -*- C++ -*- -/** - * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 - * TAO and the TAO IDL Compiler have been developed by: - * Center for Distributed Object Computing - * Washington University - * St. Louis, MO - * USA - * http://www.cs.wustl.edu/~schmidt/doc-center.html - * and - * Distributed Object Computing Laboratory - * University of California at Irvine - * Irvine, CA - * USA - * and - * Institute for Software Integrated Systems - * Vanderbilt University - * Nashville, TN - * USA - * http://www.isis.vanderbilt.edu/ - * - * Information about TAO is available at: - * http://www.dre.vanderbilt.edu/~schmidt/TAO.html - **/ -#ifndef CIAO_SL_MANYBYMANY_SENDER_EXEC_6XMS37_H_ -#define CIAO_SL_MANYBYMANY_SENDER_EXEC_6XMS37_H_ - -#include /**/ "ace/pre.h" - -#include "SL_ManyByMany_SenderEC.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include /**/ "Sender_exec_export.h" -#include "tao/LocalObject.h" - -namespace CIAO_SL_ManyByMany_Sender_Impl -{ - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Boolean; - - class Sender_exec_i; - - enum UPDATER_TEST { - UPDATE_CREATE, - UPDATE_ONE, - DELETE_ONE, - CREATE_MANY, - UPDATE_MANY, - DELETE_MANY, - END_TEST - }; - - /** - * Write action generator - */ - - class pulse_Generator : - public ACE_Event_Handler - { - public: - pulse_Generator (Sender_exec_i &callback); - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); - private: - Sender_exec_i &pulse_callback_; - }; - - /** - * ConnectorStatusListener_exec_i - */ - - class ConnectorStatusListener_exec_i - : public virtual ::CCM_DDS::CCM_ConnectorStatusListener, - public virtual ::CORBA::LocalObject - { - public: - ConnectorStatusListener_exec_i (Sender_exec_i &callback); - virtual ~ConnectorStatusListener_exec_i (void); - - virtual - void on_inconsistent_topic (::DDS::Topic_ptr the_topic, - const DDS::InconsistentTopicStatus & status); - virtual - void on_requested_incompatible_qos (::DDS::DataReader_ptr the_reader, - const DDS::RequestedIncompatibleQosStatus & status); - virtual - void on_sample_rejected (::DDS::DataReader_ptr the_reader, - const DDS::SampleRejectedStatus & status); - virtual - void on_offered_deadline_missed (::DDS::DataWriter_ptr the_writer, - const DDS::OfferedDeadlineMissedStatus & status); - virtual - void on_offered_incompatible_qos (::DDS::DataWriter_ptr the_writer, - const DDS::OfferedIncompatibleQosStatus & status); - virtual - void on_unexpected_status (::DDS::Entity_ptr the_entity, - ::DDS::StatusKind status_kind); - private: - Sender_exec_i &callback_; - }; - - /** - * Component Executor Implementation Class: Sender_exec_i - */ - - class Sender_exec_i - : public virtual Sender_Exec, - public virtual ::CORBA::LocalObject - { - public: - Sender_exec_i (void); - virtual ~Sender_exec_i (void); - - //@{ - /** Supported operations and attributes. */ - - //@} - - //@{ - /** Component attributes and port operations. */ - virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr - get_test_topic_connector_status (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); - //@} - - //@{ - /** User defined public operations. */ - void get_started (void); - void tick (void); - //@} - - private: - ::SL_ManyByMany::CCM_Sender_Context_var ciao_context_; - - //@{ - /** Component attributes. */ - //@} - - //@{ - /** User defined members. */ - pulse_Generator * ticker_; - - UPDATER_TEST test_nr_; - Atomic_Boolean test_ok_; - - TestTopicSeq topic_seq_one_; - TestTopicSeq topic_seq_many_; - - bool started_; - //@} - - //@{ - /** User defined private operations. */ - void start (void); - void stop (void); - void add_instances_of_topic (void); - - ::CORBA::Boolean create_one (void); - ::CORBA::Boolean update_one (void); - ::CORBA::Boolean delete_one (void); - ::CORBA::Boolean create_many (void); - ::CORBA::Boolean update_many (void); - ::CORBA::Boolean delete_many (void); - - //@} - - /// Get the ACE_Reactor - ACE_Reactor* reactor (void); - }; - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_SL_ManyByMany_Sender_Impl (void); -} - -#include /**/ "ace/post.h" - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/Plan.cdp deleted file mode 100644 index 8ec10347d57..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/Plan.cdp +++ /dev/null @@ -1,407 +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>SL_ManyByMany_Depl_1</label> - <UUID>SL_ManyByMany_Depl_1</UUID> - - <implementation xmi:id="ReceiverComponentImplementation"> - <name>ReceiverComponentImplementation</name> - <source/> - <artifact xmi:idref="Receiver_ExecArtifact" /> - <artifact xmi:idref="Receiver_SvntArtifact" /> - <execParameter> - <!-- entrypoint as exec parameter (see 10.6.1) --> - <name>component factory</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_SL_ManyByMany_Receiver_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_SL_ManyByMany_Receiver_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Receiver_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Receiver_exec</string> - </value> - </value> - </execParameter> - </implementation> - - <implementation xmi:id="SL_ManyByMany_ConnectorComponentImplementation"> - <name>SL_ManyByMany_ConnectorComponentImplementation</name> - <source/> - <artifact xmi:idref="SL_ManyByMany_Connector_ExecArtifact" /> - <artifact xmi:idref="SL_ManyByMany_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_SL_ManyByMany_SLManyByManyConnector_DDS_State_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_SL_ManyByMany_SLManyByManyConnector_DDS_State_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>SL_ManyByMany_Connector_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>SL_ManyByMany_Connector_exec</string> - </value> - </value> - </execParameter> - </implementation> - - <implementation xmi:id="SenderComponentImplementation"> - <name>SenderComponentImplementation</name> - <source/> - <artifact xmi:idref="Sender_ExecArtifact" /> - <artifact xmi:idref="Sender_SvntArtifact" /> - <execParameter> - <!-- entrypoint as exec parameter (see 10.6.1) --> - <name>component factory</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_SL_ManyByMany_Sender_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_SL_ManyByMany_Sender_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Sender_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Sender_exec</string> - </value> - </value> - </execParameter> - </implementation> - <instance xmi:id="ReceiverComponentInstance"> - <name>ReceiverComponent</name> - <node>ReceiverNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="ReceiverComponentImplementation" /> - </instance> - <instance xmi:id="SL_ManyByMany_ConnectorComponentInstance"> - <name>SL_ManyByMany_ConnectorComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="SL_ManyByMany_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>TestQoS</string> - </value> - </value> - </configProperty> - <configProperty> - <name>qos_profile</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>SlMbM_Library#SlMbMProfile</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="SL_ManyByMany_ConnectorComponentInstance2"> - <name>SL_ManyByMany_ConnectorComponent2</name> - <node>ReceiverNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="SL_ManyByMany_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>TestQoS</string> - </value> - </value> - </configProperty> - <configProperty> - <name>qos_profile</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>SlMbM_Library#SlMbMProfile</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="SenderComponentInstance"> - <name>SenderComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="SenderComponentImplementation" /> - </instance> - - <connection> - <name>_listenercontrol</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_out_data_control</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="ReceiverComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>push_state_observer_data_control</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SL_ManyByMany_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - <connection> - <name>_statelistener</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_out_data_listener</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="ReceiverComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>push_state_observer_data_listener</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SL_ManyByMany_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - <connection> - <name>_portstatuslistener</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_out_status</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="ReceiverComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>push_state_observer_status</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SL_ManyByMany_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - <connection> - <name>info_out_data</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_out_data</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="ReceiverComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>push_state_observer_data</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SL_ManyByMany_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - <connection> - <name>updater_connection</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>test_topic_update_data</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SenderComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>observable_data</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SL_ManyByMany_ConnectorComponentInstance" /> - </internalEndpoint> - </connection> - <connection> - <name>test_topic_connector_status_sender</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>test_topic_connector_status</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="SenderComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>error_listener</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SL_ManyByMany_ConnectorComponentInstance" /> - </internalEndpoint> - </connection> - - <artifact xmi:id="Sender_ExecArtifact"> - <name>Sender_exec</name> - <source/> - <node/> - <location>Sender_exec</location> - </artifact> - <artifact xmi:id="Sender_SvntArtifact"> - <name>Sender_svnt</name> - <source/> - <node/> - <location>Sender_svnt</location> - </artifact> - <artifact xmi:id="Sender_StubArtifact"> - <name>Sender_stub</name> - <source/> - <node/> - <location>Sender_stub</location> - </artifact> - <artifact xmi:id="SL_ManyByMany_Connector_ExecArtifact"> - <name>SL_ManyByMany_Connector_exec</name> - <source/> - <node/> - <location>DDS_SL_ManyByMany_Connector_exec</location> - </artifact> - <artifact xmi:id="SL_ManyByMany_Connector_SvntArtifact"> - <name>SL_ManyByMany_Connector_svnt</name> - <source/> - <node/> - <location>DDS_SL_ManyByMany_Connector_svnt</location> - </artifact> - <artifact xmi:id="SL_ManyByMany_Connector_StubArtifact"> - <name>SL_ManyByMany_Connector_stub</name> - <source/> - <node/> - <location>DDS_SL_ManyByMany_Connector_stub</location> - </artifact> - <artifact xmi:id="Receiver_ExecArtifact"> - <name>Receiver_exec</name> - <source/> - <node/> - <location>Receiver_exec</location> - </artifact> - <artifact xmi:id="Receiver_SvntArtifact"> - <name>Receiver_svnt</name> - <source/> - <node/> - <location>Receiver_svnt</location> - </artifact> - <artifact xmi:id="Receiver_StubArtifact"> - <name>Receiver_stub</name> - <source/> - <node/> - <location>Receiver_stub</location> - </artifact> -</Deployment:DeploymentPlan> diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/SlMbM_Library.xml b/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/SlMbM_Library.xml deleted file mode 100644 index 2080a71ca1e..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/SlMbM_Library.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- --> - -<dds xmlns="http://www.omg.org/dds" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.omg.org/dds dds_qos.xsd"> - - <qos_profile name="SlMbMProfile"> - <!-- QoS used to configure the data writer created in the example code --> - <datawriter_qos> - <reliability> - <kind>RELIABLE_RELIABILITY_QOS</kind> - <max_blocking_time> - <sec>10</sec> - <nanosec>0</nanosec> - </max_blocking_time> - </reliability> - <history> - <kind>KEEP_ALL_HISTORY_QOS</kind> - </history> - <resource_limits> - <max_instances>4</max_instances> - <initial_instances>4</initial_instances> - <max_samples>25</max_samples> - <initial_samples>10</initial_samples> - <max_samples_per_instance>5</max_samples_per_instance> - </resource_limits> - </datawriter_qos> - <!-- QoS used to configure the data reader created in the example code --> - <datareader_qos> - <reliability> - <kind>RELIABLE_RELIABILITY_QOS</kind> - </reliability> - <history> - <kind>KEEP_ALL_HISTORY_QOS</kind> - </history> - <resource_limits> - <max_instances>4</max_instances> - <initial_instances>4</initial_instances> - <max_samples>25</max_samples> - <initial_samples>10</initial_samples> - <max_samples_per_instance>5</max_samples_per_instance> - </resource_limits> - </datareader_qos> - </qos_profile> -</dds>
\ No newline at end of file diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/USER_QOS_PROFILES.xml b/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/USER_QOS_PROFILES.xml deleted file mode 100644 index ab40e123e60..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/USER_QOS_PROFILES.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<!-- --> - -<!-- - -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 environment 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="SlMbM_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="SlMbMProfile" is_default_qos="false"> - <!-- QoS used to configure the data writer created in the example code --> - <datawriter_qos> - <reliability> - <kind>RELIABLE_RELIABILITY_QOS</kind> - <max_blocking_time> - <sec>10</sec> - <nanosec>0</nanosec> - </max_blocking_time> - </reliability> - <history> - <kind>KEEP_ALL_HISTORY_QOS</kind> - </history> - <resource_limits> - <max_instances>4</max_instances> - <initial_instances>4</initial_instances> - <max_samples>25</max_samples> - <initial_samples>10</initial_samples> - <max_samples_per_instance>5</max_samples_per_instance> - </resource_limits> - <protocol> - <rtps_reliable_writer> - <max_heartbeat_retries>10</max_heartbeat_retries> - </rtps_reliable_writer> - <serialize_key_with_dispose>BOOLEAN_TRUE</serialize_key_with_dispose> - </protocol> - </datawriter_qos> - <!-- QoS used to configure the data reader created in the example code --> - <datareader_qos> - <reliability> - <kind>RELIABLE_RELIABILITY_QOS</kind> - </reliability> - <history> - <kind>KEEP_ALL_HISTORY_QOS</kind> - </history> - <resource_limits> - <max_instances>4</max_instances> - <initial_instances>4</initial_instances> - <max_samples>25</max_samples> - <initial_samples>10</initial_samples> - <max_samples_per_instance>5</max_samples_per_instance> - </resource_limits> - <protocol> - <propagate_dispose_of_unregistered_instances>BOOLEAN_TRUE</propagate_dispose_of_unregistered_instances> - </protocol> - </datareader_qos> - </qos_profile> - </qos_library> -</dds> diff --git a/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/SLManyByMany/descriptors/run_test.pl deleted file mode 100755 index c5b1964e047..00000000000 --- a/CIAO/connectors/dds4ccm/tests/SLManyByMany/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 = 2; -@ports = ( 60001, 60002 ); -@iorbases = ( "NodeApp1.ior", "NodeApp2.ior" ); -@iorfiles = 0; -@nodenames = ( "SenderNode", "ReceiverNode" ); - -# 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; |