summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsmit <msmit@remedy.nl>2010-04-07 07:18:10 +0000
committermsmit <msmit@remedy.nl>2010-04-07 07:18:10 +0000
commit3677c4541ad1c04f1633beaf6078de1b183f92a5 (patch)
treeeacfbc069275b2024d95ecc260a6f5cc2e02a865
parent983b145de8c93bd19b410ae94d2bdc0aaa7e08c9 (diff)
downloadATCD-3677c4541ad1c04f1633beaf6078de1b183f92a5.tar.gz
Wed Apr 7 07:14:22 UTC 2010 Marcel Smit <msmit@remedy.nl>
* bin/ciao_tests.lst: * connectors/dds4ccm/tests/PortUsage/*: Added test which tests the number of DataReaders and DataWriters used in DDS.
-rw-r--r--CIAO/ChangeLog7
-rw-r--r--CIAO/bin/ciao_tests.lst1
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.idl36
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.mpc26
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.idl27
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.mpc151
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.cpp296
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.h125
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.idl25
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.mpc145
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.idl29
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.mpc151
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.cpp365
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.h140
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.idl25
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.mpc145
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Get.cdp258
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Listen.cdp258
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Write.cdp258
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Get.cdp258
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Listen.cdp258
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Read.cdp246
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_StateListen.cdp258
-rw-r--r--CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Update.cdp258
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/PortUsage/descriptors/run_test.pl217
25 files changed, 3963 insertions, 0 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 2fd5751dafb..a2452561a11 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,10 @@
+Wed Apr 7 07:14:22 UTC 2010 Marcel Smit <msmit@remedy.nl>
+
+ * bin/ciao_tests.lst:
+ * connectors/dds4ccm/tests/PortUsage/*:
+ Added test which tests the number of DataReaders and
+ DataWriters used in DDS.
+
Wed Apr 7 07:06:31 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* MPC/config/avoids_ccm_lw.mpb:
diff --git a/CIAO/bin/ciao_tests.lst b/CIAO/bin/ciao_tests.lst
index 96fc67db0b2..e646f9f2031 100644
--- a/CIAO/bin/ciao_tests.lst
+++ b/CIAO/bin/ciao_tests.lst
@@ -91,3 +91,4 @@ TAO/CIAO/connectors/dds4ccm/performance-tests/DDSLatency/descriptors/run_test_nd
TAO/CIAO/connectors/dds4ccm/performance-tests/Throughput/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/performance-tests/DDSThroughput/descriptors/run_test_dds.pl: !ACE_FOR_TAO !ST NDDS
TAO/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
+TAO/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.idl b/CIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.idl
new file mode 100644
index 00000000000..d7a42a8a2ea
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.idl
@@ -0,0 +1,36 @@
+// $Id$
+
+/**
+ * @file PortUsage_Test_Base.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef PORTUSAGE_EVENT_TEST_BASE_IDL
+#define PORTUSAGE_EVENT_TEST_BASE_IDL
+
+#pragma ndds typesupport "Base/PortUsage_Test_BaseSupport.h"
+
+#pragma DCPS_DATA_TYPE "PortUsageTest"
+#pragma DCPS_DATA_KEY "PortUsageTest symbol"
+
+struct PortUsageTest {
+ string symbol; //@key
+ long iteration;
+};
+
+typedef sequence<PortUsageTest> PortUsageTestSeq;
+
+enum PortUsageAssignment {
+ //event ports
+ PORTUSAGE_ASSIGNMENT_WRITE,
+ //event and state ports
+ PORTUSAGE_ASSIGNMENT_GET,
+ PORTUSAGE_ASSIGNMENT_LISTEN,
+ //state ports
+ PORTUSAGE_ASSIGNMENT_UPDATE,
+ PORTUSAGE_ASSIGNMENT_READ,
+ PORTUSAGE_ASSIGNMENT_STATELISTEN
+};
+
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.mpc b/CIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.mpc
new file mode 100755
index 00000000000..d8125682fb4
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/Base/PortUsage_Test_Base.mpc
@@ -0,0 +1,26 @@
+// $Id$
+
+project (PortUsage_Test_Base_stub) : taoidldefaults, anytypecode, dds4ccm_ts_default {
+ sharedname = PortUsage_Test_Base_stub
+ dynamicflags += PORTUSAGE_EVENT_TEST_BASE_STUB_BUILD_DLL
+ libout = ../lib
+
+ idlflags += -SS -Sci \
+ -Wb,stub_export_macro=PORTUSAGE_EVENT_TEST_BASE_STUB_Export \
+ -Wb,stub_export_include=PortUsage_Test_Base_stub_export.h
+
+ IDL_Files {
+ idlflags += -Gxhst
+ PortUsage_Test_Base.idl
+ }
+
+ opendds_ts_flags += --export=PORTUSAGE_EVENT_TEST_BASE_STUB_Export
+
+ DDSGenerator_Files {
+ PortUsage_Test_Base.idl
+ }
+
+ Source_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.idl b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.idl
new file mode 100644
index 00000000000..f74ce0c0306
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.idl
@@ -0,0 +1,27 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef EVENT_COMPONENT_IDL
+#define EVENT_COMPONENT_IDL
+
+#include "EventConnector/PortUsageEvent_Connector.idl"
+
+module PortUsageEvent_Test
+{
+ component PortUsageEventComponent
+ {
+ port PortUsageTestConn::DDS_Write write_port;
+ port PortUsageTestConn::DDS_Get get_port;
+ port PortUsageTestConn::DDS_Listen listen_port;
+
+ provides CCM_DDS::ConnectorStatusListener connector_status;
+
+ attribute PortUsageAssignment portusage_assignment;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.mpc b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.mpc
new file mode 100755
index 00000000000..7b483c5ec20
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component.mpc
@@ -0,0 +1,151 @@
+// $Id$
+
+project(PortUsageEvent_Component_idl_gen) : componentidldefaults, dds4ccm {
+ custom_only = 1
+ after += PortUsageEvent_Connector_idl_gen
+ idlflags += -Wb,stub_export_macro=COMPONENT_STUB_Export \
+ -Wb,stub_export_include=Component_stub_export.h \
+ -Wb,skel_export_macro=COMPONENT_SVNT_Export \
+ -Wb,skel_export_include=Component_svnt_export.h \
+ -Wb,svnt_export_macro=COMPONENT_SVNT_Export \
+ -Wb,svnt_export_include=Component_svnt_export.h \
+ -Wb,exec_export_macro=COMPONENT_EXEC_Export \
+ -Wb,exec_export_include=Component_exec_export.h -I..
+
+ IDL_Files {
+ PortUsageEvent_Component.idl
+ }
+}
+
+project(PortUsageEvent_Component_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += PortUsageEvent_Component_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=COMPONENT_LEM_STUB_Export \
+ -Wb,stub_export_include=Component_lem_stub_export.h \
+ -SS -Gxhst -I..
+
+ IDL_Files {
+ PortUsageEvent_ComponentE.idl
+ }
+}
+
+project(PortUsageEvent_Component_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += PortUsageEvent_Component_lem_gen PortUsageEvent_Component_stub \
+ PortUsageEvent_Connector_stub PortUsage_Test_Base_stub
+ libs += EventComponent_stub PortUsageEvent_Connector_stub \
+ PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = EventComponent_lem_stub
+ dynamicflags = COMPONENT_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_ComponentEC.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_ComponentEC.h
+ Component_lem_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageEvent_ComponentEC.inl
+ }
+}
+
+project(PortUsageEvent_Component_stub) : ccm_stub, dds4ccm_base {
+ after += PortUsageEvent_Component_idl_gen PortUsageEvent_Connector_stub \
+ PortUsage_Test_Base_stub PortUsageEvent_Connector_lem_gen
+ libs += PortUsageEvent_Connector_stub PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = EventComponent_stub
+ dynamicflags = COMPONENT_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_ComponentC.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_ComponentC.h
+ Component_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageEvent_ComponentC.inl
+ }
+}
+
+project(PortUsageEvent_Component_exec) : ciao_executor, dds4ccm_base {
+ after += PortUsageEvent_Component_lem_stub PortUsageEvent_Component_stub \
+ PortUsage_Test_Base_stub PortUsageEvent_Connector_stub \
+ PortUsageEvent_Connector_lem_stub DDS4CCM_lem_stub
+ sharedname = EventComponent_exec
+ libs += EventComponent_stub EventComponent_lem_stub PortUsage_Test_Base_stub \
+ PortUsageEvent_Connector_stub PortUsageEvent_Connector_lem_stub \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = COMPONENT_EXEC_BUILD_DLL READER_STARTER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_Component_exec.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_Component_exec.h
+ Component_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(PortUsageEvent_Component_svnt) : ciao_servant, dds4ccm_base {
+ after += PortUsageEvent_Component_lem_stub PortUsage_Test_Base_stub \
+ PortUsageEvent_Connector_stub PortUsageEvent_Connector_svnt \
+ PortUsageEvent_Component_exec PortUsageEvent_Connector_lem_stub \
+ DDS4CCM_lem_stub DDS4CCM_skel
+ sharedname = EventComponent_svnt
+ libs += EventComponent_stub EventComponent_lem_stub PortUsage_Test_Base_stub \
+ PortUsageEvent_Connector_stub PortUsageEvent_Connector_svnt \
+ EventComponent_exec PortUsageEvent_Connector_lem_stub DDS4CCM_lem_stub \
+ DDS4CCM_skel
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = COMPONENT_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_ComponentS.cpp
+ PortUsageEvent_Component_svnt.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_ComponentS.h
+ PortUsageEvent_Component_svnt.h
+ Component_svnt_export.h
+ }
+
+ Inline_Files {
+ PortUsageEvent_ComponentS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.cpp b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.cpp
new file mode 100644
index 00000000000..4f2a1ff666e
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.cpp
@@ -0,0 +1,296 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "PortUsageEvent_Component_exec.h"
+
+#include "ace/OS_NS_unistd.h"
+#include "ace/Log_Msg.h"
+#include "ciao/Logger/Log_Macros.h"
+#include "dds4ccm/impl/dds/Utils.h"
+
+namespace CIAO_PortUsageEvent_Test_PortUsageEventComponent_Impl
+{
+ //============================================================
+ // ConnectorStatusListener_exec_i
+ //============================================================
+ ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i (
+ Atomic_ULong& datareaders_count,
+ Atomic_ULong& datawriters_count)
+ : datareaders_count_ (datareaders_count),
+ datawriters_count_ (datawriters_count)
+ {
+ }
+
+ 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)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "ConnectorStatusListener_exec_i::on_unexpected_status <%C>\n",
+ CIAO::DDS4CCM::translate_statuskind (status_kind)));
+ if (status_kind == DDS::PUBLICATION_MATCHED_STATUS)
+ {
+ DDS::DataWriter_var dw = DDS::DataWriter::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dw.in ()))
+ {
+ ++this->datawriters_count_;
+ ACE_DEBUG ((LM_DEBUG, "DataWriters found until now <%u>\n",
+ this->datawriters_count_.value ()));
+ }
+ else
+ {
+ DDS::DataReader_var dr = DDS::DataReader::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dr.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR : DATAREADER isn't nil when receiving an "
+ "on_publication_matched status\n"));
+ }
+ }
+ }
+ if (status_kind == DDS::SUBSCRIPTION_MATCHED_STATUS)
+ {
+ DDS::DataReader_var dw = DDS::DataReader::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dw.in ()))
+ {
+ ++this->datareaders_count_;
+ ACE_DEBUG ((LM_DEBUG, "DataReaders found until now <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ DDS::DataWriter_var dr = DDS::DataWriter::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dr.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR : DATAREADER isn't nil when receiving an "
+ "on_subscription_matched status\n"));
+ }
+ }
+ }
+
+ //============================================================
+ // Component_exec_i
+ //============================================================
+ Component_exec_i::Component_exec_i (void)
+ : assignment_ (PORTUSAGE_ASSIGNMENT_WRITE),
+ datareaders_count_ (0),
+ datawriters_count_ (0)
+ {
+ }
+
+ Component_exec_i::~Component_exec_i (void)
+ {
+ }
+
+ // Supported operations and attributes.
+ void
+ Component_exec_i::check_writer ()
+ {
+ if (this->datawriters_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_writer - "
+ "ERROR : Unexpected number of DataWriters detected - "
+ "expected <1> - detected <%u>\n",
+ this->datawriters_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_writer - "
+ "OK : Detected the expected number of DataWriters - "
+ "expected <1> - detected <%u>\n",
+ this->datawriters_count_.value ()));
+ }
+ }
+
+ void
+ Component_exec_i::check_getter ()
+ {
+ if (this->datareaders_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_getter - "
+ "ERROR : Unexpected number of DataReaders detected - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_getter - "
+ "OK : Detected the expected number of DataReaders - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ }
+
+ void
+ Component_exec_i::check_listener ()
+ {
+ if (this->datareaders_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_listener - "
+ "ERROR : Unexpected number of DataReaders detected - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_listener - "
+ "OK : Detected the expected number of DataReaders - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ }
+
+ // Component attributes.
+ PortUsageAssignment
+ Component_exec_i::portusage_assignment()
+ {
+ return this->assignment_;
+ }
+
+ void
+ Component_exec_i::portusage_assignment(PortUsageAssignment assignment)
+ {
+ switch (assignment)
+ {
+ case PORTUSAGE_ASSIGNMENT_WRITE:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check writer port'\n"));
+ break;
+ case PORTUSAGE_ASSIGNMENT_GET:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check getter port'\n"));
+ break;
+ case PORTUSAGE_ASSIGNMENT_LISTEN:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check listener port'\n"));
+ break;
+ default:
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::portusage_assignment - "
+ "ERROR : Unknown assignment\n"));
+ break;
+
+ }
+ this->assignment_ = assignment;
+ }
+
+ // Port operations.
+ CCM_DDS::CCM_PortStatusListener_ptr
+ Component_exec_i::get_get_port_status()
+ {
+ return CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+ PortUsageEvent_Test::PortUsageTestConn::CCM_Listener_ptr
+ Component_exec_i::get_listen_port_data_listener()
+ {
+ return PortUsageEvent_Test::PortUsageTestConn::CCM_Listener::_nil ();
+ }
+
+ CCM_DDS::CCM_PortStatusListener_ptr
+ Component_exec_i::get_listen_port_status()
+ {
+ return CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+ CCM_DDS::CCM_ConnectorStatusListener_ptr
+ Component_exec_i::get_connector_status ()
+ {
+ return new ConnectorStatusListener_exec_i (
+ this->datareaders_count_,
+ this->datawriters_count_);
+ }
+
+ // Operations from Components::SessionComponent.
+ void
+ Component_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->context_ =
+ ::PortUsageEvent_Test::CCM_PortUsageEventComponent_Context::_narrow (ctx);
+ if ( ::CORBA::is_nil (this->context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Component_exec_i::configuration_complete (void)
+ {
+ }
+
+ void
+ Component_exec_i::ccm_activate (void)
+ {
+ }
+
+ void
+ Component_exec_i::ccm_passivate (void)
+ {
+ }
+
+ void
+ Component_exec_i::ccm_remove (void)
+ {
+ switch (this->assignment_)
+ {
+ case PORTUSAGE_ASSIGNMENT_WRITE:
+ this->check_writer ();
+ break;
+ case PORTUSAGE_ASSIGNMENT_GET:
+ this->check_getter ();
+ break;
+ case PORTUSAGE_ASSIGNMENT_LISTEN:
+ this->check_listener ();
+ break;
+ default:
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::ccm_remove - "
+ "ERROR : Unknown assignment\n"));
+ break;
+
+ }
+ }
+
+ extern "C" COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_PortUsageEvent_Component_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Component_exec_i);
+
+ return retval;
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.h b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.h
new file mode 100644
index 00000000000..d3cf4ff9b4f
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/EventComponent/PortUsageEvent_Component_exec.h
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef CIAO_COMPONENT_EXEC_H_
+#define CIAO_COMPONENT_EXEC_H_
+
+#include "PortUsageEvent_ComponentEC.h"
+
+#include /**/ "Component_exec_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/LocalObject.h"
+
+namespace CIAO_PortUsageEvent_Test_PortUsageEventComponent_Impl
+{
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong> Atomic_ULong;
+
+ //============================================================
+ // ConnectorStatusListener_exec_i
+ //============================================================
+ class COMPONENT_EXEC_Export ConnectorStatusListener_exec_i
+ : public virtual ::CCM_DDS::CCM_ConnectorStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ ConnectorStatusListener_exec_i (Atomic_ULong&,
+ Atomic_ULong&);
+ 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:
+ Atomic_ULong& datareaders_count_;
+ Atomic_ULong& datawriters_count_;
+ };
+
+ //============================================================
+ // Component_exec_i
+ //============================================================
+ class COMPONENT_EXEC_Export Component_exec_i
+ : public virtual PortUsageEventComponent_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Component_exec_i (void);
+ virtual ~Component_exec_i (void);
+
+ // Component attributes.
+ virtual PortUsageAssignment
+ portusage_assignment (void);
+
+ virtual void
+ portusage_assignment (PortUsageAssignment assignment);
+
+ // Port operations.
+ virtual CCM_DDS::CCM_PortStatusListener_ptr
+ get_get_port_status (void);
+
+ virtual PortUsageEvent_Test::PortUsageTestConn::CCM_Listener_ptr
+ get_listen_port_data_listener (void);
+
+ virtual CCM_DDS::CCM_PortStatusListener_ptr
+ get_listen_port_status (void);
+
+ virtual CCM_DDS::CCM_ConnectorStatusListener_ptr
+ get_connector_status ();
+
+ // Operations from Components::SessionComponent.
+ virtual void
+ set_session_context (
+ ::Components::SessionContext_ptr ctx);
+
+ virtual void configuration_complete (void);
+
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+
+ private:
+ ::PortUsageEvent_Test::CCM_PortUsageEventComponent_Context_var context_;
+ ::PortUsageEvent_Test::PortUsageTestConn::Reader_var reader_; //Listener
+ ::PortUsageEvent_Test::PortUsageTestConn::Writer_var writer_; //Writer
+ ::PortUsageEvent_Test::PortUsageTestConn::Getter_var getter_; //Getter
+
+ PortUsageAssignment assignment_;
+
+ Atomic_ULong datareaders_count_;
+ Atomic_ULong datawriters_count_;
+
+ // Supported operations and attributes.
+ void
+ check_writer (void);
+
+ void
+ check_getter (void);
+
+ void
+ check_listener (void);
+ };
+
+ extern "C" COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_PortUsageEvent_Component_Impl (void);
+}
+
+#endif /* ifndef */
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.idl b/CIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.idl
new file mode 100644
index 00000000000..a1067b2be0f
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.idl
@@ -0,0 +1,25 @@
+// $Id$
+
+/**
+ * @file PortUsageEvent_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef PORTUSAGE_EVENT_TEST_CONNECTOR_IDL_
+#define PORTUSAGE_EVENT_TEST_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include "Base/PortUsage_Test_Base.idl"
+#include "connectors/dds4ccm/idl/ccm_dds.idl"
+
+#pragma ciao lem "EventConnector/PortUsageEvent_ConnectorE.idl"
+
+module PortUsageEvent_Test
+{
+ module ::CCM_DDS::Typed < ::PortUsageTest, ::PortUsageTestSeq> PortUsageTestConn;
+ connector PortUsageEvent_Connector : PortUsageTestConn::DDS_Event
+ {
+ };
+};
+
+#endif /* PORTUSAGE_EVENT_TEST_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.mpc b/CIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.mpc
new file mode 100755
index 00000000000..d11121d36f6
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/EventConnector/PortUsageEvent_Connector.mpc
@@ -0,0 +1,145 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p PortUsage_Test_Base -l .. -o ../lib -u DDS PortUsageEvent_Connector"
+
+project(PortUsageEvent_Connector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=PortUsageEvent_Connector_stub_export.h \
+ -Wb,skel_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=PortUsageEvent_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=PortUsageEvent_Connector_svnt_export.h \
+ -Wb,conn_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=PortUsageEvent_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ PortUsageEvent_Connector.idl
+ }
+}
+
+project(PortUsageEvent_Connector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += PortUsageEvent_Connector_idl_gen
+ idlflags += -Wb,stub_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=PortUsageEvent_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I ..
+
+ IDL_Files {
+ PortUsageEvent_ConnectorE.idl
+ }
+}
+
+project(PortUsageEvent_Connector_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += PortUsageEvent_Connector_lem_gen PortUsageEvent_Connector_stub PortUsage_Test_Base_stub DDS4CCM_lem_stub
+ libs += PortUsage_Test_Base_stub PortUsageEvent_Connector_stub DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = PortUsageEvent_Connector_lem_stub
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_ConnectorEC.h
+ PortUsageEvent_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageEvent_ConnectorEC.inl
+ }
+}
+
+project(PortUsageEvent_Connector_stub) : ccm_stub, dds4ccm_base {
+ after += PortUsageEvent_Connector_idl_gen PortUsage_Test_Base_stub
+ libs += PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = PortUsageEvent_Connector_stub
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_ConnectorC.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_ConnectorC.h
+ PortUsageEvent_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageEvent_ConnectorC.inl
+ }
+}
+
+project(PortUsageEvent_Connector_exec) : ciao_executor, dds4ccm_impl {
+ after += PortUsageEvent_Connector_lem_stub PortUsageEvent_Connector_stub DDS4CCM_lem_stub PortUsage_Test_Base_stub
+ sharedname = PortUsageEvent_Connector_exec
+ libs += PortUsageEvent_Connector_stub PortUsageEvent_Connector_lem_stub PortUsage_Test_Base_stub DDS4CCM_lem_stub PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_Connector_conn.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_Connector_conn.h
+ PortUsageEvent_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(PortUsageEvent_Connector_svnt) : ciao_servant, dds4ccm_impl {
+ after += PortUsageEvent_Connector_lem_stub PortUsageEvent_Connector_exec PortUsageEvent_Connector_stub DDS4CCM_lem_stub
+ sharedname = PortUsageEvent_Connector_svnt
+ libs += PortUsageEvent_Connector_stub \
+ PortUsageEvent_Connector_lem_stub \
+ PortUsage_Test_Base_stub \
+ PortUsageEvent_Connector_exec \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageEvent_ConnectorS.cpp
+ PortUsageEvent_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ PortUsageEvent_ConnectorS.h
+ PortUsageEvent_Connector_svnt.h
+ PortUsageEvent_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ PortUsageEvent_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.idl b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.idl
new file mode 100644
index 00000000000..9c04651fe63
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.idl
@@ -0,0 +1,29 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef STATE_COMPONENT_IDL
+#define STATE_COMPONENT_IDL
+
+#include "StateConnector/PortUsageState_Connector.idl"
+
+module PortUsageState_Test
+{
+ component PortUsageStateComponent
+ {
+ port PortUsageTestConn::DDS_Update update_port;
+ port PortUsageTestConn::DDS_Read read_port;
+ port PortUsageTestConn::DDS_Get get_port;
+ port PortUsageTestConn::DDS_Listen listen_port;
+ port PortUsageTestConn::DDS_StateListen state_listen_port;
+
+ provides CCM_DDS::ConnectorStatusListener connector_status;
+
+ attribute PortUsageAssignment portusage_assignment;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.mpc b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.mpc
new file mode 100755
index 00000000000..cd3ede80694
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component.mpc
@@ -0,0 +1,151 @@
+// $Id$
+
+project(PortUsageState_Component_idl_gen) : componentidldefaults, dds4ccm {
+ custom_only = 1
+ after += PortUsageState_Connector_idl_gen
+ idlflags += -Wb,stub_export_macro=COMPONENT_STUB_Export \
+ -Wb,stub_export_include=Component_stub_export.h \
+ -Wb,skel_export_macro=COMPONENT_SVNT_Export \
+ -Wb,skel_export_include=Component_svnt_export.h \
+ -Wb,svnt_export_macro=COMPONENT_SVNT_Export \
+ -Wb,svnt_export_include=Component_svnt_export.h \
+ -Wb,exec_export_macro=COMPONENT_EXEC_Export \
+ -Wb,exec_export_include=Component_exec_export.h -I..
+
+ IDL_Files {
+ PortUsageState_Component.idl
+ }
+}
+
+project(PortUsageState_Component_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += PortUsageState_Component_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=COMPONENT_LEM_STUB_Export \
+ -Wb,stub_export_include=Component_lem_stub_export.h \
+ -SS -Gxhst -I..
+
+ IDL_Files {
+ PortUsageState_ComponentE.idl
+ }
+}
+
+project(PortUsageState_Component_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += PortUsageState_Component_lem_gen PortUsageState_Component_stub \
+ PortUsageState_Connector_stub PortUsage_Test_Base_stub
+ libs += StateComponent_stub PortUsageState_Connector_stub \
+ PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = StateComponent_lem_stub
+ dynamicflags = COMPONENT_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_ComponentEC.cpp
+ }
+
+ Header_Files {
+ PortUsageState_ComponentEC.h
+ Component_lem_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageState_ComponentEC.inl
+ }
+}
+
+project(PortUsageState_Component_stub) : ccm_stub, dds4ccm_base {
+ after += PortUsageState_Component_idl_gen PortUsageState_Connector_stub \
+ PortUsage_Test_Base_stub PortUsageState_Connector_lem_gen
+ libs += PortUsageState_Connector_stub PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = StateComponent_stub
+ dynamicflags = COMPONENT_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_ComponentC.cpp
+ }
+
+ Header_Files {
+ PortUsageState_ComponentC.h
+ Component_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageState_ComponentC.inl
+ }
+}
+
+project(PortUsageState_Component_exec) : ciao_executor, dds4ccm_base {
+ after += PortUsageState_Component_lem_stub PortUsageState_Component_stub \
+ PortUsage_Test_Base_stub PortUsageState_Connector_stub \
+ PortUsageState_Connector_lem_stub DDS4CCM_lem_stub
+ sharedname = StateComponent_exec
+ libs += StateComponent_stub StateComponent_lem_stub PortUsage_Test_Base_stub \
+ PortUsageState_Connector_stub PortUsageState_Connector_lem_stub \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = COMPONENT_EXEC_BUILD_DLL READER_STARTER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_Component_exec.cpp
+ }
+
+ Header_Files {
+ PortUsageState_Component_exec.h
+ Component_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(PortUsageState_Component_svnt) : ciao_servant, dds4ccm_base {
+ after += PortUsageState_Component_lem_stub PortUsage_Test_Base_stub \
+ PortUsageState_Connector_stub PortUsageState_Connector_svnt \
+ PortUsageState_Component_exec PortUsageState_Connector_lem_stub \
+ DDS4CCM_lem_stub DDS4CCM_skel
+ sharedname = StateComponent_svnt
+ libs += StateComponent_stub StateComponent_lem_stub PortUsage_Test_Base_stub \
+ PortUsageState_Connector_stub PortUsageState_Connector_svnt \
+ StateComponent_exec PortUsageState_Connector_lem_stub DDS4CCM_lem_stub \
+ DDS4CCM_skel
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = COMPONENT_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_ComponentS.cpp
+ PortUsageState_Component_svnt.cpp
+ }
+
+ Header_Files {
+ PortUsageState_ComponentS.h
+ PortUsageState_Component_svnt.h
+ Component_svnt_export.h
+ }
+
+ Inline_Files {
+ PortUsageState_ComponentS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.cpp b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.cpp
new file mode 100644
index 00000000000..1e546119b36
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.cpp
@@ -0,0 +1,365 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "PortUsageState_Component_exec.h"
+
+#include "ace/OS_NS_unistd.h"
+#include "ace/Log_Msg.h"
+#include "ciao/Logger/Log_Macros.h"
+#include "dds4ccm/impl/dds/Utils.h"
+
+namespace CIAO_PortUsageState_Test_PortUsageStateComponent_Impl
+{
+ //============================================================
+ // ConnectorStatusListener_exec_i
+ //============================================================
+ ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i (
+ Atomic_ULong& datareaders_count,
+ Atomic_ULong& datawriters_count)
+ : datareaders_count_ (datareaders_count),
+ datawriters_count_ (datawriters_count)
+ {
+ }
+
+ 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)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "ConnectorStatusListener_exec_i::on_unexpected_status <%C>\n",
+ CIAO::DDS4CCM::translate_statuskind (status_kind)));
+ if (status_kind == DDS::PUBLICATION_MATCHED_STATUS)
+ {
+ DDS::DataWriter_var dw = DDS::DataWriter::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dw.in ()))
+ {
+ ++this->datawriters_count_;
+ ACE_DEBUG ((LM_DEBUG, "DataWriters found until now <%u>\n",
+ this->datawriters_count_.value ()));
+ }
+ else
+ {
+ DDS::DataReader_var dr = DDS::DataReader::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dr.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR : DATAREADER isn't nil when receiving an "
+ "on_publication_matched status\n"));
+ }
+ }
+ }
+ if (status_kind == DDS::SUBSCRIPTION_MATCHED_STATUS)
+ {
+ DDS::DataReader_var dw = DDS::DataReader::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dw.in ()))
+ {
+ ++this->datareaders_count_;
+ ACE_DEBUG ((LM_DEBUG, "DataReaders found until now <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ DDS::DataWriter_var dr = DDS::DataWriter::_narrow (the_entity);
+ if (! ::CORBA::is_nil (dr.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR : DATAREADER isn't nil when receiving an "
+ "on_subscription_matched status\n"));
+ }
+ }
+ }
+
+ //============================================================
+ // Component_exec_i
+ //============================================================
+ Component_exec_i::Component_exec_i (void)
+ : assignment_ (PORTUSAGE_ASSIGNMENT_WRITE),
+ datareaders_count_ (0),
+ datawriters_count_ (0)
+ {
+ }
+
+ Component_exec_i::~Component_exec_i (void)
+ {
+ }
+
+ // Supported operations and attributes.
+ void
+ Component_exec_i::check_updater ()
+ {
+ if (this->datawriters_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_writer - "
+ "ERROR : Unexpected number of DataWriters detected - "
+ "expected <1> - detected <%u>\n",
+ this->datawriters_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_writer - "
+ "OK : Detected the expect number of DataWriters - "
+ "expected <1> - detected <%u>\n",
+ this->datawriters_count_.value ()));
+ }
+ }
+
+ void
+ Component_exec_i::check_getter ()
+ {
+ if (this->datareaders_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_getter - "
+ "ERROR : Unexpected number of DataReaders detected - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_getter - "
+ "OK : Detected the expected number of DataReaders - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ }
+
+ void
+ Component_exec_i::check_listener ()
+ {
+ if (this->datareaders_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_listener - "
+ "ERROR : Unexpected number of DataReaders detected - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_listener - "
+ "OK : Detected the expected number of DataReaders - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ }
+
+ void
+ Component_exec_i::check_reader ()
+ {
+ if (this->datareaders_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_reader - "
+ "ERROR : Unexpected number of DataReaders detected - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_reader - "
+ "OK : Detected the expected number of DataReaders - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ }
+
+ void
+ Component_exec_i::check_state_listen ()
+ {
+ if (this->datareaders_count_.value () != 1)
+ {
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::check_state_listen - "
+ "ERROR : Unexpected number of DataReaders detected - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "Component_exec_i::check_state_listen - "
+ "OK : Detected the expected number of DataReaders - "
+ "expected <1> - detected <%u>\n",
+ this->datareaders_count_.value ()));
+ }
+ }
+
+ // Component attributes.
+ PortUsageAssignment
+ Component_exec_i::portusage_assignment()
+ {
+ return this->assignment_;
+ }
+
+ void
+ Component_exec_i::portusage_assignment(PortUsageAssignment assignment)
+ {
+ switch (assignment)
+ {
+ case PORTUSAGE_ASSIGNMENT_UPDATE:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check updater port'\n"));
+ break;
+ case PORTUSAGE_ASSIGNMENT_GET:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check getter port'\n"));
+ break;
+ case PORTUSAGE_ASSIGNMENT_LISTEN:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check listener port'\n"));
+ break;
+ case PORTUSAGE_ASSIGNMENT_READ:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check reader port'\n"));
+ break;
+ case PORTUSAGE_ASSIGNMENT_STATELISTEN:
+ ACE_DEBUG ((LM_DEBUG, "New assigment: 'check state listen port'\n"));
+ break;
+ default:
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::portusage_assignment - "
+ "ERROR : Unknown assignment\n"));
+ break;
+
+ }
+ this->assignment_ = assignment;
+ }
+
+ // Port operations.
+ CCM_DDS::CCM_PortStatusListener_ptr
+ Component_exec_i::get_read_port_status()
+ {
+ return CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+ PortUsageState_Test::PortUsageTestConn::CCM_StateListener_ptr
+ Component_exec_i::get_state_listen_port_data_listener()
+ {
+ return PortUsageState_Test::PortUsageTestConn::CCM_StateListener::_nil ();
+ }
+
+ CCM_DDS::CCM_PortStatusListener_ptr
+ Component_exec_i::get_state_listen_port_status()
+ {
+ return CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+ CCM_DDS::CCM_ConnectorStatusListener_ptr
+ Component_exec_i::get_connector_status ()
+ {
+ return new ConnectorStatusListener_exec_i (
+ this->datareaders_count_,
+ this->datawriters_count_);
+ }
+
+ CCM_DDS::CCM_PortStatusListener_ptr
+ Component_exec_i::get_get_port_status (void)
+ {
+ return CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+ PortUsageState_Test::PortUsageTestConn::CCM_Listener_ptr
+ Component_exec_i::get_listen_port_data_listener (void)
+ {
+ return PortUsageState_Test::PortUsageTestConn::CCM_Listener::_nil ();
+ }
+
+ CCM_DDS::CCM_PortStatusListener_ptr
+ Component_exec_i::get_listen_port_status (void)
+ {
+ return CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+
+ // Operations from Components::SessionComponent.
+ void
+ Component_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->context_ =
+ ::PortUsageState_Test::CCM_PortUsageStateComponent_Context::_narrow (ctx);
+ if ( ::CORBA::is_nil (this->context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Component_exec_i::configuration_complete (void)
+ {
+ }
+
+ void
+ Component_exec_i::ccm_activate (void)
+ {
+ }
+
+ void
+ Component_exec_i::ccm_passivate (void)
+ {
+ }
+
+ void
+ Component_exec_i::ccm_remove (void)
+ {
+ switch (this->assignment_)
+ {
+ case PORTUSAGE_ASSIGNMENT_UPDATE:
+ this->check_updater ();
+ break;
+ case PORTUSAGE_ASSIGNMENT_GET:
+ this->check_getter ();
+ break;
+ case PORTUSAGE_ASSIGNMENT_LISTEN:
+ this->check_listener ();
+ break;
+ case PORTUSAGE_ASSIGNMENT_READ:
+ this->check_reader ();
+ break;
+ case PORTUSAGE_ASSIGNMENT_STATELISTEN:
+ this->check_state_listen ();
+ break;
+ default:
+ ACE_ERROR ((LM_ERROR, "Component_exec_i::ccm_remove - "
+ "ERROR : Unknown assignment\n"));
+ break;
+
+ }
+ }
+
+ extern "C" COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_PortUsageState_Component_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Component_exec_i);
+
+ return retval;
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.h b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.h
new file mode 100644
index 00000000000..fbc345bab50
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/StateComponent/PortUsageState_Component_exec.h
@@ -0,0 +1,140 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef CIAO_COMPONENT_EXEC_H_
+#define CIAO_COMPONENT_EXEC_H_
+
+#include "PortUsageState_ComponentEC.h"
+
+#include /**/ "Component_exec_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/LocalObject.h"
+
+namespace CIAO_PortUsageState_Test_PortUsageStateComponent_Impl
+{
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong> Atomic_ULong;
+
+ //============================================================
+ // ConnectorStatusListener_exec_i
+ //============================================================
+ class COMPONENT_EXEC_Export ConnectorStatusListener_exec_i
+ : public virtual ::CCM_DDS::CCM_ConnectorStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ ConnectorStatusListener_exec_i (Atomic_ULong&,
+ Atomic_ULong&);
+ 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:
+ Atomic_ULong& datareaders_count_;
+ Atomic_ULong& datawriters_count_;
+ };
+
+ //============================================================
+ // Component_exec_i
+ //============================================================
+ class COMPONENT_EXEC_Export Component_exec_i
+ : public virtual PortUsageStateComponent_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Component_exec_i (void);
+ virtual ~Component_exec_i (void);
+
+ // Component attributes.
+ virtual PortUsageAssignment
+ portusage_assignment (void);
+
+ virtual void
+ portusage_assignment (PortUsageAssignment assignment);
+
+ // Port operations.
+ virtual CCM_DDS::CCM_PortStatusListener_ptr
+ get_read_port_status (void);
+
+ virtual PortUsageState_Test::PortUsageTestConn::CCM_StateListener_ptr
+ get_state_listen_port_data_listener (void);
+
+ virtual CCM_DDS::CCM_PortStatusListener_ptr
+ get_state_listen_port_status (void);
+
+ virtual CCM_DDS::CCM_ConnectorStatusListener_ptr
+ get_connector_status ();
+
+ virtual CCM_DDS::CCM_PortStatusListener_ptr
+ get_get_port_status (void);
+
+ virtual PortUsageState_Test::PortUsageTestConn::CCM_Listener_ptr
+ get_listen_port_data_listener (void);
+
+ virtual CCM_DDS::CCM_PortStatusListener_ptr
+ get_listen_port_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);
+
+ private:
+ ::PortUsageState_Test::CCM_PortUsageStateComponent_Context_var context_;
+ ::PortUsageState_Test::PortUsageTestConn::Reader_var reader_; //Listener
+ ::PortUsageState_Test::PortUsageTestConn::Writer_var writer_; //Writer
+ ::PortUsageState_Test::PortUsageTestConn::Getter_var getter_; //Getter
+
+ PortUsageAssignment assignment_;
+
+ Atomic_ULong datareaders_count_;
+ Atomic_ULong datawriters_count_;
+
+ // Supported operations and attributes.
+ void
+ check_updater (void);
+
+ void
+ check_getter (void);
+
+ void
+ check_listener (void);
+
+ void
+ check_reader (void);
+
+ void
+ check_state_listen (void);
+ };
+
+ extern "C" COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_PortUsageState_Component_Impl (void);
+}
+
+#endif /* ifndef */
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.idl b/CIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.idl
new file mode 100644
index 00000000000..0e1d37bbbdb
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.idl
@@ -0,0 +1,25 @@
+// $Id$
+
+/**
+ * @file PortUsageEvent_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef PORTUSAGE_STATE_CONNECTOR_IDL_
+#define PORTUSAGE_STATE_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include "Base/PortUsage_Test_Base.idl"
+#include "connectors/dds4ccm/idl/ccm_dds.idl"
+
+#pragma ciao lem "StateConnector/PortUsageState_ConnectorE.idl"
+
+module PortUsageState_Test
+{
+ module ::CCM_DDS::Typed < ::PortUsageTest, ::PortUsageTestSeq> PortUsageTestConn;
+ connector PortUsageState_Connector : PortUsageTestConn::DDS_State
+ {
+ };
+};
+
+#endif /* PORTUSAGE_STATE_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.mpc b/CIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.mpc
new file mode 100755
index 00000000000..759675786e4
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/StateConnector/PortUsageState_Connector.mpc
@@ -0,0 +1,145 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p PortUsage_Test_Base -l .. -o ../lib -u DDS PortUsageState_Connector"
+
+project(PortUsageState_Connector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=PortUsageState_Connector_stub_export.h \
+ -Wb,skel_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=PortUsageState_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=PortUsageState_Connector_svnt_export.h \
+ -Wb,conn_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=PortUsageState_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ PortUsageState_Connector.idl
+ }
+}
+
+project(PortUsageState_Connector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += PortUsageState_Connector_idl_gen
+ idlflags += -Wb,stub_export_macro=PORTUSAGE_EVENT_TEST_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=PortUsageState_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I ..
+
+ IDL_Files {
+ PortUsageState_ConnectorE.idl
+ }
+}
+
+project(PortUsageState_Connector_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += PortUsageState_Connector_lem_gen PortUsageState_Connector_stub PortUsage_Test_Base_stub DDS4CCM_lem_stub
+ libs += PortUsage_Test_Base_stub PortUsageState_Connector_stub DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = PortUsageState_Connector_lem_stub
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ PortUsageState_ConnectorEC.h
+ PortUsageState_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageState_ConnectorEC.inl
+ }
+}
+
+project(PortUsageState_Connector_stub) : ccm_stub, dds4ccm_base {
+ after += PortUsageState_Connector_idl_gen PortUsage_Test_Base_stub
+ libs += PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = PortUsageState_Connector_stub
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_ConnectorC.cpp
+ }
+
+ Header_Files {
+ PortUsageState_ConnectorC.h
+ PortUsageState_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ PortUsageState_ConnectorC.inl
+ }
+}
+
+project(PortUsageState_Connector_exec) : ciao_executor, dds4ccm_impl {
+ after += PortUsageState_Connector_lem_stub PortUsageState_Connector_stub DDS4CCM_lem_stub PortUsage_Test_Base_stub
+ sharedname = PortUsageState_Connector_exec
+ libs += PortUsageState_Connector_stub PortUsageState_Connector_lem_stub PortUsage_Test_Base_stub DDS4CCM_lem_stub PortUsage_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_Connector_conn.cpp
+ }
+
+ Header_Files {
+ PortUsageState_Connector_conn.h
+ PortUsageState_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(PortUsageState_Connector_svnt) : ciao_servant, dds4ccm_impl {
+ after += PortUsageState_Connector_lem_stub PortUsageState_Connector_exec PortUsageState_Connector_stub DDS4CCM_lem_stub
+ sharedname = PortUsageState_Connector_svnt
+ libs += PortUsageState_Connector_stub \
+ PortUsageState_Connector_lem_stub \
+ PortUsage_Test_Base_stub \
+ PortUsageState_Connector_exec \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = PORTUSAGE_EVENT_TEST_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PortUsageState_ConnectorS.cpp
+ PortUsageState_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ PortUsageState_ConnectorS.h
+ PortUsageState_Connector_svnt.h
+ PortUsageState_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ PortUsageState_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Get.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Get.cdp
new file mode 100644
index 00000000000..d91244f0f19
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Get.cdp
@@ -0,0 +1,258 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Test_PortUsageEventComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>EventComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>EventComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageEvent_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageEvent_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_PortUsageEvent_Test_PortUsageEvent_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Test_PortUsageEvent_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageEvent_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageEvent_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_GET</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- a writer is need to force an on_subscription_matched -->
+ <connection>
+ <name>write_port_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>write_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>supplier_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>get_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>get_port_fresh_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>pull_consumer_fresh_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageEvent_Connector_ExecArtifact">
+ <name>PortUsageEvent_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageEvent_Connector_SvntArtifact">
+ <name>PortUsageEvent_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="PortUsageEvent_Connector_StubArtifact">
+ <name>PortUsageEvent_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>EventComponent_exec</name>
+ <source/>
+ <node/>
+ <location>EventComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>EventComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>EventComponent_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_StubArtifact">
+ <name>Component_stub</name>
+ <source/>
+ <node/>
+ <location>Component_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Listen.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Listen.cdp
new file mode 100644
index 00000000000..50f58675996
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Listen.cdp
@@ -0,0 +1,258 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Test_PortUsageEventComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>EventComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>EventComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageEvent_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageEvent_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_PortUsageEvent_Test_PortUsageEvent_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Test_PortUsageEvent_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageEvent_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageEvent_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_LISTEN</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- a writer is need to force an on_subscription_matched -->
+ <connection>
+ <name>write_port_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>write_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>supplier_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>listen_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>listen_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageEvent_Connector_ExecArtifact">
+ <name>PortUsageEvent_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageEvent_Connector_SvntArtifact">
+ <name>PortUsageEvent_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="PortUsageEvent_Connector_StubArtifact">
+ <name>PortUsageEvent_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>EventComponent_exec</name>
+ <source/>
+ <node/>
+ <location>EventComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>EventComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>EventComponent_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_StubArtifact">
+ <name>Component_stub</name>
+ <source/>
+ <node/>
+ <location>Component_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Write.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Write.cdp
new file mode 100644
index 00000000000..ac29fa7f6a7
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/Event_Write.cdp
@@ -0,0 +1,258 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Test_PortUsageEventComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>EventComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>EventComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageEvent_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageEvent_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_PortUsageEvent_Test_PortUsageEvent_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageEvent_Test_PortUsageEvent_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageEvent_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageEvent_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_WRITE</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>write_port_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>write_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>supplier_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <!-- a writer is need to force an on_publication_matched -->
+ <connection>
+ <name>listen_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>listen_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageEvent_Connector_ExecArtifact">
+ <name>PortUsageEvent_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageEvent_Connector_SvntArtifact">
+ <name>PortUsageEvent_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="PortUsageEvent_Connector_StubArtifact">
+ <name>PortUsageEvent_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>PortUsageEvent_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>EventComponent_exec</name>
+ <source/>
+ <node/>
+ <location>EventComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>EventComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>EventComponent_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_StubArtifact">
+ <name>Component_stub</name>
+ <source/>
+ <node/>
+ <location>Component_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Get.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Get.cdp
new file mode 100644
index 00000000000..0c254b0cde9
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Get.cdp
@@ -0,0 +1,258 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageStateComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageState_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageState_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_PortUsageState_Test_PortUsageState_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageState_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_GET</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- a writer is need to force an on_subscription_matched -->
+ <connection>
+ <name>update_port</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>update_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>get_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>get_port_fresh_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>pull_observer_fresh_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageState_Connector_ExecArtifact">
+ <name>PortUsageState_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_SvntArtifact">
+ <name>PortUsageState_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_StubArtifact">
+ <name>PortUsageState_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>StateComponent_exec</name>
+ <source/>
+ <node/>
+ <location>StateComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>StateComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>StateComponent_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_StubArtifact">
+ <name>StateComponent_stub</name>
+ <source/>
+ <node/>
+ <location>StateComponent_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Listen.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Listen.cdp
new file mode 100644
index 00000000000..7bd888143f3
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Listen.cdp
@@ -0,0 +1,258 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageStateComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageState_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageState_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_PortUsageState_Test_PortUsageState_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageState_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_LISTEN</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- a writer is need to force an on_subscription_matched -->
+ <connection>
+ <name>update_port</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>update_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>listen_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>listen_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_observer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageState_Connector_ExecArtifact">
+ <name>PortUsageState_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_SvntArtifact">
+ <name>PortUsageState_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_StubArtifact">
+ <name>PortUsageState_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>StateComponent_exec</name>
+ <source/>
+ <node/>
+ <location>StateComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>StateComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>StateComponent_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_StubArtifact">
+ <name>Component_stub</name>
+ <source/>
+ <node/>
+ <location>Component_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Read.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Read.cdp
new file mode 100644
index 00000000000..518631c10c9
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Read.cdp
@@ -0,0 +1,246 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageStateComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageState_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageState_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_PortUsageState_Test_PortUsageState_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageState_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_READ</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- a writer is need to force an on_subscription_matched -->
+ <connection>
+ <name>update_port_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>update_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>read_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>read_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>passive_observer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageState_Connector_ExecArtifact">
+ <name>PortUsageState_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_SvntArtifact">
+ <name>PortUsageState_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>StateComponent_exec</name>
+ <source/>
+ <node/>
+ <location>StateComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>StateComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>StateComponent_svnt</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_StateListen.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_StateListen.cdp
new file mode 100644
index 00000000000..b8030168f8d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_StateListen.cdp
@@ -0,0 +1,258 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageStateComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageState_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageState_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_PortUsageState_Test_PortUsageState_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageState_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_STATELISTEN</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- a writer is need to force an on_subscription_matched -->
+ <connection>
+ <name>update_port</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>update_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>state_listen_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>state_listen_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_state_observer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageState_Connector_ExecArtifact">
+ <name>PortUsageState_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_SvntArtifact">
+ <name>PortUsageState_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_StubArtifact">
+ <name>PortUsageState_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>StateComponent_exec</name>
+ <source/>
+ <node/>
+ <location>StateComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>StateComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>StateComponent_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_StubArtifact">
+ <name>Component_stub</name>
+ <source/>
+ <node/>
+ <location>Component_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Update.cdp b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Update.cdp
new file mode 100644
index 00000000000..6479d943a3b
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/State_Update.cdp
@@ -0,0 +1,258 @@
+<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>PortUsage_Test_Depl</label>
+ <UUID>PortUsage_Test_Depl</UUID>
+
+ <implementation xmi:id="ComponentImplementation">
+ <name>ComponentComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Component_ExecArtifact" />
+ <artifact xmi:idref="Component_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Component_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageStateComponent_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>StateComponent_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ConnectorImplementation">
+ <name>ConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="PortUsageState_Connector_ExecArtifact" />
+ <artifact xmi:idref="PortUsageState_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_PortUsageState_Test_PortUsageState_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_PortUsageState_Test_PortUsageState_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsageState_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <instance xmi:id="ComponentInstance">
+ <name>ComponentInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ComponentImplementation" />
+ <configProperty>
+ <name>portusage_assignment</name>
+ <value>
+ <type>
+ <kind>tk_enum</kind>
+ <enum>
+ <name>Assigment</name>
+ <typeId>IDL:Simple/Assignment:1.0</typeId>
+ <member>PORTUSAGE_ASSIGNMENT_WRITE</member>
+ <member>PORTUSAGE_ASSIGNMENT_GET</member>
+ <member>PORTUSAGE_ASSIGNMENT_LISTEN</member>
+ <member>PORTUSAGE_ASSIGNMENT_UPDATE</member>
+ <member>PORTUSAGE_ASSIGNMENT_READ</member>
+ <member>PORTUSAGE_ASSIGNMENT_STATELISTEN</member>
+ </enum>
+ </type>
+ <value>
+ <enum>PORTUSAGE_ASSIGNMENT_UPDATE</enum>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ConnectorInstance">
+ <name>ConnectorInstance</name>
+ <node>ComponentNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PortUsage_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>update_port</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>update_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <!-- a reader is need to force an on_publication_matched -->
+ <connection>
+ <name>read_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>read_port_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>passive_observer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>connector_status</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="PortUsageState_Connector_ExecArtifact">
+ <name>PortUsageState_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_SvntArtifact">
+ <name>PortUsageState_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="PortUsageState_Connector_StubArtifact">
+ <name>PortUsageState_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>PortUsageState_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Component_ExecArtifact">
+ <name>StateComponent_exec</name>
+ <source/>
+ <node/>
+ <location>StateComponent_exec</location>
+ </artifact>
+ <artifact xmi:id="Component_SvntArtifact">
+ <name>StateComponent_svnt</name>
+ <source/>
+ <node/>
+ <location>StateComponent_svnt</location>
+ </artifact>
+ <artifact xmi:id="Component_StubArtifact">
+ <name>Component_stub</name>
+ <source/>
+ <node/>
+ <location>Component_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/run_test.pl
new file mode 100755
index 00000000000..c26f639fb6d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/PortUsage/descriptors/run_test.pl
@@ -0,0 +1,217 @@
+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 = 1;
+@ports = ( 60001 );
+@iorbases = ( "NodeApp1.ior" );
+@iorfiles = 0;
+@nodenames = ( "ComponentNode" );
+
+# 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;
+
+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 node daemon\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;
+}
+
+if ($#ARGV == -1) {
+ opendir(DIR, ".");
+ @files = grep(/\.cdp$/,readdir(DIR));
+ closedir(DIR);
+}
+else {
+ @files = @ARGV;
+}
+
+create_targets ();
+init_ior_files ();
+
+foreach $file (@files) {
+ print "*********** Starting test for deployment $file ***********\n";
+
+ print STDERR "Starting Naming Service\n";
+
+ $NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 1 -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+ $NS->Spawn ();
+
+ 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 daemons\n";
+ kill_open_processes ();
+ exit 1;
+ }
+
+ $daemons_running = 1;
+
+ # Invoke execution manager.
+ print "Invoking execution manager\n";
+ $EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+ $EM->Spawn ();
+
+ 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";
+ $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $file -k file://$ior_emfile");
+ $E->SpawnWaitKill (5 * $tg_executor->ProcessStartWaitInterval ());
+
+ print "Sleeping 5 seconds to allow task to complete\n";
+ sleep (5);
+
+ print "Teardown the application\n";
+ $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $file -s");
+ $E->SpawnWaitKill (5 * $tg_executor->ProcessStartWaitInterval ());
+ print "Executor finished.\n";
+
+ delete_ior_files ();
+ kill_open_processes ();
+}
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;