summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2010-01-26 11:30:55 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2010-01-26 11:30:55 +0000
commite2f14c4ed2af60b503f401f6cbf4cf43e48ecca2 (patch)
tree6fc0c38c4ca3f520fc308e1a17764c6cc63542aa /CIAO/connectors/dds4ccm
parent231836689eb6918b30b07b7c96ce828f2a268f50 (diff)
downloadATCD-e2f14c4ed2af60b503f401f6cbf4cf43e48ecca2.tar.gz
Diffstat (limited to 'CIAO/connectors/dds4ccm')
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.idl28
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.mpc75
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.idl28
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.mpc145
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.cpp30
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.h61
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.idl26
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.mpc151
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.cpp295
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.h148
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.idl33
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.mpc149
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.cpp450
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.h189
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/Plan.cdp512
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/USER_QOS_PROFILES.xml123
-rw-r--r--CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/run_test.pl226
17 files changed, 2669 insertions, 0 deletions
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.idl b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.idl
new file mode 100644
index 00000000000..440941e210c
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.idl
@@ -0,0 +1,28 @@
+// $Id$
+
+/**
+ * @file Perf_Keyed_Test_Base.idl
+ * @author Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ */
+
+#ifndef PERF_KEYED_TEST_BASE_IDL
+#define PERF_KEYED_TEST_BASE_IDL
+
+//const long KEY_SIZE = 4;
+
+struct PerfKeyedTest {
+ string key; //@key
+ unsigned long seq_num;
+ long latency_ping;
+ unsigned long iteration;
+ unsigned long timestamp_ccm_sec;
+ long timestamp_ccm_usec;
+ //long timestamp_dds_sec;
+ //unsigned long timestamp_dds_usec;
+ //long duration_dds_sec;
+ //unsigned long duration_dds_usec;
+};
+
+typedef sequence<PerfKeyedTest> PerfKeyedTest_Seq;
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.mpc b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.mpc
new file mode 100644
index 00000000000..f2c91f30ae4
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Base/Perf_Keyed_Test_Base.mpc
@@ -0,0 +1,75 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -o ../lib -u DDS -n Perf_Keyed_Test_Base"
+
+project(DDS_Perf_Keyed_Test_Base_idl_gen) : taoidldefaults, anytypecode {
+ custom_only = 1
+ idlflags -= -St -Sa
+ idlflags += -SS -Gxhst \
+ -Wb,stub_export_macro=PERF_KEYED_TEST_BASE_STUB_Export \
+ -Wb,stub_export_include=Perf_Keyed_Test_Base_stub_export.h
+
+ IDL_Files {
+ Perf_Keyed_Test_Base.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Base_ndds_ts_gen) : ndds_ts_defaults {
+ custom_only = 1
+ after += DDS_Perf_Keyed_Test_Base_idl_gen
+
+ NDDSTypeSupport_Files {
+ Perf_Keyed_Test_Base.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Base_NDDS_TS) : nddslib, taolib {
+ after += DDS_Perf_Keyed_Test_Base_ndds_ts_gen DDS_Perf_Keyed_Test_Base_stub
+ libs += DDS_Perf_Keyed_Test_Base_stub
+ libout = ../lib
+ libpaths += ../lib
+ sharedname = DDS_Perf_Keyed_Test_Base_NDDS_TS
+ dynamicflags = NDDS_USER_DLL_EXPORT
+
+ verbatim(gnuace, macros) {
+ override no_hidden_visibility = 1
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_Base.cxx
+ Perf_Keyed_Test_BasePlugin.cxx
+ Perf_Keyed_Test_BaseSupport.cxx
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_Base.h
+ Perf_Keyed_Test_BasePlugin.h
+ Perf_Keyed_Test_BaseSupport.h
+ }
+
+ Inline_Files {
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Base_stub) : ccm_stub {
+ after += DDS_Perf_Keyed_Test_Base_idl_gen
+ libout = ../lib
+ libpaths += ../lib
+ sharedname = DDS_Perf_Keyed_Test_Base_stub
+ dynamicflags = PERF_KEYED_TEST_BASE_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_BaseC.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_BaseC.h
+ Perf_Keyed_Test_Base_stub_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_BaseC.inl
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.idl b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.idl
new file mode 100644
index 00000000000..b8488d82a14
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.idl
@@ -0,0 +1,28 @@
+// $Id$
+
+/**
+ * @file Perf_Keyed_Test_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ *
+ * by-hand translation of the idl3p.
+ */
+
+#ifndef PERF_KEYED_TEST_CONNECTOR_IDL_
+#define PERF_KEYED_TEST_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include "Base/Perf_Keyed_Test_Base.idl"
+#include "connectors/dds4ccm/idl/ccm_dds.idl"
+
+#pragma ciao lem "Connector/Perf_Keyed_Test_ConnectorE.idl"
+
+TYPED_MODULE( ::PerfKeyedTest, ::PerfKeyedTest_Seq, PerfKeyedTest)
+
+module Perf_Keyed_Test
+{
+ connector Perf_Keyed_Test_Connector : ::CCM_DDS::PerfKeyedTest::DDS_Event
+ {
+ };
+};
+
+#endif /* Perf_Keyed_Test_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.mpc b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.mpc
new file mode 100644
index 00000000000..3fbbc9c0024
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector.mpc
@@ -0,0 +1,145 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p DDS_Perf_Keyed_Test_Base -l .. -o ../lib -u DDS Perf_Keyed_Test_Connector"
+
+project(DDS_Perf_Keyed_Test_Connector_idl_gen) : connectoridldefaults {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=PERF_KEYED_TEST_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=Perf_Keyed_Test_Connector_stub_export.h \
+ -Wb,skel_export_macro=PERF_KEYED_TEST_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=Perf_Keyed_Test_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=PERF_KEYED_TEST_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=Perf_Keyed_Test_Connector_svnt_export.h \
+ -Wb,exec_export_macro=PERF_KEYED_TEST_CONNECTOR_EXEC_Export \
+ -Wb,exec_export_include=Perf_Keyed_Test_Connector_exec_export.h \
+ -I ..
+
+ IDL_Files {
+ Perf_Keyed_Test_Connector.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Connector_lem_gen) : ciaoidldefaults {
+ custom_only = 1
+ after += DDS_Perf_Keyed_Test_Connector_idl_gen
+ idlflags += -Wb,stub_export_macro=PERF_KEYED_TEST_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=Perf_Keyed_Test_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I .. -I $(CIAO_ROOT)/connectors -I$(CIAO_ROOT)/connectors/dds4ccm/idl
+
+ IDL_Files {
+ Perf_Keyed_Test_ConnectorE.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Connector_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Connector_lem_gen DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Base_stub DDS4CCM_lem_stub
+ libs += DDS_Perf_Keyed_Test_Base_stub DDS_Perf_Keyed_Test_Connector_stub DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = DDS_Perf_Keyed_Test_Connector_lem_stub
+ dynamicflags = PERF_KEYED_TEST_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_ConnectorEC.h
+ Perf_Keyed_Test_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_ConnectorEC.inl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Connector_stub) : ccm_stub, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Connector_idl_gen DDS_Perf_Keyed_Test_Base_stub
+ libs += DDS_Perf_Keyed_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = DDS_Perf_Keyed_Test_Connector_stub
+ dynamicflags = PERF_KEYED_TEST_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_ConnectorC.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_ConnectorC.h
+ Perf_Keyed_Test_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_ConnectorC.inl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Connector_exec) : ciao_executor, dds4ccm_impl {
+ after += DDS_Perf_Keyed_Test_Connector_lem_stub DDS_Perf_Keyed_Test_Connector_stub DDS4CCM_lem_stub CIAO_DDS4CCM_NDDS_Impl DDS_Perf_Keyed_Test_Base_NDDS_TS
+ sharedname = DDS_Perf_Keyed_Test_Connector_exec
+ libs += DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Connector_lem_stub DDS_Perf_Keyed_Test_Base_stub CIAO_DDS4CCM_NDDS_Impl DDS4CCM_lem_stub DDS_Perf_Keyed_Test_Base_NDDS_TS
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = PERF_KEYED_TEST_CONNECTOR_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_Connector_exec.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_Connector_exec.h
+ Perf_Keyed_Test_Connector_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(DDS_Perf_Keyed_Test_Connector_svnt) : ciao_servant, dds4ccm_skel, nddslib {
+ after += DDS_Perf_Keyed_Test_Connector_lem_stub DDS_Perf_Keyed_Test_Connector_exec DDS_Perf_Keyed_Test_Connector_stub DDS4CCM_lem_stub
+ sharedname = DDS_Perf_Keyed_Test_Connector_svnt
+ libs += DDS_Perf_Keyed_Test_Connector_stub \
+ DDS_Perf_Keyed_Test_Connector_lem_stub \
+ DDS_Perf_Keyed_Test_Base_stub \
+ DDS_Perf_Keyed_Test_Connector_exec \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = PERF_KEYED_TEST_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_ConnectorS.cpp
+ Perf_Keyed_Test_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_ConnectorS.h
+ Perf_Keyed_Test_Connector_svnt.h
+ Perf_Keyed_Test_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.cpp b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.cpp
new file mode 100644
index 00000000000..4b8f4f9ad28
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.cpp
@@ -0,0 +1,30 @@
+// -*- C++ -*-
+// $Id$
+
+#include "Perf_Keyed_Test_Connector_exec.h"
+
+namespace CIAO_Perf_Keyed_Test_Perf_Keyed_Test_Connector_Impl
+{
+ Perf_Keyed_Test_Connector_exec_i::Perf_Keyed_Test_Connector_exec_i (void)
+ : DDS_Event_Connector_T<PerfKeyedTest_DDS_Traits, PerfKeyedTest_Connector_Traits> ()
+ {
+ }
+
+ Perf_Keyed_Test_Connector_exec_i::~Perf_Keyed_Test_Connector_exec_i (void)
+ {
+ }
+
+ extern "C" PERF_KEYED_TEST_CONNECTOR_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_Perf_Keyed_Test_Perf_Keyed_Test_Connector_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Perf_Keyed_Test_Connector_exec_i ());
+
+ return retval;
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.h b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.h
new file mode 100644
index 00000000000..b35301c7a08
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Connector/Perf_Keyed_Test_Connector_exec.h
@@ -0,0 +1,61 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef PERF_KEYED_TEST_CONNECTOR_EXEC_H_
+#define PERF_KEYED_TEST_CONNECTOR_EXEC_H_
+
+#include /**/ "ace/pre.h"
+
+#include "Perf_Keyed_Test_ConnectorEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Perf_Keyed_Test_Connector_exec_export.h"
+#include "tao/LocalObject.h"
+
+#include "dds4ccm/impl/ndds/DDS4CCM_Traits.h"
+#include "dds4ccm/impl/ndds/DDS_Event_Connector_T.h"
+
+#include "Base/Perf_Keyed_Test_BaseSupport.h"
+
+namespace CIAO_Perf_Keyed_Test_Perf_Keyed_Test_Connector_Impl
+{
+
+ // @from use of PerfKeyedTest as a parameter
+ typedef CIAO::DDS4CCM::RTI::Type_Traits <
+ PerfKeyedTest,
+ PerfKeyedTestSeq,
+ PerfKeyedTestTypeSupport,
+ PerfKeyedTestDataWriter,
+ PerfKeyedTestDataReader > PerfKeyedTest_DDS_Traits;
+
+ typedef CIAO::DDS4CCM::Connector_Traits <
+ ::CIAO_Perf_Keyed_Test_Perf_Keyed_Test_Connector_Impl::Perf_Keyed_Test_Connector_Exec,
+ PerfKeyedTest_Seq,
+ ::CCM_DDS::PerfKeyedTest::CCM_Writer,
+ ::CCM_DDS::PerfKeyedTest::CCM_Updater,
+ ::CCM_DDS::PerfKeyedTest::CCM_Getter,
+ ::CCM_DDS::PerfKeyedTest::CCM_Reader,
+ ::Perf_Keyed_Test::CCM_Perf_Keyed_Test_Connector_Context,
+ ::CCM_DDS::PerfKeyedTest::Listener,
+ ::CCM_DDS::PerfKeyedTest::StateListener,
+ ::CCM_DDS::ConnectorStatusListener> PerfKeyedTest_Connector_Traits;
+
+ class PERF_KEYED_TEST_CONNECTOR_EXEC_Export Perf_Keyed_Test_Connector_exec_i :
+ public DDS_Event_Connector_T <PerfKeyedTest_DDS_Traits, PerfKeyedTest_Connector_Traits>
+ {
+ public:
+ Perf_Keyed_Test_Connector_exec_i (void);
+ virtual ~Perf_Keyed_Test_Connector_exec_i (void);
+ };
+
+ extern "C" PERF_KEYED_TEST_CONNECTOR_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_Perf_Keyed_Test_Perf_Keyed_Test_Connector_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
+
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.idl b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.idl
new file mode 100644
index 00000000000..88e3375688d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.idl
@@ -0,0 +1,26 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef RECEIVER_IDL
+#define RECEIVER_IDL
+
+#include "Connector/Perf_Keyed_Test_Connector.idl"
+
+module Perf_Keyed_Test
+{
+ component Receiver
+ {
+ port CCM_DDS::PerfKeyedTest::DDS_Listen info_listen;
+ provides CCM_DDS::ConnectorStatusListener info_listen_connector_status;
+ port CCM_DDS::PerfKeyedTest::DDS_Write write_ping;
+
+ attribute unsigned short keys;
+ attribute unsigned short iterations;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.mpc b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.mpc
new file mode 100644
index 00000000000..67e486c9724
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver.mpc
@@ -0,0 +1,151 @@
+// $Id$
+
+project(DDS_Perf_Keyed_Test_Receiver_idl_gen) : componentidldefaults {
+ custom_only = 1
+ after += DDS_Perf_Keyed_Test_Connector_idl_gen
+ idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export \
+ -Wb,stub_export_include=Receiver_stub_export.h \
+ -Wb,skel_export_macro=RECEIVER_SVNT_Export \
+ -Wb,skel_export_include=Receiver_svnt_export.h \
+ -Wb,svnt_export_macro=RECEIVER_SVNT_Export \
+ -Wb,svnt_export_include=Receiver_svnt_export.h \
+ -Wb,exec_export_macro=RECEIVER_EXEC_Export \
+ -Wb,exec_export_include=Receiver_exec_export.h -I..
+
+ IDL_Files {
+ Perf_Keyed_Test_Receiver.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Receiver_lem_gen) : ciaoidldefaults {
+ after += DDS_Perf_Keyed_Test_Receiver_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=RECEIVER_LEM_STUB_Export \
+ -Wb,stub_export_include=Receiver_lem_stub_export.h \
+ -SS -Gxhst -I..
+
+ IDL_Files {
+ Perf_Keyed_Test_ReceiverE.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Receiver_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Receiver_lem_gen DDS_Perf_Keyed_Test_Receiver_stub \
+ DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Base_stub
+ libs += Receiver_stub DDS_Perf_Keyed_Test_Connector_stub \
+ DDS_Perf_Keyed_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_lem_stub
+ dynamicflags = RECEIVER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_ReceiverEC.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_ReceiverEC.h
+ Receiver_lem_stub_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_ReceiverEC.inl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Receiver_stub) : ccm_stub, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Receiver_idl_gen DDS_Perf_Keyed_Test_Connector_stub \
+ DDS_Perf_Keyed_Test_Base_stub DDS_Perf_Keyed_Test_Connector_lem_gen
+ libs += DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_stub
+ dynamicflags = RECEIVER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_ReceiverC.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_ReceiverC.h
+ Receiver_stub_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_ReceiverC.inl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Receiver_exec) : ciao_executor, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Receiver_lem_stub DDS_Perf_Keyed_Test_Receiver_stub \
+ DDS_Perf_Keyed_Test_Base_stub DDS_Perf_Keyed_Test_Connector_stub \
+ DDS_Perf_Keyed_Test_Connector_lem_stub DDS4CCM_lem_stub
+ sharedname = Receiver_exec
+ libs += Receiver_stub Receiver_lem_stub DDS_Perf_Keyed_Test_Base_stub \
+ DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Connector_lem_stub \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = RECEIVER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_Receiver_exec.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_Receiver_exec.h
+ Receiver_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(DDS_Perf_Keyed_Test_Receiver_svnt) : ciao_servant, dds4ccm_base, nddslib {
+ after += DDS_Perf_Keyed_Test_Receiver_lem_stub DDS_Perf_Keyed_Test_Base_stub \
+ DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Connector_svnt \
+ DDS_Perf_Keyed_Test_Receiver_exec DDS_Perf_Keyed_Test_Connector_lem_stub \
+ DDS4CCM_lem_stub DDS4CCM_skel
+ sharedname = Receiver_svnt
+ libs += Receiver_stub Receiver_lem_stub DDS_Perf_Keyed_Test_Base_stub \
+ DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Connector_svnt \
+ Receiver_exec DDS_Perf_Keyed_Test_Connector_lem_stub DDS4CCM_lem_stub \
+ DDS4CCM_skel
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = RECEIVER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_ReceiverS.cpp
+ Perf_Keyed_Test_Receiver_svnt.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_ReceiverS.h
+ Perf_Keyed_Test_Receiver_svnt.h
+ Receiver_svnt_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_ReceiverS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.cpp
new file mode 100644
index 00000000000..b42460b941c
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.cpp
@@ -0,0 +1,295 @@
+// -*- C++ -*-
+//
+// $Id$
+
+#include "Perf_Keyed_Test_Receiver_exec.h"
+#include "ciao/Logger/Log_Macros.h"
+#include "ace/OS_NS_sys_time.h"
+#include "ace/os_ns_unistd.h"
+
+
+namespace CIAO_Perf_Keyed_Test_Receiver_Impl
+{
+ //============================================================
+ // PerfKeyedTest_Listener_exec_i
+ //============================================================
+ PerfKeyedTest_Listener_exec_i::PerfKeyedTest_Listener_exec_i (
+ Receiver_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ PerfKeyedTest_Listener_exec_i::~PerfKeyedTest_Listener_exec_i (void)
+ {
+ }
+
+ void
+ PerfKeyedTest_Listener_exec_i::on_one_data (
+ const PerfKeyedTest & an_instance,
+ const ::CCM_DDS::ReadInfo & /*info*/)
+ {
+ ACE_OS::sleep(1); //temporarily set to 1 sec for testing time results, if not set
+ // time now (in usec) == time ccm (in usec) -> duration = 0 .
+ // TO DO: solve this by using other/more data and lesser measure points for statistic purposes.
+ ACE_Time_Value now = ACE_OS::gettimeofday ();
+ ACE_Time_Value ccm_rec (an_instance.timestamp_ccm_sec,
+ an_instance.timestamp_ccm_usec);
+ ACE_DEBUG ((LM_DEBUG, "RECEIVER PerfKeyedTest_Listener_exec_i::on_one_data:\n "
+ "key <%C> - iteration <%d> - latency_ping <%d>\n, ccm_sec %u, ccm_usec %u\n",
+ an_instance.key.in (),
+ an_instance.iteration,
+ an_instance.latency_ping,
+ an_instance.timestamp_ccm_sec,
+ an_instance.timestamp_ccm_usec));
+ this->callback_.record_time (now, ccm_rec);
+ ACE_OS::sleep(1); //temporarily set to 1 sec for testing time results
+
+ // Send back a packet if this is a ping
+ if (an_instance.latency_ping == 1L)
+ {
+ //printf("send ping back\n");
+ this->callback_.write_one(an_instance);
+ }
+ else
+ {
+ // printf("send no back\n");
+
+ }
+ }
+
+ void
+ PerfKeyedTest_Listener_exec_i::on_many_data (
+ const PerfKeyedTest_Seq & /*an_instance*/,
+ const ::CCM_DDS::ReadInfoSeq & /*info*/)
+ {
+ }
+
+ //============================================================
+ // ConnectorStatusListener_exec_i
+ //============================================================
+ ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i (
+ Receiver_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ ConnectorStatusListener_exec_i::~ConnectorStatusListener_exec_i (void)
+ {
+ }
+
+ void ConnectorStatusListener_exec_i::on_inconsistent_topic(
+ ::DDS::Topic_ptr ,
+ const DDS::InconsistentTopicStatus & )
+ {
+ }
+
+ void ConnectorStatusListener_exec_i::on_requested_incompatible_qos(
+ ::DDS::DataReader_ptr ,
+ const DDS::RequestedIncompatibleQosStatus & )
+ {
+ }
+
+ void ConnectorStatusListener_exec_i::on_sample_rejected(
+ ::DDS::DataReader_ptr ,
+ const DDS::SampleRejectedStatus & )
+ {
+ }
+
+ void ConnectorStatusListener_exec_i::on_offered_deadline_missed(
+ ::DDS::DataWriter_ptr ,
+ const DDS::OfferedDeadlineMissedStatus & )
+ {
+ }
+
+ void ConnectorStatusListener_exec_i::on_offered_incompatible_qos(
+ ::DDS::DataWriter_ptr ,
+ const DDS::OfferedIncompatibleQosStatus & )
+ {
+ }
+
+ void ConnectorStatusListener_exec_i::on_unexpected_status(
+ ::DDS::Entity_ptr ,
+ ::DDS::StatusKind status_kind)
+ {
+ if (status_kind == ::DDS::DATA_ON_READERS_STATUS)
+ {
+// printf("data on readers\n");
+ this->callback_.start ();
+ }
+ }
+
+ //============================================================
+ // Receiver_exec_i
+ //============================================================
+ Receiver_exec_i::Receiver_exec_i (void)
+ : tv_total_ (0L),
+ tv_max_ (0L),
+ tv_min_ (0L),
+ count_ (0L),
+ started_ (false),
+ iterations_ (10),
+ keys_ (5)
+ {
+ }
+
+ Receiver_exec_i::~Receiver_exec_i (void)
+ {
+ }
+ void
+ Receiver_exec_i::write_one ( const PerfKeyedTest & an_instance)
+ {
+ PerfKeyedTest * dup_ = new PerfKeyedTest;
+ dup_->iteration = an_instance.iteration;
+ dup_->key = CORBA::string_dup(an_instance.key);
+ dup_->seq_num = an_instance.seq_num;
+ dup_->timestamp_ccm_sec = an_instance.timestamp_ccm_sec;
+ dup_->timestamp_ccm_usec = an_instance.timestamp_ccm_usec;
+ dup_->latency_ping = -1L;
+
+ this->writer_->write_one (*dup_, ::DDS::HANDLE_NIL);
+ }
+
+ void
+ Receiver_exec_i::start ()
+ {
+ if (!this->started_.value ())
+ {
+ this->started_ = true;
+ ::CCM_DDS::DataListenerControl_var dlc =
+ this->context_->get_connection_info_listen_data_control ();
+ dlc->mode (::CCM_DDS::ONE_BY_ONE);
+ }
+ }
+
+
+ void
+ Receiver_exec_i::record_time (const ACE_Time_Value &now,
+ const ACE_Time_Value &ccm)
+ {
+ //printf("COUNT voor = %lu, now sec % u and usec %u \n",this->count_.value (),static_cast <CORBA::Long>(now.sec()),now.usec());
+ //printf("COUNT voor = %lu, ccm sec % u and usec %u \n",this->count_.value (),static_cast <CORBA::Long>(ccm.sec()),ccm.usec());
+ ACE_Time_Value dur = now - ccm;
+ ++this->count_;
+ //printf("COUNT na = %lu , dur sec % u and usec %u \n",this->count_.value (),static_cast <CORBA::Long>(dur.sec()),dur.usec());
+
+ long duration = dur.usec () + (static_cast <CORBA::Long>(dur.sec() * 1000000));
+ this->tv_total_ += duration;
+ if (duration > this->tv_max_.value ()|| (this->tv_max_.value () == 0))
+ this->tv_max_ = duration;
+ if (duration < this->tv_min_.value () || (this->tv_min_.value () == 0))
+ this->tv_min_ = duration;
+ double avg = this->tv_total_.value () / this->count_.value ();
+
+
+ ACE_DEBUG((LM_ERROR, "=========\n RECEIVER: record_time\n "
+ "samples <%u>\n - duration <%u> total time <%u>\n "
+ "- avg <%6.01f>\n - min <%u>\n - max <%u>\n ================\n",
+ this->count_.value (),
+ duration,
+ this->tv_total_.value (),
+ avg,
+ this->tv_min_.value (),
+ this->tv_max_.value ()));
+
+ }
+
+ ::CCM_DDS::PerfKeyedTest::CCM_Listener_ptr
+ Receiver_exec_i::get_info_listen_data_listener (void)
+ {
+ return new PerfKeyedTest_Listener_exec_i (*this);
+ }
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ Receiver_exec_i::get_info_listen_status (void)
+ {
+ return ::CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+ ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ Receiver_exec_i::get_info_listen_connector_status (void)
+ {
+ return new ConnectorStatusListener_exec_i (*this);
+ }
+
+ ::CORBA::UShort
+ Receiver_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Receiver_exec_i::iterations (::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ ::CORBA::UShort
+ Receiver_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Receiver_exec_i::keys (::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ }
+
+ void
+ Receiver_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->context_ =
+ ::Perf_Keyed_Test::CCM_Receiver_Context::_narrow (ctx);
+ if ( ::CORBA::is_nil (this->context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Receiver_exec_i::configuration_complete (void)
+ {
+ }
+
+ void
+ Receiver_exec_i::ccm_activate (void)
+ {
+ this->writer_ = this->context_->get_connection_write_ping_data ();
+
+ }
+
+ void
+ Receiver_exec_i::ccm_passivate (void)
+ {
+ double avg = this->tv_total_.value () / this->count_.value ();
+ ACE_DEBUG((LM_ERROR, "SUMMARY RECEIVER:\n "
+ "samples <%u>\n - total time <%u>\n "
+ "- avg <%6.01f>\n - min <%u>\n - max <%u>\n",
+ this->count_.value (),
+ this->tv_total_.value (),
+ avg,
+ this->tv_min_.value (),
+ this->tv_max_.value ()));
+ }
+
+ void
+ Receiver_exec_i::ccm_remove (void)
+ {
+
+
+ }
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_Perf_Keyed_Test_Receiver_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Receiver_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.h b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.h
new file mode 100644
index 00000000000..e76c8fb9ba1
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Receiver/Perf_Keyed_Test_Receiver_exec.h
@@ -0,0 +1,148 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef CIAO_RECEIVER_EXEC_H_
+#define CIAO_RECEIVER_EXEC_H_
+
+#include "Perf_Keyed_Test_ReceiverEC.h"
+
+#include /**/ "Receiver_exec_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/LocalObject.h"
+#include "ace/Reactor.h"
+#include "ace/Task.h"
+
+#include <map>
+
+namespace CIAO_Perf_Keyed_Test_Receiver_Impl
+{
+ class Receiver_exec_i;
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULongLong> Atomic_ULongLong;
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong> Atomic_ULong;
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, bool> Atomic_Bool;
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Long> Atomic_Long;
+
+
+ //============================================================
+ // PerfKeyedTest_Listener_exec_i
+ //============================================================
+ class RECEIVER_EXEC_Export PerfKeyedTest_Listener_exec_i
+ : public virtual ::CCM_DDS::PerfKeyedTest::CCM_Listener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ PerfKeyedTest_Listener_exec_i (Receiver_exec_i &callback);
+ virtual ~PerfKeyedTest_Listener_exec_i (void);
+
+ virtual void
+ on_one_data (
+ const PerfKeyedTest & an_instance,
+ const ::CCM_DDS::ReadInfo & info);
+ virtual void
+ on_many_data (
+ const PerfKeyedTest_Seq & an_instance,
+ const ::CCM_DDS::ReadInfoSeq & info);
+ private:
+ Receiver_exec_i &callback_;
+ };
+
+ //============================================================
+ // ConnectorStatusListener_exec_i
+ //============================================================
+ class RECEIVER_EXEC_Export ConnectorStatusListener_exec_i
+ : public virtual ::CCM_DDS::CCM_ConnectorStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ ConnectorStatusListener_exec_i (Receiver_exec_i &callback);
+ virtual ~ConnectorStatusListener_exec_i (void);
+
+ virtual
+ void on_inconsistent_topic( ::DDS::Topic_ptr ,
+ const DDS::InconsistentTopicStatus & );
+ virtual
+ void on_requested_incompatible_qos( ::DDS::DataReader_ptr ,
+ const DDS::RequestedIncompatibleQosStatus & );
+ virtual
+ void on_sample_rejected( ::DDS::DataReader_ptr ,
+ const DDS::SampleRejectedStatus & );
+ virtual
+ void on_offered_deadline_missed( ::DDS::DataWriter_ptr ,
+ const DDS::OfferedDeadlineMissedStatus & );
+ virtual
+ void on_offered_incompatible_qos( ::DDS::DataWriter_ptr ,
+ const DDS::OfferedIncompatibleQosStatus & );
+ virtual
+ void on_unexpected_status( ::DDS::Entity_ptr ,
+ ::DDS::StatusKind );
+ private:
+ Receiver_exec_i &callback_;
+ };
+
+ //============================================================
+ // Receiver_exec_i
+ //============================================================
+ class RECEIVER_EXEC_Export Receiver_exec_i
+ : public virtual Receiver_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Receiver_exec_i (void);
+ virtual ~Receiver_exec_i (void);
+
+ void start ();
+ void record_time (const ACE_Time_Value &now,
+ const ACE_Time_Value &ccm);
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+
+ virtual void keys (::CORBA::UShort keys);
+
+ virtual ::CCM_DDS::PerfKeyedTest::CCM_Listener_ptr
+ get_info_listen_data_listener (void);
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_info_listen_status (void);
+
+ virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ get_info_listen_connector_status (void);
+
+ virtual void
+ set_session_context (
+ ::Components::SessionContext_ptr ctx);
+
+ virtual void configuration_complete (void);
+
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+
+ void write_one (const PerfKeyedTest & an_instance);
+
+
+ private:
+ ::Perf_Keyed_Test::CCM_Receiver_Context_var context_;
+ CCM_DDS::PerfKeyedTest::Writer_var writer_;
+
+ Atomic_Long tv_total_;
+ Atomic_Long tv_max_;
+ Atomic_Long tv_min_;
+ Atomic_ULong count_;
+ Atomic_Bool started_;
+ CORBA::UShort iterations_;
+ CORBA::UShort keys_;
+ };
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_Perf_Keyed_Test_Receiver_Impl (void);
+}
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.idl b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.idl
new file mode 100644
index 00000000000..e9d70245afe
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.idl
@@ -0,0 +1,33 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marijke Hengstmengel <mhengstmengel@remedy.nl>
+ *
+ * by-hand idl3 translation of sender components.
+ */
+
+#ifndef DDS_PERF_KEYED_TEST_SENDER_IDL
+#define DDS_PERF_KEYED_TEST_SENDER_IDL
+
+#include "Connector/Perf_Keyed_Test_Connector.idl"
+
+
+module Perf_Keyed_Test
+{
+ component Sender
+ {
+ port CCM_DDS::PerfKeyedTest::DDS_Write info_write;
+ attribute unsigned short keys;
+ attribute unsigned short iterations;
+ attribute unsigned short latency_count; //number of samples sent before a latency ping packet is sent. default 100000, < sample_count
+ attribute unsigned short sleep; //time to sleep between each send
+ provides CCM_DDS::ConnectorStatusListener connector_status;
+ port CCM_DDS::PerfKeyedTest::DDS_Listen ping_listen;
+ // attribute unsigned short sample_count;
+ // attribute unsigned short latency_count;
+ //
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.mpc b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.mpc
new file mode 100644
index 00000000000..d026e06f8c2
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender.mpc
@@ -0,0 +1,149 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p DDS_Perf_Keyed_Test_Base -l ../lib -o ../lib -c controller -u DDS Sender"
+
+project(DDS_Perf_Keyed_Test_Sender_idl_gen) : componentidldefaults {
+ after += DDS_Perf_Keyed_Test_Connector_idl_gen DDS_Starter_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=SENDER_STUB_Export \
+ -Wb,stub_export_include=Sender_stub_export.h \
+ -Wb,skel_export_macro=SENDER_SVNT_Export \
+ -Wb,skel_export_include=Sender_svnt_export.h \
+ -Wb,svnt_export_macro=SENDER_SVNT_Export \
+ -Wb,svnt_export_include=Sender_svnt_export.h \
+ -Wb,exec_export_macro=SENDER_EXEC_Export \
+ -Wb,exec_export_include=Sender_exec_export.h \
+ -I ..
+
+ IDL_Files {
+ Perf_Keyed_Test_Sender.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Sender_lem_gen) : ciaoidldefaults {
+ after += DDS_Perf_Keyed_Test_Sender_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=SENDER_LEM_STUB_Export \
+ -Wb,stub_export_include=Sender_lem_stub_export.h \
+ -SS -Gxhst -I $CIAO_ROOT/connectors -I ..
+
+ IDL_Files {
+ Perf_Keyed_Test_SenderE.idl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Sender_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Sender_lem_gen DDS_Perf_Keyed_Test_Sender_stub \
+ DDS_Perf_Keyed_Test_Base_stub
+ libs += DDS_Perf_Keyed_Test_Base_stub Sender_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Sender_lem_stub
+ dynamicflags = SENDER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_SenderEC.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_SenderEC.h
+ Sender_lem_stub_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_SenderEC.inl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Sender_stub) : ccm_stub, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Sender_idl_gen DDS_Perf_Keyed_Test_Base_stub \
+ DDS_Perf_Keyed_Test_Connector_stub
+ libs += DDS_Perf_Keyed_Test_Base_stub DDS_Perf_Keyed_Test_Connector_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = Sender_stub
+ dynamicflags = SENDER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_SenderC.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_SenderC.h
+ Sender_stub_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_SenderC.inl
+ }
+}
+
+project(DDS_Perf_Keyed_Test_Sender_exec) : ciao_executor, dds4ccm_base {
+ after += DDS_Perf_Keyed_Test_Sender_lem_stub DDS_Perf_Keyed_Test_Sender_stub \
+ DDS_Perf_Keyed_Test_Connector_lem_stub DDS_Perf_Keyed_Test_Connector_stub \
+ DDS4CCM_lem_stub
+ sharedname = Sender_exec
+ libs += Sender_stub Sender_lem_stub DDS_Perf_Keyed_Test_Base_stub \
+ DDS_Perf_Keyed_Test_Connector_lem_stub DDS_Perf_Keyed_Test_Connector_stub \
+ DDS4CCM_lem_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags = SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_Sender_exec.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_Sender_exec.h
+ Sender_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(DDS_Perf_Keyed_Test_Sender_svnt) : ciao_servant, dds4ccm_base, nddslib {
+ after += DDS_Perf_Keyed_Test_Base_stub DDS_Perf_Keyed_Test_Sender_lem_stub \
+ DDS4CCM_lem_stub DDS4CCM_skel DDS_Perf_Keyed_Test_Connector_stub \
+ DDS_Perf_Keyed_Test_Connector_svnt DDS_Perf_Keyed_Test_Connector_lem_stub
+ sharedname = Sender_svnt
+ libs += Sender_stub Sender_lem_stub DDS_Perf_Keyed_Test_Base_stub DDS4CCM_lem_stub \
+ DDS4CCM_skel DDS_Perf_Keyed_Test_Connector_stub DDS_Perf_Keyed_Test_Connector_svnt \
+ DDS_Perf_Keyed_Test_Connector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags = SENDER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Perf_Keyed_Test_SenderS.cpp
+ Perf_Keyed_Test_Sender_svnt.cpp
+ }
+
+ Header_Files {
+ Perf_Keyed_Test_SenderS.h
+ Perf_Keyed_Test_Sender_svnt.h
+ Sender_svnt_export.h
+ }
+
+ Inline_Files {
+ Perf_Keyed_Test_SenderS.inl
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.cpp
new file mode 100644
index 00000000000..e777e1a0ae1
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.cpp
@@ -0,0 +1,450 @@
+// -*- C++ -*-
+// $Id$
+
+#include "Perf_Keyed_Test_Sender_exec.h"
+#include "ace/Guard_T.h"
+#include "ciao/Logger/Log_Macros.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+#include "ace/OS_NS_sys_time.h"
+
+namespace CIAO_Perf_Keyed_Test_Sender_Impl
+{
+ //============================================================
+ // PerfKeyedTest_Listener_exec_i
+ //============================================================
+ PerfKeyedTest_Listener_exec_i::PerfKeyedTest_Listener_exec_i (
+ Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ PerfKeyedTest_Listener_exec_i::~PerfKeyedTest_Listener_exec_i (void)
+ {
+ }
+
+ //read messages, only 'ping'messages (ping = -1) which returned from the subscribers, to measure latency time are important.
+ void
+ PerfKeyedTest_Listener_exec_i::on_one_data (
+ const PerfKeyedTest & an_instance,
+ const ::CCM_DDS::ReadInfo & /*info*/)
+ {
+ //time now
+ ACE_Time_Value now = ACE_OS::gettimeofday ();
+ //set time in message to an ACE_TIME_VAlue
+ ACE_Time_Value ccm_rec (an_instance.timestamp_ccm_sec,
+ an_instance.timestamp_ccm_usec);
+// ACE_DEBUG ((LM_DEBUG, "SENDER: PerfKeyedTest_Listener_exec_i::on_one_data: \n"
+// "key <%C> - iteration <%d> - latency_ping <%d>\n",
+// an_instance.key.in (),
+// an_instance.iteration,
+// an_instance.latency_ping));
+
+ if( an_instance.latency_ping == -1)
+ {
+ this->callback_.record_time (now, ccm_rec);
+ }
+ }
+
+ void
+ PerfKeyedTest_Listener_exec_i::on_many_data (
+ const PerfKeyedTest_Seq & /*an_instance*/,
+ const ::CCM_DDS::ReadInfoSeq & /*info*/)
+ {
+ }
+ //============================================================
+ // Facet Executor Implementation Class: ConnectorStatusListener_exec_i
+ //============================================================
+ ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i (Atomic_Boolean &matched, int number_of_subscribers)
+ : matched_ (matched),
+ number_of_subscribers_ (number_of_subscribers)
+ {
+ }
+
+ 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) {
+ CORBA::ULong kind = status_kind;
+ if((!CORBA::is_nil(the_entity)) && (kind==DDS::PUBLICATION_MATCHED_STATUS))
+ {
+ ::DDS::PublicationMatchedStatus_var stat;
+ (dynamic_cast <DDS::DataWriter_ptr> (the_entity))->get_publication_matched_status(stat.out());
+ //printf("stat.current_count = %ld\n", stat.in().current_count);
+ //printf("stat.total_count = %ld\n", stat.in().total_count);
+ if(stat.in().current_count >= this->number_of_subscribers_)
+ this->matched_ = true;
+ }
+ }
+ //============================================================
+ // WriteManyHandler
+ //============================================================
+ WriteTicker::WriteTicker (Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ WriteTicker::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ // Notify the subscribers
+ this->callback_.write_one ();
+ return 0;
+ }
+
+ //============================================================
+ // WriteManyHandler
+ //============================================================
+ WriteManyHandler::WriteManyHandler (Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ WriteManyHandler::handle_exception (ACE_HANDLE)
+ {
+ this->callback_.write_one ();
+ return 0;
+ }
+
+
+ //============================================================
+ // Component Executor Implementation Class: Sender_exec_i
+ //============================================================
+ Sender_exec_i::Sender_exec_i (void)
+ : iterations_ (10),
+ keys_ (5),
+ latency_count_(10000),
+ sleep_(10),
+ matched_(false),
+ number_of_subscribers_(1),
+ tv_total_ (0L),
+ tv_max_ (0L),
+ tv_min_ (0L),
+ count_ (0)
+ {
+ this->ticker_ = new WriteTicker (*this);
+ }
+
+ Sender_exec_i::~Sender_exec_i (void)
+ {
+ }
+
+ void
+ Sender_exec_i::write_one (void)
+ {
+ if (this->last_key_ != this->samples_.end ())
+ {
+ try
+ {
+ ACE_Time_Value now = ACE_OS::gettimeofday();
+ // suseconds_t a = now.usec();
+ // time_t b = ynow.sec() -> sec since 1970
+ ++this->last_key_->second->iteration;
+ this->last_key_->second->timestamp_ccm_sec = static_cast <CORBA::ULong>(now.sec());
+ this->last_key_->second->timestamp_ccm_usec = now.usec();
+
+ //send some messages (latency_ping = 1L) with indicator that message has to be returned by the subscriber
+ // TO DO : use other selection
+ if ((this->last_key_->second->iteration % 2) == 0)
+ {
+ this->last_key_->second->latency_ping = 1L;
+ }
+ else
+ {
+ this->last_key_->second->latency_ping = 0L;
+ }
+
+ this->writer_->write_one (this->last_key_->second, ::DDS::HANDLE_NIL);
+ ACE_DEBUG ((LM_DEBUG, "Written key <%C> - <%u>\n",
+ this->last_key_->second->key,
+ this->last_key_->second->iteration));
+ }
+ catch (const CCM_DDS::InternalError& )
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ")
+ ACE_TEXT ("while updating writer info for <%C>.\n"),
+ this->last_key_->first.c_str ()));
+ }
+ ++this->last_key_;
+ }
+ else
+ {
+ //onto the next iteration
+ this->last_key_ = this->samples_.begin ();
+ while (this->last_key_ != this->samples_.end ())
+ {
+ if (this->last_key_->second->iteration == this->iterations_)
+ {
+ //next key
+ ++this->last_key_;
+ }
+ else
+ {
+ break;
+ }
+ }
+ if (this->last_key_ == this->samples_.end ())
+ {
+ //start over again.
+ this->last_key_ = this->samples_.begin ();
+ }
+ }
+ }
+ ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ Sender_exec_i::get_connector_status (void)
+ {
+ return new ConnectorStatusListener_exec_i (this->matched_, this->number_of_subscribers_);
+ }
+
+ ::CCM_DDS::PerfKeyedTest::CCM_Listener_ptr
+ Sender_exec_i::get_ping_listen_data_listener (void)
+ {
+ return new PerfKeyedTest_Listener_exec_i (*this);
+ }
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ Sender_exec_i::get_ping_listen_status (void)
+ {
+ return ::CCM_DDS::CCM_PortStatusListener::_nil ();
+ }
+
+ void
+ Sender_exec_i::start (void)
+ {
+ ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, _guard,
+ this->mutex_, CORBA::INTERNAL ());
+
+ for (CORBA::UShort i = 1; i < this->keys_ + 1; ++i)
+ {
+ char key[7];
+ PerfKeyedTest *new_key = new PerfKeyedTest;
+ ACE_OS::sprintf (key, "KEY_%d", i);
+ new_key->key = CORBA::string_dup(key);
+ new_key->iteration = 0;
+
+ this->samples_[key] = new_key;
+ }
+ this->last_key_ = this->samples_.begin ();
+ if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer (
+ this->ticker_,
+ 0,
+ ACE_Time_Value (5, 50000),
+ ACE_Time_Value (3, 50000)) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ")
+ ACE_TEXT ("Error scheduling timer")));
+ }
+ }
+void
+ Sender_exec_i::record_time (const ACE_Time_Value &now,
+ const ACE_Time_Value &ccm)
+ {
+ ACE_Time_Value dur = now - ccm;
+ ++this->count_;
+ //printf("Sender Na count = %u\n",this->count_.value ());
+// printf(" Sender in record_time now sec = %lu ,now -usec %lu \n",now.sec(), now.usec());
+// printf(" sender in record_time ccm sec = %lu ,ccm -usec %lu \n",ccm.sec(),ccm.usec());
+// printf(" sender in record_time dur sec = %lu ,ccm -usec %lu \n",dur.sec(),dur.usec());
+
+ long duration = static_cast <CORBA::Long>(dur.sec() * 1000 * 1000) + dur.usec(); //total duration in usec
+// printf(" sender in record_time duration = %lu \n",duration);
+
+ this->tv_total_ += duration;
+ if (duration > this->tv_max_.value ()|| (this->tv_max_.value () == 0L))
+ this->tv_max_ = duration;
+ if (duration < this->tv_min_.value () || (this->tv_min_.value () == 0L))
+ this->tv_min_ = duration;
+ double avg = this->tv_total_.value () / this->count_.value ();
+
+
+ ACE_DEBUG ((LM_ERROR, "++++++++++++\nPerfKeyedTest_Sender Listener_exec_i::on_one_data:\n"
+ " dur sec = <%u> usec = %u , duration = %u\n total.value <%u>,\nthis->count <%u>\n,Avg <%6.01f>\nMin <%u>\nMax <%u> \n ++++++++++++++++++\n",
+ static_cast <CORBA::Long>(dur.sec ()), dur.usec (),
+ duration,
+ this->tv_total_.value (),
+ this->count_.value (),
+ avg,
+ //this->tv_total_.value () / this->count_.value (),
+ this->tv_min_.value (),
+ this->tv_max_.value ()));
+
+
+
+ }
+ ::CORBA::UShort
+ Sender_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Sender_exec_i::iterations (::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ ::CORBA::UShort
+ Sender_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Sender_exec_i::keys (::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ }
+
+ ::CORBA::UShort
+ Sender_exec_i::latency_count (void)
+ {
+ return this->latency_count_;
+ }
+
+ void
+ Sender_exec_i::latency_count (::CORBA::UShort latency_count)
+ {
+ this->latency_count_ = latency_count;
+ }
+ ::CORBA::UShort
+ Sender_exec_i::sleep (void)
+ {
+ return this->sleep_;
+ }
+
+ void
+ Sender_exec_i::sleep (::CORBA::UShort sleep)
+ {
+ this->sleep_ = sleep;
+ }
+
+ void
+ Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx)
+ {
+ this->context_ =
+ ::Perf_Keyed_Test::CCM_Sender_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Sender_exec_i::configuration_complete (void)
+ {
+ }
+
+ void
+ Sender_exec_i::ccm_activate (void)
+ {
+ try
+ {
+ this->writer_ = this->context_->get_connection_info_write_data ();
+ // wait_for_readers(1);
+ ::CCM_DDS::DataListenerControl_var dlc =
+ this->context_->get_connection_ping_listen_data_control ();
+ dlc->mode (::CCM_DDS::ONE_BY_ONE);
+
+ if (this->matched_.value())
+ {
+ start ();
+
+ }
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Exception caught\n")));
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("ERROR: Sender_exec_i::ccm_activate: Unknown exception caught\n")));
+ }
+ }
+
+ void
+ Sender_exec_i::wait_for_readers(int numSubscribers)
+ {
+ //DDS_PublicationMatchedStatus status;
+ // DDS::PublicationMatchedStatus status;
+ // while (true)
+ // {
+ // this->writer_-> ->get_publication_matched_status(status);
+ // if (status.current_count >= numSubscribers)
+ // {
+ // break;
+ // }
+ //perftest_cpp::MilliSleep(1000);
+ // }
+ }
+
+
+ void
+ Sender_exec_i::ccm_passivate (void)
+ {
+ this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_);
+ }
+
+ void
+ Sender_exec_i::ccm_remove (void)
+ {
+
+
+
+ double avg = this->tv_total_.value () / this->count_.value ();
+ ACE_DEBUG ((LM_ERROR, "SUMMARY SENDER latency time:\n "
+ "Total <%u>\n , Count <%u>\n, Avg <%6.01f>\nMin <%u>\nMax <%u> \n",
+ this->tv_total_.value (),
+ this->count_.value (),
+ avg,
+ this->tv_min_.value (),
+ this->tv_max_.value ()));
+ }
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_Perf_Keyed_Test_Sender_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Sender_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.h
new file mode 100644
index 00000000000..a43579338ea
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/Sender/Perf_Keyed_Test_Sender_exec.h
@@ -0,0 +1,189 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef CIAO_SENDER_EXEC_H_
+#define CIAO_SENDER_EXEC_H_
+
+
+#include "Perf_Keyed_Test_SenderEC.h"
+
+#include /**/ "Sender_exec_export.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "tao/LocalObject.h"
+
+#include <map>
+
+namespace CIAO_Perf_Keyed_Test_Sender_Impl
+{
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Long > Atomic_Long;
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Boolean;
+
+ class Sender_exec_i;
+ //============================================================
+ // PerfKeyedTest_Listener_exec_i
+ //============================================================
+ class SENDER_EXEC_Export PerfKeyedTest_Listener_exec_i
+ : public virtual ::CCM_DDS::PerfKeyedTest::CCM_Listener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ PerfKeyedTest_Listener_exec_i (Sender_exec_i &callback);
+ virtual ~PerfKeyedTest_Listener_exec_i (void);
+
+ virtual void
+ on_one_data (
+ const PerfKeyedTest & an_instance,
+ const ::CCM_DDS::ReadInfo & info);
+ virtual void
+ on_many_data (
+ const PerfKeyedTest_Seq & an_instance,
+ const ::CCM_DDS::ReadInfoSeq & info);
+ private:
+ Sender_exec_i &callback_;
+ };
+
+class SENDER_EXEC_Export ConnectorStatusListener_exec_i
+ : public virtual ::CCM_DDS::CCM_ConnectorStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ ConnectorStatusListener_exec_i (Atomic_Boolean &, int);
+ 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_Boolean &matched_;
+ int number_of_subscribers_;
+
+ };
+ //============================================================
+ // WriteTicker
+ //============================================================
+ class WriteTicker :
+ public ACE_Event_Handler
+ {
+ public:
+ WriteTicker (Sender_exec_i &callback);
+ int handle_timeout (const ACE_Time_Value &, const void *);
+ private:
+ /// Maintains a handle that actually process the event
+ Sender_exec_i &callback_;
+ };
+
+ //============================================================
+ // WriteManyHandler
+ //============================================================
+ class WriteManyHandler :
+ public ACE_Event_Handler
+ {
+ public:
+ WriteManyHandler (Sender_exec_i &callback);
+ virtual int handle_exception (ACE_HANDLE fc = ACE_INVALID_HANDLE);
+ private:
+ /// Maintains a handle that actually process the event
+ Sender_exec_i &callback_;
+ };
+
+ class Sender_exec_i
+ : public virtual Sender_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Sender_exec_i (void);
+ virtual ~Sender_exec_i (void);
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr
+ get_connector_status (void);
+
+ virtual ::CCM_DDS::PerfKeyedTest::CCM_Listener_ptr
+ get_ping_listen_data_listener (void);
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_ping_listen_status (void);
+
+
+ void record_time (const ACE_Time_Value &now,
+ const ACE_Time_Value &ccm);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+ virtual void keys (::CORBA::UShort keys);
+
+ virtual ::CORBA::UShort latency_count (void);
+ virtual void latency_count (::CORBA::UShort latency_count);
+
+ virtual ::CORBA::UShort sleep (void);
+ virtual void sleep (::CORBA::UShort sleep);
+
+ virtual void wait_for_readers(int numSubscribers);
+
+
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+
+ virtual void configuration_complete (void);
+
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+
+ void start (void);
+ void write_one (void);
+
+ private:
+ ::Perf_Keyed_Test::CCM_Sender_Context_var context_;
+ CCM_DDS::PerfKeyedTest::Writer_var writer_;
+
+ WriteTicker *ticker_;
+
+ CORBA::UShort iterations_;
+ CORBA::UShort keys_;
+
+ CORBA::UShort latency_count_;
+ CORBA::UShort sleep_;
+
+ Atomic_Boolean matched_;
+ int number_of_subscribers_;
+ Atomic_Long tv_total_;
+ Atomic_Long tv_max_;
+ Atomic_Long tv_min_;
+ Atomic_Long count_;
+
+
+ TAO_SYNCH_MUTEX mutex_;
+ typedef std::map<ACE_CString, PerfKeyedTest_var> Writer_Table;
+ Writer_Table samples_;
+
+ Writer_Table::iterator last_key_;
+ };
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_Perf_Keyed_Test_Sender_Impl (void);
+}
+
+#endif /* ifndef */
+
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/Plan.cdp
new file mode 100644
index 00000000000..c557077916a
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/Plan.cdp
@@ -0,0 +1,512 @@
+<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>Perf_Keyed_Test_Depl_1</label>
+ <UUID>Perf_Keyed_Test_Depl_1</UUID>
+
+ <implementation xmi:id="ReceiverComponentImplementation">
+ <name>ReceiverComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Perf_Keyed_Test_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Perf_Keyed_Test_Receiver_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="Perf_Keyed_Test_ConnectorComponentImplementation">
+ <name>Perf_Keyed_Test_ConnectorComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Perf_Keyed_Test_Connector_ExecArtifact" />
+ <artifact xmi:idref="Perf_Keyed_Test_Connector_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Perf_Keyed_Test_Perf_Keyed_Test_Connector_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Perf_Keyed_Test_Perf_Keyed_Test_Connector_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Perf_Keyed_Test_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Perf_Keyed_Test_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+ <implementation xmi:id="SenderComponentImplementation">
+ <name>SenderComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Sender_ExecArtifact" />
+ <artifact xmi:idref="Sender_SvntArtifact" />
+ <execParameter>
+ <!-- entrypoint as exec parameter (see 10.6.1) -->
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Perf_Keyed_Test_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_Perf_Keyed_Test_Sender_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+ <instance xmi:id="ReceiverComponentInstance">
+ <name>ReceiverComponent</name>
+ <node>ReceiverNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="ReceiverComponentImplementation" />
+ <configProperty>
+ <name>keys</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>5</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>iterations</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>10</ushort>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+ <instance xmi:id="Perf_Keyed_Test_ConnectorComponentInstance">
+ <name>Perf_Keyed_Test_ConnectorComponent</name>
+ <node>SenderNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="Perf_Keyed_Test_ConnectorComponentImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Perf_Keyed_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>qos_profile</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>HelloTest_Library#LatencyQoS</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+ <instance xmi:id="Perf_Keyed_Test_ConnectorComponentInstance2">
+ <name>Perf_Keyed_Test_ConnectorComponent2</name>
+ <node>ReceiverNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="Perf_Keyed_Test_ConnectorComponentImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Perf_Keyed_Test</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>qos_profile</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>HelloTest_Library#LatencyQoS</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+ <instance xmi:id="SenderComponentInstance">
+ <name>SenderComponent</name>
+ <node>SenderNode</node>
+ <!-- hostname -->
+ <source/>
+ <implementation xmi:idref="SenderComponentImplementation" />
+ <configProperty>
+ <name>keys</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>5</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>iterations</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>1000</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>latency_count</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>100</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>sleep</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>10</ushort>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>info_listen_connector_status_receiver</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_listen_connector_status</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance2" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>info_listen_data</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_listen_data_listener</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance2" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>info_listen_data_pub</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>ping_listen_data_listener</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance" />
+ </internalEndpoint>
+ </connection>
+ <connection>
+ <name>ping_listen_data_control</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>ping_listen_data_control</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_control</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance" />
+ </internalEndpoint>
+ </connection>
+ <connection>
+ <name>info_listen_data_control</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_listen_data_control</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_control</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance2" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>writer_connection</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_write_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>supplier_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance" />
+ </internalEndpoint>
+ </connection>
+ <connection>
+ <name>writer_connection_sub</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>write_ping_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>supplier_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance2" />
+ </internalEndpoint>
+ </connection>
+ <connection>
+ <name>connector_status_sender</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="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>error_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="Perf_Keyed_Test_ConnectorComponentInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="Sender_ExecArtifact">
+ <name>Sender_exec</name>
+ <source/>
+ <node/>
+ <location>Sender_exec</location>
+ </artifact>
+ <artifact xmi:id="Sender_SvntArtifact">
+ <name>Sender_svnt</name>
+ <source/>
+ <node/>
+ <location>Sender_svnt</location>
+ </artifact>
+ <artifact xmi:id="Sender_StubArtifact">
+ <name>Sender_stub</name>
+ <source/>
+ <node/>
+ <location>Sender_stub</location>
+ </artifact>
+ <artifact xmi:id="Perf_Keyed_Test_Connector_ExecArtifact">
+ <name>Perf_Keyed_Test_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>DDS_Perf_Keyed_Test_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="Perf_Keyed_Test_Connector_SvntArtifact">
+ <name>Perf_Keyed_Test_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>DDS_Perf_Keyed_Test_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Perf_Keyed_Test_Connector_StubArtifact">
+ <name>Perf_Keyed_Test_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>DDS_Perf_Keyed_Test_Connector_stub</location>
+ </artifact>
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_StubArtifact">
+ <name>Receiver_stub</name>
+ <source/>
+ <node/>
+ <location>Receiver_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/USER_QOS_PROFILES.xml b/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/USER_QOS_PROFILES.xml
new file mode 100644
index 00000000000..391422a33ba
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/USER_QOS_PROFILES.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+Description
+XML QoS Profile
+
+The QoS configuration of the DDS entities in the generated example is
+loaded from this file.
+
+This file is used only when it is in the current working directory
+or when the enviroment variable
+NDDS_QOS_PROFILES is defined and points to this file.
+
+For more information about XML QoS Profiles see Chapter 15 in the
+RTI Data Distribution Service user manual.
+-->
+<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:/ndds/ndds.4.4d/scripts/../resource/rtiddsgen/../qos_profiles_4.4d/schema/rti_dds_qos_profiles.xsd" version="4.4d">
+ <!-- QoS Library containing the QoS profile used in the generated example.
+
+ A QoS library is a named set of QoS profiles.
+ -->
+ <qos_library name="HelloTest_Library">
+ <!-- QoS profile used to configure reliable communication between the DataWriter
+ and DataReader created in the example code.
+
+ A QoS profile groups a set of related QoS.
+ -->
+ <qos_profile name="LatencyQoS" is_default_qos="true">
+ <!-- QoS used to configure the data writer created in the example code -->
+
+ <datawriter_qos>
+ <!--
+ The number of samples for which the middleware will set aside space.
+ See the comments above for more information.
+ -->
+ <resource_limits>
+ <max_instances>1000</max_instances>
+ <initial_instances>1000</initial_instances>
+ <max_samples>LENGTH_UNLIMITED</max_samples>
+ <initial_samples>100</initial_samples>
+ <max_samples_per_instance>LENGTH_UNLIMITED</max_samples_per_instance>
+ </resource_limits>
+ <!--
+ The behavioral contract under which the DataWriter will carry out the
+ reliability protocol. See the comments above for more information.
+ -->
+ <protocol>
+ <rtps_reliable_writer>
+ <low_watermark>10</low_watermark>
+ <high_watermark>100</high_watermark>
+ <heartbeats_per_max_samples>1000</heartbeats_per_max_samples>
+ <heartbeat_period>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>10000000</nanosec>
+ </heartbeat_period>
+ <fast_heartbeat_period>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>1000000</nanosec>
+ </fast_heartbeat_period>
+ <late_joiner_heartbeat_period>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>10000000</nanosec>
+ </late_joiner_heartbeat_period>
+ <max_heartbeat_retries>LENGTH_UNLIMITED</max_heartbeat_retries>
+ <min_nack_response_delay>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>DURATION_ZERO_NSEC</nanosec>
+ </min_nack_response_delay>
+ <max_nack_response_delay>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>DURATION_ZERO_NSEC</nanosec>
+ </max_nack_response_delay>
+ </rtps_reliable_writer>
+ </protocol>
+
+ <writer_data_lifecycle>
+ <autodispose_unregistered_instances>false</autodispose_unregistered_instances>
+ </writer_data_lifecycle>
+
+ </datawriter_qos>
+
+ <!-- QoS used to configure the data reader created in the example code -->
+ <datareader_qos>
+ <!--
+ The number of samples for which the middleware will set aside space.
+ See the comments above for more information.
+ -->
+ <resource_limits>
+ <max_instances>1000</max_instances>
+ <initial_instances>10</initial_instances>
+ <max_samples>100</max_samples>
+ <initial_samples>100</initial_samples>
+ <max_samples_per_instance>100</max_samples_per_instance>
+ </resource_limits>
+ <reader_resource_limits>
+ <max_samples_per_remote_writer>100</max_samples_per_remote_writer>
+ </reader_resource_limits>
+
+ <!--
+ The behavioral contract under which the DataReader will carry out the
+ reliability protocol. See the comments above for more information.
+ -->
+ <protocol>
+ <rtps_reliable_reader>
+ <min_heartbeat_response_delay>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>DURATION_ZERO_NSEC</nanosec>
+ </min_heartbeat_response_delay>
+ <max_heartbeat_response_delay>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>DURATION_ZERO_NSEC</nanosec>
+ </max_heartbeat_response_delay>
+ <heartbeat_suppression_duration>
+ <sec>DURATION_ZERO_SEC</sec>
+ <nanosec>DURATION_ZERO_NSEC</nanosec>
+ </heartbeat_suppression_duration>
+ </rtps_reliable_reader>
+ </protocol>
+ </datareader_qos>
+
+ </qos_profile>
+ </qos_library>
+</dds> \ No newline at end of file
diff --git a/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/run_test.pl
new file mode 100644
index 00000000000..253001cc07f
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/performance-tests/Keyed/descriptors/run_test.pl
@@ -0,0 +1,226 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{'ACE_ROOT'}/bin";
+use PerlACE::TestTarget;
+
+$CIAO_ROOT = "$ENV{'CIAO_ROOT'}";
+$TAO_ROOT = "$ENV{'TAO_ROOT'}";
+$DANCE_ROOT = "$ENV{'DANCE_ROOT'}";
+
+$daemons_running = 0;
+$em_running = 0;
+$ns_running = 0;
+
+$nr_daemon = 2;
+@ports = ( 60001, 60002 );
+@iorbases = ( "NodeApp1.ior", "NodeApp2.ior" );
+@iorfiles = 0;
+@nodenames = ( "SenderNode", "ReceiverNode" );
+
+# ior files other than daemon
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+$ENV{"DANCE_TRACE_ENABLE"} = 0;
+$ENV{"CIAO_TRACE_ENABLE"} = 0;
+$ENV{"CIAO_LOG_LEVEL"} = 5;
+$ENV{"DANCE_LOG_LEVEL"} = 5;
+# $ENV{"DDS4CCM_NDDS_LOG_VERBOSITY"} = 31;
+
+
+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);
+ }
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = "$CIAO_ROOT/bin/ciao_componentserver";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $DEAMONS[$i]->Spawn ();
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 1 -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$NS->Spawn ();
+
+print STDERR "Starting Naming Service with -m 1 -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$EM->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";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$E->SpawnWaitKill (2*$tg_executor->ProcessStartWaitInterval ());
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 30 seconds to allow task to complete\n";
+sleep (30);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file -q\n";
+
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -q");
+$E->SpawnWaitKill ($tg_executor->ProcessStopWaitInterval ());
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;