diff options
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests')
22 files changed, 0 insertions, 3346 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Connector/FSS_Event_Connector.mpc b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Connector/FSS_Event_Connector.mpc index 2ea8baf9abf..4b06553411a 100755 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Connector/FSS_Event_Connector.mpc +++ b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Connector/FSS_Event_Connector.mpc @@ -91,7 +91,6 @@ project(DDS_FSS_Event_Connector_exec) : ciao_executor, dds4ccm_impl { libout = ../lib includes += .. dynamicflags = FIXED_SIZE_STRUCT_EVENT_CONNECTOR_CONN_BUILD_DLL - requires += dummy_label IDL_Files { } diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver.idl b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver.idl deleted file mode 100644 index 13f4e028a5a..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver.idl +++ /dev/null @@ -1,24 +0,0 @@ -// $Id$ - -/** - * @file - * @author Marcel Smit <msmit@remedy.nl> - */ - -#ifndef RECEIVER_IDL -#define RECEIVER_IDL - -#include "Connector/FSS_Event_Connector.idl" - -module FSS_Event -{ - component Receiver - { - port FixedStructSizeTestConn::DDS_Listen info_listen; - - attribute unsigned short keys; - attribute unsigned short iterations; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver.mpc deleted file mode 100755 index 30925bfd03a..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver.mpc +++ /dev/null @@ -1,151 +0,0 @@ -// $Id$ - -project(DDS_FSS_Event_Receiver_idl_gen) : componentidldefaults { - custom_only = 1 - after += DDS_FSS_Event_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 { - FSS_Event_Receiver.idl - } -} - -project(DDS_FSS_Event_Receiver_lem_gen) : ciaoidldefaults { - after += DDS_FSS_Event_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 { - FSS_Event_ReceiverE.idl - } -} - -project(DDS_FSS_Event_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_FSS_Event_Receiver_lem_gen DDS_FSS_Event_Receiver_stub \ - DDS_FSS_Event_Connector_stub DDS_FSS_Event_Base_stub - libs += Receiver_stub DDS_FSS_Event_Connector_stub \ - DDS_FSS_Event_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_lem_stub - dynamicflags = RECEIVER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_ReceiverEC.cpp - } - - Header_Files { - FSS_Event_ReceiverEC.h - Receiver_lem_stub_export.h - } - - Inline_Files { - FSS_Event_ReceiverEC.inl - } -} - -project(DDS_FSS_Event_Receiver_stub) : ccm_stub, dds4ccm_base { - after += DDS_FSS_Event_Receiver_idl_gen DDS_FSS_Event_Connector_stub \ - DDS_FSS_Event_Base_stub DDS_FSS_Event_Connector_lem_gen - libs += DDS_FSS_Event_Connector_stub DDS_FSS_Event_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_stub - dynamicflags = RECEIVER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_ReceiverC.cpp - } - - Header_Files { - FSS_Event_ReceiverC.h - Receiver_stub_export.h - } - - Inline_Files { - FSS_Event_ReceiverC.inl - } -} - -project(DDS_FSS_Event_Receiver_exec) : ciao_executor, dds4ccm_base { - after += DDS_FSS_Event_Receiver_lem_stub DDS_FSS_Event_Receiver_stub \ - DDS_FSS_Event_Base_stub DDS_FSS_Event_Connector_stub \ - DDS_FSS_Event_Connector_lem_stub DDS4CCM_lem_stub - sharedname = Receiver_exec - libs += Receiver_stub Receiver_lem_stub DDS_FSS_Event_Base_stub \ - DDS_FSS_Event_Connector_stub DDS_FSS_Event_Connector_lem_stub \ - DDS4CCM_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags = RECEIVER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_Receiver_exec.cpp - } - - Header_Files { - FSS_Event_Receiver_exec.h - Receiver_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_FSS_Event_Receiver_svnt) : ciao_servant, dds4ccm_base, nddslib { - after += DDS_FSS_Event_Receiver_lem_stub DDS_FSS_Event_Base_stub \ - DDS_FSS_Event_Connector_stub DDS_FSS_Event_Connector_svnt \ - DDS_FSS_Event_Receiver_exec DDS_FSS_Event_Connector_lem_stub \ - DDS4CCM_lem_stub DDS4CCM_skel - sharedname = Receiver_svnt - libs += Receiver_stub Receiver_lem_stub DDS_FSS_Event_Base_stub \ - DDS_FSS_Event_Connector_stub DDS_FSS_Event_Connector_svnt \ - Receiver_exec DDS_FSS_Event_Connector_lem_stub DDS4CCM_lem_stub \ - DDS4CCM_skel - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags = RECEIVER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_ReceiverS.cpp - FSS_Event_Receiver_svnt.cpp - } - - Header_Files { - FSS_Event_ReceiverS.h - FSS_Event_Receiver_svnt.h - Receiver_svnt_export.h - } - - Inline_Files { - FSS_Event_ReceiverS.inl - } -} - - diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver_exec.cpp deleted file mode 100644 index 780998fda8c..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver_exec.cpp +++ /dev/null @@ -1,260 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -#include "FSS_Event_Receiver_exec.h" -#include "ciao/Logger/Log_Macros.h" - -namespace CIAO_FSS_Event_Receiver_Impl -{ - //============================================================ - // FixedStructSizeTest_Listener_exec_i - //============================================================ - FixedStructSizeTest_Listener_exec_i::FixedStructSizeTest_Listener_exec_i ( - Atomic_ULong &received_one_by_one, - Atomic_ULong &received_many_by_many, - Atomic_ThreadId &thread_id) - : received_one_by_one_ (received_one_by_one), - received_many_by_many_ (received_many_by_many), - thread_id_ (thread_id) - { - } - - FixedStructSizeTest_Listener_exec_i::~FixedStructSizeTest_Listener_exec_i (void) - { - } - - void - FixedStructSizeTest_Listener_exec_i::on_one_data ( - const FixedStructSizeTest & an_instance, - const ::CCM_DDS::ReadInfo & info) - { - this->thread_id_ = ACE_Thread::self (); - ACE_DEBUG ((LM_DEBUG, "FixedStructSizeTest_Listener_exec_i::on_one_data: " - "key <%u> - iteration <%u>\n", - an_instance.one, - an_instance.two)); - if (!info.instance_handle.isValid) - { - ACE_ERROR ((LM_ERROR, "ERROR: FixedStructSizeTest_Listener_exec_i::on_one_data: " - "instance handle seems to be invalid " - "key <%u> - iteration <%u>\n", - an_instance.one, - an_instance.two)); - } - if (info.source_timestamp.sec == 0 && - info.source_timestamp.nanosec == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: FixedStructSizeTest_Listener_exec_i::on_one_data: " - "source timestamp seems to be invalid (nil) " - "key <%u> - iteration <%u>\n", - an_instance.one, - an_instance.two)); - } - ++this->received_one_by_one_; - } - - void - FixedStructSizeTest_Listener_exec_i::on_many_data ( - const FixedStructSizeTest_Seq & an_instance, - const ::CCM_DDS::ReadInfoSeq & /*info*/) - { - //just count. Is checked on ccm_remove. - this->received_many_by_many_ += an_instance.length (); - } - - //============================================================ - // Receiver_exec_i - //============================================================ - Receiver_exec_i::Receiver_exec_i (void) - : received_one_by_one_ (0), - received_many_by_many_ (0), - thread_id_listener_ (0), - iterations_ (10), - keys_ (5) - { - } - - Receiver_exec_i::~Receiver_exec_i (void) - { - } - - void - Receiver_exec_i::start () - { - ::CCM_DDS::DataListenerControl_var dlc = - this->context_->get_connection_info_listen_data_control (); - dlc->mode (::CCM_DDS::ONE_BY_ONE); - } - - ::FSS_Event::FixedStructSizeTestConn::CCM_Listener_ptr - Receiver_exec_i::get_info_listen_data_listener (void) - { - return new FixedStructSizeTest_Listener_exec_i ( - this->received_one_by_one_, - this->received_many_by_many_, - this->thread_id_listener_); - } - - ::CCM_DDS::CCM_PortStatusListener_ptr - Receiver_exec_i::get_info_listen_status (void) - { - return ::CCM_DDS::CCM_PortStatusListener::_nil (); - } - - ::CCM_DDS::CCM_ConnectorStatusListener_ptr - Receiver_exec_i::get_info_listen_connector_status (void) - { - return ::CCM_DDS::CCM_ConnectorStatusListener::_nil (); - } - - ::CORBA::UShort - Receiver_exec_i::iterations (void) - { - return this->iterations_; - } - - void - Receiver_exec_i::iterations (::CORBA::UShort iterations) - { - this->iterations_ = iterations; - } - - ::CORBA::UShort - Receiver_exec_i::keys (void) - { - return this->keys_; - } - - void - Receiver_exec_i::keys (::CORBA::UShort keys) - { - this->keys_ = keys; - } - - void - Receiver_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->context_ = - ::FSS_Event::CCM_Receiver_Context::_narrow (ctx); - if ( ::CORBA::is_nil (this->context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - Receiver_exec_i::configuration_complete (void) - { - } - - void - Receiver_exec_i::ccm_activate (void) - { - start (); - } - - void - Receiver_exec_i::ccm_passivate (void) - { - } - - void - Receiver_exec_i::ccm_remove (void) - { - CORBA::ULong expected = this->keys_ * this->iterations_; - if (this->received_one_by_one_.value () == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Didn't receive samples on one_by_one " - "callback while mode is ONE_BY_ONE " - "expected <%u> - received <%u>\n", - expected, - this->received_one_by_one_.value ())); - } - else if (expected != this->received_one_by_one_.value ()) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Didn't receive the expected " - "number of samples on one_by_one " - "callback while mode is ONE_BY_ONE " - "expected <%u> - received <%u>\n", - expected, - this->received_one_by_one_.value ())); - } - if (this->received_many_by_many_.value () > 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Received samples on many_by_many " - "callback while mode is ONE_BY_ONE " - "expected <0> - received <%u>\n", - this->received_many_by_many_.value ())); - } - if (this->received_one_by_one_.value () > 0 && - this->received_many_by_many_.value () == 0) - { - ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: " - "Received only data on " - "one_by_one callback. " - "Test passed!\n")); - } - if (this->thread_id_listener_.value () == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: " - "Thread ID for ReaderListener not set!\n")); - } - #if defined (CIAO_DDS4CCM_CONTEXT_SWITCH) && (CIAO_DDS4CCM_CONTEXT_SWITCH == 1) - else if (ACE_OS::thr_equal (this->thread_id_listener_.value (), - ACE_Thread::self ())) - { - ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: " - "Thread switch for ReaderListener seems OK. " - "(DDS uses the CCM thread for its callback) " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - else - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Thread switch for ReaderListener " - "doesn't seem to work! " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - #else - else if (ACE_OS::thr_equal (this->thread_id_listener_.value (), - ACE_Thread::self ())) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: ReaderListener: " - "DDS seems to use a CCM thread for its callback: " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - else - { - ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: ReaderListener: " - "DDS seems to use its own thread for its callback: " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - #endif - } - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_Event_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/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver_exec.h deleted file mode 100644 index 123c4a1195b..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Receiver/FSS_Event_Receiver_exec.h +++ /dev/null @@ -1,113 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#ifndef CIAO_RECEIVER_EXEC_H_ -#define CIAO_RECEIVER_EXEC_H_ - -#include "FSS_Event_ReceiverEC.h" - -#include /**/ "Receiver_exec_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/LocalObject.h" -#include "ace/OS_NS_Thread.h" -#include "ace/Reactor.h" -#include "ace/Task.h" - -#include <map> - -namespace CIAO_FSS_Event_Receiver_Impl -{ - class Receiver_exec_i; - - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong> Atomic_ULong; - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> Atomic_Bool; - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, ACE_thread_t> Atomic_ThreadId; - - //============================================================ - // FixedStructSizeTest_Listener_exec_i - //============================================================ - class RECEIVER_EXEC_Export FixedStructSizeTest_Listener_exec_i - : public virtual ::FSS_Event::FixedStructSizeTestConn::CCM_Listener, - public virtual ::CORBA::LocalObject - { - public: - FixedStructSizeTest_Listener_exec_i ( - Atomic_ULong &received_one_by_one, - Atomic_ULong &received_many_by_many, - Atomic_ThreadId &thread_id); - virtual ~FixedStructSizeTest_Listener_exec_i (void); - - virtual void - on_one_data ( - const FixedStructSizeTest & an_instance, - const ::CCM_DDS::ReadInfo & info); - virtual void - on_many_data ( - const FixedStructSizeTest_Seq & an_instance, - const ::CCM_DDS::ReadInfoSeq & info); - private: - Atomic_ULong &received_one_by_one_; - Atomic_ULong &received_many_by_many_; - Atomic_ThreadId &thread_id_; - }; - - //============================================================ - // Receiver_exec_i - //============================================================ - class RECEIVER_EXEC_Export Receiver_exec_i - : public virtual Receiver_Exec, - public virtual ::CORBA::LocalObject - { - public: - Receiver_exec_i (void); - virtual ~Receiver_exec_i (void); - - void start (); - - virtual ::CORBA::UShort iterations (void); - - virtual void iterations (::CORBA::UShort iterations); - - virtual ::CORBA::UShort keys (void); - - virtual void keys (::CORBA::UShort keys); - - virtual ::FSS_Event::FixedStructSizeTestConn::CCM_Listener_ptr - get_info_listen_data_listener (void); - - virtual ::CCM_DDS::CCM_PortStatusListener_ptr - get_info_listen_status (void); - - virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr - get_info_listen_connector_status (void); - - virtual void - set_session_context ( - ::Components::SessionContext_ptr ctx); - - virtual void configuration_complete (void); - - virtual void ccm_activate (void); - virtual void ccm_passivate (void); - virtual void ccm_remove (void); - - private: - ::FSS_Event::CCM_Receiver_Context_var context_; - - Atomic_ULong received_one_by_one_; - Atomic_ULong received_many_by_many_; - Atomic_ThreadId thread_id_listener_; - - CORBA::UShort iterations_; - CORBA::UShort keys_; - }; - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_Event_Receiver_Impl (void); -} - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender.idl b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender.idl deleted file mode 100644 index 212a0aece00..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender.idl +++ /dev/null @@ -1,26 +0,0 @@ -// $Id$ - -/** - * @file - * @author Marcel Smit <msmit@remedy.nl> - * - * by-hand idl3 translation of sender components. - */ - -#ifndef DDS_FIXED_SIZE_STRUCT_EVENT_SENDER_IDL -#define DDS_FIXED_SIZE_STRUCT_EVENT_SENDER_IDL - -#include "Connector/FSS_Event_Connector.idl" - -module FSS_Event -{ - component Sender - { - port FixedStructSizeTestConn::DDS_Write info_write; - - attribute unsigned short keys; - attribute unsigned short iterations; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender.mpc b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender.mpc deleted file mode 100755 index 27318d35d58..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender.mpc +++ /dev/null @@ -1,149 +0,0 @@ -// $Id$ -// This file is generated with "generate_component_mpc.pl -p DDS_FSS_Event_Base -l ../lib -o ../lib -c controller -u DDS Sender" - -project(DDS_FSS_Event_Sender_idl_gen) : componentidldefaults { - after += DDS_FSS_Event_Connector_idl_gen DDS_Starter_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 { - FSS_Event_Sender.idl - } -} - -project(DDS_FSS_Event_Sender_lem_gen) : ciaoidldefaults { - after += DDS_FSS_Event_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 { - FSS_Event_SenderE.idl - } -} - -project(DDS_FSS_Event_Sender_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_FSS_Event_Sender_lem_gen DDS_FSS_Event_Sender_stub \ - DDS_FSS_Event_Base_stub - libs += DDS_FSS_Event_Base_stub Sender_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Sender_lem_stub - dynamicflags = SENDER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_SenderEC.cpp - } - - Header_Files { - FSS_Event_SenderEC.h - Sender_lem_stub_export.h - } - - Inline_Files { - FSS_Event_SenderEC.inl - } -} - -project(DDS_FSS_Event_Sender_stub) : ccm_stub, dds4ccm_base { - after += DDS_FSS_Event_Sender_idl_gen DDS_FSS_Event_Base_stub \ - DDS_FSS_Event_Connector_stub - libs += DDS_FSS_Event_Base_stub DDS_FSS_Event_Connector_stub - includes += .. - libpaths += ../lib - libout = ../lib - sharedname = Sender_stub - dynamicflags = SENDER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_SenderC.cpp - } - - Header_Files { - FSS_Event_SenderC.h - Sender_stub_export.h - } - - Inline_Files { - FSS_Event_SenderC.inl - } -} - -project(DDS_FSS_Event_Sender_exec) : ciao_executor, dds4ccm_base { - after += DDS_FSS_Event_Sender_lem_stub DDS_FSS_Event_Sender_stub \ - DDS_FSS_Event_Connector_lem_stub DDS_FSS_Event_Connector_stub \ - DDS4CCM_lem_stub - sharedname = Sender_exec - libs += Sender_stub Sender_lem_stub DDS_FSS_Event_Base_stub \ - DDS_FSS_Event_Connector_lem_stub DDS_FSS_Event_Connector_stub \ - DDS4CCM_lem_stub - libpaths += ../lib - includes += .. - libout = ../lib - dynamicflags = SENDER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_Sender_exec.cpp - } - - Header_Files { - FSS_Event_Sender_exec.h - Sender_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_FSS_Event_Sender_svnt) : ciao_servant, dds4ccm_base, nddslib { - after += DDS_FSS_Event_Base_stub DDS_FSS_Event_Sender_lem_stub \ - DDS4CCM_lem_stub DDS4CCM_skel DDS_FSS_Event_Connector_stub \ - DDS_FSS_Event_Connector_svnt DDS_FSS_Event_Connector_lem_stub - sharedname = Sender_svnt - libs += Sender_stub Sender_lem_stub DDS_FSS_Event_Base_stub DDS4CCM_lem_stub \ - DDS4CCM_skel DDS_FSS_Event_Connector_stub DDS_FSS_Event_Connector_svnt \ - DDS_FSS_Event_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags = SENDER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_Event_SenderS.cpp - FSS_Event_Sender_svnt.cpp - } - - Header_Files { - FSS_Event_SenderS.h - FSS_Event_Sender_svnt.h - Sender_svnt_export.h - } - - Inline_Files { - FSS_Event_SenderS.inl - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender_exec.cpp deleted file mode 100644 index eb98bc7b2bb..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender_exec.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#include "FSS_Event_Sender_exec.h" -#include "ace/Guard_T.h" -#include "ciao/Logger/Log_Macros.h" -#include "ace/Date_Time.h" -#include "tao/ORB_Core.h" -#include "ace/Reactor.h" - -namespace CIAO_FSS_Event_Sender_Impl -{ - //============================================================ - // WriteManyHandler - //============================================================ - WriteTicker::WriteTicker (Sender_exec_i &callback) - : callback_ (callback) - { - } - - int - WriteTicker::handle_timeout (const ACE_Time_Value &, const void *) - { - // Notify the subscribers - this->callback_.write_one (); - return 0; - } - - //============================================================ - // WriteManyHandler - //============================================================ - WriteManyHandler::WriteManyHandler (Sender_exec_i &callback) - : callback_ (callback) - { - } - - int - WriteManyHandler::handle_exception (ACE_HANDLE) - { - this->callback_.write_one (); - return 0; - } - - - //============================================================ - // Component Executor Implementation Class: Sender_exec_i - //============================================================ - Sender_exec_i::Sender_exec_i (void) - : iterations_ (10), - keys_ (5) - { - this->ticker_ = new WriteTicker (*this); - } - - Sender_exec_i::~Sender_exec_i (void) - { - } - - void - Sender_exec_i::write_one (void) - { - if (this->last_key_ != this->samples_.end ()) - { - try - { - ++this->last_key_->second->one; - this->writer_->write_one (this->last_key_->second, ::DDS::HANDLE_NIL); - ACE_DEBUG ((LM_DEBUG, "Written key <%u> - <%u>\n", - this->last_key_->first, - this->last_key_->second->one)); - } - catch (const CCM_DDS::InternalError& ) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") - ACE_TEXT ("while updating writer info for <%u>.\n"), - this->last_key_->first)); - } - ++this->last_key_; - } - else - { - //onto the next iteration - this->last_key_ = this->samples_.begin (); - while (this->last_key_ != this->samples_.end ()) - { - if (this->last_key_->second->two == this->iterations_) - { - //next key - ++this->last_key_; - } - else - { - break; - } - } - if (this->last_key_ == this->samples_.end ()) - { - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); - } - } - } - - - void - Sender_exec_i::start (void) - { - ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, _guard, - this->mutex_, CORBA::INTERNAL ()); - - for (CORBA::UShort i = 1; i < this->keys_ + 1; ++i) - { - FixedStructSizeTest *new_key = new FixedStructSizeTest; - new_key->one = i; - new_key->two = 0; - - this->samples_[i] = new_key; - } - this->last_key_ = this->samples_.begin (); - if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer ( - this->ticker_, - 0, - ACE_Time_Value (5, 50000), - ACE_Time_Value (0, 50000)) == -1) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ") - ACE_TEXT ("Error scheduling timer"))); - } - } - - ::CORBA::UShort - Sender_exec_i::iterations (void) - { - return this->iterations_; - } - - void - Sender_exec_i::iterations (::CORBA::UShort iterations) - { - this->iterations_ = iterations; - } - - ::CORBA::UShort - Sender_exec_i::keys (void) - { - return this->keys_; - } - - void - Sender_exec_i::keys (::CORBA::UShort keys) - { - this->keys_ = keys; - } - - void - Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx) - { - this->context_ = - ::FSS_Event::CCM_Sender_Context::_narrow (ctx); - - if ( ::CORBA::is_nil (this->context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - Sender_exec_i::configuration_complete (void) - { - } - - void - Sender_exec_i::ccm_activate (void) - { - try - { - this->writer_ = this->context_->get_connection_info_write_data (); - start (); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("Exception caught:"); - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Exception caught\n"))); - } - catch (...) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Unknown exception caught\n"))); - } - } - - void - Sender_exec_i::ccm_passivate (void) - { - } - - void - Sender_exec_i::ccm_remove (void) - { - } - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_Event_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/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender_exec.h deleted file mode 100644 index b76bcb7be62..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/Sender/FSS_Event_Sender_exec.h +++ /dev/null @@ -1,99 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#ifndef CIAO_SENDER_EXEC_H_ -#define CIAO_SENDER_EXEC_H_ - - -#include "FSS_Event_SenderEC.h" - -#include /**/ "Sender_exec_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/LocalObject.h" - -#include <map> - -namespace CIAO_FSS_Event_Sender_Impl -{ - class Sender_exec_i; - - //============================================================ - // WriteTicker - //============================================================ - class WriteTicker : - public ACE_Event_Handler - { - public: - WriteTicker (Sender_exec_i &callback); - int handle_timeout (const ACE_Time_Value &, const void *); - private: - Sender_exec_i &callback_; - }; - - //============================================================ - // WriteManyHandler - //============================================================ - class WriteManyHandler : - public ACE_Event_Handler - { - public: - WriteManyHandler (Sender_exec_i &callback); - virtual int handle_exception (ACE_HANDLE fc = ACE_INVALID_HANDLE); - private: - /// Maintains a handle that actually process the event - Sender_exec_i &callback_; - }; - - class Sender_exec_i - : public virtual Sender_Exec, - public virtual ::CORBA::LocalObject - { - public: - Sender_exec_i (void); - virtual ~Sender_exec_i (void); - - virtual ::CORBA::UShort iterations (void); - - virtual void iterations (::CORBA::UShort iterations); - - virtual ::CORBA::UShort keys (void); - - virtual void keys (::CORBA::UShort keys); - - 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); - - void start (void); - void write_one (void); - - private: - ::FSS_Event::CCM_Sender_Context_var context_; - ::FSS_Event::FixedStructSizeTestConn::Writer_var writer_; - - WriteTicker *ticker_; - - CORBA::UShort iterations_; - CORBA::UShort keys_; - - TAO_SYNCH_MUTEX mutex_; - typedef std::map<CORBA::ULong, FixedStructSizeTest_var> Writer_Table; - Writer_Table samples_; - - Writer_Table::iterator last_key_; - }; - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_Event_Sender_Impl (void); -} - -#endif /* ifndef */ - diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/descriptors/Plan.cdp deleted file mode 100644 index 21e1b50b533..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/descriptors/Plan.cdp +++ /dev/null @@ -1,392 +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>FSS_Event_Depl_1</label> - <UUID>FSS_Event_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_FSS_Event_Receiver_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_FSS_Event_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="FSS_Event_ConnectorComponentImplementation"> - <name>FSS_Event_ConnectorComponentImplementation</name> - <source/> - <artifact xmi:idref="FSS_Event_Connector_ExecArtifact" /> - <artifact xmi:idref="FSS_Event_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_FSS_Event_FSS_Event_Connector_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_FSS_Event_FSS_Event_Connector_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_Event_Connector_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_Event_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_FSS_Event_Sender_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_FSS_Event_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>keys</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>5</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>iterations</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>10</ushort> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="FSS_Event_ConnectorComponentInstance"> - <name>FSS_Event_ConnectorComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="FSS_Event_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_Event</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="FSS_Event_ConnectorComponentInstance2"> - <name>FSS_Event_ConnectorComponent2</name> - <node>ReceiverNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="FSS_Event_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_Event</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="SenderComponentInstance"> - <name>SenderComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="SenderComponentImplementation" /> - <configProperty> - <name>keys</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>5</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>iterations</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>10</ushort> - </value> - </value> - </configProperty> - </instance> - - <connection> - <name>info_listen_connector_status_receiver</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_listen_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="FSS_Event_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - - <connection> - <name>info_listen_data</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_listen_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="FSS_Event_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - - <connection> - <name>info_listen_data_control</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_listen_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="FSS_Event_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="FSS_Event_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="FSS_Event_Connector_ExecArtifact"> - <name>FSS_Event_Connector_exec</name> - <source/> - <node/> - <location>DDS_FSS_Event_Connector_exec</location> - </artifact> - <artifact xmi:id="FSS_Event_Connector_SvntArtifact"> - <name>FSS_Event_Connector_svnt</name> - <source/> - <node/> - <location>DDS_FSS_Event_Connector_svnt</location> - </artifact> - <artifact xmi:id="FSS_Event_Connector_StubArtifact"> - <name>FSS_Event_Connector_stub</name> - <source/> - <node/> - <location>DDS_FSS_Event_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/FixedSizeStruct/EventConnector/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/descriptors/run_test.pl deleted file mode 100755 index 017ddc50ed1..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/EventConnector/descriptors/run_test.pl +++ /dev/null @@ -1,244 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::TestTarget; - -$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; -$TAO_ROOT = "$ENV{'TAO_ROOT'}"; -$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; - -$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 deamon $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 ('ciao_componentserver'); -} - -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 = "$CIAO_ROOT/bin/ciao_componentserver"; - - $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/Naming_Service", "-m 1 -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 -m 1 -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 -q\n"; - -$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", - "-k file://$ior_emfile -x $cdp_file -q"); -$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; diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Connector/FSS_State_Connector.mpc b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Connector/FSS_State_Connector.mpc index 74ea1c1ecf8..380a57a899d 100755 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Connector/FSS_State_Connector.mpc +++ b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Connector/FSS_State_Connector.mpc @@ -92,7 +92,6 @@ project(DDS_FSS_State_Connector_exec) : ciao_executor, dds4ccm_impl { libout = ../lib includes += .. dynamicflags = FIXED_SIZE_STRUCT_STATE_CONNECTOR_CONN_BUILD_DLL - requires += dummy_label IDL_Files { } diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver.idl b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver.idl deleted file mode 100644 index 48d133e63ee..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver.idl +++ /dev/null @@ -1,24 +0,0 @@ -// $Id$ - -/** - * @file - * @author Marcel Smit <msmit@remedy.nl> - */ - -#ifndef RECEIVER_IDL -#define RECEIVER_IDL - -#include "Connector/FSS_State_Connector.idl" - -module FSS_State -{ - component Receiver - { - port FixedStructSizeTestConn::DDS_Listen info_listen; - - attribute unsigned short keys; - attribute unsigned short iterations; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver.mpc deleted file mode 100755 index 4cca85dcb7c..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver.mpc +++ /dev/null @@ -1,151 +0,0 @@ -// $Id$ - -project(DDS_FSS_State_Receiver_idl_gen) : componentidldefaults { - custom_only = 1 - after += DDS_FSS_State_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 { - FSS_State_Receiver.idl - } -} - -project(DDS_FSS_State_Receiver_lem_gen) : ciaoidldefaults { - after += DDS_FSS_State_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 { - FSS_State_ReceiverE.idl - } -} - -project(DDS_FSS_State_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_FSS_State_Receiver_lem_gen DDS_FSS_State_Receiver_stub \ - DDS_FSS_State_Connector_stub DDS_FSS_State_Base_stub - libs += Receiver_stub DDS_FSS_State_Connector_stub \ - DDS_FSS_State_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_lem_stub - dynamicflags = RECEIVER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_ReceiverEC.cpp - } - - Header_Files { - FSS_State_ReceiverEC.h - Receiver_lem_stub_export.h - } - - Inline_Files { - FSS_State_ReceiverEC.inl - } -} - -project(DDS_FSS_State_Receiver_stub) : ccm_stub, dds4ccm_base { - after += DDS_FSS_State_Receiver_idl_gen DDS_FSS_State_Connector_stub \ - DDS_FSS_State_Base_stub DDS_FSS_State_Connector_lem_gen - libs += DDS_FSS_State_Connector_stub DDS_FSS_State_Base_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Receiver_stub - dynamicflags = RECEIVER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_ReceiverC.cpp - } - - Header_Files { - FSS_State_ReceiverC.h - Receiver_stub_export.h - } - - Inline_Files { - FSS_State_ReceiverC.inl - } -} - -project(DDS_FSS_State_Receiver_exec) : ciao_executor, dds4ccm_base { - after += DDS_FSS_State_Receiver_lem_stub DDS_FSS_State_Receiver_stub \ - DDS_FSS_State_Base_stub DDS_FSS_State_Connector_stub \ - DDS_FSS_State_Connector_lem_stub DDS4CCM_lem_stub - sharedname = Receiver_exec - libs += Receiver_stub Receiver_lem_stub DDS_FSS_State_Base_stub \ - DDS_FSS_State_Connector_stub DDS_FSS_State_Connector_lem_stub \ - DDS4CCM_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags = RECEIVER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_Receiver_exec.cpp - } - - Header_Files { - FSS_State_Receiver_exec.h - Receiver_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_FSS_State_Receiver_svnt) : ciao_servant, dds4ccm_base, nddslib { - after += DDS_FSS_State_Receiver_lem_stub DDS_FSS_State_Base_stub \ - DDS_FSS_State_Connector_stub DDS_FSS_State_Connector_svnt \ - DDS_FSS_State_Receiver_exec DDS_FSS_State_Connector_lem_stub \ - DDS4CCM_lem_stub DDS4CCM_skel - sharedname = Receiver_svnt - libs += Receiver_stub Receiver_lem_stub DDS_FSS_State_Base_stub \ - DDS_FSS_State_Connector_stub DDS_FSS_State_Connector_svnt \ - Receiver_exec DDS_FSS_State_Connector_lem_stub DDS4CCM_lem_stub \ - DDS4CCM_skel - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags = RECEIVER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_ReceiverS.cpp - FSS_State_Receiver_svnt.cpp - } - - Header_Files { - FSS_State_ReceiverS.h - FSS_State_Receiver_svnt.h - Receiver_svnt_export.h - } - - Inline_Files { - FSS_State_ReceiverS.inl - } -} - - diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver_exec.cpp deleted file mode 100644 index a2b83d95fc4..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver_exec.cpp +++ /dev/null @@ -1,260 +0,0 @@ -// -*- C++ -*- -// -// $Id$ - -#include "FSS_State_Receiver_exec.h" -#include "ciao/Logger/Log_Macros.h" - -namespace CIAO_FSS_State_Receiver_Impl -{ - //============================================================ - // FixedStructSizeTest_Listener_exec_i - //============================================================ - FixedStructSizeTest_Listener_exec_i::FixedStructSizeTest_Listener_exec_i ( - Atomic_ULong &received_one_by_one, - Atomic_ULong &received_many_by_many, - Atomic_ThreadId &thread_id) - : received_one_by_one_ (received_one_by_one), - received_many_by_many_ (received_many_by_many), - thread_id_ (thread_id) - { - } - - FixedStructSizeTest_Listener_exec_i::~FixedStructSizeTest_Listener_exec_i (void) - { - } - - void - FixedStructSizeTest_Listener_exec_i::on_one_data ( - const FixedStructSizeTest & an_instance, - const ::CCM_DDS::ReadInfo & info) - { - this->thread_id_ = ACE_Thread::self (); - ACE_DEBUG ((LM_DEBUG, "FixedStructSizeTest_Listener_exec_i::on_one_data: " - "key <%u> - iteration <%u>\n", - an_instance.one, - an_instance.two)); - if (!info.instance_handle.isValid) - { - ACE_ERROR ((LM_ERROR, "ERROR: FixedStructSizeTest_Listener_exec_i::on_one_data: " - "instance handle seems to be invalid " - "key <%u> - iteration <%u>\n", - an_instance.one, - an_instance.two)); - } - if (info.source_timestamp.sec == 0 && - info.source_timestamp.nanosec == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: FixedStructSizeTest_Listener_exec_i::on_one_data: " - "source timestamp seems to be invalid (nil) " - "key <%u> - iteration <%u>\n", - an_instance.one, - an_instance.two)); - } - ++this->received_one_by_one_; - } - - void - FixedStructSizeTest_Listener_exec_i::on_many_data ( - const FixedStructSizeTest_Seq & an_instance, - const ::CCM_DDS::ReadInfoSeq & /*info*/) - { - //just count. Is checked on ccm_remove. - this->received_many_by_many_ += an_instance.length (); - } - - //============================================================ - // Receiver_exec_i - //============================================================ - Receiver_exec_i::Receiver_exec_i (void) - : received_one_by_one_ (0), - received_many_by_many_ (0), - thread_id_listener_ (0), - iterations_ (10), - keys_ (5) - { - } - - Receiver_exec_i::~Receiver_exec_i (void) - { - } - - void - Receiver_exec_i::start () - { - ::CCM_DDS::DataListenerControl_var dlc = - this->context_->get_connection_info_listen_data_control (); - dlc->mode (::CCM_DDS::ONE_BY_ONE); - } - - ::FSS_State::FixedStructSizeTestConn::CCM_Listener_ptr - Receiver_exec_i::get_info_listen_data_listener (void) - { - return new FixedStructSizeTest_Listener_exec_i ( - this->received_one_by_one_, - this->received_many_by_many_, - this->thread_id_listener_); - } - - ::CCM_DDS::CCM_PortStatusListener_ptr - Receiver_exec_i::get_info_listen_status (void) - { - return ::CCM_DDS::CCM_PortStatusListener::_nil (); - } - - ::CCM_DDS::CCM_ConnectorStatusListener_ptr - Receiver_exec_i::get_info_listen_connector_status (void) - { - return ::CCM_DDS::CCM_ConnectorStatusListener::_nil (); - } - - ::CORBA::UShort - Receiver_exec_i::iterations (void) - { - return this->iterations_; - } - - void - Receiver_exec_i::iterations (::CORBA::UShort iterations) - { - this->iterations_ = iterations; - } - - ::CORBA::UShort - Receiver_exec_i::keys (void) - { - return this->keys_; - } - - void - Receiver_exec_i::keys (::CORBA::UShort keys) - { - this->keys_ = keys; - } - - void - Receiver_exec_i::set_session_context ( - ::Components::SessionContext_ptr ctx) - { - this->context_ = - ::FSS_State::CCM_Receiver_Context::_narrow (ctx); - if ( ::CORBA::is_nil (this->context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - Receiver_exec_i::configuration_complete (void) - { - } - - void - Receiver_exec_i::ccm_activate (void) - { - start (); - } - - void - Receiver_exec_i::ccm_passivate (void) - { - } - - void - Receiver_exec_i::ccm_remove (void) - { - CORBA::ULong expected = this->keys_ * this->iterations_; - if (this->received_one_by_one_.value () == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Didn't receive samples on one_by_one " - "callback while mode is ONE_BY_ONE " - "expected <%u> - received <%u>\n", - expected, - this->received_one_by_one_.value ())); - } - else if (expected != this->received_one_by_one_.value ()) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Didn't receive the expected " - "number of samples on one_by_one " - "callback while mode is ONE_BY_ONE " - "expected <%u> - received <%u>\n", - expected, - this->received_one_by_one_.value ())); - } - if (this->received_many_by_many_.value () > 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Received samples on many_by_many " - "callback while mode is ONE_BY_ONE " - "expected <0> - received <%u>\n", - this->received_many_by_many_.value ())); - } - if (this->received_one_by_one_.value () > 0 && - this->received_many_by_many_.value () == 0) - { - ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: " - "Received only data on " - "one_by_one callback. " - "Test passed!\n")); - } - if (this->thread_id_listener_.value () == 0) - { - ACE_ERROR ((LM_ERROR, "ERROR: " - "Thread ID for ReaderListener not set!\n")); - } - #if defined (CIAO_DDS4CCM_CONTEXT_SWITCH) && (CIAO_DDS4CCM_CONTEXT_SWITCH == 1) - else if (ACE_OS::thr_equal (this->thread_id_listener_.value (), - ACE_Thread::self ())) - { - ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: " - "Thread switch for ReaderListener seems OK. " - "(DDS uses the CCM thread for its callback) " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - else - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: " - "Thread switch for ReaderListener " - "doesn't seem to work! " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - #else - else if (ACE_OS::thr_equal (this->thread_id_listener_.value (), - ACE_Thread::self ())) - { - ACE_ERROR ((LM_ERROR, "ERROR: ONE_BY_ONE: ReaderListener: " - "DDS seems to use a CCM thread for its callback: " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - else - { - ACE_DEBUG ((LM_DEBUG, "ONE_BY_ONE: ReaderListener: " - "DDS seems to use its own thread for its callback: " - "listener <%u> - component <%u>\n", - this->thread_id_listener_.value (), - ACE_Thread::self ())); - } - #endif - } - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_State_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/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver_exec.h deleted file mode 100644 index 4c5629cc047..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Receiver/FSS_State_Receiver_exec.h +++ /dev/null @@ -1,113 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#ifndef CIAO_RECEIVER_EXEC_H_ -#define CIAO_RECEIVER_EXEC_H_ - -#include "FSS_State_ReceiverEC.h" - -#include /**/ "Receiver_exec_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/LocalObject.h" -#include "ace/OS_NS_Thread.h" -#include "ace/Reactor.h" -#include "ace/Task.h" - -#include <map> - -namespace CIAO_FSS_State_Receiver_Impl -{ - class Receiver_exec_i; - - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong> Atomic_ULong; - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> Atomic_Bool; - typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, ACE_thread_t> Atomic_ThreadId; - - //============================================================ - // FixedStructSizeTest_Listener_exec_i - //============================================================ - class RECEIVER_EXEC_Export FixedStructSizeTest_Listener_exec_i - : public virtual ::FSS_State::FixedStructSizeTestConn::CCM_Listener, - public virtual ::CORBA::LocalObject - { - public: - FixedStructSizeTest_Listener_exec_i ( - Atomic_ULong &received_one_by_one, - Atomic_ULong &received_many_by_many, - Atomic_ThreadId &thread_id); - virtual ~FixedStructSizeTest_Listener_exec_i (void); - - virtual void - on_one_data ( - const FixedStructSizeTest & an_instance, - const ::CCM_DDS::ReadInfo & info); - virtual void - on_many_data ( - const FixedStructSizeTest_Seq & an_instance, - const ::CCM_DDS::ReadInfoSeq & info); - private: - Atomic_ULong &received_one_by_one_; - Atomic_ULong &received_many_by_many_; - Atomic_ThreadId &thread_id_; - }; - - //============================================================ - // Receiver_exec_i - //============================================================ - class RECEIVER_EXEC_Export Receiver_exec_i - : public virtual Receiver_Exec, - public virtual ::CORBA::LocalObject - { - public: - Receiver_exec_i (void); - virtual ~Receiver_exec_i (void); - - void start (); - - virtual ::CORBA::UShort iterations (void); - - virtual void iterations (::CORBA::UShort iterations); - - virtual ::CORBA::UShort keys (void); - - virtual void keys (::CORBA::UShort keys); - - virtual ::FSS_State::FixedStructSizeTestConn::CCM_Listener_ptr - get_info_listen_data_listener (void); - - virtual ::CCM_DDS::CCM_PortStatusListener_ptr - get_info_listen_status (void); - - virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr - get_info_listen_connector_status (void); - - virtual void - set_session_context ( - ::Components::SessionContext_ptr ctx); - - virtual void configuration_complete (void); - - virtual void ccm_activate (void); - virtual void ccm_passivate (void); - virtual void ccm_remove (void); - - private: - ::FSS_State::CCM_Receiver_Context_var context_; - - Atomic_ULong received_one_by_one_; - Atomic_ULong received_many_by_many_; - Atomic_ThreadId thread_id_listener_; - - CORBA::UShort iterations_; - CORBA::UShort keys_; - }; - - extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_State_Receiver_Impl (void); -} - -#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender.idl b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender.idl deleted file mode 100644 index f6d248d909f..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender.idl +++ /dev/null @@ -1,26 +0,0 @@ -// $Id$ - -/** - * @file - * @author Marcel Smit <msmit@remedy.nl> - * - * by-hand idl3 translation of sender components. - */ - -#ifndef DDS_FIXED_SIZE_STRUCT_STATE_SENDER_IDL -#define DDS_FIXED_SIZE_STRUCT_STATE_SENDER_IDL - -#include "Connector/FSS_State_Connector.idl" - -module FSS_State -{ - component Sender - { - port FixedStructSizeTestConn::DDS_Write info_write; - - attribute unsigned short keys; - attribute unsigned short iterations; - }; -}; - -#endif diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender.mpc b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender.mpc deleted file mode 100755 index 49c46e609ee..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender.mpc +++ /dev/null @@ -1,149 +0,0 @@ -// $Id$ -// This file is generated with "generate_component_mpc.pl -p DDS_FSS_State_Base -l ../lib -o ../lib -c controller -u DDS Sender" - -project(DDS_FSS_State_Sender_idl_gen) : componentidldefaults { - after += DDS_FSS_State_Connector_idl_gen DDS_Starter_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 { - FSS_State_Sender.idl - } -} - -project(DDS_FSS_State_Sender_lem_gen) : ciaoidldefaults { - after += DDS_FSS_State_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 { - FSS_State_SenderE.idl - } -} - -project(DDS_FSS_State_Sender_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_FSS_State_Sender_lem_gen DDS_FSS_State_Sender_stub \ - DDS_FSS_State_Base_stub - libs += DDS_FSS_State_Base_stub Sender_stub - libpaths += ../lib - libout = ../lib - includes += .. - sharedname = Sender_lem_stub - dynamicflags = SENDER_LEM_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_SenderEC.cpp - } - - Header_Files { - FSS_State_SenderEC.h - Sender_lem_stub_export.h - } - - Inline_Files { - FSS_State_SenderEC.inl - } -} - -project(DDS_FSS_State_Sender_stub) : ccm_stub, dds4ccm_base { - after += DDS_FSS_State_Sender_idl_gen DDS_FSS_State_Base_stub \ - DDS_FSS_State_Connector_stub - libs += DDS_FSS_State_Base_stub DDS_FSS_State_Connector_stub - includes += .. - libpaths += ../lib - libout = ../lib - sharedname = Sender_stub - dynamicflags = SENDER_STUB_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_SenderC.cpp - } - - Header_Files { - FSS_State_SenderC.h - Sender_stub_export.h - } - - Inline_Files { - FSS_State_SenderC.inl - } -} - -project(DDS_FSS_State_Sender_exec) : ciao_executor, dds4ccm_base { - after += DDS_FSS_State_Sender_lem_stub DDS_FSS_State_Sender_stub \ - DDS_FSS_State_Connector_lem_stub DDS_FSS_State_Connector_stub \ - DDS4CCM_lem_stub - sharedname = Sender_exec - libs += Sender_stub Sender_lem_stub DDS_FSS_State_Base_stub \ - DDS_FSS_State_Connector_lem_stub DDS_FSS_State_Connector_stub \ - DDS4CCM_lem_stub - libpaths += ../lib - includes += .. - libout = ../lib - dynamicflags = SENDER_EXEC_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_Sender_exec.cpp - } - - Header_Files { - FSS_State_Sender_exec.h - Sender_exec_export.h - } - - Inline_Files { - } -} - - -project(DDS_FSS_State_Sender_svnt) : ciao_servant, dds4ccm_base, nddslib { - after += DDS_FSS_State_Base_stub DDS_FSS_State_Sender_lem_stub \ - DDS4CCM_lem_stub DDS4CCM_skel DDS_FSS_State_Connector_stub \ - DDS_FSS_State_Connector_svnt DDS_FSS_State_Connector_lem_stub - sharedname = Sender_svnt - libs += Sender_stub Sender_lem_stub DDS_FSS_State_Base_stub DDS4CCM_lem_stub \ - DDS4CCM_skel DDS_FSS_State_Connector_stub DDS_FSS_State_Connector_svnt \ - DDS_FSS_State_Connector_lem_stub - libpaths += ../lib - libout = ../lib - includes += .. - dynamicflags = SENDER_SVNT_BUILD_DLL - - IDL_Files { - } - - Source_Files { - FSS_State_SenderS.cpp - FSS_State_Sender_svnt.cpp - } - - Header_Files { - FSS_State_SenderS.h - FSS_State_Sender_svnt.h - Sender_svnt_export.h - } - - Inline_Files { - FSS_State_SenderS.inl - } -} - diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender_exec.cpp deleted file mode 100644 index c7a0796369b..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender_exec.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#include "FSS_State_Sender_exec.h" -#include "ace/Guard_T.h" -#include "ciao/Logger/Log_Macros.h" -#include "ace/Date_Time.h" -#include "tao/ORB_Core.h" -#include "ace/Reactor.h" - -namespace CIAO_FSS_State_Sender_Impl -{ - //============================================================ - // WriteManyHandler - //============================================================ - WriteTicker::WriteTicker (Sender_exec_i &callback) - : callback_ (callback) - { - } - - int - WriteTicker::handle_timeout (const ACE_Time_Value &, const void *) - { - // Notify the subscribers - this->callback_.write_one (); - return 0; - } - - //============================================================ - // WriteManyHandler - //============================================================ - WriteManyHandler::WriteManyHandler (Sender_exec_i &callback) - : callback_ (callback) - { - } - - int - WriteManyHandler::handle_exception (ACE_HANDLE) - { - this->callback_.write_one (); - return 0; - } - - - //============================================================ - // Component Executor Implementation Class: Sender_exec_i - //============================================================ - Sender_exec_i::Sender_exec_i (void) - : iterations_ (10), - keys_ (5) - { - this->ticker_ = new WriteTicker (*this); - } - - Sender_exec_i::~Sender_exec_i (void) - { - } - - void - Sender_exec_i::write_one (void) - { - if (this->last_key_ != this->samples_.end ()) - { - try - { - ++this->last_key_->second->one; - this->writer_->write_one (this->last_key_->second, ::DDS::HANDLE_NIL); - ACE_DEBUG ((LM_DEBUG, "Written key <%u> - <%u>\n", - this->last_key_->first, - this->last_key_->second->one)); - } - catch (const CCM_DDS::InternalError& ) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") - ACE_TEXT ("while updating writer info for <%u>.\n"), - this->last_key_->first)); - } - ++this->last_key_; - } - else - { - //onto the next iteration - this->last_key_ = this->samples_.begin (); - while (this->last_key_ != this->samples_.end ()) - { - if (this->last_key_->second->two == this->iterations_) - { - //next key - ++this->last_key_; - } - else - { - break; - } - } - if (this->last_key_ == this->samples_.end ()) - { - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); - } - } - } - - - void - Sender_exec_i::start (void) - { - ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, _guard, - this->mutex_, CORBA::INTERNAL ()); - - for (CORBA::UShort i = 1; i < this->keys_ + 1; ++i) - { - FixedStructSizeTest *new_key = new FixedStructSizeTest; - new_key->one = i; - new_key->two = 0; - - this->samples_[i] = new_key; - } - this->last_key_ = this->samples_.begin (); - if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer ( - this->ticker_, - 0, - ACE_Time_Value (5, 50000), - ACE_Time_Value (0, 50000)) == -1) - { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ") - ACE_TEXT ("Error scheduling timer"))); - } - } - - ::CORBA::UShort - Sender_exec_i::iterations (void) - { - return this->iterations_; - } - - void - Sender_exec_i::iterations (::CORBA::UShort iterations) - { - this->iterations_ = iterations; - } - - ::CORBA::UShort - Sender_exec_i::keys (void) - { - return this->keys_; - } - - void - Sender_exec_i::keys (::CORBA::UShort keys) - { - this->keys_ = keys; - } - - void - Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx) - { - this->context_ = - ::FSS_State::CCM_Sender_Context::_narrow (ctx); - - if ( ::CORBA::is_nil (this->context_.in ())) - { - throw ::CORBA::INTERNAL (); - } - } - - void - Sender_exec_i::configuration_complete (void) - { - } - - void - Sender_exec_i::ccm_activate (void) - { - try - { - this->writer_ = this->context_->get_connection_info_write_data (); - start (); - } - catch (const CORBA::Exception& ex) - { - ex._tao_print_exception ("Exception caught:"); - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Exception caught\n"))); - } - catch (...) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Unknown exception caught\n"))); - } - } - - void - Sender_exec_i::ccm_passivate (void) - { - } - - void - Sender_exec_i::ccm_remove (void) - { - } - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_State_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/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender_exec.h deleted file mode 100644 index 805f5dbc899..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/Sender/FSS_State_Sender_exec.h +++ /dev/null @@ -1,99 +0,0 @@ -// -*- C++ -*- -// $Id$ - -#ifndef CIAO_SENDER_EXEC_H_ -#define CIAO_SENDER_EXEC_H_ - - -#include "FSS_State_SenderEC.h" - -#include /**/ "Sender_exec_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "tao/LocalObject.h" - -#include <map> - -namespace CIAO_FSS_State_Sender_Impl -{ - class Sender_exec_i; - - //============================================================ - // WriteTicker - //============================================================ - class WriteTicker : - public ACE_Event_Handler - { - public: - WriteTicker (Sender_exec_i &callback); - int handle_timeout (const ACE_Time_Value &, const void *); - private: - Sender_exec_i &callback_; - }; - - //============================================================ - // WriteManyHandler - //============================================================ - class WriteManyHandler : - public ACE_Event_Handler - { - public: - WriteManyHandler (Sender_exec_i &callback); - virtual int handle_exception (ACE_HANDLE fc = ACE_INVALID_HANDLE); - private: - /// Maintains a handle that actually process the event - Sender_exec_i &callback_; - }; - - class Sender_exec_i - : public virtual Sender_Exec, - public virtual ::CORBA::LocalObject - { - public: - Sender_exec_i (void); - virtual ~Sender_exec_i (void); - - virtual ::CORBA::UShort iterations (void); - - virtual void iterations (::CORBA::UShort iterations); - - virtual ::CORBA::UShort keys (void); - - virtual void keys (::CORBA::UShort keys); - - 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); - - void start (void); - void write_one (void); - - private: - ::FSS_State::CCM_Sender_Context_var context_; - ::FSS_State::FixedStructSizeTestConn::Writer_var writer_; - - WriteTicker *ticker_; - - CORBA::UShort iterations_; - CORBA::UShort keys_; - - TAO_SYNCH_MUTEX mutex_; - typedef std::map<CORBA::ULong, FixedStructSizeTest_var> Writer_Table; - Writer_Table samples_; - - Writer_Table::iterator last_key_; - }; - - extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr - create_FSS_State_Sender_Impl (void); -} - -#endif /* ifndef */ - diff --git a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/descriptors/Plan.cdp deleted file mode 100644 index 7b6201f4dfa..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/descriptors/Plan.cdp +++ /dev/null @@ -1,392 +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>FSS_State_Depl_1</label> - <UUID>FSS_State_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_FSS_State_Receiver_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_FSS_State_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="FSS_State_ConnectorComponentImplementation"> - <name>FSS_State_ConnectorComponentImplementation</name> - <source/> - <artifact xmi:idref="FSS_State_Connector_ExecArtifact" /> - <artifact xmi:idref="FSS_State_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_FSS_State_FSS_State_Connector_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_FSS_State_FSS_State_Connector_Servant</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_State_Connector_svnt</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_State_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_FSS_State_Sender_Impl</string> - </value> - </value> - </execParameter> - <execParameter> - <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>create_FSS_State_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>keys</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>5</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>iterations</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>10</ushort> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="FSS_State_ConnectorComponentInstance"> - <name>FSS_State_ConnectorComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="FSS_State_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_State</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="FSS_State_ConnectorComponentInstance2"> - <name>FSS_State_ConnectorComponent2</name> - <node>ReceiverNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="FSS_State_ConnectorComponentImplementation" /> - <configProperty> - <name>topic_name</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>FSS_State</string> - </value> - </value> - </configProperty> - </instance> - <instance xmi:id="SenderComponentInstance"> - <name>SenderComponent</name> - <node>SenderNode</node> - <!-- hostname --> - <source/> - <implementation xmi:idref="SenderComponentImplementation" /> - <configProperty> - <name>keys</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>5</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>iterations</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>10</ushort> - </value> - </value> - </configProperty> - </instance> - - <connection> - <name>info_listen_connector_status_receiver</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_listen_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="FSS_State_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - - <connection> - <name>info_listen_data</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_listen_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="FSS_State_ConnectorComponentInstance2" /> - </internalEndpoint> - </connection> - - <connection> - <name>info_listen_data_control</name> - <deployRequirement> - <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> - <resourceType>Local_Interface</resourceType> - </deployRequirement> - <internalEndpoint> - <portName>info_listen_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="FSS_State_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="FSS_State_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="FSS_State_Connector_ExecArtifact"> - <name>FSS_State_Connector_exec</name> - <source/> - <node/> - <location>DDS_FSS_State_Connector_exec</location> - </artifact> - <artifact xmi:id="FSS_State_Connector_SvntArtifact"> - <name>FSS_State_Connector_svnt</name> - <source/> - <node/> - <location>DDS_FSS_State_Connector_svnt</location> - </artifact> - <artifact xmi:id="FSS_State_Connector_StubArtifact"> - <name>FSS_State_Connector_stub</name> - <source/> - <node/> - <location>DDS_FSS_State_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/FixedSizeStruct/StateConnector/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/descriptors/run_test.pl deleted file mode 100755 index 017ddc50ed1..00000000000 --- a/CIAO/connectors/dds4ccm/tests/FixedSizeStruct/StateConnector/descriptors/run_test.pl +++ /dev/null @@ -1,244 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::TestTarget; - -$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; -$TAO_ROOT = "$ENV{'TAO_ROOT'}"; -$DANCE_ROOT = "$ENV{'DANCE_ROOT'}"; - -$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 deamon $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 ('ciao_componentserver'); -} - -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 = "$CIAO_ROOT/bin/ciao_componentserver"; - - $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/Naming_Service", "-m 1 -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 -m 1 -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 -q\n"; - -$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", - "-k file://$ior_emfile -x $cdp_file -q"); -$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; |