diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests/UnkeyedSamples')
19 files changed, 0 insertions, 2339 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/.gitignore b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/.gitignore deleted file mode 100644 index 502167fa0b8..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/lib diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Base/Unkeyed_Test_Base.idl b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Base/Unkeyed_Test_Base.idl deleted file mode 100644 index 42a3dad6ae0..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Base/Unkeyed_Test_Base.idl +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @file Unkeyed_Test_Base.idl - * @author Marcel Smit (msmit@remedy.nl) - */ - -#ifndef UNKEYED_TEST_BASE_IDL -#define UNKEYED_TEST_BASE_IDL - -#pragma ndds typesupport "Base/Unkeyed_Test_BaseSupport.h" -#pragma opendds typesupport "Base/Unkeyed_Test_BaseTypeSupportImpl.h" - -#pragma DCPS_DATA_TYPE "UnkeyedTest" - -struct UnkeyedTest { - string key; - long iteration; -}; - -#if defined DDS4CCM_NEEDS_SEQUENCES_DEFINED -typedef sequence<UnkeyedTest> UnkeyedTestSeq; -#endif - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Base/Unkeyed_Test_Base.mpc b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Base/Unkeyed_Test_Base.mpc deleted file mode 100644 index a82c8c37555..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Base/Unkeyed_Test_Base.mpc +++ /dev/null @@ -1,24 +0,0 @@ -project (DDS_Unkeyed_Test_Base_stub) : taoidldefaults, dds4ccm_ts_default { - sharedname = DDS_Unkeyed_Test_Base_stub - dynamicflags += UNKEYED_TEST_BASE_STUB_BUILD_DLL - libout = ../lib - - idlflags += -SS -Sci \ - -Wb,stub_export_macro=UNKEYED_TEST_BASE_STUB_Export \ - -Wb,stub_export_include=Unkeyed_Test_Base_stub_export.h - - IDL_Files { - idlflags += -Gxhst - Unkeyed_Test_Base.idl - } - - opendds_ts_flags += --export=UNKEYED_TEST_BASE_STUB_Export - - DDSGenerator_Files { - Unkeyed_Test_Base.idl - } - - Source_Files { - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/.gitignore b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/.gitignore deleted file mode 100644 index 1d95bf64721..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/Unkeyed_Test_ConnectorE.idl -/Unkeyed_Test_Connector_conn.cpp -/Unkeyed_Test_Connector_conn.h -/Unkeyed_Test_Connector_conn_export.h -/Unkeyed_Test_Connector_lem_stub_export.h -/Unkeyed_Test_Connector_stub_export.h -/Unkeyed_Test_Connector_svnt_export.h diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/Unkeyed_Test_Connector.idl b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/Unkeyed_Test_Connector.idl deleted file mode 100644 index 807df77e543..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/Unkeyed_Test_Connector.idl +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @file Unkeyed_Test_Connector.idl - * @author Marcel Smit (msmit@remedy.nl) - */ - -#ifndef UNKEYED_TEST_CONNECTOR_IDL_ -#define UNKEYED_TEST_CONNECTOR_IDL_ - -#include <Components.idl> -#include <ccm_dds.idl> - -#include "Base/Unkeyed_Test_Base.idl" - -#pragma ciao lem "Connector/Unkeyed_Test_ConnectorE.idl" - -#if (CIAO_DDS4CCM_OPENDDS==1) -# include "Base/Unkeyed_Test_BaseTypeSupport.idl" -#endif - -module Unkeyed_Test -{ - module ::CCM_DDS::Typed < ::UnkeyedTest, ::UnkeyedTestSeq> UnkeyedTestConnector; -}; - -#endif /* Unkeyed_Test_CONNECTOR_IDL_ */ diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/Unkeyed_Test_Connector.mpc b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/Unkeyed_Test_Connector.mpc deleted file mode 100644 index 3a7a7dc1310..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Connector/Unkeyed_Test_Connector.mpc +++ /dev/null @@ -1,146 +0,0 @@ -// This file is generated with "generate_component_mpc.pl -p DDS_Unkeyed_Test_Base -l .. -o ../lib -u DDS Unkeyed_Test_Connector" - -project(DDS_Unkeyed_Test_Connector_idl_gen) : connectoridldefaults, dds4ccm { - after += DDS4CCM_idl_gen DDS_Unkeyed_Test_Base_stub - custom_only = 1 - idlflags += -Wb,stub_export_macro=UNKEYED_TEST_CONNECTOR_STUB_Export \ - -Wb,stub_export_include=Unkeyed_Test_Connector_stub_export.h \ - -Wb,skel_export_macro=UNKEYED_TEST_CONNECTOR_SVNT_Export \ - -Wb,skel_export_include=Unkeyed_Test_Connector_svnt_export.h \ - -Wb,svnt_export_macro=UNKEYED_TEST_CONNECTOR_SVNT_Export \ - -Wb,svnt_export_include=Unkeyed_Test_Connector_svnt_export.h \ - -Wb,conn_export_macro=UNKEYED_TEST_CONNECTOR_CONN_Export \ - -Wb,conn_export_include=Unkeyed_Test_Connector_conn_export.h \ - -I .. - - IDL_Files { - Unkeyed_Test_Connector.idl - } -} - -project(DDS_Unkeyed_Test_Connector_lem_gen) : ciaoidldefaults, dds4ccm { - custom_only = 1 - after += DDS_Unkeyed_Test_Connector_idl_gen - idlflags += -Wb,stub_export_macro=UNKEYED_TEST_CONNECTOR_LEM_STUB_Export \ - -Wb,stub_export_include=Unkeyed_Test_Connector_lem_stub_export.h \ - -SS -Gxhst \ - -I .. - - IDL_Files { - Unkeyed_Test_ConnectorE.idl - } -} - -project(DDS_Unkeyed_Test_Connector_lem_stub) : ccm_svnt, dds4ccm_lem_stub { - after += DDS_Unkeyed_Test_Connector_lem_gen DDS_Unkeyed_Test_Connector_stub \ - DDS_Unkeyed_Test_Base_stub - libs += DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = DDS_Unkeyed_Test_Connector_lem_stub - dynamicflags += UNKEYED_TEST_CONNECTOR_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_ConnectorEC.cpp - } - - Header_Files { - Unkeyed_Test_ConnectorEC.h - Unkeyed_Test_Connector_lem_stub_export.h - } - - Inline_Files { - Unkeyed_Test_ConnectorEC.inl - } -} - -project(DDS_Unkeyed_Test_Connector_stub) : ccm_stub, dds4ccm_base { - after += DDS_Unkeyed_Test_Connector_idl_gen DDS_Unkeyed_Test_Base_stub - libs += DDS_Unkeyed_Test_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = DDS_Unkeyed_Test_Connector_stub - dynamicflags += UNKEYED_TEST_CONNECTOR_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_ConnectorC.cpp - } - - Header_Files { - Unkeyed_Test_ConnectorC.h - Unkeyed_Test_Connector_stub_export.h - } - - Inline_Files { - Unkeyed_Test_ConnectorC.inl - } -} - -project(DDS_Unkeyed_Test_Connector_exec) : ciao_executor, dds4ccm_impl { - after += DDS_Unkeyed_Test_Connector_lem_stub DDS_Unkeyed_Test_Connector_stub \ - DDS_Unkeyed_Test_Base_stub - sharedname = DDS_Unkeyed_Test_Connector_exec - libs += DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Connector_lem_stub \ - DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += UNKEYED_TEST_CONNECTOR_CONN_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_Connector_conn.cpp - } - - Header_Files { - Unkeyed_Test_Connector_conn.h - Unkeyed_Test_Connector_conn_export.h - } - - Inline_Files { - } -} - - -project(DDS_Unkeyed_Test_Connector_svnt) : ciao_servant, dds4ccm_impl { - after += DDS_Unkeyed_Test_Connector_lem_stub DDS_Unkeyed_Test_Connector_exec \ - DDS_Unkeyed_Test_Connector_stub - sharedname = DDS_Unkeyed_Test_Connector_svnt - libs += DDS_Unkeyed_Test_Connector_stub \ - DDS_Unkeyed_Test_Connector_lem_stub \ - DDS_Unkeyed_Test_Base_stub \ - DDS_Unkeyed_Test_Connector_exec - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += UNKEYED_TEST_CONNECTOR_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_ConnectorS.cpp - Unkeyed_Test_Connector_svnt.cpp - } - - Header_Files { - Unkeyed_Test_ConnectorS.h - Unkeyed_Test_Connector_svnt.h - Unkeyed_Test_Connector_svnt_export.h - } - - Inline_Files { - } -} - - diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/README b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/README deleted file mode 100644 index 8a26966f186..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/README +++ /dev/null @@ -1,6 +0,0 @@ - - -UnkeyedSamples consists of a Sender and a Receiver. -The Sender writes samples unkeyed; the Receiver should -receive the same number of samples. An error is printed -when this isn't the case.
\ No newline at end of file diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/.gitignore b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/.gitignore deleted file mode 100644 index 4829caba63b..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/Receiver_exec_export.h -/Receiver_lem_stub_export.h -/Receiver_stub_export.h -/Receiver_svnt_export.h -/Unkeyed_Test_ReceiverE.idl diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver.idl b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver.idl deleted file mode 100644 index 45c30460219..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver.idl +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @file - * @author Marcel Smit (msmit@remedy.nl) - */ - -#ifndef RECEIVER_IDL -#define RECEIVER_IDL - -#include "Connector/Unkeyed_Test_Connector.idl" - -module Unkeyed_Test -{ - component Receiver - { - port UnkeyedTestConnector::DDS_Listen info_out; - provides CCM_DDS::ConnectorStatusListener info_out_connector_status; - attribute unsigned short iterations; - attribute unsigned short keys; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver.mpc deleted file mode 100644 index 8afc8d0bf79..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver.mpc +++ /dev/null @@ -1,136 +0,0 @@ -project(DDS_Unkeyed_Test_Receiver_idl_gen) : componentidldefaults, dds4ccm { - custom_only = 1 - after += DDS_Unkeyed_Test_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 { - Unkeyed_Test_Receiver.idl - } -} - -project(DDS_Unkeyed_Test_Receiver_lem_gen) : ciaoidldefaults, dds4ccm { - after += DDS_Unkeyed_Test_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 { - Unkeyed_Test_ReceiverE.idl - } -} - -project(DDS_Unkeyed_Test_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_Unkeyed_Test_Receiver_lem_gen DDS_Unkeyed_Test_Receiver_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Base_stub - libs += Receiver_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_lem_stub - dynamicflags += RECEIVER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_ReceiverEC.cpp - } - - Header_Files { - Unkeyed_Test_ReceiverEC.h - Receiver_lem_stub_export.h - } - - Inline_Files { - Unkeyed_Test_ReceiverEC.inl - } -} - -project(DDS_Unkeyed_Test_Receiver_stub) : ccm_stub, dds4ccm_base { - after += DDS_Unkeyed_Test_Receiver_idl_gen DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_lem_gen - libs += DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_stub - dynamicflags += RECEIVER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_ReceiverC.cpp - } - - Header_Files { - Unkeyed_Test_ReceiverC.h - Receiver_stub_export.h - } - - Inline_Files { - Unkeyed_Test_ReceiverC.inl - } -} - -project(DDS_Unkeyed_Test_Receiver_exec) : ciao_executor, dds4ccm_lem_stub { - after += DDS_Unkeyed_Test_Receiver_lem_stub DDS_Unkeyed_Test_Receiver_stub DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Connector_lem_stub - sharedname = Receiver_exec - libs += Receiver_stub Receiver_lem_stub DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += RECEIVER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_Receiver_exec.cpp - } - - Header_Files { - Unkeyed_Test_Receiver_exec.h - Receiver_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_Unkeyed_Test_Receiver_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { - after += DDS_Unkeyed_Test_Receiver_lem_stub DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Connector_svnt DDS_Unkeyed_Test_Receiver_exec DDS_Unkeyed_Test_Connector_lem_stub - sharedname = Receiver_svnt - libs += Receiver_stub Receiver_lem_stub DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Connector_svnt Receiver_exec DDS_Unkeyed_Test_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += RECEIVER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_ReceiverS.cpp - Unkeyed_Test_Receiver_svnt.cpp - } - - Header_Files { - Unkeyed_Test_ReceiverS.h - Unkeyed_Test_Receiver_svnt.h - Receiver_svnt_export.h - } - - Inline_Files { - } -} - - diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver_exec.cpp deleted file mode 100644 index e5c788e651b..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver_exec.cpp +++ /dev/null @@ -1,370 +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 "Unkeyed_Test_Receiver_exec.h" -#include "dds4ccm/impl/dds4ccm_conf.h" - -namespace CIAO_Unkeyed_Test_Receiver_Impl -{ - - /** - * Facet Executor Implementation Class: info_out_data_listener_exec_i - */ - - info_out_data_listener_exec_i::info_out_data_listener_exec_i ( - ::Unkeyed_Test::CCM_Receiver_Context_ptr ctx, - Atomic_ULong &received) - : ciao_context_ ( - ::Unkeyed_Test::CCM_Receiver_Context::_duplicate (ctx)) - , received_ (received) - , handle_ (DDS::HANDLE_NIL) - { - } - - info_out_data_listener_exec_i::~info_out_data_listener_exec_i (void) - { - } - - // Operations from ::Unkeyed_Test::UnkeyedTestConnector::Listener - - void - info_out_data_listener_exec_i::on_one_data (const ::UnkeyedTest & datum, - const ::CCM_DDS::ReadInfo & info) - { - // From the first sample store the instance handle, the handle should be - // nil (RTI DDS) or stay the same (OpenDDS) - if (this->received_ == 0) - { - this->handle_ = info.instance_handle; - } - ++this->received_; - - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("UnkeyedTest_Listener: ") - ACE_TEXT ("received keyed_test_info for <%C> at iteration <%u> for handle ") - DDS_INSTANCE_HANDLE_FORMAT_SPECIFIER - ACE_TEXT ("\n"), - datum.key.in (), - datum.iteration, - DDS_INSTANCE_HANDLE_LOG (info.instance_handle))); - if ((info.instance_handle != ::DDS::HANDLE_NIL) && - (this->handle_.value () != info.instance_handle)) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: UnkeyedTest_Listener::on_one_data: ") - ACE_TEXT ("received instance handle ") - DDS_INSTANCE_HANDLE_FORMAT_SPECIFIER - ACE_TEXT (" should be nil or stay the same ") - ACE_TEXT ("for unkeyed data ") - ACE_TEXT ("key <%C> - iteration <%u>\n"), - DDS_INSTANCE_HANDLE_LOG (info.instance_handle), - datum.key.in (), - datum.iteration)); - } - if (info.source_timestamp.sec == 0 && - info.source_timestamp.nanosec == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: UnkeyedTest_Listener::on_one_data: " - "source timestamp seems to be invalid (nil) " - "key <%C> - iteration <%d>\n", - datum.key.in (), - datum.iteration)); - } - } - - void - info_out_data_listener_exec_i::on_many_data (const ::UnkeyedTestSeq & /* data */, - const ::CCM_DDS::ReadInfoSeq & /* infos */) - { - /* Your code here. */ - } - - /** - * Facet Executor Implementation Class: info_out_status_exec_i - */ - - info_out_status_exec_i::info_out_status_exec_i ( - ::Unkeyed_Test::CCM_Receiver_Context_ptr ctx) - : ciao_context_ ( - ::Unkeyed_Test::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. */ - } - - /** - * Facet Executor Implementation Class: info_out_connector_status_exec_i - */ - - info_out_connector_status_exec_i::info_out_connector_status_exec_i ( - ::Unkeyed_Test::CCM_Receiver_Context_ptr ctx) - : ciao_context_ ( - ::Unkeyed_Test::CCM_Receiver_Context::_duplicate (ctx)) - { - } - - info_out_connector_status_exec_i::~info_out_connector_status_exec_i (void) - { - } - - // Operations from ::CCM_DDS::ConnectorStatusListener - - void - info_out_connector_status_exec_i::on_inconsistent_topic (::DDS::Topic_ptr /* the_topic */, - const ::DDS::InconsistentTopicStatus & /* status */) - { - /* Your code here. */ - } - - void - info_out_connector_status_exec_i::on_requested_incompatible_qos (::DDS::DataReader_ptr /* the_reader */, - const ::DDS::RequestedIncompatibleQosStatus & /* status */) - { - /* Your code here. */ - } - - void - info_out_connector_status_exec_i::on_sample_rejected (::DDS::DataReader_ptr /* the_reader */, - const ::DDS::SampleRejectedStatus & /* status */) - { - /* Your code here. */ - } - - void - info_out_connector_status_exec_i::on_offered_deadline_missed (::DDS::DataWriter_ptr /* the_writer */, - const ::DDS::OfferedDeadlineMissedStatus & /* status */) - { - /* Your code here. */ - } - - void - info_out_connector_status_exec_i::on_offered_incompatible_qos (::DDS::DataWriter_ptr /* the_writer */, - const ::DDS::OfferedIncompatibleQosStatus & /* status */) - { - /* Your code here. */ - } - - void - info_out_connector_status_exec_i::on_unexpected_status (::DDS::Entity_ptr /* the_entity */, - ::DDS::StatusKind /* status_kind */) - { - /* Your code here. */ - } - - /** - * Component Executor Implementation Class: Receiver_exec_i - */ - - Receiver_exec_i::Receiver_exec_i (void) - : iterations_ (10) - , keys_ (3) - , received_ (0) - { - } - - Receiver_exec_i::~Receiver_exec_i (void) - { - } - - // Supported operations and attributes. - - // Component attributes and port operations. - - ::Unkeyed_Test::UnkeyedTestConnector::CCM_Listener_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->received_), - ::Unkeyed_Test::UnkeyedTestConnector::CCM_Listener::_nil ()); - - this->ciao_info_out_data_listener_ = tmp; - } - - return - ::Unkeyed_Test::UnkeyedTestConnector::CCM_Listener::_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 ()); - } - - ::CCM_DDS::CCM_ConnectorStatusListener_ptr - Receiver_exec_i::get_info_out_connector_status (void) - { - if ( ::CORBA::is_nil (this->ciao_info_out_connector_status_.in ())) - { - info_out_connector_status_exec_i *tmp = 0; - ACE_NEW_RETURN ( - tmp, - info_out_connector_status_exec_i ( - this->ciao_context_.in ()), - ::CCM_DDS::CCM_ConnectorStatusListener::_nil ()); - - this->ciao_info_out_connector_status_ = tmp; - } - - return - ::CCM_DDS::CCM_ConnectorStatusListener::_duplicate ( - this->ciao_info_out_connector_status_.in ()); - } - - ::CORBA::UShort - Receiver_exec_i::iterations (void) - { - return this->iterations_; - } - - void - Receiver_exec_i::iterations ( - const ::CORBA::UShort iterations) - { - this->iterations_ = iterations; - } - - ::CORBA::UShort - Receiver_exec_i::keys (void) - { - return this->keys_; - } - - void - Receiver_exec_i::keys ( - const ::CORBA::UShort keys) - { - this->keys_ = keys; - } - - // Operations from Components::SessionComponent. - - void - Receiver_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->ciao_context_ = - ::Unkeyed_Test::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::DataListenerControl_var lc = - this->ciao_context_->get_connection_info_out_data_control (); - - if (::CORBA::is_nil (lc.in ())) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Error: Listener control receptacle is null!\n"))); - throw ::CORBA::INTERNAL (); - } - - lc->mode (::CCM_DDS::ONE_BY_ONE); - } - - void - Receiver_exec_i::ccm_passivate (void) - { - /* Your code here. */ - } - - void - Receiver_exec_i::ccm_remove (void) - { - ::CORBA::ULong expected = this->keys_ * this->iterations_; - ACE_DEBUG ((LM_INFO, "Receiver_exec_i summary: received <%u>\n", - this->received_.value ())); - - if (this->received_.value () != expected) - { - ACE_ERROR ((LM_ERROR, "Receiver_exec_i::ccm_remove - " - "ERROR: Unexpected number of samples received: " - "expected <%u> - received <%u>\n", - expected, - this->received_.value ())); - } - } - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_Unkeyed_Test_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/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver_exec.h deleted file mode 100644 index f238945030d..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Receiver/Unkeyed_Test_Receiver_exec.h +++ /dev/null @@ -1,234 +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_UNKEYED_TEST_RECEIVER_EXEC_SACODV_H_ -#define CIAO_UNKEYED_TEST_RECEIVER_EXEC_SACODV_H_ - -#include /**/ "ace/pre.h" - -#include "Unkeyed_Test_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_Unkeyed_Test_Receiver_Impl -{ - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong > Atomic_ULong; - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, DDS::InstanceHandle_t > Atomic_Handle; - - /** - * Provider Executor Implementation Class: info_out_data_listener_exec_i - */ - - class info_out_data_listener_exec_i - : public virtual ::Unkeyed_Test::UnkeyedTestConnector::CCM_Listener, - public virtual ::CORBA::LocalObject - { - public: - info_out_data_listener_exec_i ( - ::Unkeyed_Test::CCM_Receiver_Context_ptr ctx, - Atomic_ULong &); - virtual ~info_out_data_listener_exec_i (void); - - //@{ - /** Operations and attributes from Unkeyed_Test::UnkeyedTestConnector::Listener. */ - - virtual - void on_one_data (const ::UnkeyedTest & datum, - const ::CCM_DDS::ReadInfo & info); - - virtual - void on_many_data (const ::UnkeyedTestSeq & data, - const ::CCM_DDS::ReadInfoSeq & infos); - //@} - - private: - ::Unkeyed_Test::CCM_Receiver_Context_var ciao_context_; - Atomic_ULong &received_; - Atomic_Handle handle_; - }; - - /** - * 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 ( - ::Unkeyed_Test::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: - ::Unkeyed_Test::CCM_Receiver_Context_var ciao_context_; - }; - - /** - * Provider Executor Implementation Class: info_out_connector_status_exec_i - */ - - class info_out_connector_status_exec_i - : public virtual ::CCM_DDS::CCM_ConnectorStatusListener, - public virtual ::CORBA::LocalObject - { - public: - info_out_connector_status_exec_i ( - ::Unkeyed_Test::CCM_Receiver_Context_ptr ctx); - virtual ~info_out_connector_status_exec_i (void); - - //@{ - /** Operations and attributes from CCM_DDS::ConnectorStatusListener. */ - - 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: - ::Unkeyed_Test::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 ::Unkeyed_Test::UnkeyedTestConnector::CCM_Listener_ptr - get_info_out_data_listener (void); - - virtual ::CCM_DDS::CCM_PortStatusListener_ptr - get_info_out_status (void); - - virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr - get_info_out_connector_status (void); - - virtual ::CORBA::UShort iterations (void); - - virtual void iterations (::CORBA::UShort iterations); - - virtual ::CORBA::UShort keys (void); - - virtual void keys (::CORBA::UShort keys); - //@} - - //@{ - /** 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. */ - - //@} - - private: - ::Unkeyed_Test::CCM_Receiver_Context_var ciao_context_; - - //@{ - /** Component attributes. */ - ::Unkeyed_Test::UnkeyedTestConnector::CCM_Listener_var ciao_info_out_data_listener_; - ::CCM_DDS::CCM_PortStatusListener_var ciao_info_out_status_; - ::CCM_DDS::CCM_ConnectorStatusListener_var ciao_info_out_connector_status_; - - ::CORBA::UShort iterations_; - - ::CORBA::UShort keys_; - //@} - - //@{ - /** User defined members. */ - Atomic_ULong received_; - - //@} - - //@{ - /** User defined private operations. */ - - //@} - }; - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_Unkeyed_Test_Receiver_Impl (void); -} - -#include /**/ "ace/post.h" - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/.gitignore b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/.gitignore deleted file mode 100644 index d02ac4819e3..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/Sender_exec_export.h -/Sender_lem_stub_export.h -/Sender_stub_export.h -/Sender_svnt_export.h -/Unkeyed_Test_SenderE.idl diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender.idl b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender.idl deleted file mode 100644 index aa31f073a0f..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender.idl +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @author Marcel Smit (msmit@remedy.nl) - */ - -#ifndef DDS_KEYED_TEST_SENDER_IDL -#define DDS_KEYED_TEST_SENDER_IDL - -#include "Connector/Unkeyed_Test_Connector.idl" - -module Unkeyed_Test -{ - component Sender - { - port UnkeyedTestConnector::DDS_Write info_write; - provides CCM_DDS::ConnectorStatusListener test_topic_connector_status; - attribute unsigned short rate; - attribute unsigned short iterations; - attribute unsigned short keys; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender.mpc b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender.mpc deleted file mode 100644 index 413980d9e47..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender.mpc +++ /dev/null @@ -1,138 +0,0 @@ -// This file is generated with "generate_component_mpc.pl -p DDS_Unkeyed_Test_Base -l ../lib -o ../lib -c controller -u DDS Sender" - -project(DDS_Unkeyed_Test_Sender_idl_gen) : componentidldefaults, dds4ccm { - after += DDS_Unkeyed_Test_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 { - Unkeyed_Test_Sender.idl - } -} - -project(DDS_Unkeyed_Test_Sender_lem_gen) : ciaoidldefaults, dds4ccm { - after += DDS_Unkeyed_Test_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 { - Unkeyed_Test_SenderE.idl - } -} - -project(DDS_Unkeyed_Test_Sender_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_Unkeyed_Test_Sender_lem_gen DDS_Unkeyed_Test_Sender_stub DDS_Unkeyed_Test_Base_stub - libs += DDS_Unkeyed_Test_Base_stub Sender_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Sender_lem_stub - dynamicflags += SENDER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_SenderEC.cpp - } - - Header_Files { - Unkeyed_Test_SenderEC.h - Sender_lem_stub_export.h - } - - Inline_Files { - Unkeyed_Test_SenderEC.inl - } -} - -project(DDS_Unkeyed_Test_Sender_stub) : ccm_stub, dds4ccm_base { - after += DDS_Unkeyed_Test_Sender_idl_gen DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub - libs += DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub - includes += .. - libpaths += ../lib - libout = ../lib - sharedname = Sender_stub - dynamicflags += SENDER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_SenderC.cpp - } - - Header_Files { - Unkeyed_Test_SenderC.h - Sender_stub_export.h - } - - Inline_Files { - Unkeyed_Test_SenderC.inl - } -} - -project(DDS_Unkeyed_Test_Sender_exec) : ciao_executor, dds4ccm_lem_stub { - after += DDS_Unkeyed_Test_Sender_lem_stub DDS_Unkeyed_Test_Sender_stub DDS_Unkeyed_Test_Connector_lem_stub DDS_Unkeyed_Test_Connector_stub - sharedname = Sender_exec - libs += Sender_stub Sender_lem_stub DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_lem_stub DDS_Unkeyed_Test_Connector_stub - libpaths += ../lib - includes += .. - libout = ../lib - dynamicflags += SENDER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_Sender_exec.cpp - } - - Header_Files { - Unkeyed_Test_Sender_exec.h - Sender_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_Unkeyed_Test_Sender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel { - after += DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Sender_lem_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Connector_svnt DDS_Unkeyed_Test_Connector_lem_stub - sharedname = Sender_svnt - libs += Sender_stub Sender_lem_stub \ - DDS_Unkeyed_Test_Base_stub DDS_Unkeyed_Test_Connector_stub DDS_Unkeyed_Test_Connector_svnt DDS_Unkeyed_Test_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags += SENDER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - Unkeyed_Test_SenderS.cpp - Unkeyed_Test_Sender_svnt.cpp - } - - Header_Files { - Unkeyed_Test_SenderS.h - Unkeyed_Test_Sender_svnt.h - Sender_svnt_export.h - } - - Inline_Files { - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender_exec.cpp deleted file mode 100644 index fd7ac4b155e..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender_exec.cpp +++ /dev/null @@ -1,324 +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 "Unkeyed_Test_Sender_exec.h" -#include "tao/ORB_Core.h" -#include "ace/Reactor.h" - -namespace CIAO_Unkeyed_Test_Sender_Impl -{ - //============================================================ - // 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_.start (); - } - } - - /** - * 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 *) - { - // Notify the subscribers - this->pulse_callback_.tick (); - return 0; - } - - /** - * Component Executor Implementation Class: Sender_exec_i - */ - - Sender_exec_i::Sender_exec_i (void) - : rate_ (1) - , iterations_ (10) - , keys_ (3) - { - ACE_NEW_THROW_EX (this->ticker_, - pulse_Generator (*this), - ::CORBA::NO_MEMORY ()); - } - - Sender_exec_i::~Sender_exec_i (void) - { - delete this->ticker_; - } - - // 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; - } - - void - Sender_exec_i::tick () - { - ::Unkeyed_Test::UnkeyedTestConnector::Writer_var writer - = this->ciao_context_->get_connection_info_write_data (); - - if (this->last_key != this->ktests_.end ()) - { - try - { - ++this->last_key->second->iteration; - writer->write_one (this->last_key->second, ::DDS::HANDLE_NIL); - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Written key <%C> with <%d>\n"), - this->last_key->first.c_str (), - this->last_key->second->iteration)); - } - catch (const CCM_DDS::NonExistent& ) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Key info for <%C> not updated: <%C> didn't exist.\n"), - this->last_key->first.c_str (), this->last_key->first.c_str ())); - } - catch (const CCM_DDS::InternalError& ) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error while updating key info for <%C>.\n"), - this->last_key->first.c_str ())); - } - ++this->last_key; - } - else - { - // onto the next iteration - this->last_key = this->ktests_.begin (); - while (this->last_key != this->ktests_.end ()) - { - if (this->last_key->second->iteration == this->iterations_) - { - //next key - ++this->last_key; - } - else - { - break; - } - } - } - } - - void - Sender_exec_i::start (void) - { - // Calculate the interval time - long const usec = 1000000 / this->rate_; - if (this->reactor ()->schedule_timer ( - this->ticker_, - 0, - ACE_Time_Value (0, usec), - ACE_Time_Value (0, 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. - - ::CORBA::UShort - Sender_exec_i::rate (void) - { - return this->rate_; - } - - void - Sender_exec_i::rate ( - const ::CORBA::UShort rate) - { - this->rate_ = rate; - } - - ::CORBA::UShort - Sender_exec_i::iterations (void) - { - return this->iterations_; - } - - void - Sender_exec_i::iterations ( - const ::CORBA::UShort iterations) - { - this->iterations_ = iterations; - } - - ::CORBA::UShort - Sender_exec_i::keys (void) - { - return this->keys_; - } - - void - Sender_exec_i::keys ( - const ::CORBA::UShort keys) - { - this->keys_ = keys; - } - - ::CCM_DDS::CCM_ConnectorStatusListener_ptr - Sender_exec_i::get_test_topic_connector_status (void) - { - return new ConnectorStatusListener_exec_i (*this); - } - - // Operations from Components::SessionComponent. - - void - Sender_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->ciao_context_ = - ::Unkeyed_Test::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) - { - ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, _guard, - this->mutex_, CORBA::INTERNAL ()); - - for (CORBA::UShort i = 1; i < this->keys_ + 1; ++i) - { - char key[7]; - UnkeyedTest *new_key = new UnkeyedTest; - ACE_OS::sprintf (key, "KEY_%d", i); - new_key->key = CORBA::string_dup(key); - new_key->iteration = 0; - - this->ktests_[key] = new_key; - } - this->last_key = this->ktests_.begin (); - } - - void - Sender_exec_i::ccm_passivate (void) - { - this->stop (); - } - - void - Sender_exec_i::ccm_remove (void) - { - /* Your code here. */ - } - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_Unkeyed_Test_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/UnkeyedSamples/Sender/Unkeyed_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender_exec.h deleted file mode 100644 index ef9ae64ec62..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/Sender/Unkeyed_Test_Sender_exec.h +++ /dev/null @@ -1,184 +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_UNKEYED_TEST_SENDER_EXEC_ENQT0J_H_ -#define CIAO_UNKEYED_TEST_SENDER_EXEC_ENQT0J_H_ - -#include /**/ "ace/pre.h" - -#include "Unkeyed_Test_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_Unkeyed_Test_Sender_Impl -{ - - class Sender_exec_i; - - //============================================================ - // ConnectorStatusListener_exec_i - //============================================================ - class SENDER_EXEC_Export 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_; - }; - - /** - * 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_; - }; - - /** - * 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 ::CORBA::UShort rate (void); - - virtual void rate (::CORBA::UShort rate); - - virtual ::CORBA::UShort iterations (void); - - virtual void iterations (::CORBA::UShort iterations); - - virtual ::CORBA::UShort keys (void); - - virtual void keys (::CORBA::UShort keys); - - 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 tick (void); - void start (void); - //@} - - private: - ::Unkeyed_Test::CCM_Sender_Context_var ciao_context_; - - //@{ - /** Component attributes. */ - - ::CORBA::UShort rate_; - - ::CORBA::UShort iterations_; - - ::CORBA::UShort keys_; - //@} - - //@{ - /** User defined members. */ - pulse_Generator * ticker_; - - TAO_SYNCH_MUTEX mutex_; - typedef std::map<ACE_CString, UnkeyedTest_var> Unkeyed_Test_Table; - Unkeyed_Test_Table ktests_; - Unkeyed_Test_Table::iterator last_key; - - //@} - - //@{ - /** User defined private operations. */ - void stop (void); - //@} - - /// Get the ACE_Reactor - ACE_Reactor* reactor (void); - }; - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_Unkeyed_Test_Sender_Impl (void); -} - -#include /**/ "ace/post.h" - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/descriptors/Plan.cdp deleted file mode 100644 index 6c5731e08f8..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/descriptors/Plan.cdp +++ /dev/null @@ -1,424 +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>Unkeyed_Test_Depl_1</label> - <UUID>Unkeyed_Test_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_Unkeyed_Test_Receiver_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_Unkeyed_Test_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="Unkeyed_Test_ConnectorComponentImplementation"> - <name>Unkeyed_Test_ConnectorComponentImplementation</name> - <source/> - <artifact xmi:idref="Unkeyed_Test_Connector_ExecArtifact" /> - <artifact xmi:idref="Unkeyed_Test_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_Unkeyed_Test_UnkeyedTestConnector_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_Unkeyed_Test_UnkeyedTestConnector_DDS_Event_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Unkeyed_Test_Connector_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Unkeyed_Test_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_Unkeyed_Test_Sender_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_Unkeyed_Test_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" /> - <configProperty> - <name>iterations</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>10</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>keys</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>3</ushort> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="Unkeyed_Test_ConnectorComponentInstance"> - <name>Unkeyed_Test_ConnectorComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="Unkeyed_Test_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Unkeyed_Test</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="Unkeyed_Test_ConnectorComponentInstance2"> - <name>Unkeyed_Test_ConnectorComponent2</name> - <node>ReceiverNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="Unkeyed_Test_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>Unkeyed_Test</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="SenderComponentInstance"> - <name>SenderComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="SenderComponentImplementation" /> - <configProperty> - <name>rate</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>1</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>iterations</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>10</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>keys</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>3</ushort> - </value> - </value> - </configProperty> - </instance> - - <connection> - <name>_listener</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_consumer_data_listener</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="Unkeyed_Test_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - - <connection> - <name>_datacontrol</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_consumer_data_control</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="Unkeyed_Test_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - - <connection> - <name>info_out_connector_status_receiver</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_out_connector_status</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="ReceiverComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>error_listener</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="Unkeyed_Test_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - - <connection> - <name>writer_connection</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_write_data</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="SenderComponentInstance" /> - </internalEndpoint> - <internalEndpoint> - <portName>supplier_data</portName> - <provider>true</provider> - <kind>Facet</kind> - <instance xmi:idref="Unkeyed_Test_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="Unkeyed_Test_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="Unkeyed_Test_Connector_ExecArtifact"> - <name>Unkeyed_Test_Connector_exec</name> - <source/> - <node/> - <location>DDS_Unkeyed_Test_Connector_exec</location> - </artifact> - <artifact xmi:id="Unkeyed_Test_Connector_SvntArtifact"> - <name>Unkeyed_Test_Connector_svnt</name> - <source/> - <node/> - <location>DDS_Unkeyed_Test_Connector_svnt</location> - </artifact> - <artifact xmi:id="Unkeyed_Test_Connector_StubArtifact"> - <name>Unkeyed_Test_Connector_stub</name> - <source/> - <node/> - <location>DDS_Unkeyed_Test_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/UnkeyedSamples/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/descriptors/run_test.pl deleted file mode 100755 index 87984594507..00000000000 --- a/CIAO/connectors/dds4ccm/tests/UnkeyedSamples/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 60 seconds to allow task to complete\n"; -sleep (60); - -# 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; |