summaryrefslogtreecommitdiff
path: root/CIAO/connectors
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/connectors')
-rw-r--r--CIAO/connectors/dds4ccm/idl/dds4ccm_lem_stub.mpc23
-rw-r--r--CIAO/connectors/dds4ccm/idl/dds4ccm_skel.mpc20
-rw-r--r--CIAO/connectors/dds4ccm/idl/dds4ccm_stub.mpc27
-rw-r--r--CIAO/connectors/dds4ccm/idl/ndds/ndds_dcps.idl4
-rw-r--r--CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_lem_stub.mpc13
-rw-r--r--CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_skel.mpc10
-rw-r--r--CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_stub.mpc24
-rw-r--r--CIAO/connectors/dds4ccm/impl/CCM_DataReader.cpp13
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp97
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.h1
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Get_T.cpp1
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Get_T.h3
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp2
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_StateListen_T.cpp1
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp110
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.h1
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp1
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp93
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h4
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp1
-rw-r--r--CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp2
-rw-r--r--CIAO/connectors/dds4ccm/impl/Getter_T.cpp4
-rw-r--r--CIAO/connectors/dds4ccm/impl/Reader_T.cpp19
-rw-r--r--CIAO/connectors/dds4ccm/impl/dds4ccm_impl.mpc4
-rw-r--r--CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h5
-rw-r--r--CIAO/connectors/dds4ccm/impl/logger/dds4ccm_logger.mpc4
-rw-r--r--CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp8
-rw-r--r--CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantManager.cpp7
-rw-r--r--CIAO/connectors/dds4ccm/impl/ndds/ndds_idltocpp.mpc4
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.idl21
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.mpc26
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.idl18
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.mpc147
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.idl16
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.mpc146
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.cpp303
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.h171
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.idl15
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.mpc146
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.cpp201
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.h150
-rw-r--r--CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/Plan.cdp654
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/run_test.pl244
-rw-r--r--CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.cpp24
-rw-r--r--CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.h2
-rw-r--r--CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.cpp54
-rw-r--r--CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.h4
-rw-r--r--CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.cpp62
-rw-r--r--CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.h4
-rw-r--r--CIAO/connectors/dds4ccm/tests/NonChangeableAttribute/Component/NonChangeable_Component_exec.cpp12
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/README32
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.mpc26
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.idl20
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.mpc113
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.mpc148
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.idl25
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.mpc158
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.cpp283
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.h194
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.cpp395
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.h77
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.idl29
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.mpc152
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.cpp257
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.h139
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/Plan.cdp461
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/USER_QOS_PROFILES.xml38
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/run_test.pl244
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.mpc26
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.mpc148
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/SenderDriver.cpp93
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.idl32
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.mpc166
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.cpp387
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.h147
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/Plan.cdp338
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/run_test.pl265
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.mpc26
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.mpc148
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/SenderDriver.cpp93
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.idl32
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.mpc166
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.cpp427
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.h147
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/Plan.cdp338
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/run_test.pl265
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.mpc26
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.mpc148
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/ReceiverDriver.cpp88
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.idl28
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.mpc163
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.cpp330
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.h199
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/SenderDriver.cpp88
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.idl31
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.mpc166
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.cpp335
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.h148
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/Plan.cdp407
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/run_test.pl281
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.mpc26
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.idl23
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.mpc148
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/ReceiverDriver.cpp88
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.idl28
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.mpc163
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.cpp309
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.h181
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/SenderDriver.cpp88
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.idl31
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.mpc166
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.cpp283
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.h139
-rw-r--r--CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/Plan.cdp407
-rwxr-xr-xCIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/run_test.pl281
124 files changed, 13786 insertions, 181 deletions
diff --git a/CIAO/connectors/dds4ccm/idl/dds4ccm_lem_stub.mpc b/CIAO/connectors/dds4ccm/idl/dds4ccm_lem_stub.mpc
index 130ab10f97a..c915f486cfe 100644
--- a/CIAO/connectors/dds4ccm/idl/dds4ccm_lem_stub.mpc
+++ b/CIAO/connectors/dds4ccm/idl/dds4ccm_lem_stub.mpc
@@ -21,9 +21,15 @@ project (DDS4CCM_lem_gen) : install, dds4ccm, ciaoidldefaults {
dds4ccm_StateListenerControlE.idl
dds4ccm_ConnectorE.idl
}
+
+ specific {
+ install_dir = connectors/dds4ccm/idl
+ }
}
-project (DDS4CCM_lem_stub) : install, dds4ccm, ccm_lem_stub, ccm_session_stub, ciaolib_with_idl, ciao_output, taolib, valuetype, ifr_client {
+project (DDS4CCM_lem_stub) : install, dds4ccm, ccm_lem_stub, ccm_session_stub, \
+ ciaolib_with_idl, ciao_output, taolib, valuetype, \
+ ifr_client {
after += DDS4CCM_stub DDS4CCM_lem_gen CIAO_NDDS_lem_stub
libs += DDS4CCM_stub
includes += $(CIAO_ROOT)/connectors
@@ -50,7 +56,22 @@ project (DDS4CCM_lem_stub) : install, dds4ccm, ccm_lem_stub, ccm_session_stub, c
dds4ccm_DataListenerControlEC.h
dds4ccm_ConnectorStatusListenerEC.h
dds4ccm_StateListenerControlEC.h
+ dds4ccm_ConnectorEC.h
dds4ccm_lem_stub_export.h
}
+
+ Inline_Files {
+ dds4ccm_BaseEC.inl
+ dds_rtf2_dcpsEC.inl
+ dds4ccm_PortStatusListenerEC.inl
+ dds4ccm_DataListenerControlEC.inl
+ dds4ccm_ConnectorStatusListenerEC.inl
+ dds4ccm_StateListenerControlEC.inl
+ dds4ccm_ConnectorEC.inl
+ }
+
+ specific {
+ install_dir = connectors/dds4ccm/idl
+ }
}
diff --git a/CIAO/connectors/dds4ccm/idl/dds4ccm_skel.mpc b/CIAO/connectors/dds4ccm/idl/dds4ccm_skel.mpc
index 5ce6f26cf24..309ba352d67 100644
--- a/CIAO/connectors/dds4ccm/idl/dds4ccm_skel.mpc
+++ b/CIAO/connectors/dds4ccm/idl/dds4ccm_skel.mpc
@@ -1,6 +1,7 @@
// $Id$
-project (DDS4CCM_skel) : install, dds4ccm_lem_stub, ciaolib_with_idl, ciao_output, taolib, portableserver, ciao_servant {
+project (DDS4CCM_skel) : install, dds4ccm_lem_stub, ciaolib_with_idl, \
+ ciao_output, taolib, portableserver, ciao_servant {
includes += $(CIAO_ROOT)/connectors
dynamicflags += DDS4CCM_SKEL_BUILD_DLL
@@ -8,12 +9,16 @@ project (DDS4CCM_skel) : install, dds4ccm_lem_stub, ciaolib_with_idl, ciao_outpu
}
Header_Files {
+ dds4ccm_skel_export.h
+ dds4ccm_EntityS.h
+ ccm_ddsS.h
dds4ccm_BaseS.h
dds4ccm_QueryFilterS.h
dds4ccm_PortStatusListenerS.h
dds4ccm_DataListenerControlS.h
dds4ccm_StateListenerControlS.h
dds4ccm_ConnectorStatusListenerS.h
+ dds4ccm_ConnectorS.h
dds_rtf2_dcpsS.h
}
@@ -25,4 +30,17 @@ project (DDS4CCM_skel) : install, dds4ccm_lem_stub, ciaolib_with_idl, ciao_outpu
dds4ccm_ConnectorS.cpp
dds4ccm_StateListenerControlS.cpp
}
+
+ Inline_Files {
+ dds_rtf2_dcpsS.inl
+ dds4ccm_PortStatusListenerS.inl
+ dds4ccm_DataListenerControlS.inl
+ dds4ccm_ConnectorStatusListenerS.inl
+ dds4ccm_ConnectorS.inl
+ dds4ccm_StateListenerControlS.inl
+ }
+
+ specific {
+ install_dir = connectors/dds4ccm/idl
+ }
}
diff --git a/CIAO/connectors/dds4ccm/idl/dds4ccm_stub.mpc b/CIAO/connectors/dds4ccm/idl/dds4ccm_stub.mpc
index fe189aa6d4e..9d1abfae6ff 100644
--- a/CIAO/connectors/dds4ccm/idl/dds4ccm_stub.mpc
+++ b/CIAO/connectors/dds4ccm/idl/dds4ccm_stub.mpc
@@ -9,19 +9,20 @@ project (DDS4CCM_idl_gen) : install, dds4ccm, componentidldefaults {
-I$(CIAO_ROOT)/connectors -Glem
IDL_Files {
+ idlflags -= -Gsv
idlflags += -Gxhst -Gxhsk -SS
dds4ccm_Base.idl
}
IDL_Files {
- idlflags -= -Gxhst -Gxhsk
+ idlflags -= -Gxhst -Gxhsk -Gsv -Glem
idlflags -= -St -Sa
idlflags += -SS
dds4ccm_QueryFilter.idl
}
IDL_Files {
- idlflags -= -Gxhst -Gxhsk
+ idlflags -= -Gxhst -Gxhsk -Gsv
idlflags += -Sci -SS -Scc
dds4ccm_Entity.idl
ccm_dds.idl
@@ -36,6 +37,10 @@ project (DDS4CCM_idl_gen) : install, dds4ccm, componentidldefaults {
dds4ccm_StateListenerControl.idl
dds4ccm_Connector.idl
}
+
+ specific {
+ install_dir = connectors/dds4ccm/idl
+ }
}
project (DDS4CCM_stub) : install, dds4ccm, ccm_stub, ciaolib_with_idl, ciao_output, taolib {
@@ -47,12 +52,16 @@ project (DDS4CCM_stub) : install, dds4ccm, ccm_stub, ciaolib_with_idl, ciao_outp
}
Header_Files {
+ dds4ccm_stub_export.h
+ dds4ccm_EntityC.h
+ ccm_ddsC.h
dds4ccm_BaseC.h
dds4ccm_QueryFilterC.h
dds4ccm_PortStatusListenerC.h
dds4ccm_DataListenerControlC.h
dds4ccm_ConnectorStatusListenerC.h
dds4ccm_StateListenerControlC.h
+ dds4ccm_ConnectorC.h
dds_rtf2_dcpsC.h
}
@@ -66,5 +75,19 @@ project (DDS4CCM_stub) : install, dds4ccm, ccm_stub, ciaolib_with_idl, ciao_outp
dds4ccm_ConnectorC.cpp
dds_rtf2_dcpsC.cpp
}
+
+ Inline_Files {
+ dds4ccm_BaseC.inl
+ dds4ccm_PortStatusListenerC.inl
+ dds4ccm_DataListenerControlC.inl
+ dds4ccm_ConnectorStatusListenerC.inl
+ dds4ccm_StateListenerControlC.inl
+ dds4ccm_ConnectorC.inl
+ dds_rtf2_dcpsC.inl
+ }
+
+ specific {
+ install_dir = connectors/dds4ccm/idl
+ }
}
diff --git a/CIAO/connectors/dds4ccm/idl/ndds/ndds_dcps.idl b/CIAO/connectors/dds4ccm/idl/ndds/ndds_dcps.idl
index 76829440c2a..573ca744dae 100644
--- a/CIAO/connectors/dds4ccm/idl/ndds/ndds_dcps.idl
+++ b/CIAO/connectors/dds4ccm/idl/ndds/ndds_dcps.idl
@@ -229,8 +229,8 @@ module DDS {
local interface Listener {};
local interface TopicListener : Listener {
- void on_inconsistent_topic(in Topic the_topic,
- in InconsistentTopicStatus status);
+ void on_inconsistent_topic(in Topic the_topic,
+ in InconsistentTopicStatus status);
};
local interface DataWriterListener : Listener {
diff --git a/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_lem_stub.mpc b/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_lem_stub.mpc
index 1a0dc70497c..ff39d52a23f 100644
--- a/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_lem_stub.mpc
+++ b/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_lem_stub.mpc
@@ -15,6 +15,10 @@ project (CIAO_NDDS_lem_gen) : install, ndds_idltocpp, ciaoidldefaults {
IDL_Files {
ndds_dcps_i_handleE.idl
}
+
+ specific {
+ install_dir = connectors/dds4ccm/idl/ndds
+ }
}
project (CIAO_NDDS_lem_stub) : install, ndds_idltocpp_stub, ccm_lem_stub, ccm_session_stub, ciaolib_with_idl, ciao_output, taolib, valuetype, ifr_client {
@@ -35,5 +39,14 @@ project (CIAO_NDDS_lem_stub) : install, ndds_idltocpp_stub, ccm_lem_stub, ccm_se
ndds_lem_stub_export.h
ndds_dcps_i_handleEC.h
}
+
+ Inline_Files {
+ ndds_dcpsEC.inl
+ ndds_dcps_i_handleEC.inl
+ }
+
+ specific {
+ install_dir = connectors/dds4ccm/idl/ndds
+ }
}
diff --git a/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_skel.mpc b/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_skel.mpc
index 3ac0258877a..8a3c01e4d7f 100644
--- a/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_skel.mpc
+++ b/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_skel.mpc
@@ -9,6 +9,7 @@ project (CIAO_NDDS_skel) : install, ndds_idltocpp_stub, ciaolib_with_idl, ciao_o
}
Header_Files {
+ ndds_skel_export.h
ndds_dcpsS.h
ndds_dcps_i_handleS.h
}
@@ -17,4 +18,13 @@ project (CIAO_NDDS_skel) : install, ndds_idltocpp_stub, ciaolib_with_idl, ciao_o
ndds_dcpsS.cpp
ndds_dcps_i_handleS.cpp
}
+
+ Inline_Files {
+ ndds_dcpsS.inl
+ ndds_dcps_i_handleS.inl
+ }
+
+ specific {
+ install_dir = connectors/dds4ccm/idl/ndds
+ }
}
diff --git a/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_stub.mpc b/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_stub.mpc
index c57e5e28376..bb24ef53099 100644
--- a/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_stub.mpc
+++ b/CIAO/connectors/dds4ccm/idl/ndds/ndds_idltocpp_stub.mpc
@@ -9,12 +9,18 @@ project (CIAO_NDDS_idl_gen) : install, ndds_idltocpp, componentidldefaults {
-I$(CIAO_ROOT)/connectors -Glem
IDL_Files {
+ idlflags -= -Gsv
ndds_dcps.idl
}
+
IDL_Files {
- idlflags -= -Gxhst -Gxhsk
+ idlflags -= -Gxhst -Gxhsk -Gsv
ndds_dcps_i_handle.idl
}
+
+ specific {
+ install_dir = connectors/dds4ccm/idl/ndds
+ }
}
project (CIAO_NDDS_stub) : install, ndds_idltocpp, ccm_stub, ciaolib_with_idl, ciao_output, taolib {
@@ -27,6 +33,7 @@ project (CIAO_NDDS_stub) : install, ndds_idltocpp, ccm_stub, ciaolib_with_idl, c
}
Header_Files {
+ ndds_stub_export.h
ndds_dcpsC.h
ndds_dcps_i_handleC.h
ndds_dcps_instance_handleC.h
@@ -37,6 +44,21 @@ project (CIAO_NDDS_stub) : install, ndds_idltocpp, ccm_stub, ciaolib_with_idl, c
ndds_dcps_i_handleC.cpp
ndds_dcps_instance_handleC.cpp
}
+
+ Inline_Files {
+ ndds_dcpsC.inl
+ ndds_dcps_i_handleC.inl
+ }
+
+ specific {
+ install_dir = connectors/dds4ccm/idl/ndds
+ }
+
+ verbatim(gnuace, postinstall) {
+" cp ndds_dcps_instance_handle.idl $(INSTALL_PREFIX)/include/connectors/dds4ccm/idl/ndds/"
+" cp ndds_dcps_instance_handle*.h $(INSTALL_PREFIX)/include/connectors/dds4ccm/idl/ndds/"
+ }
+
}
project (CIAO_NDDS_idl_install_only) {
diff --git a/CIAO/connectors/dds4ccm/impl/CCM_DataReader.cpp b/CIAO/connectors/dds4ccm/impl/CCM_DataReader.cpp
index ea7741dcc66..b60a111538e 100644
--- a/CIAO/connectors/dds4ccm/impl/CCM_DataReader.cpp
+++ b/CIAO/connectors/dds4ccm/impl/CCM_DataReader.cpp
@@ -43,7 +43,9 @@ CIAO::DDS4CCM::CCM_DataReader::create_readcondition (
::DDS::ViewStateMask view_states,
::DDS::InstanceStateMask instance_states)
{
- return this->dds_entity ()->create_readcondition (sample_states, view_states, instance_states);
+ return this->dds_entity ()->create_readcondition (sample_states,
+ view_states,
+ instance_states);
}
::DDS::QueryCondition_ptr
@@ -54,7 +56,11 @@ CIAO::DDS4CCM::CCM_DataReader::create_querycondition (
const char * query_expression,
const ::DDS::StringSeq & query_parameters)
{
- return this->dds_entity ()->create_querycondition (sample_states, view_states, instance_states, query_expression, query_parameters);
+ return this->dds_entity ()->create_querycondition (sample_states,
+ view_states,
+ instance_states,
+ query_expression,
+ query_parameters);
}
::DDS::ReturnCode_t
@@ -171,7 +177,8 @@ CIAO::DDS4CCM::CCM_DataReader::get_matched_publication_data (
::DDS::PublicationBuiltinTopicData & publication_data,
DDS_INSTANCE_HANDLE_T_IN publication_handle)
{
- return this->dds_entity ()->get_matched_publication_data (publication_data, publication_handle);
+ return this->dds_entity ()->get_matched_publication_data (publication_data,
+ publication_handle);
}
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp
index 3786f19ca7c..1371b7e41c1 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.cpp
@@ -35,6 +35,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_supplier_data (v
this->supplier_obtained_ = true;
this->supplier_.set_component (this);
+ this->init_publisher_ |= this->supplier_obtained_;
return this->supplier_.get_data ();
}
@@ -46,6 +47,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_supplier_dds_ent
this->supplier_obtained_ = true;
this->supplier_.set_component (this);
+ this->init_publisher_ |= this->supplier_obtained_;
return this->supplier_.get_dds_entity ();
}
@@ -57,6 +59,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_consumer_fr
this->pull_consumer_obtained_ = true;
this->pull_consumer_.set_component (this);
+ this->init_subscriber_ |= this->pull_consumer_obtained_;
return this->pull_consumer_.get_fresh_data ();
}
@@ -68,6 +71,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_consumer_da
this->push_consumer_obtained_ = true;
this->push_consumer_.set_component (this);
+ this->init_subscriber_ |= this->push_consumer_obtained_;
return this->push_consumer_.get_data ();
}
@@ -79,6 +83,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_consumer_da
this->pull_consumer_obtained_ = true;
this->pull_consumer_.set_component (this);
+ this->init_subscriber_ |= this->pull_consumer_obtained_;
return this->pull_consumer_.get_data ();
}
@@ -90,6 +95,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_consumer_fi
this->pull_consumer_obtained_ = true;
this->pull_consumer_.set_component (this);
+ this->init_subscriber_ |= this->pull_consumer_obtained_;
return this->pull_consumer_.get_filter_config ();
}
@@ -101,6 +107,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_consumer_da
this->push_consumer_obtained_ = true;
this->push_consumer_.set_component (this);
+ this->init_subscriber_ |= this->push_consumer_obtained_;
return this->push_consumer_.get_data_control ();
}
@@ -112,6 +119,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_consumer_dd
this->pull_consumer_obtained_ = true;
this->pull_consumer_.set_component (this);
+ this->init_subscriber_ |= this->pull_consumer_obtained_;
return this->pull_consumer_.get_dds_entity ();
}
@@ -142,6 +150,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_consumer_dd
this->push_consumer_obtained_ = true;
this->push_consumer_.set_component (this);
+ this->init_subscriber_ |= this->push_consumer_obtained_;
return this->push_consumer_.get_dds_entity ();
}
@@ -153,6 +162,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_consumer_fi
this->push_consumer_obtained_ = true;
this->push_consumer_.set_component (this);
+ this->init_subscriber_ |= this->push_consumer_obtained_;
return this->push_consumer_.get_filter_config ();
}
@@ -182,7 +192,46 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::topic_name (
{
DDS4CCM_TRACE ("DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::topic_name");
- if (this->late_binded (topic_name))
+ if (this->stop_dds (topic_name))
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_Event_Connector_T::topic_name - "
+ "Stopping DDS=>switching to new topic <%C>.\n",
+ topic_name));
+ this->ccm_passivate ();
+ this->do_ccm_remove ();
+
+ if (ACE_OS::strlen (topic_name) > 0)
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_Event_Connector_T::topic_name - "
+ "DDS is down. Setting new to <%C>.\n",
+ topic_name));
+
+ TopicBaseConnector::topic_name (topic_name);
+
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_Event_Connector_T::topic_name - "
+ "Initialize DDS again for topic <%C>.\n",
+ topic_name));
+
+ this->do_configuration_complete ();
+ this->do_ccm_activate ();
+
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_Event_Connector_T::topic_name - "
+ "DDS up and running for topic <%C>.\n",
+ topic_name));
+ }
+ else
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_Event_Connector_T::topic_name - "
+ "DDS is down.\n"));
+ TopicBaseConnector::topic_name (topic_name);
+ }
+ }
+ else if (this->late_binded (topic_name))
{
this->do_configuration_complete ();
this->do_ccm_activate ();
@@ -204,21 +253,24 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_configuration_com
{
DDS4CCM_TRACE ("DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_configuration_complete");
- TopicBaseConnector::configuration_complete ();
+ typename CCM_TYPE::push_consumer_traits::data_listener_type::_var_type
+ push_consumer_data_listener =
+ this->context_->get_connection_push_consumer_data_listener ();
- typename CCM_TYPE::push_consumer_traits::data_listener_type::_var_type push_consumer_data_listener =
- this->context_->get_connection_push_consumer_data_listener ();
this->push_consumer_obtained_ |=
! ::CORBA::is_nil (push_consumer_data_listener.in ());
-
::CCM_DDS::PortStatusListener_var push_consumer_psl =
this->context_->get_connection_push_consumer_status ();
this->push_consumer_obtained_ |= ! ::CORBA::is_nil (push_consumer_psl.in ());
+ this->init_subscriber_ |= this->push_consumer_obtained_;
::CCM_DDS::PortStatusListener_var pull_consumer_psl =
this->context_->get_connection_pull_consumer_status ();
this->pull_consumer_obtained_ |=
! ::CORBA::is_nil (pull_consumer_psl.in ());
+ this->init_subscriber_ |= this->pull_consumer_obtained_;
+
+ TopicBaseConnector::configuration_complete ();
if (this->push_consumer_obtained_)
{
@@ -443,12 +495,12 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_passivate (void)
}
}
+
template <typename CCM_TYPE, typename DDS_TYPE, bool FIXED, typename SEQ_TYPE>
void
-DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
+DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_ccm_remove (void)
{
- DDS4CCM_TRACE ("DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove");
-
+ DDS4CCM_TRACE ("DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_ccm_remove");
try
{
if (ACE_OS::strlen (this->topic_name_) != 0)
@@ -475,7 +527,7 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
DDS4CCM_PRINT_INTERNAL_EXCEPTION (
DDS4CCM_LOG_LEVEL_ERROR,
::CIAO::DDS4CCM::translate_retcode (ex.error_code),
- "DDS_Event_Connector_T::ccm_remove");
+ "DDS_Event_Connector_T::do_ccm_remove");
throw ::CORBA::INTERNAL ();
}
catch (const ::CORBA::Exception& ex)
@@ -483,14 +535,37 @@ DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
DDS4CCM_PRINT_CORBA_EXCEPTION (
DDS4CCM_LOG_LEVEL_ERROR,
ex,
- "DDS_Event_Connector_T::ccm_remove");
+ "DDS_Event_Connector_T::do_ccm_remove");
throw;
}
catch (...)
{
DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO
- "DDS_Event_Connector_T::ccm_remove - "
+ "DDS_Event_Connector_T::do_ccm_remove - "
"Caught unexpected exception.\n"));
throw ::CORBA::INTERNAL ();
}
}
+
+template <typename CCM_TYPE, typename DDS_TYPE, bool FIXED, typename SEQ_TYPE>
+void
+DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
+{
+ DDS4CCM_TRACE ("DDS_Event_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove");
+ if (this->push_consumer_obtained_)
+ {
+ this->push_consumer_.set_component (::CORBA::Object::_nil ());
+ }
+
+ if (this->supplier_obtained_)
+ {
+ this->supplier_.set_component (::CORBA::Object::_nil ());
+ }
+
+ if (this->pull_consumer_obtained_)
+ {
+ this->pull_consumer_.set_component (::CORBA::Object::_nil ());
+ }
+
+ this->do_ccm_remove ();
+}
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.h b/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.h
index 53436c30d26..d4ee38981ac 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.h
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Event_Connector_T.h
@@ -123,6 +123,7 @@ private:
void do_configuration_complete (void);
void do_ccm_activate (void);
+ void do_ccm_remove (void);
typedef DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE> TopicBaseConnector;
};
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Get_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Get_T.cpp
index 30fe30dd841..3837ed218ec 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Get_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Get_T.cpp
@@ -45,7 +45,6 @@ DDS_Get_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE, FIXED>::remove
{
DDS4CCM_TRACE ("DDS_Get_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE, FIXED>::remove");
SubscriberBase_type::remove (subscriber);
- this->dds_get_->_set_component (::CORBA::Object::_nil ());
}
template <typename CCM_TYPE, typename TYPED_DDS_READER, typename VALUE_TYPE, typename SEQ_VALUE_TYPE, bool FIXED>
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Get_T.h b/CIAO/connectors/dds4ccm/impl/DDS_Get_T.h
index 7b670374730..5ec5598f196 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Get_T.h
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Get_T.h
@@ -35,8 +35,7 @@ public:
::DDS::Subscriber_ptr subscriber,
const char * qos_profile);
- void remove (
- ::DDS::Subscriber_ptr subscriber);
+ void remove (::DDS::Subscriber_ptr subscriber);
private:
typedef DDS_Subscriber_Base_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp
index d6b6fb93c6f..d96d926e7a3 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Listen_T.cpp
@@ -81,8 +81,6 @@ DDS_Listen_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::remove (
{
DDS4CCM_TRACE ("DDS_Listen_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::remove");
- this->data_control_->_set_component (::CORBA::Object::_nil ());
-
SubscriberBase_type::remove (subscriber);
}
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_StateListen_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_StateListen_T.cpp
index 3f617c44643..62eb3c5db87 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_StateListen_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_StateListen_T.cpp
@@ -82,7 +82,6 @@ DDS_StateListen_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::remov
{
DDS4CCM_TRACE ("DDS_StateListen_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::remove");
- this->data_control_->_set_component (::CORBA::Object::_nil ());
SubscriberBase_type::remove (subscriber);
}
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp
index 7869391559c..ee278dd36fd 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.cpp
@@ -34,6 +34,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_observable_data
this->observable_obtained_ = true;
this->observable_.set_component (this);
+ this->init_publisher_ |= this->observable_obtained_;
return this->observable_.get_data ();
}
@@ -45,6 +46,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_observable_dds_e
this->observable_obtained_ = true;
this->observable_.set_component (this);
+ this->init_publisher_ |= this->observable_obtained_;
return this->observable_.get_dds_entity ();
}
@@ -56,6 +58,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_passive_observer
this->passive_observer_obtained_ = true;
this->passive_observer_.set_component (this);
+ this->init_subscriber_ |= this->passive_observer_obtained_;
return this->passive_observer_.get_data ();
}
@@ -67,6 +70,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_passive_observer
this->passive_observer_obtained_ = true;
this->passive_observer_.set_component (this);
+ this->init_subscriber_ |= this->passive_observer_obtained_;
return this->passive_observer_.get_dds_entity ();
}
@@ -78,6 +82,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_passive_observer
this->passive_observer_obtained_ = true;
this->passive_observer_.set_component (this);
+ this->init_subscriber_ |= this->passive_observer_obtained_;
return this->passive_observer_.get_filter_config ();
}
@@ -108,6 +113,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_observer_da
this->pull_observer_obtained_ = true;
this->pull_observer_.set_component (this);
+ this->init_subscriber_ |= this->pull_observer_obtained_;
return this->pull_observer_.get_data ();
}
@@ -119,6 +125,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_observer_fr
this->pull_observer_obtained_ = true;
this->pull_observer_.set_component (this);
+ this->init_subscriber_ |= this->pull_observer_obtained_;
return this->pull_observer_.get_fresh_data ();
}
@@ -130,6 +137,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_observer_dd
this->pull_observer_obtained_ = true;
this->pull_observer_.set_component (this);
+ this->init_subscriber_ |= this->pull_observer_obtained_;
return this->pull_observer_.get_dds_entity ();
}
@@ -141,6 +149,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_pull_observer_fi
this->pull_observer_obtained_ = true;
this->pull_observer_.set_component (this);
+ this->init_subscriber_ |= this->pull_observer_obtained_;
return this->pull_observer_.get_filter_config ();
}
@@ -171,6 +180,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_observer_da
this->push_observer_obtained_ = true;
this->push_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_observer_obtained_;
return this->push_observer_.get_data ();
}
@@ -182,6 +192,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_observer_da
this->push_observer_obtained_ = true;
this->push_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_observer_obtained_;
return this->push_observer_.get_data_control ();
}
@@ -193,6 +204,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_observer_dd
this->push_observer_obtained_ = true;
this->push_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_observer_obtained_;
return this->push_observer_.get_dds_entity ();
}
@@ -204,6 +216,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_observer_fi
this->push_observer_obtained_ = true;
this->push_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_observer_obtained_;
return this->push_observer_.get_filter_config ();
}
@@ -234,6 +247,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_state_obser
this->push_state_observer_obtained_ = true;
this->push_state_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_state_observer_obtained_;
return this->push_state_observer_.get_data ();
}
@@ -245,6 +259,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_state_obser
this->push_state_observer_obtained_ = true;
this->push_state_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_state_observer_obtained_;
return this->push_state_observer_.get_data_control ();
}
@@ -256,6 +271,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_state_obser
this->push_state_observer_obtained_ = true;
this->push_state_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_state_observer_obtained_;
return this->push_state_observer_.get_dds_entity ();
}
@@ -267,6 +283,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::get_push_state_obser
this->push_state_observer_obtained_ = true;
this->push_state_observer_.set_component (this);
+ this->init_subscriber_ |= this->push_state_observer_obtained_;
return this->push_state_observer_.get_filter_config ();
}
@@ -296,7 +313,45 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::topic_name (
{
DDS4CCM_TRACE ("DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::topic_name");
- if (this->late_binded (topic_name))
+ if (this->stop_dds (topic_name))
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_State_Connector_T::topic_name - "
+ "Stopping DDS=>switching to new topic <%C>.\n",
+ topic_name));
+ this->ccm_passivate ();
+ this->do_ccm_remove ();
+
+ if (ACE_OS::strlen (topic_name) > 0)
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_State_Connector_T::topic_name - "
+ "DDS is down. Setting new to <%C>.\n",
+ topic_name));
+
+ TopicBaseConnector::topic_name (topic_name);
+
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_State_Connector_T::topic_name - "
+ "Initialize DDS again for topic <%C>.\n",
+ topic_name));
+
+ this->do_configuration_complete ();
+ this->do_ccm_activate ();
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_State_Connector_T::topic_name - "
+ "DDS up and running for topic <%C>.\n",
+ topic_name));
+ }
+ else
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_Event_Connector_T::topic_name - "
+ "DDS is down.\n"));
+ TopicBaseConnector::topic_name (topic_name);
+ }
+ }
+ else if (this->late_binded (topic_name))
{
this->do_configuration_complete ();
this->do_ccm_activate ();
@@ -318,14 +373,13 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_configuration_com
{
DDS4CCM_TRACE ("DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_configuration_complete");
- TopicBaseConnector::configuration_complete ();
-
::CCM_DDS::PortStatusListener_var push_observer_psl =
this->context_->get_connection_push_observer_status ();
typename CCM_TYPE::push_observer_traits::data_listener_type::_var_type push_observer_dl =
this->context_->get_connection_push_observer_data_listener ();
this->push_observer_obtained_ |= ! ::CORBA::is_nil (push_observer_psl.in ());
this->push_observer_obtained_ |= ! ::CORBA::is_nil (push_observer_dl.in ());
+ this->init_subscriber_ |= this->push_observer_obtained_;
::CCM_DDS::PortStatusListener_var push_state_observer_psl =
this->context_->get_connection_push_state_observer_status ();
@@ -333,14 +387,19 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_configuration_com
this->context_->get_connection_push_state_observer_data_listener ();
this->push_state_observer_obtained_ |= ! ::CORBA::is_nil (push_state_observer_psl.in ());
this->push_state_observer_obtained_ |= ! ::CORBA::is_nil (push_state_observer_dl.in ());
+ this->init_subscriber_ |= this->push_state_observer_obtained_;
::CCM_DDS::PortStatusListener_var pull_observer_psl =
this->context_->get_connection_pull_observer_status ();
this->pull_observer_obtained_ |= ! ::CORBA::is_nil (pull_observer_psl.in ());
+ this->init_subscriber_ |= this->pull_observer_obtained_;
::CCM_DDS::PortStatusListener_var passive_observer_psl =
this->context_->get_connection_passive_observer_status ();
this->passive_observer_obtained_ |= ! ::CORBA::is_nil (passive_observer_psl.in ());
+ this->init_subscriber_ |= this->passive_observer_obtained_;
+
+ TopicBaseConnector::configuration_complete ();
if (this->observable_obtained_)
{
@@ -587,10 +646,9 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_passivate (void)
template <typename CCM_TYPE, typename DDS_TYPE, bool FIXED, typename SEQ_TYPE>
void
-DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
+DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_ccm_remove (void)
{
- DDS4CCM_TRACE ("DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove");
-
+ DDS4CCM_TRACE ("DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::do_ccm_remove");
try
{
if (ACE_OS::strlen (this->topic_name_) != 0)
@@ -627,7 +685,7 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
DDS4CCM_PRINT_INTERNAL_EXCEPTION (
DDS4CCM_LOG_LEVEL_ERROR,
::CIAO::DDS4CCM::translate_retcode (ex.error_code),
- "DDS_State_Connector_T::ccm_remove");
+ "DDS_State_Connector_T::do_ccm_remove");
throw ::CORBA::INTERNAL ();
}
catch (const ::CORBA::Exception& ex)
@@ -635,15 +693,49 @@ DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
DDS4CCM_PRINT_CORBA_EXCEPTION (
DDS4CCM_LOG_LEVEL_ERROR,
ex,
- "DDS_State_Connector_T::ccm_remove");
+ "DDS_State_Connector_T::do_ccm_remove");
throw;
}
catch (...)
{
DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO
- "DDS_State_Connector_T::ccm_remove - "
+ "DDS_State_Connector_T::do_ccm_remove - "
"Caught unexpected exception.\n"));
throw ::CORBA::INTERNAL ();
}
}
+template <typename CCM_TYPE, typename DDS_TYPE, bool FIXED, typename SEQ_TYPE>
+void
+DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove (void)
+{
+ DDS4CCM_TRACE ("DDS_State_Connector_T<CCM_TYPE, DDS_TYPE, FIXED, SEQ_TYPE>::ccm_remove");
+
+ if (this->observable_obtained_)
+ {
+ this->observable_.set_component (::CORBA::Object::_nil ());
+ }
+
+ if (this->push_observer_obtained_)
+ {
+ this->push_observer_.set_component (::CORBA::Object::_nil ());
+ }
+
+ if (this->push_state_observer_obtained_)
+ {
+ this->push_state_observer_.set_component (::CORBA::Object::_nil ());
+ }
+
+ if (this->pull_observer_obtained_)
+ {
+ this->pull_observer_.set_component (::CORBA::Object::_nil ());
+ }
+
+ if (this->passive_observer_obtained_)
+ {
+ this->passive_observer_.set_component (::CORBA::Object::_nil ());
+ }
+
+ this->do_ccm_remove ();
+}
+
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.h b/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.h
index c67badb0454..b27b8f2887d 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.h
+++ b/CIAO/connectors/dds4ccm/impl/DDS_State_Connector_T.h
@@ -199,6 +199,7 @@ private:
void do_configuration_complete (void);
void do_ccm_activate (void);
+ void do_ccm_remove (void);
typedef DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE> TopicBaseConnector;
};
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp
index cd08bf48d8b..3d95f4f60bc 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Subscriber_Base_T.cpp
@@ -208,7 +208,6 @@ DDS_Subscriber_Base_T<CCM_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::r
}
}
this->cft_setting_->delete_contentfilteredtopic (subscriber);
- this->dds_read_->_set_component (::CORBA::Object::_nil ());
this->dds_read_->set_dds_reader (::DDS::DataReader::_nil (),
0);
this->condition_manager_.set_dds_entity (::DDS::DataReader::_nil ());
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp
index d4cac2fb147..27f575acf07 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.cpp
@@ -7,6 +7,8 @@
template <typename CCM_TYPE, typename DDS_TYPE, typename SEQ_TYPE>
DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::DDS_TopicBase_Connector_T (void) :
BaseConnector ()
+ , init_subscriber_ (false)
+ , init_publisher_(false)
, late_binding_ (false)
{
}
@@ -32,6 +34,27 @@ DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::late_binding (bool late
this->late_binding_ |= late_binding;
}
+
+template <typename CCM_TYPE, typename DDS_TYPE, typename SEQ_TYPE>
+bool
+DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::stop_dds (
+ const char * topic_name)
+{
+ DDS4CCM_TRACE ("DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::stop_dds");
+
+ if (!::CORBA::is_nil (this->topic_name_.in ()))
+ { //topic name already set
+ // do not stop DDS when topic names are equal
+ if (ACE_OS::strlen (this->topic_name_.in ()) == 0)
+ return false;
+ return ACE_OS::strcmp (this->topic_name_.in (), topic_name) != 0;
+ }
+ else
+ { //topic is not set
+ return false;
+ }
+}
+
template <typename CCM_TYPE, typename DDS_TYPE, typename SEQ_TYPE>
bool
DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::late_binded (
@@ -41,27 +64,23 @@ DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::late_binded (
this->late_binding (ACE_OS::strlen (topic_name) == 0);
- if (this->late_binding () &&
- ACE_OS::strlen (topic_name) > 0 &&
+ if (ACE_OS::strlen (topic_name) > 0 &&
+ !CORBA::is_nil (this->topic_name_) &&
ACE_OS::strlen (this->topic_name_.in ()) == 0)
{
DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
ACE_TEXT ("DDS_TopicBase_Connector_T::late_binded - ")
- ACE_TEXT ("Topic %C is late binded.\n"), topic_name));
+ ACE_TEXT ("Topic <%C> is late binded.\n"), topic_name));
DDS_TopicBase_Connector_T::topic_name (topic_name);
return true;
}
- else if (this->configuration_complete_)
- {
- throw ::CCM_DDS::NonChangeable ();
- }
- else
+ else if (!this->configuration_complete_)
{
- DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
- ACE_TEXT ("DDS_TopicBase_Connector_T::late_binded - ")
- ACE_TEXT ("Topic %C is not late binded.\n"), topic_name));
DDS_TopicBase_Connector_T::topic_name (topic_name);
}
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ ACE_TEXT ("DDS_TopicBase_Connector_T::late_binded - ")
+ ACE_TEXT ("Topic <%C> is not late binded.\n"), topic_name));
return false;
}
@@ -80,19 +99,45 @@ DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::configuration_complete
typesupport_name = type.get_type_name ();
#endif
+ ::CCM_DDS::ConnectorStatusListener_var error_listener =
+ this->context_->get_connection_error_listener ();
+ this->init_subscriber_ |= ! ::CORBA::is_nil (error_listener.in ());
+ this->init_publisher_ |= ! ::CORBA::is_nil (error_listener.in ());
+
if (::CORBA::is_nil (this->topic_.in ()))
{
this->register_type (this->domain_participant_.in (),
typesupport_name);
+
this->init_topic (this->domain_participant_.in (),
this->topic_.inout () ,
this->topic_name_.in (),
typesupport_name.in ());
}
- this->init_subscriber (this->domain_participant_.in (),
- this->subscriber_.inout ());
- this->init_publisher (this->domain_participant_.in (),
- this->publisher_.inout ());
+
+ if (this->init_subscriber_)
+ {
+ this->init_subscriber (this->domain_participant_.in (),
+ this->subscriber_.inout ());
+ }
+ else
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_TopicBase_Connector_T::configuration_complete - "
+ "No need to create a subscriber.\n"));
+ }
+
+ if (this->init_publisher_)
+ {
+ this->init_publisher (this->domain_participant_.in (),
+ this->publisher_.inout ());
+ }
+ else
+ {
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
+ "DDS_TopicBase_Connector_T::configuration_complete - "
+ "No need to create a publisher.\n"));
+ }
}
template <typename CCM_TYPE, typename DDS_TYPE, typename SEQ_TYPE>
@@ -106,12 +151,18 @@ DDS_TopicBase_Connector_T<CCM_TYPE, DDS_TYPE, SEQ_TYPE>::ccm_activate (void)
this->activate_topic (reactor,
this->topic_.in (),
this->topiclistener_.inout ());
- this->activate_subscriber (reactor,
- this->subscriber_.in (),
- this->subscriber_listener_.inout ());
- this->activate_publisher (reactor,
- this->publisher_.in (),
- this->publisher_listener_.inout ());
+ if (this->init_subscriber_)
+ {
+ this->activate_subscriber (reactor,
+ this->subscriber_.in (),
+ this->subscriber_listener_.inout ());
+ }
+ if (this->init_publisher_)
+ {
+ this->activate_publisher (reactor,
+ this->publisher_.in (),
+ this->publisher_listener_.inout ());
+ }
}
template <typename CCM_TYPE, typename DDS_TYPE, typename SEQ_TYPE>
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h
index a42b39d00a3..61900d21086 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h
+++ b/CIAO/connectors/dds4ccm/impl/DDS_TopicBase_Connector_T.h
@@ -43,6 +43,7 @@ protected:
bool late_binding (void);
void late_binding (bool late_binding);
bool late_binded (const char * topic_name);
+ bool stop_dds (const char * topic_name);
CORBA::String_var topic_name_;
DDS::StringSeq key_fields_;
@@ -55,6 +56,9 @@ protected:
::DDS::Subscriber_var subscriber_;
::DDS::SubscriberListener_var subscriber_listener_;
+ bool init_subscriber_;
+ bool init_publisher_;
+
typedef DDS_Base_Connector_T<CCM_TYPE> BaseConnector;
#if (CIAO_DDS4CCM_NDDS==1)
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp
index 87e38a86c9b..3277146a1bd 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Update_T.cpp
@@ -126,7 +126,6 @@ DDS_Update_T<CCM_TYPE, TYPED_WRITER, VALUE_TYPE, SEQ_VALUE_TYPE>::remove (
::CIAO::DDS4CCM::translate_retcode (retval)));
throw ::CORBA::INTERNAL ();
}
- this->dds_update_->_set_component (::CORBA::Object::_nil ());
this->dds_update_->set_dds_writer (::DDS::DataWriter::_nil ());
this->ccm_data_writer_->set_dds_entity (::DDS::DataWriter::_nil ());
}
diff --git a/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp b/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp
index 5f6ab877bf6..c892fffe610 100644
--- a/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DDS_Write_T.cpp
@@ -89,6 +89,7 @@ DDS_Write_T<CCM_TYPE, TYPED_WRITER, VALUE_TYPE, SEQ_VALUE_TYPE>::configuration_c
this->ccm_data_writer_->set_dds_entity (dwv_tmp.in ());
}
}
+
template <typename CCM_TYPE, typename TYPED_WRITER, typename VALUE_TYPE, typename SEQ_VALUE_TYPE>
void
DDS_Write_T<CCM_TYPE, TYPED_WRITER, VALUE_TYPE, SEQ_VALUE_TYPE>::activate ()
@@ -118,7 +119,6 @@ DDS_Write_T<CCM_TYPE, TYPED_WRITER, VALUE_TYPE, SEQ_VALUE_TYPE>::remove (
if (retcode == ::DDS::RETCODE_OK)
{
- this->dds_write_->_set_component (::CORBA::Object::_nil ());
this->dds_write_->set_dds_writer (::DDS::DataWriter::_nil ());
this->ccm_data_writer_->set_dds_entity (::DDS::DataWriter::_nil ());
}
diff --git a/CIAO/connectors/dds4ccm/impl/Getter_T.cpp b/CIAO/connectors/dds4ccm/impl/Getter_T.cpp
index e2e9a77b862..13e5d5bda95 100644
--- a/CIAO/connectors/dds4ccm/impl/Getter_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/Getter_T.cpp
@@ -295,7 +295,7 @@ namespace CIAO
}
// Check which conditions have triggered the wait method to 'wake up'.
- for (::CORBA::ULong i = 0; i < active_conditions.length(); i++)
+ for (::CORBA::ULong i = 0; i < active_conditions.length(); ++i)
{
// Check whether this condition is the one we were waiting for.
if (this->condition_manager_->check_condition (active_conditions[i].in ()))
@@ -398,7 +398,7 @@ namespace CIAO
::DDS::SampleInfoSeq sample_info;
SEQ_VALUE_TYPE data;
// Check which conditions have triggered the wait method to 'wake up'.
- for (::CORBA::ULong i = 0; i < active_conditions.length(); i++)
+ for (::CORBA::ULong i = 0; i < active_conditions.length(); ++i)
{
// Check whether this condition is the one we were waiting for.
if (this->condition_manager_->check_condition (active_conditions[i].in ()))
diff --git a/CIAO/connectors/dds4ccm/impl/Reader_T.cpp b/CIAO/connectors/dds4ccm/impl/Reader_T.cpp
index 7594a282110..04141dc73ed 100644
--- a/CIAO/connectors/dds4ccm/impl/Reader_T.cpp
+++ b/CIAO/connectors/dds4ccm/impl/Reader_T.cpp
@@ -28,6 +28,8 @@ namespace CIAO
const VALUE_TYPE& an_instance,
DDS_INSTANCE_HANDLE_T_IN instance_handle)
{
+ DDS4CCM_TRACE ("Reader_T::check_handle");
+
::DDS::InstanceHandle_t const lookup_hnd =
this->dds_reader ()->lookup_instance (an_instance);
@@ -41,6 +43,8 @@ namespace CIAO
const ::DDS::SampleInfoSeq& sample_infos,
const bool determine_last)
{
+ DDS4CCM_TRACE ("Reader_T::get_nr_valid_samples");
+
CORBA::ULong nr_of_samples = 0;
if (determine_last)
{
@@ -74,6 +78,8 @@ namespace CIAO
::CCM_DDS::ReadInfoSeq& infos,
const ::DDS::SampleInfoSeq & sample_info)
{
+ DDS4CCM_TRACE ("Reader_T::convert_data");
+
CORBA::ULong samples_to_return = this->get_nr_valid_samples (sample_info,
false);
infos.length (samples_to_return);
@@ -133,6 +139,7 @@ namespace CIAO
::DDS::QueryCondition_ptr qc)
{
DDS4CCM_TRACE ("Reader_T::read_wo_instance");
+
::DDS::ReturnCode_t retval = ::DDS::RETCODE_ERROR;
if (! ::CORBA::is_nil (qc))
@@ -174,6 +181,8 @@ namespace CIAO
::DDS::SampleInfoSeq sample_info,
bool throw_exception)
{
+ DDS4CCM_TRACE ("Reader_T::return_loan");
+
// Return the loan
::DDS::ReturnCode_t const retval =
this->dds_reader ()->return_loan (data, sample_info);
@@ -196,6 +205,8 @@ namespace CIAO
SEQ_VALUE_TYPE& instances,
::CCM_DDS::ReadInfoSeq& infos)
{
+ DDS4CCM_TRACE ("Reader_T::read_last");
+
// This function has to return the last sample of all instances
::DDS::SampleInfoSeq sample_info;
SEQ_VALUE_TYPE data;
@@ -229,6 +240,8 @@ namespace CIAO
SEQ_VALUE_TYPE& instances,
::CCM_DDS::ReadInfoSeq& infos)
{
+ DDS4CCM_TRACE ("Reader_T::read_all");
+
// This function has to return all samples of all instances
::DDS::SampleInfoSeq sample_info;
SEQ_VALUE_TYPE data;
@@ -249,6 +262,8 @@ namespace CIAO
::CCM_DDS::ReadInfo_out info,
DDS_INSTANCE_HANDLE_T_IN instance_handle)
{
+ DDS4CCM_TRACE ("Reader_T::read_one_last");
+
::DDS::InstanceHandle_t const lookup_hnd =
this->check_handle (an_instance, instance_handle);
@@ -287,6 +302,8 @@ namespace CIAO
::CCM_DDS::ReadInfoSeq& infos,
DDS_INSTANCE_HANDLE_T_IN instance_handle)
{
+ DDS4CCM_TRACE ("Reader_T::read_one_all");
+
::DDS::InstanceHandle_t const lookup_hnd =
this->check_handle (an_instance, instance_handle);
@@ -305,6 +322,7 @@ namespace CIAO
Reader_T<READER_TYPE, TYPED_DDS_READER, VALUE_TYPE, SEQ_VALUE_TYPE>::query (void)
{
DDS4CCM_TRACE ("Reader_T::query");
+
return this->condition_manager_->query ();
}
@@ -325,6 +343,7 @@ namespace CIAO
ConditionManager * condition_manager)
{
DDS4CCM_TRACE ("Reader_T::set_dds_reader");
+
this->dds_reader_ = TYPED_DDS_READER::_narrow (dr);
if (!::CORBA::is_nil (dr) && ::CORBA::is_nil (this->dds_reader_.in ()))
{
diff --git a/CIAO/connectors/dds4ccm/impl/dds4ccm_impl.mpc b/CIAO/connectors/dds4ccm/impl/dds4ccm_impl.mpc
index 9a92fee139a..f6cdb899543 100644
--- a/CIAO/connectors/dds4ccm/impl/dds4ccm_impl.mpc
+++ b/CIAO/connectors/dds4ccm/impl/dds4ccm_impl.mpc
@@ -27,4 +27,8 @@ project(CIAO_DDS4CCM_DDS_Impl) : install, dds4ccm_skel, dds4ccm_lem_stub, taolib
TopicListener.cpp
Utils.cpp
}
+
+ specific {
+ install_dir = connectors/dds4ccm/impl
+ }
}
diff --git a/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h b/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h
index 727cadda94c..914f9f3119e 100644
--- a/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h
+++ b/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h
@@ -65,8 +65,8 @@ extern DDS4CCM_Logger_Export unsigned int DDS4CCM_debug_level;
#if defined (DDS4CCM_NLOGGING)
# define DDS4CCM_ERROR(L, X) do {} while (0)
# define DDS4CCM_DEBUG(L, X) do {} while (0)
-# define DDS4CCM_PRINT_INTERNAL_EXCEPTION (L, E, X) do {} while (0)
-# define DDS4CCM_PRINT_CORBA_EXCEPTION (L, E, X) do {} while (0)
+# define DDS4CCM_PRINT_INTERNAL_EXCEPTION(L, E, X) do {} while (0)
+# define DDS4CCM_PRINT_CORBA_EXCEPTION(L, E, X) do {} while (0)
# define DDS4CCM_ERROR_RETURN(L, X, Y) return (Y)
# define DDS4CCM_ERROR_BREAK(L, X) { break; }
#else
@@ -82,6 +82,7 @@ extern DDS4CCM_Logger_Export unsigned int DDS4CCM_debug_level;
} \
} while (0)
# endif
+
# if !defined (DDS4CCM_DEBUG)
# define DDS4CCM_DEBUG(L, X) \
do { \
diff --git a/CIAO/connectors/dds4ccm/impl/logger/dds4ccm_logger.mpc b/CIAO/connectors/dds4ccm/impl/logger/dds4ccm_logger.mpc
index d6589d70acb..58d78a63dba 100644
--- a/CIAO/connectors/dds4ccm/impl/logger/dds4ccm_logger.mpc
+++ b/CIAO/connectors/dds4ccm/impl/logger/dds4ccm_logger.mpc
@@ -15,5 +15,9 @@ project(DDS4CCM_Logger): install, ciao_lib, taolib, acelib {
Logger_Service.h
Log_Macros.h
}
+
+ specific {
+ install_dir = connectors/dds4ccm/impl/logger
+ }
}
diff --git a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp
index 00248ecdc41..942c7b1419f 100644
--- a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp
+++ b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp
@@ -484,7 +484,9 @@ namespace CIAO
{
DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_DDS_NIL_RETURN, (LM_ERROR, DDS4CCM_INFO
"DDS_DomainParticipant_i::create_topic - "
- "Error: RTI DDS returned a nil topic\n"));
+ "Error: RTI DDS returned a nil topic "
+ "with name <%C> and type <%C>\n",
+ impl_name, type_name));
delete ccm_dds_tl;
return ::DDS::Topic::_nil ();
}
@@ -496,7 +498,7 @@ namespace CIAO
DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_INFO, DDS4CCM_INFO
"DDS_DomainParticipant_i::create_topic - "
- "Successfully created topic with name %C and type %C\n",
+ "Successfully created topic with name <%C> and type <%C>\n",
impl_name, type_name));
DPMANAGER->add_topic (this->rti_entity (), dds_tp);
@@ -512,7 +514,7 @@ namespace CIAO
{
DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, DDS4CCM_INFO
"DDS_DomainParticipant_i::create_topic - "
- "Re-using topic with name %C and type %C.\n",
+ "Re-using topic with name <%C> and type <%C>.\n",
impl_name, type_name));
DPMANAGER->_inc_ref (this->rti_entity (), dds_tp);
diff --git a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantManager.cpp b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantManager.cpp
index 226333eea71..43c7b648f02 100644
--- a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantManager.cpp
+++ b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantManager.cpp
@@ -241,6 +241,9 @@ namespace CIAO
{
if (iter->second->_ref_count () == 1)
{
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_UNIMP_ACTION, (LM_TRACE, DDS4CCM_INFO
+ "DomainParticipantManager::remove_participant - "
+ "Delete participant since ref_count is one. \n"));
delete iter->second;
// Save to remove from list
@@ -248,12 +251,12 @@ namespace CIAO
}
else
{
+ iter->second->_dec_ref ();
DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_UNIMP_ACTION, (LM_TRACE, DDS4CCM_INFO
"DomainParticipantManager::remove_participant - "
"Don't delete participant since "
- "it's still used - ref_count <%d>\n",
+ "it's still used - ref_count is still <%d>\n",
iter->second->_ref_count ()));
- iter->second->_dec_ref ();
return false;
}
}
diff --git a/CIAO/connectors/dds4ccm/impl/ndds/ndds_idltocpp.mpc b/CIAO/connectors/dds4ccm/impl/ndds/ndds_idltocpp.mpc
index 6994be18eb2..677f9eba314 100644
--- a/CIAO/connectors/dds4ccm/impl/ndds/ndds_idltocpp.mpc
+++ b/CIAO/connectors/dds4ccm/impl/ndds/ndds_idltocpp.mpc
@@ -36,4 +36,8 @@ project(CIAO_DDS4CCM_DDS_NDDS) : install, ndds_idltocpp_stub, taolib, \
WaitSet.cpp
Utils.cpp
}
+
+ specific {
+ install_dir = connectors/dds4ccm/impl/ndds
+ }
}
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.idl
new file mode 100644
index 00000000000..7cf07c81a11
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.idl
@@ -0,0 +1,21 @@
+// $Id$
+
+#ifndef COLLACATED_BASE_
+#define COLLACATED_BASE_
+
+#pragma ndds typesupport "Base/Collocated_BaseSupport.h"
+#pragma opendds typesupport "Base/Collocated_BaseTypeSupportImpl.h"
+
+#pragma DCPS_DATA_TYPE "CoPubSub::Test_msg"
+
+module CoPubSub {
+ struct Test_msg {
+ string hello;
+ long msgId;
+ };
+ typedef sequence <Test_msg> Test_msgSeq;
+};
+
+
+#endif // COLLACATED_BASE_
+
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.mpc
new file mode 100644
index 00000000000..958f6ebbd66
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Base/Collocated_Base.mpc
@@ -0,0 +1,26 @@
+// $Id$
+
+project (Collocated_Base_stub) : taoidldefaults, dds4ccm_ts_default {
+ sharedname = Collocated_Base_stub
+ dynamicflags += COLLACATED_BASE_STUB_BUILD_DLL
+ libout = ../lib
+
+ idlflags += -SS -Sci \
+ -Wb,stub_export_macro=COLLACATED_BASE_STUB_Export \
+ -Wb,stub_export_include=Collocated_Base_stub_export.h
+
+ IDL_Files {
+ idlflags += -Gxhst
+ Collocated_Base.idl
+ }
+
+ opendds_ts_flags += --export=COLLACATED_BASE_STUB_Export
+
+ DDSGenerator_Files {
+ Collocated_Base.idl
+ }
+
+ Source_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.idl
new file mode 100644
index 00000000000..e5083387d94
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.idl
@@ -0,0 +1,18 @@
+//$Id$
+
+#ifndef COLLACATED_CONNECTOR_
+#define COLLACATED_CONNECTOR_
+
+#include <Components.idl>
+#include <ccm_dds.idl>
+
+#include "Base/Collocated_Base.idl"
+
+#pragma ciao lem "Connector/Collocated_ConnectorE.idl"
+
+module CoPubSub {
+ module CCM_DDS::Typed <Test_msg, Test_msgSeq> Test_conn;
+};
+
+#endif // COLLACATED_CONNECTOR_
+
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.mpc
new file mode 100644
index 00000000000..a75a0b6274a
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/Connector/Collocated_Connector.mpc
@@ -0,0 +1,147 @@
+// $Id$
+
+project(Collocated_Connector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=COLLACATED_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=Collocated_Connector_stub_export.h \
+ -Wb,skel_export_macro=COLLACATED_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=Collocated_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=COLLACATED_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=Collocated_Connector_svnt_export.h \
+ -Wb,conn_export_macro=COLLACATED_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=Collocated_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ Collocated_Connector.idl
+ }
+}
+
+project(Collocated_Connector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += Collocated_Connector_idl_gen
+ idlflags += -Wb,stub_export_macro=COLLACATED_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=Collocated_Connector_lem_stub_export.h \
+ -SS -Gxhst -Sci \
+ -I ..
+
+ IDL_Files {
+ Collocated_ConnectorE.idl
+ }
+}
+
+project(Collocated_Connector_lem_stub) : ccm_svnt, dds4ccm_lem_stub {
+ after += Collocated_Connector_lem_gen Collocated_Connector_stub Collocated_Base_stub
+ libs += Collocated_Base_stub Collocated_Connector_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Collocated_Connector_lem_stub
+ dynamicflags += COLLACATED_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Collocated_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ Collocated_ConnectorEC.h
+ Collocated_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ Collocated_ConnectorEC.inl
+ }
+}
+
+project(Collocated_Connector_stub) : ccm_stub, dds4ccm_base {
+ after += Collocated_Connector_idl_gen Collocated_Base_stub
+ libs += Collocated_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Collocated_Connector_stub
+ dynamicflags += COLLACATED_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Collocated_ConnectorC.cpp
+ }
+
+ Header_Files {
+ Collocated_ConnectorC.h
+ Collocated_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ Collocated_ConnectorC.inl
+ }
+}
+
+project(Collocated_Connector_exec) : ciao_executor, dds4ccm_impl {
+ after += Collocated_Connector_lem_stub Collocated_Connector_stub \
+ Collocated_Base_stub
+ sharedname = Collocated_Connector_exec
+ libs += Collocated_Connector_stub Collocated_Connector_lem_stub \
+ Collocated_Base_stub Collocated_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += COLLACATED_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Collocated_Connector_conn.cpp
+ }
+
+ Header_Files {
+ Collocated_Connector_conn.h
+ Collocated_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(Collocated_Connector_svnt) : ciao_servant, dds4ccm_impl {
+ after += Collocated_Connector_lem_stub \
+ Collocated_Connector_exec \
+ Collocated_Connector_stub
+ sharedname = Collocated_Connector_svnt
+ libs += Collocated_Connector_stub \
+ Collocated_Connector_lem_stub \
+ Collocated_Base_stub \
+ Collocated_Connector_exec
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += COLLACATED_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Collocated_ConnectorS.cpp
+ Collocated_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ Collocated_ConnectorS.h
+ Collocated_Connector_svnt.h
+ Collocated_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ Collocated_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.idl
new file mode 100644
index 00000000000..0615dec14df
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.idl
@@ -0,0 +1,16 @@
+// $Id$
+
+#ifndef PUBSUB_COMPONENT_
+#define PUBSUB_COMPONENT_
+
+#include <Components.idl>
+#include "Connector/Collocated_Connector.idl"
+
+module CoPubSub {
+ component PubSub_comp {
+ port Test_conn::DDS_Write TestPub;
+ port Test_conn::DDS_Listen TestSub;
+ };
+};
+
+#endif // PUBSUB_COMPONENT_
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.mpc
new file mode 100644
index 00000000000..502644612a9
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component.mpc
@@ -0,0 +1,146 @@
+// $Id$
+
+project(PubSubComponent_idl_gen) : componentidldefaults, dds4ccm {
+ after += Collocated_Connector_idl_gen DDS_Starter_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_STUB_Export \
+ -Wb,stub_export_include=PubSub_Component_stub_export.h \
+ -Wb,skel_export_macro=PUBSUB_COMPONENT_SVNT_Export \
+ -Wb,skel_export_include=PubSub_Component_svnt_export.h \
+ -Wb,svnt_export_macro=PUBSUB_COMPONENT_SVNT_Export \
+ -Wb,svnt_export_include=PubSub_Component_svnt_export.h \
+ -Wb,exec_export_macro=PUBSUB_COMPONENT_EXEC_Export \
+ -Wb,exec_export_include=PubSub_Component_exec_export.h \
+ -I ..
+
+ IDL_Files {
+ PubSub_Component.idl
+ }
+}
+
+project(PubSubComponent_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += PubSubComponent_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_LEM_STUB_Export \
+ -Wb,stub_export_include=PubSubComponent_lem_stub_export.h \
+ -SS -Gxhst -I $CIAO_ROOT/connectors -I ..
+
+ IDL_Files {
+ PubSub_ComponentE.idl
+ }
+}
+
+project(PubSubComponent_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += PubSubComponent_lem_gen PubSubComponent_stub \
+ Collocated_Base_stub
+ libs += Collocated_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = PubSub_Component_lem_stub
+ dynamicflags += PUBSUB_COMPONENT_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PubSub_ComponentEC.cpp
+ }
+
+ Header_Files {
+ PubSub_ComponentEC.h
+ PubSub_Component_lem_stub_export.h
+ }
+
+ Inline_Files {
+ PubSub_ComponentEC.inl
+ }
+}
+
+project(PubSubComponent_stub) : ccm_stub, dds4ccm_base {
+ after += PubSubComponent_idl_gen Collocated_Base_stub \
+ Collocated_Connector_stub
+ libs += Collocated_Base_stub Collocated_Connector_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = PubSub_Component_stub
+ dynamicflags += PUBSUB_COMPONENT_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PubSub_ComponentC.cpp
+ }
+
+ Header_Files {
+ PubSub_ComponentC.h
+ PubSub_Component_stub_export.h
+ }
+
+ Inline_Files {
+ PubSub_ComponentC.inl
+ }
+}
+
+project(PubSubComponent_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += PubSubComponent_lem_stub PubSubComponent_stub \
+ Collocated_Connector_lem_stub Collocated_Connector_stub
+ sharedname = PubSub_Component_exec
+ libs += PubSub_Component_stub PubSub_Component_lem_stub Collocated_Base_stub \
+ Collocated_Connector_lem_stub Collocated_Connector_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags += PUBSUB_COMPONENT_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PubSub_Component_exec.cpp
+ }
+
+ Header_Files {
+ PubSub_Component_exec.h
+ PubSub_Component_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(PubSubComponent_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += Collocated_Base_stub PubSubComponent_lem_stub \
+ Collocated_Connector_stub \
+ Collocated_Connector_svnt Collocated_Connector_lem_stub
+ sharedname = PubSub_Component_svnt
+ libs += PubSub_Component_stub PubSub_Component_lem_stub Collocated_Base_stub \
+ Collocated_Connector_stub Collocated_Connector_svnt \
+ Collocated_Connector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += PUBSUB_COMPONENT_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ PubSub_ComponentS.cpp
+ PubSub_Component_svnt.cpp
+ }
+
+ Header_Files {
+ PubSub_ComponentS.h
+ PubSub_Component_svnt.h
+ PubSub_Component_svnt_export.h
+ }
+
+ Inline_Files {
+ PubSub_ComponentS.inl
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.cpp b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.cpp
new file mode 100644
index 00000000000..3fdc5b19acc
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.cpp
@@ -0,0 +1,303 @@
+// -*- C++ -*-
+// $Id$
+
+#include "PubSub_Component_exec.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+namespace CIAO_CoPubSub_PubSub_comp_Impl
+{
+
+
+ /**
+ * WriteHandler
+ */
+ WriteHandler::WriteHandler (PubSub_comp_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ WriteHandler::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ return this->callback_.tick ();
+ }
+
+ /**
+ * Facet Executor Implementation Class: TestSub_data_listener_exec_i
+ */
+
+ TestSub_data_listener_exec_i::TestSub_data_listener_exec_i (
+ ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx)
+ : ciao_context_ (
+ ::CoPubSub::CCM_PubSub_comp_Context::_duplicate (ctx))
+ {
+ }
+
+ TestSub_data_listener_exec_i::~TestSub_data_listener_exec_i (void)
+ {
+ }
+
+ // Operations from ::CoPubSub::Test_conn::Listener
+
+ void
+ TestSub_data_listener_exec_i::on_one_data (
+ const ::CoPubSub::Test_msg & datum,
+ const ::CCM_DDS::ReadInfo & /* info */)
+ {
+ ACE_DEBUG ((LM_DEBUG, "TestSub_data_listener_exec_i::on_one_data - "
+ "New data received: <%C> - <%d>\n",
+ datum.hello.in (), datum.msgId));
+ }
+
+ void
+ TestSub_data_listener_exec_i::on_many_data (
+ const ::CoPubSub::Test_msgSeq & /* data */,
+ const ::CCM_DDS::ReadInfoSeq & /* infos */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Facet Executor Implementation Class: TestSub_status_exec_i
+ */
+
+ TestSub_status_exec_i::TestSub_status_exec_i (
+ ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx)
+ : ciao_context_ (
+ ::CoPubSub::CCM_PubSub_comp_Context::_duplicate (ctx))
+ {
+ }
+
+ TestSub_status_exec_i::~TestSub_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ TestSub_status_exec_i::on_requested_deadline_missed (
+ ::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ TestSub_status_exec_i::on_sample_lost (
+ ::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Component Executor Implementation Class: PubSub_comp_exec_i
+ */
+
+ PubSub_comp_exec_i::PubSub_comp_exec_i (void)
+ : count_(-3)
+ {
+ ticker_ = new WriteHandler (*this);
+ }
+
+ PubSub_comp_exec_i::~PubSub_comp_exec_i (void)
+ {
+ delete this->ticker_;
+ }
+
+ // Supported operations and attributes.
+ ACE_Reactor*
+ PubSub_comp_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ int
+ PubSub_comp_exec_i::tick (void)
+ {
+ CoPubSub::Test_msg sample;
+ sample.hello = CORBA::string_dup("CoPubSub Test Message");
+ sample.msgId = ++this->count_;
+
+ // Reference to the writer interface for the DDS4CCM connector for msg type
+ ::CoPubSub::Test_conn::Writer_var writer;
+
+ writer = ciao_context_->get_connection_TestPub_data();
+
+ if (CORBA::is_nil(writer.in()))
+ {
+ ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::tick - Writer seems nil.\n"));
+ return -1; // Don't reschedule timer
+ }
+
+ try
+ {
+ writer->write_one(sample, DDS::HANDLE_NIL);
+ ACE_DEBUG ((LM_DEBUG, "PubSub_comp_exec_i::tick - "
+ "Sample has been written: <%C> - <%d>\n",
+ sample.hello.in (), sample.msgId));
+ }
+ catch (CCM_DDS::InternalError & ex) // catch "normal" exception
+ {
+ ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::tick - "
+ "ERROR: caught InternalError.\n"));
+
+ return -1; // Don't reschedule timer
+ }
+ catch (const CORBA::Exception & ex)
+ {
+ ex._tao_print_exception("PubSub_comp_exec_i::tick - ERROR: ");
+ return -1; // Don't reschedule timer
+ }
+ catch (...) // catch everything else. If this is called something is wrong
+ {
+ ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::tick - "
+ "ERROR: caught unknown exception.\n"));
+ return -1; // Don't reschedule timer
+ }
+ return 0;
+ }
+
+ // Component attributes and port operations.
+
+ ::CoPubSub::Test_conn::CCM_Listener_ptr
+ PubSub_comp_exec_i::get_TestSub_data_listener (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_TestSub_data_listener_.in ()))
+ {
+ TestSub_data_listener_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ TestSub_data_listener_exec_i (
+ this->ciao_context_.in ()),
+ ::CoPubSub::Test_conn::CCM_Listener::_nil ());
+
+ this->ciao_TestSub_data_listener_ = tmp;
+ }
+
+ return
+ ::CoPubSub::Test_conn::CCM_Listener::_duplicate (
+ this->ciao_TestSub_data_listener_.in ());
+ }
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ PubSub_comp_exec_i::get_TestSub_status (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_TestSub_status_.in ()))
+ {
+ TestSub_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ TestSub_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_TestSub_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_TestSub_status_.in ());
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ PubSub_comp_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::CoPubSub::CCM_PubSub_comp_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ PubSub_comp_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ PubSub_comp_exec_i::ccm_activate (void)
+ {
+ CCM_DDS::DataListenerControl_var control =
+ ciao_context_->get_connection_TestSub_data_control();
+
+ if (! CORBA::is_nil(control.in()))
+ {
+ try
+ {
+ control->mode(CCM_DDS::ONE_BY_ONE);
+ }
+ catch (const CORBA::Exception & ex)
+ {
+ ex._tao_print_exception("PubSub_comp_exec_i::ccm_activate - ERROR: ");
+ }
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::ccm_activate - "
+ "ERROR: Data listener control seems nil.\n"));
+ }
+
+ ACE_Time_Value delay(3, 0); // timer = 3 seconds + 0 usec = 3 sec
+ ACE_Time_Value repeat(3, 0); // timer = 3 seconds + 0 usec = 3 sec
+
+ if (this->reactor()->schedule_timer(this->ticker_,
+ 0,
+ delay,
+ repeat) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "PubSub_comp_exec_i::ccm_activate - "
+ "ERROR: Unable to schedule timer.\n"));
+ }
+ else
+ ACE_DEBUG ((LM_DEBUG, "PubSub_comp_exec_i::ccm_activate - "
+ "Timer is up and running.\n"));
+ }
+
+ void
+ PubSub_comp_exec_i::ccm_passivate (void)
+ {
+ this->reactor()->cancel_timer(this->ticker_);
+ }
+
+ void
+ PubSub_comp_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_CoPubSub_PubSub_comp_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ PubSub_comp_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.h b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.h
new file mode 100644
index 00000000000..6a1cb4a8d71
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/PubSubComponent/PubSub_Component_exec.h
@@ -0,0 +1,171 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef CIAO_PUBSUB_COMPONENT_EXEC_VCU9KR_H_
+#define CIAO_PUBSUB_COMPONENT_EXEC_VCU9KR_H_
+
+#include /**/ "ace/pre.h"
+
+#include "PubSub_ComponentEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "PubSub_Component_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO_CoPubSub_PubSub_comp_Impl
+{
+ class PubSub_comp_exec_i;
+
+ /**
+ * WriteHandler
+ */
+ class WriteHandler :
+ public ACE_Event_Handler
+ {
+ public:
+ WriteHandler (PubSub_comp_exec_i &callback);
+ virtual int handle_timeout (const ACE_Time_Value &, const void *);
+ private:
+ PubSub_comp_exec_i &callback_;
+ };
+
+
+ /**
+ * Provider Executor Implementation Class: TestSub_data_listener_exec_i
+ */
+
+ class TestSub_data_listener_exec_i
+ : public virtual ::CoPubSub::Test_conn::CCM_Listener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ TestSub_data_listener_exec_i (
+ ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx);
+ virtual ~TestSub_data_listener_exec_i (void);
+
+ /** @name Operations and attributes from CoPubSub::Test_conn::Listener */
+ //@{
+
+ virtual
+ void on_one_data (
+ const ::CoPubSub::Test_msg & datum,
+ const ::CCM_DDS::ReadInfo & info);
+
+ virtual
+ void on_many_data (
+ const ::CoPubSub::Test_msgSeq & data,
+ const ::CCM_DDS::ReadInfoSeq & infos);
+ //@}
+
+ private:
+ ::CoPubSub::CCM_PubSub_comp_Context_var ciao_context_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: TestSub_status_exec_i
+ */
+
+ class TestSub_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ TestSub_status_exec_i (
+ ::CoPubSub::CCM_PubSub_comp_Context_ptr ctx);
+ virtual ~TestSub_status_exec_i (void);
+
+ /** @name Operations and attributes from CCM_DDS::PortStatusListener */
+ //@{
+
+ virtual
+ void on_requested_deadline_missed (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::CoPubSub::CCM_PubSub_comp_Context_var ciao_context_;
+ };
+
+ /**
+ * Component Executor Implementation Class: PubSub_comp_exec_i
+ */
+
+ class PubSub_comp_exec_i
+ : public virtual PubSub_comp_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ PubSub_comp_exec_i (void);
+ virtual ~PubSub_comp_exec_i (void);
+
+ /** @name Supported operations and attributes. */
+ //@{
+
+ //@}
+
+ /** @name Component attributes and port operations. */
+ //@{
+
+ virtual ::CoPubSub::Test_conn::CCM_Listener_ptr
+ get_TestSub_data_listener (void);
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_TestSub_status (void);
+ //@}
+
+ /** @name 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);
+ //@}
+
+ /** @name User defined public operations. */
+ //@{
+ int tick (void);
+
+ //@}
+
+ private:
+ ::CoPubSub::CCM_PubSub_comp_Context_var ciao_context_;
+
+ /** @name Component attributes. */
+ //@{
+ ::CoPubSub::Test_conn::CCM_Listener_var ciao_TestSub_data_listener_;
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_TestSub_status_;
+ //@}
+
+ /** @name User defined members. */
+ //@{
+ WriteHandler *ticker_;
+
+ ::CORBA::Long count_;
+ //@}
+
+ /** @name User defined private operations. */
+ //@{
+
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
+ };
+
+ extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_CoPubSub_PubSub_comp_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.idl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.idl
new file mode 100644
index 00000000000..a10072c233f
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.idl
@@ -0,0 +1,15 @@
+// $Id$
+
+#ifndef SUB_COMPONENT_
+#define SUB_COMPONENT_
+
+#include <Components.idl>
+#include "Connector/Collocated_Connector.idl"
+
+module CoPubSub {
+ component Sub_comp {
+ port Test_conn::DDS_Listen TestSub;
+ };
+};
+
+#endif // SUB_COMPONENT_
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.mpc b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.mpc
new file mode 100644
index 00000000000..86ed3573eb7
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component.mpc
@@ -0,0 +1,146 @@
+// $Id$
+
+project(SubComponent_idl_gen) : componentidldefaults, dds4ccm {
+ after += Collocated_Connector_idl_gen DDS_Starter_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_STUB_Export \
+ -Wb,stub_export_include=Sub_Component_stub_export.h \
+ -Wb,skel_export_macro=PUBSUB_COMPONENT_SVNT_Export \
+ -Wb,skel_export_include=Sub_Component_svnt_export.h \
+ -Wb,svnt_export_macro=PUBSUB_COMPONENT_SVNT_Export \
+ -Wb,svnt_export_include=Sub_Component_svnt_export.h \
+ -Wb,exec_export_macro=PUBSUB_COMPONENT_EXEC_Export \
+ -Wb,exec_export_include=Sub_Component_exec_export.h \
+ -I ..
+
+ IDL_Files {
+ Sub_Component.idl
+ }
+}
+
+project(SubComponent_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += SubComponent_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=PUBSUB_COMPONENT_LEM_STUB_Export \
+ -Wb,stub_export_include=SubComponent_lem_stub_export.h \
+ -SS -Gxhst -I $CIAO_ROOT/connectors -I ..
+
+ IDL_Files {
+ Sub_ComponentE.idl
+ }
+}
+
+project(SubComponent_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += SubComponent_lem_gen SubComponent_stub \
+ Collocated_Base_stub
+ libs += Collocated_Base_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Sub_Component_lem_stub
+ dynamicflags += PUBSUB_COMPONENT_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sub_ComponentEC.cpp
+ }
+
+ Header_Files {
+ Sub_ComponentEC.h
+ Sub_Component_lem_stub_export.h
+ }
+
+ Inline_Files {
+ Sub_ComponentEC.inl
+ }
+}
+
+project(SubComponent_stub) : ccm_stub, dds4ccm_base {
+ after += SubComponent_idl_gen Collocated_Base_stub \
+ Collocated_Connector_stub
+ libs += Collocated_Base_stub Collocated_Connector_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = Sub_Component_stub
+ dynamicflags += PUBSUB_COMPONENT_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sub_ComponentC.cpp
+ }
+
+ Header_Files {
+ Sub_ComponentC.h
+ Sub_Component_stub_export.h
+ }
+
+ Inline_Files {
+ Sub_ComponentC.inl
+ }
+}
+
+project(SubComponent_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += SubComponent_lem_stub SubComponent_stub \
+ Collocated_Connector_lem_stub Collocated_Connector_stub
+ sharedname = Sub_Component_exec
+ libs += Sub_Component_stub Sub_Component_lem_stub Collocated_Base_stub \
+ Collocated_Connector_lem_stub Collocated_Connector_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags += PUBSUB_COMPONENT_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sub_Component_exec.cpp
+ }
+
+ Header_Files {
+ Sub_Component_exec.h
+ Sub_Component_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project(SubComponent_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += Collocated_Base_stub SubComponent_lem_stub \
+ Collocated_Connector_stub \
+ Collocated_Connector_svnt Collocated_Connector_lem_stub
+ sharedname = Sub_Component_svnt
+ libs += Sub_Component_stub Sub_Component_lem_stub Collocated_Base_stub \
+ Collocated_Connector_stub Collocated_Connector_svnt \
+ Collocated_Connector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += PUBSUB_COMPONENT_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Sub_ComponentS.cpp
+ Sub_Component_svnt.cpp
+ }
+
+ Header_Files {
+ Sub_ComponentS.h
+ Sub_Component_svnt.h
+ Sub_Component_svnt_export.h
+ }
+
+ Inline_Files {
+ Sub_ComponentS.inl
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.cpp b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.cpp
new file mode 100644
index 00000000000..faaa7e51fe8
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.cpp
@@ -0,0 +1,201 @@
+// -*- C++ -*-
+// $Id$
+
+#include "Sub_Component_exec.h"
+
+namespace CIAO_CoPubSub_Sub_comp_Impl
+{
+
+ /**
+ * Facet Executor Implementation Class: TestSub_data_listener_exec_i
+ */
+
+ TestSub_data_listener_exec_i::TestSub_data_listener_exec_i (
+ ::CoPubSub::CCM_Sub_comp_Context_ptr ctx)
+ : ciao_context_ (
+ ::CoPubSub::CCM_Sub_comp_Context::_duplicate (ctx))
+ {
+ }
+
+ TestSub_data_listener_exec_i::~TestSub_data_listener_exec_i (void)
+ {
+ }
+
+ // Operations from ::CoPubSub::Test_conn::Listener
+
+ void
+ TestSub_data_listener_exec_i::on_one_data (
+ const ::CoPubSub::Test_msg & datum,
+ const ::CCM_DDS::ReadInfo & /* info */)
+ {
+ ACE_DEBUG ((LM_DEBUG, "TestSub_data_listener_exec_i::on_one_data - "
+ "New data received: <%C> - <%d>\n",
+ datum.hello.in (), datum.msgId));
+ }
+
+ void
+ TestSub_data_listener_exec_i::on_many_data (
+ const ::CoPubSub::Test_msgSeq & /* data */,
+ const ::CCM_DDS::ReadInfoSeq & /* infos */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Facet Executor Implementation Class: TestSub_status_exec_i
+ */
+
+ TestSub_status_exec_i::TestSub_status_exec_i (
+ ::CoPubSub::CCM_Sub_comp_Context_ptr ctx)
+ : ciao_context_ (
+ ::CoPubSub::CCM_Sub_comp_Context::_duplicate (ctx))
+ {
+ }
+
+ TestSub_status_exec_i::~TestSub_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ TestSub_status_exec_i::on_requested_deadline_missed (
+ ::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ TestSub_status_exec_i::on_sample_lost (
+ ::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Component Executor Implementation Class: Sub_comp_exec_i
+ */
+
+ Sub_comp_exec_i::Sub_comp_exec_i (void){
+ }
+
+ Sub_comp_exec_i::~Sub_comp_exec_i (void)
+ {
+ }
+
+ // Supported operations and attributes.
+
+ // Component attributes and port operations.
+
+ ::CoPubSub::Test_conn::CCM_Listener_ptr
+ Sub_comp_exec_i::get_TestSub_data_listener (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_TestSub_data_listener_.in ()))
+ {
+ TestSub_data_listener_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ TestSub_data_listener_exec_i (
+ this->ciao_context_.in ()),
+ ::CoPubSub::Test_conn::CCM_Listener::_nil ());
+
+ this->ciao_TestSub_data_listener_ = tmp;
+ }
+
+ return
+ ::CoPubSub::Test_conn::CCM_Listener::_duplicate (
+ this->ciao_TestSub_data_listener_.in ());
+ }
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ Sub_comp_exec_i::get_TestSub_status (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_TestSub_status_.in ()))
+ {
+ TestSub_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ TestSub_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_TestSub_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_TestSub_status_.in ());
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Sub_comp_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::CoPubSub::CCM_Sub_comp_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Sub_comp_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Sub_comp_exec_i::ccm_activate (void)
+ {
+ CCM_DDS::DataListenerControl_var control =
+ ciao_context_->get_connection_TestSub_data_control();
+
+ if (! CORBA::is_nil(control.in()))
+ {
+ try
+ {
+ control->mode(CCM_DDS::ONE_BY_ONE);
+ }
+ catch (const CORBA::Exception & ex)
+ {
+ ex._tao_print_exception("Sub_comp_exec_i::ccm_activate - ERROR: ");
+ }
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "Sub_comp_exec_i::ccm_activate - "
+ "ERROR: Listener control is nil.\n"));
+ }
+ }
+
+ void
+ Sub_comp_exec_i::ccm_passivate (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Sub_comp_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_CoPubSub_Sub_comp_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Sub_comp_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.h b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.h
new file mode 100644
index 00000000000..d43763f78f4
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/SubComponent/Sub_Component_exec.h
@@ -0,0 +1,150 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef CIAO_SUB_COMPONENT_EXEC_SXAYYT_H_
+#define CIAO_SUB_COMPONENT_EXEC_SXAYYT_H_
+
+#include /**/ "ace/pre.h"
+
+#include "Sub_ComponentEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Sub_Component_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO_CoPubSub_Sub_comp_Impl
+{
+
+ /**
+ * Provider Executor Implementation Class: TestSub_data_listener_exec_i
+ */
+
+ class TestSub_data_listener_exec_i
+ : public virtual ::CoPubSub::Test_conn::CCM_Listener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ TestSub_data_listener_exec_i (
+ ::CoPubSub::CCM_Sub_comp_Context_ptr ctx);
+ virtual ~TestSub_data_listener_exec_i (void);
+
+ /** @name Operations and attributes from CoPubSub::Test_conn::Listener */
+ //@{
+
+ virtual
+ void on_one_data (
+ const ::CoPubSub::Test_msg & datum,
+ const ::CCM_DDS::ReadInfo & info);
+
+ virtual
+ void on_many_data (
+ const ::CoPubSub::Test_msgSeq & data,
+ const ::CCM_DDS::ReadInfoSeq & infos);
+ //@}
+
+ private:
+ ::CoPubSub::CCM_Sub_comp_Context_var ciao_context_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: TestSub_status_exec_i
+ */
+
+ class TestSub_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ TestSub_status_exec_i (
+ ::CoPubSub::CCM_Sub_comp_Context_ptr ctx);
+ virtual ~TestSub_status_exec_i (void);
+
+ /** @name Operations and attributes from CCM_DDS::PortStatusListener */
+ //@{
+
+ virtual
+ void on_requested_deadline_missed (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::CoPubSub::CCM_Sub_comp_Context_var ciao_context_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Sub_comp_exec_i
+ */
+
+ class Sub_comp_exec_i
+ : public virtual Sub_comp_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Sub_comp_exec_i (void);
+ virtual ~Sub_comp_exec_i (void);
+
+ /** @name Supported operations and attributes. */
+ //@{
+
+ //@}
+
+ /** @name Component attributes and port operations. */
+ //@{
+
+ virtual ::CoPubSub::Test_conn::CCM_Listener_ptr
+ get_TestSub_data_listener (void);
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_TestSub_status (void);
+ //@}
+
+ /** @name 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);
+ //@}
+
+ /** @name User defined public operations. */
+ //@{
+
+ //@}
+
+ private:
+ ::CoPubSub::CCM_Sub_comp_Context_var ciao_context_;
+
+ /** @name Component attributes. */
+ //@{
+ ::CoPubSub::Test_conn::CCM_Listener_var ciao_TestSub_data_listener_;
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_TestSub_status_;
+ //@}
+
+ /** @name User defined members. */
+ //@{
+
+ //@}
+
+ /** @name User defined private operations. */
+ //@{
+
+ //@}
+ };
+
+ extern "C" PUBSUB_COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_CoPubSub_Sub_comp_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/Plan.cdp
new file mode 100644
index 00000000000..5dead0833fe
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/Plan.cdp
@@ -0,0 +1,654 @@
+<!-- $Id$ -->
+<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>CollocatedDepl_1</label>
+ <UUID>CollocatedDepl_1</UUID>
+
+ <implementation xmi:id="SubComponentImplementation">
+ <name>SubComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Sub_Component_ExecArtifact" />
+ <artifact xmi:idref="Sub_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_CoPubSub_Sub_comp_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_CoPubSub_Sub_comp_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sub_Component_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sub_Component_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="PubSubComponentImplementation">
+ <name>PubSubComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="PubSub_Component_ExecArtifact" />
+ <artifact xmi:idref="PubSub_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_CoPubSub_PubSub_comp_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_CoPubSub_PubSub_comp_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PubSub_Component_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>PubSub_Component_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="CollocatedConnectorComponentImplementation">
+ <name>CollocatedConnectorComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Collocated_Connector_ExecArtifact" />
+ <artifact xmi:idref="Collocated_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_CoPubSub_Test_conn_DDS_Event_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_CoPubSub_Test_conn_DDS_Event_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Collocated_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Collocated_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <!-- SubComponent1 and its connector -->
+ <instance xmi:id="SubComponentInstance1">
+ <name>SubComponent1</name>
+ <node>Node</node>
+ <source/>
+ <implementation xmi:idref="SubComponentImplementation" />
+ </instance>
+
+ <instance xmi:id="SubComponent1Connector">
+ <name>SubComponent1Connector</name>
+ <node>Node</node>
+ <source/>
+ <implementation xmi:idref="CollocatedConnectorComponentImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>CollocatedTopic</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>push_consumer_filter</name>
+ <value>
+ <type>
+ <kind>tk_struct</kind>
+ <struct>
+ <name>QueryFilter</name>
+ <typeId>IDL:CCM_DDS/QueryFilter:1.0</typeId>
+ <member>
+ <name>expression</name>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ </member>
+ <member>
+ <name>parameters</name>
+ <type>
+ <kind>tk_sequence</kind>
+ <sequence>
+ <elementType>
+ <kind>tk_string</kind>
+ </elementType>
+ </sequence>
+ </type>
+ </member>
+ </struct>
+ </type>
+ <value>
+ <member>
+ <name>expression</name>
+ <value>
+ <string>msgId &lt; %0</string>
+ </value>
+ </member>
+ <member>
+ <name>parameters</name>
+ <value>
+ <element>
+ <string>1</string>
+ </element>
+ </value>
+ </member>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- SubComponent2 and its connector -->
+ <instance xmi:id="SubComponentInstance2">
+ <name>SubComponent2</name>
+ <node>Node</node>
+ <source/>
+ <implementation xmi:idref="SubComponentImplementation" />
+ </instance>
+
+ <instance xmi:id="SubComponent2Connector">
+ <name>SubComponent2Connector</name>
+ <node>Node</node>
+ <source/>
+ <implementation xmi:idref="CollocatedConnectorComponentImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>CollocatedTopic</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>push_consumer_filter</name>
+ <value>
+ <type>
+ <kind>tk_struct</kind>
+ <struct>
+ <name>QueryFilter</name>
+ <typeId>IDL:CCM_DDS/QueryFilter:1.0</typeId>
+ <member>
+ <name>expression</name>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ </member>
+ <member>
+ <name>parameters</name>
+ <type>
+ <kind>tk_sequence</kind>
+ <sequence>
+ <elementType>
+ <kind>tk_string</kind>
+ </elementType>
+ </sequence>
+ </type>
+ </member>
+ </struct>
+ </type>
+ <value>
+ <member>
+ <name>expression</name>
+ <value>
+ <string>msgId &lt; %0</string>
+ </value>
+ </member>
+ <member>
+ <name>parameters</name>
+ <value>
+ <element>
+ <string>1</string>
+ </element>
+ </value>
+ </member>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- PubSubComponent and its connector -->
+ <instance xmi:id="PubSubComponentInstance">
+ <name>PubSubComponent</name>
+ <node>Node</node>
+ <source/>
+ <implementation xmi:idref="PubSubComponentImplementation" />
+ </instance>
+
+ <instance xmi:id="PubSubComponentConnector">
+ <name>PubSubComponentConnector</name>
+ <node>Node</node>
+ <source/>
+ <implementation xmi:idref="CollocatedConnectorComponentImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>CollocatedTopic</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>push_consumer_filter</name>
+ <value>
+ <type>
+ <kind>tk_struct</kind>
+ <struct>
+ <name>QueryFilter</name>
+ <typeId>IDL:CCM_DDS/QueryFilter:1.0</typeId>
+ <member>
+ <name>expression</name>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ </member>
+ <member>
+ <name>parameters</name>
+ <type>
+ <kind>tk_sequence</kind>
+ <sequence>
+ <elementType>
+ <kind>tk_string</kind>
+ </elementType>
+ </sequence>
+ </type>
+ </member>
+ </struct>
+ </type>
+ <value>
+ <member>
+ <name>expression</name>
+ <value>
+ <string>msgId &lt; %0</string>
+ </value>
+ </member>
+ <member>
+ <name>parameters</name>
+ <value>
+ <element>
+ <string>1</string>
+ </element>
+ </value>
+ </member>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <!-- pubsub writer connection -->
+ <connection>
+ <name>writer_connection</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestPub_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="PubSubComponentInstance"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>supplier_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="PubSubComponentConnector"/>
+ </internalEndpoint>
+ </connection>
+
+ <!-- pub sub listener connections -->
+ <connection>
+ <name>pubsub_listener_filter</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_filter_config</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="PubSubComponentInstance"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_filter_config</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="PubSubComponentConnector"/>
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>pubsub_data_listener</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_data_listener</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="PubSubComponentInstance"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="PubSubComponentConnector"/>
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>pubsub_listener_control</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_data_control</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="PubSubComponentInstance"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_control</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="PubSubComponentConnector"/>
+ </internalEndpoint>
+ </connection>
+
+ <!-- sub1 listener connections -->
+ <connection>
+ <name>sub1_listener_filter</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_filter_config</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SubComponentInstance1"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_filter_config</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SubComponent1Connector"/>
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>sub1_data_listener</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_data_listener</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SubComponentInstance1"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SubComponent1Connector"/>
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>sub1_listener_control</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_data_control</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SubComponentInstance1"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_control</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SubComponent1Connector"/>
+ </internalEndpoint>
+ </connection>
+
+ <!-- sub2 listener connections -->
+ <connection>
+ <name>sub2_listener_filter</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_filter_config</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SubComponentInstance2"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_filter_config</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SubComponent2Connector"/>
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>sub2_data_listener</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_data_listener</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SubComponentInstance2"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SubComponent2Connector"/>
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>sub2_listener_control</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>TestSub_data_control</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SubComponentInstance2"/>
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data_control</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="SubComponent2Connector"/>
+ </internalEndpoint>
+ </connection>
+
+ <artifact xmi:id="Collocated_Connector_ExecArtifact">
+ <name>Collocated_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>Collocated_Connector_exec</location>
+ </artifact>
+ <artifact xmi:id="Collocated_Connector_SvntArtifact">
+ <name>Collocated_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>Collocated_Connector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Collocated_Connector_StubArtifact">
+ <name>Collocated_Connector_stub</name>
+ <source/>
+ <node/>
+ <location>Collocated_Connector_stub</location>
+ </artifact>
+
+ <artifact xmi:id="Sub_Component_ExecArtifact">
+ <name>Sub_Component_exec</name>
+ <source/>
+ <node/>
+ <location>Sub_Component_exec</location>
+ </artifact>
+ <artifact xmi:id="Sub_Component_SvntArtifact">
+ <name>Sub_Component_svnt</name>
+ <source/>
+ <node/>
+ <location>Sub_Component_svnt</location>
+ </artifact>
+ <artifact xmi:id="Sub_Component_StubArtifact">
+ <name>Sub_Component_stub</name>
+ <source/>
+ <node/>
+ <location>Sub_Component_stub</location>
+ </artifact>
+
+ <artifact xmi:id="PubSub_Component_ExecArtifact">
+ <name>PubSub_Component_exec</name>
+ <source/>
+ <node/>
+ <location>PubSub_Component_exec</location>
+ </artifact>
+ <artifact xmi:id="PubSub_Component_SvntArtifact">
+ <name>PubSub_Component_svnt</name>
+ <source/>
+ <node/>
+ <location>PubSub_Component_svnt</location>
+ </artifact>
+ <artifact xmi:id="PubSub_Component_StubArtifact">
+ <name>PubSub_Component_stub</name>
+ <source/>
+ <node/>
+ <location>PubSub_Component_stub</location>
+ </artifact>
+
+ <localityConstraint>
+ <constraint>SameProcess</constraint>
+ <constrainedInstance xmi:idref="PubSubComponentInstance"/>
+ <constrainedInstance xmi:idref="PubSubComponentConnector"/>
+ </localityConstraint>
+
+ <localityConstraint>
+ <constraint>SameProcess</constraint>
+ <constrainedInstance xmi:idref="SubComponentInstance1"/>
+ <constrainedInstance xmi:idref="SubComponent1Connector"/>
+ <constrainedInstance xmi:idref="SubComponentInstance2"/>
+ <constrainedInstance xmi:idref="SubComponent2Connector"/>
+ </localityConstraint>
+
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/run_test.pl
new file mode 100755
index 00000000000..2a6ecd3b4e8
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/CollocatedPubSub/descriptors/run_test.pl
@@ -0,0 +1,244 @@
+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 = ( "NodeApp.ior" );
+@iorfiles = 0;
+@nodenames = ( "Node" );
+
+# ior files other than daemon
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+sub create_targets {
+ # naming service
+ $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+ $tg_naming->AddLibPath ('../lib');
+ # daemon
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n";
+ $tg_daemons[$i]->AddLibPath ('../lib');
+ }
+ # execution manager
+ $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n";
+ $tg_exe_man->AddLibPath ('../lib');
+ # executor (plan_launcher)
+ $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n";
+ $tg_executor->AddLibPath ('../lib');
+}
+
+sub init_ior_files {
+ $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase);
+ $ior_emfile = $tg_exe_man->LocalFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+ delete_ior_files ();
+}
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i]->DeleteFile ($iorbases[$i]);
+ }
+ $tg_naming->DeleteFile ($ior_nsbase);
+ $tg_exe_man->DeleteFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+}
+
+sub kill_node_daemon {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemon ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill (); $EM->TimedWait (1);
+ }
+
+ if ($ns_running == 1) {
+ $NS->Kill (); $NS->TimedWait (1);
+ }
+ # in case shutdown did not perform as expected
+ $tg_executor->KillAll ('dance_locality_manager');
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $DEAMONS[$i]->Spawn ();
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$ns_status = $NS->Spawn ();
+
+if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$em_status = $EM->Spawn ();
+
+if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+}
+
+if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - launch the application -\n";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 30 seconds to allow task to complete\n";
+sleep (30);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
+
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -s");
+$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;
diff --git a/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.cpp
index f1bcda297e7..fcae1ffefd6 100644
--- a/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.cpp
@@ -91,34 +91,34 @@ namespace CIAO_Keyed_Test_Sender_Impl
void
Sender_exec_i::tick (void)
{
- if (this->last_key != this->ktests_.end ())
+ if (this->last_key_ != this->ktests_.end ())
{
try
{
KeyedTestConnector::Writer_var writer =
this->ciao_context_->get_connection_info_write_data ();
- ++this->last_key->second->iteration;
- writer->write_one (this->last_key->second, ::DDS::HANDLE_NIL);
+ ++this->last_key_->second->iteration;
+ writer->write_one (this->last_key_->second, ::DDS::HANDLE_NIL);
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Written key <%C> with <%d>\n"),
- this->last_key->first.c_str (),
- this->last_key->second->iteration));
+ this->last_key_->first.c_str (),
+ this->last_key_->second->iteration));
}
catch (const CCM_DDS::InternalError& )
{
ACE_ERROR ((LM_ERROR, "ERROR: Internal Error while writing KeyedTest info for <%C>.\n",
- this->last_key->first.c_str ()));
+ this->last_key_->first.c_str ()));
}
- ++this->last_key;
+ ++this->last_key_;
}
else
{
// Onto the next iteration
- this->last_key = this->ktests_.begin ();
- while (this->last_key != this->ktests_.end ())
+ this->last_key_ = this->ktests_.begin ();
+ while (this->last_key_ != this->ktests_.end ())
{
- if (this->last_key->second->iteration == this->iterations_)
+ if (this->last_key_->second->iteration == this->iterations_)
{
- ++this->last_key;
+ ++this->last_key_;
}
else
{
@@ -229,7 +229,7 @@ namespace CIAO_Keyed_Test_Sender_Impl
this->ktests_[key] = new_key;
}
- this->last_key = this->ktests_.begin ();
+ this->last_key_ = this->ktests_.begin ();
}
void
diff --git a/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.h
index b6085322894..c366385b14f 100644
--- a/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.h
+++ b/CIAO/connectors/dds4ccm/tests/KeyedSamples/Sender/Keyed_Test_Sender_exec.h
@@ -132,7 +132,7 @@ namespace CIAO_Keyed_Test_Sender_Impl
typedef std::map<ACE_CString, KeyedTest_var> Keyed_Test_Table;
Keyed_Test_Table ktests_;
- Keyed_Test_Table::iterator last_key;
+ Keyed_Test_Table::iterator last_key_;
//@}
diff --git a/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.cpp b/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.cpp
index 491fcbbcf11..e57ae4c813e 100644
--- a/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.cpp
+++ b/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.cpp
@@ -138,8 +138,8 @@ namespace CIAO_RG_LateBinding_Receiver_Impl
this->start_reading ();
this->set_topic_name_getter ();
this->start_getting ();
- this->set_topic_name_reader (true);
- this->set_topic_name_getter (true);
+ this->set_topic_name_reader ();
+ this->set_topic_name_getter ();
}
void
@@ -294,7 +294,7 @@ namespace CIAO_RG_LateBinding_Receiver_Impl
}
void
- RG_LateBinding_Receiver_impl::set_topic_name_reader (bool test_non_changeable)
+ RG_LateBinding_Receiver_impl::set_topic_name_reader (void)
{
try
{
@@ -323,34 +323,17 @@ namespace CIAO_RG_LateBinding_Receiver_Impl
"Unable to narrow connector interface\n"));
throw ::CORBA::INTERNAL ();
}
- if (test_non_changeable)
- {
- conn->topic_name ("LateBindingTopicSecondTime");
- ACE_ERROR ((LM_ERROR, "RG_LateBinding_Receiver_impl::set_topic_name_reader - "
- "ERROR: No NonChangeable exception thrown.\n"));
- }
- else
- {
- conn->topic_name ("LateBindingTopic");
- }
+ conn->topic_name ("LateBindingTopic");
}
catch (const ::CCM_DDS::NonChangeable &)
{
- if (test_non_changeable)
- {
- ACE_DEBUG ((LM_DEBUG, "RG_LateBinding_Receiver_impl::set_topic_name_reader - "
- "Expected NonChangeable caught.\n"));
- }
- else
- {
- ACE_ERROR ((LM_ERROR, "ERROR: RG_LateBinding_Receiver_impl::set_topic_name_reader - "
- "Caught NonChangeable exception.\n"));
- }
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_LateBinding_Receiver_impl::set_topic_name_reader - "
+ "Caught NonChangeable exception.\n"));
}
}
void
- RG_LateBinding_Receiver_impl::set_topic_name_getter (bool test_non_changeable)
+ RG_LateBinding_Receiver_impl::set_topic_name_getter (void)
{
try
{
@@ -379,29 +362,12 @@ namespace CIAO_RG_LateBinding_Receiver_Impl
"Unable to narrow connector interface\n"));
throw ::CORBA::INTERNAL ();
}
- if (test_non_changeable)
- {
- conn->topic_name ("LateBindingTopicSecondTime");
- ACE_ERROR ((LM_ERROR, "RG_LateBinding_Receiver_impl::set_topic_name_getter - "
- "ERROR: No NonChangeable exception thrown.\n"));
- }
- else
- {
- conn->topic_name ("LateBindingTopic");
- }
+ conn->topic_name ("LateBindingTopic");
}
catch (const ::CCM_DDS::NonChangeable &)
{
- if (test_non_changeable)
- {
- ACE_DEBUG ((LM_DEBUG, "RG_LateBinding_Receiver_impl::set_topic_name_getter - "
- "Expected NonChangeable caught.\n"));
- }
- else
- {
- ACE_ERROR ((LM_ERROR, "RG_LateBinding_Receiver_impl::set_topic_name_getter - "
- "ERROR: Caught NonChangeable exception.\n"));
- }
+ ACE_ERROR ((LM_ERROR, "RG_LateBinding_Receiver_impl::set_topic_name_getter - "
+ "ERROR: Caught NonChangeable exception.\n"));
}
}
}
diff --git a/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.h b/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.h
index 786fa95e26a..43d1198c287 100644
--- a/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.h
+++ b/CIAO/connectors/dds4ccm/tests/LateBinding/ReadGet/Receiver/RG_LateBinding_Receiver_impl.h
@@ -52,8 +52,8 @@ namespace CIAO_RG_LateBinding_Receiver_Impl
LastSampleChecker * checker_;
- void set_topic_name_reader (bool test_non_changeable=false);
- void set_topic_name_getter (bool test_non_changeable=false);
+ void set_topic_name_reader ();
+ void set_topic_name_getter ();
void start_reading (void);
void start_getting (void);
diff --git a/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.cpp
index c11c0efe344..163fb3877b1 100644
--- a/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.cpp
@@ -53,8 +53,8 @@ namespace CIAO_WU_LateBinding_Sender_Impl
else if (assingment == 1)
{
this->callback_.start_state_test ();
- this->callback_.set_topic_name_writer (true);
- this->callback_.set_topic_name_updater (true);
+ this->callback_.set_topic_name_writer ();
+ this->callback_.set_topic_name_updater ();
}
return 0;
}
@@ -139,7 +139,7 @@ namespace CIAO_WU_LateBinding_Sender_Impl
}
void
- Sender_exec_i::set_topic_name_writer (bool test_non_changeable)
+ Sender_exec_i::set_topic_name_writer (void)
{
try
{
@@ -166,29 +166,16 @@ namespace CIAO_WU_LateBinding_Sender_Impl
"Unable to narrow connector interface\n"));
throw ::CORBA::INTERNAL ();
}
- if (test_non_changeable)
- {
- conn->topic_name ("LateBindingTopicSecondTime");
- ACE_ERROR ((LM_ERROR, "Sender_exec_i::set_topic_name_writer - "
- "ERROR: No NonChangeable exception thrown.\n"));
- }
- else
- {
- conn->topic_name ("LateBindingTopic");
- }
+ conn->topic_name ("LateBindingTopic");
}
catch (const ::CCM_DDS::NonChangeable &)
{
- if (test_non_changeable)
- {
- ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_writer - "
- "Expected NonChangeable caught.\n"));
- }
- else
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
- "Caught NonChangeable exception.\n"));
- }
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Caught NonChangeable exception.\n"));
+ }
+ catch (const ::CORBA::Exception &ex)
+ {
+ ex._tao_print_exception("ERROR: Sender_exec_i::set_topic_name_writer - ");
}
}
@@ -234,7 +221,7 @@ namespace CIAO_WU_LateBinding_Sender_Impl
}
void
- Sender_exec_i::set_topic_name_updater(bool test_non_changeable)
+ Sender_exec_i::set_topic_name_updater(void)
{
try
{
@@ -261,29 +248,16 @@ namespace CIAO_WU_LateBinding_Sender_Impl
"Unable to narrow connector interface\n"));
throw ::CORBA::INTERNAL ();
}
- if (test_non_changeable)
- {
- conn->topic_name ("LateBindingTopicSecondTime");
- ACE_ERROR ((LM_ERROR, "Sender_exec_i::set_topic_name_updater - "
- "ERROR: No NonChangeable exception thrown.\n"));
- }
- else
- {
- conn->topic_name ("LateBindingTopic");
- }
+ conn->topic_name ("LateBindingTopic");
}
catch (const ::CCM_DDS::NonChangeable &)
{
- if (test_non_changeable)
- {
- ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_updater - "
- "Expected NonChangeable caught.\n"));
- }
- else
- {
- ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
- "Caught NonChangeable exception.\n"));
- }
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Caught NonChangeable exception.\n"));
+ }
+ catch (const ::CORBA::Exception &ex)
+ {
+ ex._tao_print_exception("ERROR: Sender_exec_i::set_topic_name_writer - ");
}
}
diff --git a/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.h
index 345d9dba5db..499bbe90312 100644
--- a/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.h
+++ b/CIAO/connectors/dds4ccm/tests/LateBinding/UpdateWrite/Sender/WU_LateBinding_Sender_exec.h
@@ -98,8 +98,8 @@ namespace CIAO_WU_LateBinding_Sender_Impl
//@{
/** User defined public operations. */
- void set_topic_name_writer (bool test_non_changeable=false);
- void set_topic_name_updater (bool test_non_changeable=false);
+ void set_topic_name_writer (void);
+ void set_topic_name_updater (void);
void start_event_test (void);
void start_state_test (void);
//@}
diff --git a/CIAO/connectors/dds4ccm/tests/NonChangeableAttribute/Component/NonChangeable_Component_exec.cpp b/CIAO/connectors/dds4ccm/tests/NonChangeableAttribute/Component/NonChangeable_Component_exec.cpp
index e0939d5a991..9519d15b3f6 100644
--- a/CIAO/connectors/dds4ccm/tests/NonChangeableAttribute/Component/NonChangeable_Component_exec.cpp
+++ b/CIAO/connectors/dds4ccm/tests/NonChangeableAttribute/Component/NonChangeable_Component_exec.cpp
@@ -31,21 +31,19 @@ namespace CIAO_NonChangeable_NonChangeableComponent_Impl
try
{
conn->topic_name ("nonchangeable_test");
- ACE_ERROR ((LM_ERROR, "NonChangeable_Connector_exec_impl_i::test_topic_name - "
- "ERROR: Able to set topic name without "
- "an exception.\n"));
+ ACE_DEBUG ((LM_DEBUG, "NonChangeable_Connector_exec_impl_i::test_topic_name - "
+ "Able to reset topic name without an exception.\n"));
+ return true;
}
catch (const ::CCM_DDS::NonChangeable &)
{
- ACE_DEBUG ((LM_DEBUG, "NonChangeable_Connector_exec_impl_i::test_topic_name - "
- "Caught expected exception.\n"));
- return true;
+ ACE_ERROR ((LM_ERROR, "NonChangeable_Connector_exec_impl_i::test_topic_name - "
+ "ERROR: Unable to reset topic name.\n"));
}
catch (...)
{
ACE_ERROR ((LM_ERROR, "NonChangeable_Connector_exec_impl_i::test_topic_name - "
"ERROR: Caught unexpected exception.\n"));
- return false;
}
return false;
}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/README b/CIAO/connectors/dds4ccm/tests/ResetTopic/README
new file mode 100644
index 00000000000..c2d71f3d08b
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/README
@@ -0,0 +1,32 @@
+// $Id$
+
+In the early days of the DDS4CCM specification a topic name was not changable.
+When it was set (doesn't matter if it was a late binded topic), the user was not
+allowed to change it, otherwise a NonChangeable exception was thrown.
+
+The requirement from the field dictates that a topic name should be changeable.
+When the topic name will be set a second time, the connector should shut down
+DDS and start it again, using the new topic name. The connector does not tear
+down the proxies. This means that the connector doesn't change on the outside.
+
+The ReadGet test has the following sequence:
+1. Sender starts writing samples for TopicI
+2. Sender informs the Receiver that samples has been written for TopicI
+3. Receiver sets this topic name on his connector (late binding), and starts to
+ collect the samples.
+4. Sender resets the topic name to TopicII and informs the receiver about this.
+5. Receiver resets the topic name on his connector and starts collecting the
+ samples belonging to TopicII.
+
+Both listeners tests (UpdateListen and WriteListen) have about the same sequence:
+1. Sender and Receiver start, writing and listening to the same topic.
+2. After 10 second, the perl script starts two small executables; one to inform
+ the receiver to switch to topic II and one to inform the sender to switch to
+ topic II. The executables are spawned in this order.
+3. Step one is repeated.
+4. Step two will be repeated.
+
+The ToEmpty test will initially start writing samples for TopicI. After a while,
+the topic name will be cleared. This means that the connector internally stops DDS.
+After another while, the sender will start writing samples again,
+but now for TopicII. This sequence repeats.
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.idl
new file mode 100644
index 00000000000..5a7452f2015
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file RG_ResetTopic_Base.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef RG_RESETTOPIC_BASE_IDL
+#define RG_RESETTOPIC_BASE_IDL
+
+#pragma ndds typesupport "Base/RG_ResetTopic_BaseSupport.h"
+
+#pragma DCPS_DATA_TYPE "RG_ResetTopicSample"
+#pragma DCPS_DATA_KEY "RG_ResetTopicSample key"
+
+struct RG_ResetTopicSample {
+ string key; //@key
+ long iteration;
+};
+
+typedef sequence<RG_ResetTopicSample> RG_ResetTopicSampleSeq;
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.mpc
new file mode 100644
index 00000000000..36560836af9
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/RG_ResetTopic_Base.mpc
@@ -0,0 +1,26 @@
+// $Id$
+
+project (RG_ResetTopicBase_stub) : taoidldefaults, dds4ccm_ts_default {
+ sharedname = RG_ResetTopicBase_stub
+ dynamicflags += RG_RESETTOPIC_BASE_STUB_BUILD_DLL
+ libout = ../lib
+
+ idlflags += -SS -Sci \
+ -Wb,stub_export_macro=RG_RESETTOPIC_BASE_STUB_Export \
+ -Wb,stub_export_include=LateBinding_Base_stub_export.h
+
+ IDL_Files {
+ idlflags += -Gxhst
+ RG_ResetTopic_Base.idl
+ }
+
+ opendds_ts_flags += --export=RG_RESETTOPIC_BASE_STUB_Export
+
+ DDSGenerator_Files {
+ RG_ResetTopic_Base.idl
+ }
+
+ Source_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.idl
new file mode 100644
index 00000000000..bf198b37ea7
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.idl
@@ -0,0 +1,20 @@
+// $Id$
+
+/**
+ * @file Reader_Starter.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef READER_STARTER_IDL
+#define READER_STARTER_IDL
+
+#pragma ciao lem "Base/Reader_StarterE.idl"
+
+interface ReaderStarter
+{
+ void start_read (in string topic_name);
+ void set_reader_properties (in unsigned short nr_keys,
+ in unsigned short nr_iterations);
+};
+
+#endif /* READER_STARTER_IDL */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.mpc
new file mode 100755
index 00000000000..050904fd873
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Base/Reader_Starter.mpc
@@ -0,0 +1,113 @@
+// $Id$
+
+project(reader_starter_rt_idl_gen) : componentidldefaults, dds4ccm {
+ custom_only = 1
+ after +=
+ idlflags += -Wb,stub_export_macro=READER_STARTER_STUB_Export \
+ -Wb,stub_export_include=reader_starter_rt_stub_export.h \
+ -Wb,skel_export_macro=READER_STARTER_SVNT_Export \
+ -Wb,skel_export_include=reader_starter_rt_svnt_export.h \
+ -Wb,svnt_export_macro=READER_STARTER_SVNT_Export \
+ -Wb,svnt_export_include=reader_starter_rt_svnt_export.h \
+ -Wb,exec_export_macro=READER_STARTER_EXEC_Export \
+ -Wb,exec_export_include=Reader_Starter_exec_export.h -I..
+
+ IDL_Files {
+ Reader_Starter.idl
+ }
+}
+
+project(reader_starter_rt_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += reader_starter_rt_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=READER_STARTER_LEM_STUB_Export \
+ -Wb,stub_export_include=reader_starter_rt_lem_stub_export.h \
+ -SS -Gxhst -I..
+
+ IDL_Files {
+ Reader_StarterE.idl
+ }
+}
+
+project(reader_starter_rt_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += reader_starter_rt_lem_gen reader_starter_rt_stub
+ libs += reader_starter_rt_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = reader_starter_rt_lem_stub
+ dynamicflags += READER_STARTER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Reader_StarterEC.cpp
+ }
+
+ Header_Files {
+ Reader_StarterEC.h
+ reader_starter_rt_lem_stub_export.h
+ }
+
+ Inline_Files {
+ Reader_StarterEC.inl
+ }
+}
+
+project(reader_starter_rt_stub) : ccm_stub, dds4ccm_base {
+ after += reader_starter_rt_idl_gen
+ libs +=
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = reader_starter_rt_stub
+ dynamicflags += READER_STARTER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Reader_StarterC.cpp
+ }
+
+ Header_Files {
+ Reader_StarterC.h
+ reader_starter_rt_stub_export.h
+ }
+
+ Inline_Files {
+ Reader_StarterC.inl
+ }
+}
+
+
+project(reader_starter_rt_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += reader_starter_rt_lem_stub reader_starter_rt_stub
+ sharedname = reader_starter_rt_svnt
+ libs += reader_starter_rt_stub reader_starter_rt_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += READER_STARTER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ Reader_StarterS.cpp
+ Reader_Starter_svnt.cpp
+ }
+
+ Header_Files {
+ Reader_StarterS.h
+ Reader_Starter_svnt.h
+ reader_starter_rt_svnt_export.h
+ }
+
+ Inline_Files {
+ Reader_StarterS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.idl
new file mode 100644
index 00000000000..1da3f3494d0
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file RG_ResetTopic_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef RG_RESETTOPIC_CONNECTOR_IDL_
+#define RG_RESETTOPIC_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include <ccm_dds.idl>
+
+#include "Base/RG_ResetTopic_Base.idl"
+
+#pragma ciao lem "Connector/RG_ResetTopic_ConnectorE.idl"
+
+module RG_ResetTopic
+{
+ module ::CCM_DDS::Typed < ::RG_ResetTopicSample, ::RG_ResetTopicSampleSeq> RG_ResetTopicSampleConnector;
+};
+
+#endif /* RG_ResetTopic_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.mpc
new file mode 100644
index 00000000000..f5e8207275a
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Connector/RG_ResetTopic_Connector.mpc
@@ -0,0 +1,148 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p RG_ResetTopicBase -l .. -o ../lib -u DDS RG_ResetTopic_Connector"
+
+project (RG_ResetTopicConnector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=RG_RESETTOPIC_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=LateBinding_Connector_stub_export.h \
+ -Wb,skel_export_macro=RG_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=LateBinding_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=RG_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=LateBinding_Connector_svnt_export.h \
+ -Wb,conn_export_macro=RG_RESETTOPIC_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=LateBinding_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ RG_ResetTopic_Connector.idl
+ }
+}
+
+project (RG_ResetTopicConnector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += RG_ResetTopicConnector_idl_gen
+ idlflags += -Wb,stub_export_macro=RG_RESETTOPIC_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=RG_ResetTopic_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I ..
+
+ IDL_Files {
+ RG_ResetTopic_ConnectorE.idl
+ }
+}
+
+project (RG_ResetTopicConnector_lem_stub) : ccm_svnt, dds4ccm_lem_stub {
+ after += RG_ResetTopicConnector_lem_gen RG_ResetTopicConnector_stub \
+ RG_ResetTopicBase_stub
+ libs += RG_ResetTopicBase_stub RG_ResetTopicConnector_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = RG_ResetTopicConnector_lem_stub
+ dynamicflags += RG_RESETTOPIC_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_ConnectorEC.h
+ RG_ResetTopic_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_ConnectorEC.inl
+ }
+}
+
+project (RG_ResetTopicConnector_stub) : ccm_stub, dds4ccm_base {
+ after += RG_ResetTopicConnector_idl_gen RG_ResetTopicBase_stub
+ libs += RG_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = RG_ResetTopicConnector_stub
+ dynamicflags += RG_RESETTOPIC_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_ConnectorC.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_ConnectorC.h
+ RG_ResetTopic_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_ConnectorC.inl
+ }
+}
+
+project (RG_ResetTopicConnector_exec) : ciao_executor, dds4ccm_impl {
+ after += RG_ResetTopicConnector_lem_stub RG_ResetTopicConnector_stub \
+ RG_ResetTopicBase_stub
+ sharedname = RG_ResetTopicConnector_exec
+ libs += RG_ResetTopicConnector_stub RG_ResetTopicConnector_lem_stub \
+ RG_ResetTopicBase_stub RG_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RG_RESETTOPIC_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_Connector_conn.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_Connector_conn.h
+ RG_ResetTopic_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (RG_ResetTopicConnector_svnt) : ciao_servant, dds4ccm_impl {
+ after += RG_ResetTopicConnector_lem_stub RG_ResetTopicConnector_exec \
+ RG_ResetTopicConnector_stub
+ sharedname = RG_ResetTopicConnector_svnt
+ libs += RG_ResetTopicConnector_stub \
+ RG_ResetTopicConnector_lem_stub \
+ RG_ResetTopicBase_stub \
+ RG_ResetTopicConnector_exec
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RG_RESETTOPIC_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_ConnectorS.cpp
+ RG_ResetTopic_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_ConnectorS.h
+ RG_ResetTopic_Connector_svnt.h
+ RG_ResetTopic_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.idl
new file mode 100644
index 00000000000..1a3d83d66c6
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.idl
@@ -0,0 +1,25 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef RECEIVER_IDL
+#define RECEIVER_IDL
+
+#include "Connector/RG_ResetTopic_Connector.idl"
+#include "Base/Reader_Starter.idl"
+
+module RG_ResetTopic
+{
+ component Receiver
+ {
+ port RG_ResetTopicSampleConnector::DDS_Get info_get;
+ port RG_ResetTopicSampleConnector::DDS_Read info_read;
+
+ provides ReaderStarter start_reading;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.mpc
new file mode 100644
index 00000000000..fe2ed2dae50
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver.mpc
@@ -0,0 +1,158 @@
+// $Id$
+
+project (RG_ResetTopicReceiver_idl_gen) : componentidldefaults, dds4ccm {
+ custom_only = 1
+ after += RG_ResetTopicConnector_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 {
+ RG_ResetTopic_Receiver.idl
+ }
+}
+
+project (RG_ResetTopicReceiver_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += RG_ResetTopicReceiver_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 {
+ RG_ResetTopic_ReceiverE.idl
+ }
+}
+
+project (RG_ResetTopicReceiver_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += RG_ResetTopicReceiver_lem_gen RG_ResetTopicReceiver_stub RG_ResetTopicConnector_stub \
+ RG_ResetTopicBase_stub reader_starter_rt_stub
+ libs += Receiver_stub RG_ResetTopicConnector_stub RG_ResetTopicBase_stub \
+ reader_starter_rt_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_lem_stub
+ dynamicflags += RECEIVER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_ReceiverEC.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_ReceiverEC.h
+ Receiver_lem_stub_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_ReceiverEC.inl
+ }
+}
+
+project (RG_ResetTopicReceiver_stub) : ccm_stub, dds4ccm_base {
+ after += RG_ResetTopicReceiver_idl_gen RG_ResetTopicConnector_stub \
+ RG_ResetTopicBase_stub RG_ResetTopicConnector_lem_gen \
+ reader_starter_rt_stub reader_starter_rt_lem_stub
+ libs += RG_ResetTopicConnector_stub RG_ResetTopicBase_stub \
+ reader_starter_rt_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_stub
+ dynamicflags += RECEIVER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_ReceiverC.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_ReceiverC.h
+ Receiver_stub_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_ReceiverC.inl
+ }
+}
+
+project (RG_ResetTopicReceiver_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += RG_ResetTopicReceiver_lem_stub RG_ResetTopicReceiver_stub \
+ RG_ResetTopicBase_stub RG_ResetTopicConnector_stub \
+ RG_ResetTopicConnector_lem_stub \
+ reader_starter_rt_lem_stub reader_starter_rt_stub
+ sharedname = Receiver_exec
+ libs += Receiver_stub Receiver_lem_stub RG_ResetTopicBase_stub \
+ RG_ResetTopicConnector_stub RG_ResetTopicConnector_lem_stub \
+ reader_starter_rt_lem_stub reader_starter_rt_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RECEIVER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_Receiver_exec.cpp
+ RG_ResetTopic_Receiver_impl.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_Receiver_exec.h
+ RG_ResetTopic_Receiver_impl.h
+ Receiver_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (RG_ResetTopicReceiver_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += RG_ResetTopicReceiver_lem_stub RG_ResetTopicBase_stub \
+ RG_ResetTopicConnector_stub RG_ResetTopicConnector_svnt \
+ RG_ResetTopicReceiver_exec RG_ResetTopicConnector_lem_stub \
+ reader_starter_rt_stub \
+ reader_starter_rt_svnt reader_starter_rt_lem_stub
+ sharedname = Receiver_svnt
+ libs += Receiver_stub Receiver_lem_stub RG_ResetTopicBase_stub \
+ RG_ResetTopicConnector_stub RG_ResetTopicConnector_svnt \
+ Receiver_exec RG_ResetTopicConnector_lem_stub \
+ reader_starter_rt_stub reader_starter_rt_svnt \
+ reader_starter_rt_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RECEIVER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_ReceiverS.cpp
+ RG_ResetTopic_Receiver_svnt.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_ReceiverS.h
+ RG_ResetTopic_Receiver_svnt.h
+ Receiver_svnt_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_ReceiverS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.cpp
new file mode 100644
index 00000000000..02b5ea6f723
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.cpp
@@ -0,0 +1,283 @@
+// -*- C++ -*-
+// $Id$
+
+#include "RG_ResetTopic_Receiver_exec.h"
+#include "RG_ResetTopic_Receiver_impl.h"
+
+namespace CIAO_RG_ResetTopic_Receiver_Impl
+{
+
+ /**
+ * Facet Executor Implementation Class: info_get_status_exec_i
+ */
+
+ info_get_status_exec_i::info_get_status_exec_i (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::RG_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ {
+ }
+
+ info_get_status_exec_i::~info_get_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ info_get_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ info_get_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Facet Executor Implementation Class: info_read_status_exec_i
+ */
+
+ info_read_status_exec_i::info_read_status_exec_i (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::RG_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ {
+ }
+
+ info_read_status_exec_i::~info_read_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ info_read_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ info_read_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Facet Executor Implementation Class: start_reading_exec_i
+ */
+
+ start_reading_exec_i::start_reading_exec_i (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ Receiver_exec_i &callback)
+ : ciao_context_ (
+ ::RG_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ , callback_ (callback)
+ {
+ }
+
+ start_reading_exec_i::~start_reading_exec_i (void)
+ {
+ }
+
+ // Operations from ::ReaderStarter
+
+ void
+ start_reading_exec_i::start_read (const char * topic_name)
+ {
+ this->callback_.start_read (topic_name);
+ }
+
+ void
+ start_reading_exec_i::set_reader_properties (::CORBA::UShort nr_keys,
+ ::CORBA::UShort nr_iterations)
+ {
+ this->callback_.keys (nr_keys);
+ this->callback_.iterations (nr_iterations);
+ }
+
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ Receiver_exec_i::Receiver_exec_i (void)
+ : iterations_ (10)
+ , keys_ (5)
+ , impl_(0)
+ {
+ }
+
+ Receiver_exec_i::~Receiver_exec_i (void)
+ {
+ delete this->impl_;
+ }
+
+ // Supported operations and attributes.
+ ::CORBA::UShort
+ Receiver_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Receiver_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ if (this->impl_)
+ {
+ this->impl_->iterations (iterations);
+ }
+ }
+
+ ::CORBA::UShort
+ Receiver_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Receiver_exec_i::keys (
+ const ::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ if (this->impl_)
+ {
+ this->impl_->keys (keys);
+ }
+ }
+
+ void
+ Receiver_exec_i::start_read (const char * topic_name)
+ {
+ if (!this->impl_)
+ ACE_NEW_THROW_EX (this->impl_,
+ RG_ResetTopic_Receiver_impl (
+ this->ciao_context_.in (),
+ this->iterations_,
+ this->keys_),
+ ::CORBA::INTERNAL ());
+ this->impl_->start (topic_name);
+ }
+
+ // Component attributes and port operations.
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ Receiver_exec_i::get_info_get_status (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_info_get_status_.in ()))
+ {
+ info_get_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ info_get_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_info_get_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_info_get_status_.in ());
+ }
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ Receiver_exec_i::get_info_read_status (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_info_read_status_.in ()))
+ {
+ info_read_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ info_read_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_info_read_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_info_read_status_.in ());
+ }
+
+ ::CCM_ReaderStarter_ptr
+ Receiver_exec_i::get_start_reading (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_start_reading_.in ()))
+ {
+ start_reading_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ start_reading_exec_i (
+ this->ciao_context_.in (),
+ *this),
+ ::CCM_ReaderStarter::_nil ());
+
+ this->ciao_start_reading_ = tmp;
+ }
+
+ return
+ ::CCM_ReaderStarter::_duplicate (
+ this->ciao_start_reading_.in ());
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Receiver_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::RG_ResetTopic::CCM_Receiver_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Receiver_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Receiver_exec_i::ccm_activate (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Receiver_exec_i::ccm_passivate (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Receiver_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_RG_ResetTopic_Receiver_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Receiver_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.h
new file mode 100644
index 00000000000..6b772b6a35e
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_exec.h
@@ -0,0 +1,194 @@
+// -*- C++ -*-
+// $Id$
+
+#ifndef CIAO_RG_RESETTOPIC_RECEIVER_EXEC_MMKH3G_H_
+#define CIAO_RG_RESETTOPIC_RECEIVER_EXEC_MMKH3G_H_
+
+#include /**/ "ace/pre.h"
+
+#include "RG_ResetTopic_ReceiverEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Receiver_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO_RG_ResetTopic_Receiver_Impl
+{
+ class Receiver_exec_i;
+ class RG_ResetTopic_Receiver_impl;
+ /**
+ * Provider Executor Implementation Class: info_get1_status_exec_i
+ */
+
+ class info_get_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ info_get_status_exec_i (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx);
+ virtual ~info_get_status_exec_i (void);
+
+ /** @name Operations and attributes from CCM_DDS::PortStatusListener */
+ //@{
+
+ virtual
+ void on_requested_deadline_missed (::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::RG_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: info_read1_status_exec_i
+ */
+
+ class info_read_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ info_read_status_exec_i (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx);
+ virtual ~info_read_status_exec_i (void);
+
+ /** @name Operations and attributes from CCM_DDS::PortStatusListener */
+ //@{
+
+ virtual
+ void on_requested_deadline_missed (::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::RG_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: start_reading_exec_i
+ */
+
+ class start_reading_exec_i
+ : public virtual ::CCM_ReaderStarter,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ start_reading_exec_i (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ Receiver_exec_i &callback_);
+ virtual ~start_reading_exec_i (void);
+
+ /** @name Operations and attributes from ReaderStarter */
+ //@{
+
+ virtual
+ void start_read (const char * topic_name);
+
+ virtual
+ void set_reader_properties (::CORBA::UShort nr_keys,
+ ::CORBA::UShort nr_iterations);
+ //@}
+
+ private:
+ ::RG_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ Receiver_exec_i &callback_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ class Receiver_exec_i
+ : public virtual Receiver_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Receiver_exec_i (void);
+ virtual ~Receiver_exec_i (void);
+
+ /** @name Supported operations and attributes. */
+ //@{
+
+ //@}
+
+ /** @name Component attributes and port operations. */
+ //@{
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_info_get_status (void);
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_info_read_status (void);
+
+ virtual ::CCM_ReaderStarter_ptr
+ get_start_reading (void);
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+
+ virtual void keys (::CORBA::UShort keys);
+ //@}
+
+ /** @name 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);
+ //@}
+
+ /** @name User defined public operations. */
+ //@{
+ void
+ start_read (const char * topic_name);
+ //@}
+
+ private:
+ ::RG_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+
+ /** @name Component attributes. */
+ //@{
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_info_get_status_;
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_info_read_status_;
+ ::CCM_ReaderStarter_var ciao_start_reading_;
+
+ ::CORBA::UShort iterations_;
+
+ ::CORBA::UShort keys_;
+ //@}
+
+ /** @name User defined members. */
+ //@{
+ RG_ResetTopic_Receiver_impl *impl_;
+ //@}
+
+ /** @name User defined private operations. */
+ //@{
+
+ //@}
+ };
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_RG_ResetTopic_Receiver_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.cpp
new file mode 100644
index 00000000000..f25757e9552
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.cpp
@@ -0,0 +1,395 @@
+// $Id$
+#include "RG_ResetTopic_Receiver_impl.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+namespace CIAO_RG_ResetTopic_Receiver_Impl
+{
+
+ /**
+ * Check last
+ */
+ LastSampleChecker::LastSampleChecker (RG_ResetTopic_Receiver_impl &callback,
+ const ::CORBA::UShort &iterations)
+ : callback_ (callback)
+ , iterations_ (iterations)
+ {
+ }
+
+ LastSampleChecker::~LastSampleChecker ()
+ {
+ }
+
+ int
+ LastSampleChecker::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Checking if last sample "
+ "is available in DDS...\n"));
+ if (this->callback_.check_last ())
+ this->callback_.start_read ();
+ return 0;
+ }
+
+ /**
+ * RG_ResetTopic_Receiver_impl
+ */
+ RG_ResetTopic_Receiver_impl::RG_ResetTopic_Receiver_impl (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ const ::CORBA::UShort & iterations,
+ const ::CORBA::UShort & keys)
+ : ciao_context_ (
+ ::RG_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ , iterations_ (iterations)
+ , keys_ (keys)
+ , expected_per_run_ (keys * iterations)
+ , checker_ (0)
+ , topic_name_("")
+ {
+ }
+
+ RG_ResetTopic_Receiver_impl::~RG_ResetTopic_Receiver_impl ()
+ {
+ delete this->checker_;
+ }
+
+ ACE_Reactor*
+ RG_ResetTopic_Receiver_impl::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::iterations (::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::keys (::CORBA::UShort keys)
+ {
+ this->keys_= keys;
+ }
+
+ bool
+ RG_ResetTopic_Receiver_impl::check_last (void)
+ {
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::Reader_var reader =
+ this->ciao_context_->get_connection_info_read_data ();
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::check_last - "
+ "last iteration should be <%02d>\n",
+ this->iterations_));
+ RG_ResetTopicSample datum;
+ ::CCM_DDS::ReadInfo readinfo;
+ char key[10];
+ ACE_OS::sprintf (key, "KEY_%d", this->keys_);
+ datum.key = CORBA::string_dup (key);
+ reader->read_one_last (
+ datum,
+ readinfo,
+ ::DDS::HANDLE_NIL);
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::check_last - "
+ "last iteration <%02d> - <%02d>\n",
+ datum.iteration,
+ this->iterations_));
+ return datum.iteration >= this->iterations_;
+ }
+ catch (const ::CCM_DDS::InternalError &)
+ {
+ ACE_DEBUG ((LM_DEBUG, "INTERNAL ERROR\n"));
+ }
+ catch (const ::CCM_DDS::NonExistent &)
+ {
+ ACE_DEBUG ((LM_DEBUG, "NONEXISTENT\n"));
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::check_last: "
+ "ERROR: Unexpected exception caught\n"));
+ }
+ return false;
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::start (const char * topic_name)
+ {
+ this->topic_name_ = topic_name;
+ //only the first time...
+ if (!this->checker_)
+ this->test_exception ();
+ this->set_topic_name_reader (topic_name);
+
+ if (!this->checker_)
+ ACE_NEW_THROW_EX (this->checker_,
+ LastSampleChecker (*this,
+ this->iterations_),
+ ::CORBA::NO_MEMORY ());
+ if (this->reactor ()->schedule_timer (this->checker_,
+ 0,
+ ACE_Time_Value (1, 0),
+ ACE_Time_Value (1, 0)) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::schedule_timer - "
+ "ERROR: Error while starting LastSampleChecker\n"));
+ }
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::start_read (void)
+ {
+ if (this->checker_)
+ {
+ this->reactor ()->cancel_timer (this->checker_);
+ }
+ this->start_reading ();
+ this->set_topic_name_getter (this->topic_name_.c_str());
+ this->start_getting ();
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::check_samples (
+ const char * test,
+ const RG_ResetTopicSampleSeq& samples,
+ const ::CORBA::UShort& expected)
+ {
+ bool error = samples.length () != expected;
+ if (ACE_OS::strcmp (test, "get") == 0)
+ {
+ error = !(samples.length () > 0);
+ }
+ if (error)
+ {
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::check_samples - "
+ "ERROR: Unexpected number of %C samples received: "
+ "expected <%d> - received <%u>\n",
+ test,
+ expected,
+ samples.length ()));
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG, "RG_ResetTopic_Receiver_impl::check_samples - "
+ "%C Samples found: <%u>\n",
+ test,
+ samples.length ()));
+ }
+ for (::CORBA::ULong i = 0;
+ i < samples.length ();
+ ++i)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RG_ResetTopic_Receiver_impl::check_samples - "
+ "Sample %C: sample <%d> - key <%C> - iteration <%d>\n",
+ test,
+ i,
+ samples[i].key.in (),
+ samples[i].iteration));
+ }
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::test_exception (void)
+ {
+ try
+ {
+ if (! ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::Reader_var reader =
+ this->ciao_context_->get_connection_info_read_data ();
+ if (::CORBA::is_nil (reader.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::test_exception - "
+ "ERROR: Unable to get reader interface from the "
+ "CIAO context\n"));
+ return;
+ }
+
+ RG_ResetTopicSample sample;
+ ::CCM_DDS::ReadInfo readinfo;
+ sample.key = CORBA::string_dup ("KEY_1");
+ reader->read_one_last (sample,
+ readinfo,
+ ::DDS::HANDLE_NIL);
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::test_exception - "
+ "ERROR: No exception caught before topic name has been set\n"));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::test_exception - "
+ "ERROR: CIAO context seems to be NIL\n"));
+ }
+ }
+ catch (const ::CORBA::BAD_INV_ORDER &)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RG_ResetTopic_Receiver_impl::test_exception - "
+ "Expected BAD_INV_ORDER thrown.\n"));
+ }
+ catch (const CORBA::Exception &e)
+ {
+ e._tao_print_exception("RG_ResetTopic_Receiver_impl::test_exception - "
+ "ERROR: Unexpected exception");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::test_exception - "
+ "ERROR: expected and unknown exception caught\n"));
+ }
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::start_reading (void)
+ {
+ ACE_DEBUG ((LM_DEBUG, "RG_ResetTopic_Receiver_impl::start_reading - "
+ "Start reading\n"));
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::Reader_var reader =
+ this->ciao_context_->get_connection_info_read_data ();
+ try
+ {
+ RG_ResetTopicSampleSeq samples;
+ ::CCM_DDS::ReadInfoSeq readinfo_seq;
+ reader->read_all (samples, readinfo_seq);
+
+ this->check_samples ("read", samples, this->expected_per_run_);
+ }
+ catch (const CORBA::Exception &e)
+ {
+ e._tao_print_exception("RG_ResetTopic_Receiver_impl::start_reading - "
+ "ERROR: Unexpected exception");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::start_reading - "
+ "ERROR: Caught unknow exception\n"));
+ }
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::start_getting (void)
+ {
+ try
+ {
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::Getter_var getter =
+ this->ciao_context_->get_connection_info_get_fresh_data ();
+ if (::CORBA::is_nil (getter.in ()))
+ {
+ ACE_DEBUG ((LM_DEBUG, "RG_ResetTopic_Receiver_impl::start_getting - "
+ "ERROR: Unable to get writer interface from the "
+ "CIAO context\n"));
+ return;
+ }
+ DDS::Duration_t to;
+ to.sec = 1;
+ to.nanosec = 0;
+ getter->time_out (to);
+
+ RG_ResetTopicSampleSeq samples;
+ ::CCM_DDS::ReadInfoSeq readinfos;
+ getter->get_many (samples, readinfos);
+ this->check_samples ("get", samples);
+ }
+ catch (const CORBA::Exception &e)
+ {
+ e._tao_print_exception("RG_ResetTopic_Receiver_impl::start_getting - "
+ "ERROR: Unexpected exception");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::start_getting - "
+ "ERROR: expected and unknown exception caught\n"));
+ }
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::set_topic_name_reader (const char * topic_name)
+ {
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "RG_ResetTopic_Receiver_impl::set_topic_name_reader - "
+ "Setting topic name to <%C>\n", topic_name));
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::Reader_var reader =
+ this->ciao_context_->get_connection_info_read_data ();
+ if (::CORBA::is_nil (reader.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_ResetTopic_Receiver_impl::set_topic_name_reader - "
+ "Unable to get reader interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::CORBA::Object_var cmp = reader->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_ResetTopic_Receiver_impl::set_topic_name_reader - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::CCM_DDS_State_var conn =
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::CCM_DDS_State::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_ResetTopic_Receiver_impl::set_topic_name_reader - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+
+ conn->topic_name (topic_name);
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_ResetTopic_Receiver_impl::set_topic_name_reader - "
+ "Caught NonChangeable exception.\n"));
+ }
+ }
+
+ void
+ RG_ResetTopic_Receiver_impl::set_topic_name_getter (const char * topic_name)
+ {
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "RG_ResetTopic_Receiver_impl::set_topic_name_getter - "
+ "Setting topic name to <%C>\n", topic_name));
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::Getter_var getter =
+ this->ciao_context_->get_connection_info_get_fresh_data ();
+ if (::CORBA::is_nil (getter.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_ResetTopic_Receiver_impl::set_topic_name_getter - "
+ "Unable to get getter interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::CORBA::Object_var cmp = getter->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_ResetTopic_Receiver_impl::set_topic_name_getter - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::CCM_DDS_Event_var conn =
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::CCM_DDS_Event::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: RG_ResetTopic_Receiver_impl::set_topic_name_getter - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ conn->topic_name (topic_name);
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "RG_ResetTopic_Receiver_impl::set_topic_name_getter - "
+ "ERROR: Caught NonChangeable exception.\n"));
+ }
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.h
new file mode 100644
index 00000000000..241ab592731
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Receiver/RG_ResetTopic_Receiver_impl.h
@@ -0,0 +1,77 @@
+// $Id$
+
+#ifndef RG_RESETTOPIC_RECEIVER_IMPL_H_
+#define RG_RESETTOPIC_RECEIVER_IMPL_H_
+
+#include "RG_ResetTopic_ReceiverEC.h"
+
+namespace CIAO_RG_ResetTopic_Receiver_Impl
+{
+ class RG_ResetTopic_Receiver_impl;
+
+ /**
+ * LastSampleChecker
+ */
+ class LastSampleChecker
+ : public ACE_Event_Handler
+ {
+ public:
+ LastSampleChecker (RG_ResetTopic_Receiver_impl &callback,
+ const ::CORBA::UShort &iterations);
+
+ virtual ~LastSampleChecker (void);
+
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+ private:
+ RG_ResetTopic_Receiver_impl &callback_;
+ const ::CORBA::UShort iterations_;
+ };
+
+ /**
+ * RG_ResetTopic_Receiver_impl
+ */
+ class RG_ResetTopic_Receiver_impl
+ {
+ public:
+ RG_ResetTopic_Receiver_impl (
+ ::RG_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ const ::CORBA::UShort & iterations,
+ const ::CORBA::UShort & keys);
+ ~RG_ResetTopic_Receiver_impl (void);
+
+ void start (const char * topic_name);
+ bool check_last (void);
+ void start_read (void);
+
+
+ void iterations (::CORBA::UShort iterations);
+ void keys (::CORBA::UShort keys);
+
+ private:
+ ::RG_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ ::CORBA::UShort iterations_;
+ ::CORBA::UShort keys_;
+ ::CORBA::UShort expected_per_run_;
+
+ LastSampleChecker * checker_;
+
+ ACE_CString topic_name_;
+
+ void set_topic_name_reader (const char * topic_name);
+ void set_topic_name_getter (const char * topic_name);
+
+ void start_reading (void);
+ void start_getting (void);
+ void test_exception (void);
+
+ void check_samples (
+ const char * test,
+ const RG_ResetTopicSampleSeq& samples,
+ const ::CORBA::UShort& expected=0);
+
+ ACE_Reactor* reactor (void);
+ };
+};
+
+#endif /* RG_RESETTOPIC_RECEIVER_IMPL_H_ */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.idl
new file mode 100644
index 00000000000..218682613f5
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.idl
@@ -0,0 +1,29 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ *
+ * by-hand idl3 translation of sender components.
+ */
+
+#ifndef RG_RESETTOPIC_SENDER_IDL
+#define RG_RESETTOPIC_SENDER_IDL
+
+#include "Connector/RG_ResetTopic_Connector.idl"
+#include "Base/Reader_Starter.idl"
+
+module RG_ResetTopic
+{
+ component Sender
+ {
+ port RG_ResetTopicSampleConnector::DDS_Write info_write;
+
+ attribute unsigned short iterations;
+ attribute unsigned short keys;
+
+ uses ReaderStarter reader_start;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.mpc
new file mode 100644
index 00000000000..b2ee15acdb8
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender.mpc
@@ -0,0 +1,152 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p RG_ResetTopicBase -l ../lib -o ../lib -c controller -u DDS Sender"
+
+project (RG_ResetTopicSender_idl_gen) : componentidldefaults, dds4ccm {
+ after += RG_ResetTopicConnector_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 {
+ RG_ResetTopic_Sender.idl
+ }
+}
+
+project (RG_ResetTopicSender_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += RG_ResetTopicSender_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 {
+ RG_ResetTopic_SenderE.idl
+ }
+}
+
+project (RG_ResetTopicSender_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += RG_ResetTopicSender_lem_gen RG_ResetTopicSender_stub \
+ RG_ResetTopicBase_stub reader_starter_rt_stub
+ libs += RG_ResetTopicBase_stub Sender_stub reader_starter_rt_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Sender_lem_stub
+ dynamicflags += SENDER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_SenderEC.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_SenderEC.h
+ Sender_lem_stub_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_SenderEC.inl
+ }
+}
+
+project (RG_ResetTopicSender_stub) : ccm_stub, dds4ccm_base {
+ after += RG_ResetTopicSender_idl_gen RG_ResetTopicBase_stub \
+ RG_ResetTopicConnector_stub reader_starter_rt_stub \
+ reader_starter_rt_lem_stub
+ libs += RG_ResetTopicBase_stub RG_ResetTopicConnector_stub \
+ reader_starter_rt_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = Sender_stub
+ dynamicflags += SENDER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_SenderC.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_SenderC.h
+ Sender_stub_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_SenderC.inl
+ }
+}
+
+project (RG_ResetTopicSender_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += RG_ResetTopicSender_lem_stub RG_ResetTopicSender_stub \
+ RG_ResetTopicConnector_lem_stub RG_ResetTopicConnector_stub \
+ reader_starter_rt_svnt reader_starter_rt_lem_stub
+ sharedname = Sender_exec
+ libs += Sender_stub Sender_lem_stub RG_ResetTopicBase_stub \
+ RG_ResetTopicConnector_lem_stub RG_ResetTopicConnector_stub \
+ reader_starter_rt_stub reader_starter_rt_svnt reader_starter_rt_lem_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags += SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_Sender_exec.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_Sender_exec.h
+ Sender_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (RG_ResetTopicSender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += RG_ResetTopicBase_stub RG_ResetTopicSender_lem_stub RG_ResetTopicConnector_stub \
+ RG_ResetTopicConnector_svnt RG_ResetTopicConnector_lem_stub \
+ reader_starter_rt_stub reader_starter_rt_lem_stub reader_starter_rt_svnt
+ sharedname = Sender_svnt
+ libs += Sender_stub Sender_lem_stub \
+ RG_ResetTopicBase_stub RG_ResetTopicConnector_stub RG_ResetTopicConnector_svnt \
+ RG_ResetTopicConnector_lem_stub reader_starter_rt_stub \
+ reader_starter_rt_lem_stub reader_starter_rt_svnt
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += SENDER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ RG_ResetTopic_SenderS.cpp
+ RG_ResetTopic_Sender_svnt.cpp
+ }
+
+ Header_Files {
+ RG_ResetTopic_SenderS.h
+ RG_ResetTopic_Sender_svnt.h
+ Sender_svnt_export.h
+ }
+
+ Inline_Files {
+ RG_ResetTopic_SenderS.inl
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.cpp
new file mode 100644
index 00000000000..1fa28b59098
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.cpp
@@ -0,0 +1,257 @@
+// -*- C++ -*-
+// $Id$
+
+#include "RG_ResetTopic_Sender_exec.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+#define TOPIC_1 "ResetTopic1"
+#define TOPIC_2 "ResetTopic2"
+
+
+namespace CIAO_RG_ResetTopic_Sender_Impl
+{
+
+ /**
+ * Timeout_Handler
+ */
+
+ Timeout_Handler::Timeout_Handler (Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ Timeout_Handler::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ this->callback_.start_write ();
+ return 0;
+ }
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ Sender_exec_i::Sender_exec_i (void)
+ : iterations_ (0)
+ , keys_ (0)
+ , topic_name_ (TOPIC_2)
+ , run_(0)
+ , start_key_ (1)
+ , start_iteration_ (1)
+ {
+ }
+
+ Sender_exec_i::~Sender_exec_i (void)
+ {
+ }
+
+ // Supported operations and attributes.
+ ACE_Reactor*
+ Sender_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ void
+ Sender_exec_i::start_write (void)
+ {
+ try
+ {
+ if (++this->run_ > 4)
+ return;
+ if (ACE_OS::strcmp (this->topic_name_.c_str(), TOPIC_1) == 0)
+ this->topic_name_ = TOPIC_2;
+ else
+ this->topic_name_ = TOPIC_1;
+
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_write - "
+ "Setting topic name to <%C>\n", this->topic_name_.c_str()));
+
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::Writer_var writer =
+ this->ciao_context_->get_connection_info_write_data ();
+ if (::CORBA::is_nil (writer.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::start_write - "
+ "Unable to get writer interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::CORBA::Object_var cmp = writer->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::start_write - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::CCM_DDS_Event_var conn =
+ ::RG_ResetTopic::RG_ResetTopicSampleConnector::CCM_DDS_Event::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::start_write - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+
+ conn->topic_name (::CORBA::string_dup (this->topic_name_.c_str()));
+
+ ::CORBA::UShort key = 0;
+ ::CORBA::UShort iter = 0;
+ for (key = this->start_key_; key < this->run_ * this->keys_ + 1; ++key)
+ {
+ RG_ResetTopicSample sample;
+ char tmp[7];
+ ACE_OS::sprintf (tmp, "KEY_%d", key);
+ sample.key = CORBA::string_dup(tmp);
+
+ for (iter = this->start_iteration_; iter < this->run_ * this->iterations_ + 1; ++iter)
+ {
+ sample.iteration = iter;
+ writer->write_one (sample, ::DDS::HANDLE_NIL);
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - "
+ "Sample written : key <%C> - iteration <%d>\n",
+ tmp, iter));
+ }
+ }
+ this->start_key_ = key;
+ this->start_iteration_ = iter;
+ ACE_Time_Value tv (2, 0);
+ ACE_OS::sleep (tv);
+ ReaderStarter_var starter =
+ this->ciao_context_->get_connection_reader_start ();
+ if (!::CORBA::is_nil (starter.in ()))
+ {
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - "
+ "Inform the receiver that all samples were written\n"));
+ starter->set_reader_properties (this->start_key_ - 1, this->start_iteration_ - 1);
+
+ starter->start_read (::CORBA::string_dup(this->topic_name_.c_str()));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "Sender_exec_i::start_event_test - "
+ "ERROR: unable to get connection to the ReaderStarter\n"));
+ }
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "Sender_exec_i::start_event_test - "
+ "ERROR: Caught NonChangeable exception.\n"));
+ }
+ catch (const ::CORBA::Exception & e)
+ {
+ e._tao_print_exception("Sender_exec_i::start_event_test - ERROR");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "Sender_exec_i::start_event_test - "
+ "ERROR: Unexpected and unknown exception caught.\n"));
+ }
+ }
+
+
+ // Component attributes and port operations.
+
+ ::CORBA::UShort
+ Sender_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Sender_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ ::CORBA::UShort
+ Sender_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Sender_exec_i::keys (
+ const ::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Sender_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::RG_ResetTopic::CCM_Sender_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Sender_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Sender_exec_i::ccm_activate (void)
+ {
+ ACE_NEW_THROW_EX (this->to_handler_,
+ Timeout_Handler (*this),
+ ::CORBA::INTERNAL ());
+ if (this->reactor ()->schedule_timer (
+ this->to_handler_,
+ 0,
+ ACE_Time_Value (1, 0),
+ ACE_Time_Value (10, 0)) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ")
+ ACE_TEXT ("Error scheduling timer")));
+ }
+ }
+
+ void
+ Sender_exec_i::ccm_passivate (void)
+ {
+ this->reactor()->cancel_timer(this->to_handler_);
+ }
+
+ void
+ Sender_exec_i::ccm_remove (void)
+ {
+ delete this->to_handler_;
+ }
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_RG_ResetTopic_Sender_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Sender_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.h
new file mode 100644
index 00000000000..66c55bfa8d9
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/Sender/RG_ResetTopic_Sender_exec.h
@@ -0,0 +1,139 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_RG_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+#define CIAO_RG_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+
+#include /**/ "ace/pre.h"
+
+#include "RG_ResetTopic_SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO_RG_ResetTopic_Sender_Impl
+{
+ class Sender_exec_i;
+
+ /**
+ * Timeout_Handler
+ */
+ class Timeout_Handler :
+ public ACE_Event_Handler
+ {
+ public:
+ Timeout_Handler (Sender_exec_i &callback);
+ /// Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+ private:
+ /// Maintains a handle that actually process the event
+ Sender_exec_i &callback_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ class Sender_exec_i
+ : public virtual Sender_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Sender_exec_i (void);
+ virtual ~Sender_exec_i (void);
+
+ //@{
+ /** Supported operations and attributes. */
+
+ //@}
+
+ //@{
+ /** Component attributes and port operations. */
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+
+ virtual void keys (::CORBA::UShort keys);
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+ void start_write (void);
+ //@}
+
+ private:
+ ::RG_ResetTopic::CCM_Sender_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+
+ ::CORBA::UShort iterations_;
+
+ ::CORBA::UShort keys_;
+ //@}
+
+ //@{
+ /** User defined members. */
+ Timeout_Handler *to_handler_;
+ ACE_CString topic_name_;
+ ::CORBA::UShort run_;
+ ::CORBA::UShort start_key_;
+ ::CORBA::UShort start_iteration_;
+ //@}
+
+ //@{
+ /** User defined private operations. */
+
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
+ };
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_RG_ResetTopic_Sender_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/Plan.cdp
new file mode 100644
index 00000000000..b47fe050e3c
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/Plan.cdp
@@ -0,0 +1,461 @@
+<!-- $Id$ -->
+<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>ResetTopic_Depl_1</label>
+ <UUID>ResetTopic_Depl_1</UUID>
+
+ <implementation xmi:id="ReceiverComponentImplementation">
+ <name>ReceiverComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_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="ResetTopic_EventConnectorImplementation">
+ <name>ResetTopic_EventConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_RG_ResetTopicSampleConnector_DDS_Event_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_RG_ResetTopicSampleConnector_DDS_Event_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>RG_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>RG_ResetTopic_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ResetTopic_StateConnectorImplementation">
+ <name>ResetTopic_StateConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_RG_ResetTopicSampleConnector_DDS_State_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_RG_ResetTopicSampleConnector_DDS_State_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>RG_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>RG_ResetTopic_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>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_RG_ResetTopic_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>
+ <source/>
+ <implementation xmi:idref="ReceiverComponentImplementation" />
+ </instance>
+
+ <instance xmi:id="ResetTopic_SenderEventConnectorInstance">
+ <name>ResetTopic_SenderEventConnectorInstance</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_EventConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>ResetTopic1</string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>qos_profile</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>ResetTopic_Library#ResetTopic_Profile</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_ReceiverEventConnectorInstance">
+ <name>ResetTopic_ReceiverEventConnectorInstance</name>
+ <node>ReceiverNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_EventConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string></string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>qos_profile</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>ResetTopic_Library#ResetTopic_Profile</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_ReceiverStateConnectorInstance">
+ <name>ResetTopic_ReceiverStateConnectorInstance</name>
+ <node>ReceiverNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_StateConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string></string>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>qos_profile</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>ResetTopic_Library#ResetTopic_Profile</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderComponentInstance">
+ <name>SenderComponent</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="SenderComponentImplementation" />
+ <configProperty>
+ <name>keys</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>5</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>iterations</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>10</ushort>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>reader_starter</name>
+ <internalEndpoint>
+ <portName>reader_start</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>start_reading</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>reader_connection</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_read_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>passive_observer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_ReceiverStateConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>getter_connection</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_get_fresh_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>pull_consumer_fresh_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_ReceiverEventConnectorInstance" />
+ </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="ResetTopic_SenderEventConnectorInstance" />
+ </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="ResetTopic_Connector_ExecArtifact">
+ <name>RG_ResetTopic_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>RG_ResetTopicConnector_exec</location>
+ </artifact>
+ <artifact xmi:id="ResetTopic_Connector_SvntArtifact">
+ <name>RG_ResetTopic_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>RG_ResetTopicConnector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_StubArtifact">
+ <name>Receiver_stub</name>
+ <source/>
+ <node/>
+ <location>Receiver_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/USER_QOS_PROFILES.xml b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/USER_QOS_PROFILES.xml
new file mode 100644
index 00000000000..55c5d7657cd
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/USER_QOS_PROFILES.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:/ndds/ndds.4.5d/scripts/../resource/rtiddsgen/../qos_profiles_4.5d/schema/rti_dds_qos_profiles.xsd" version="4.5d">
+ <qos_library name="ResetTopic_Library">
+ <qos_profile name="ResetTopic_Profile" is_default_qos="true">
+ <datawriter_qos>
+ <reliability>
+ <kind>RELIABLE_RELIABILITY_QOS</kind>
+ <max_blocking_time>
+ <sec>10</sec>
+ <nanosec>0</nanosec>
+ </max_blocking_time>
+ </reliability>
+ <durability>
+ <kind>TRANSIENT_DURABILITY_QOS</kind>
+ </durability>
+ <history>
+ <kind>KEEP_ALL_HISTORY_QOS</kind>
+ </history>
+ <protocol>
+ <rtps_reliable_writer>
+ <max_heartbeat_retries>10</max_heartbeat_retries>
+ </rtps_reliable_writer>
+ </protocol>
+ </datawriter_qos>
+ <datareader_qos>
+ <reliability>
+ <kind>RELIABLE_RELIABILITY_QOS</kind>
+ </reliability>
+ <history>
+ <kind>KEEP_ALL_HISTORY_QOS</kind>
+ </history>
+ <durability>
+ <kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
+ </durability>
+ </datareader_qos>
+ </qos_profile>
+ </qos_library>
+</dds>
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/run_test.pl
new file mode 100755
index 00000000000..5eb32d70c34
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ReadGet/descriptors/run_test.pl
@@ -0,0 +1,244 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{'ACE_ROOT'}/bin";
+use PerlACE::TestTarget;
+
+$CIAO_ROOT = "$ENV{'CIAO_ROOT'}";
+$TAO_ROOT = "$ENV{'TAO_ROOT'}";
+$DANCE_ROOT = "$ENV{'DANCE_ROOT'}";
+
+$daemons_running = 0;
+$em_running = 0;
+$ns_running = 0;
+
+$nr_daemon = 2;
+@ports = ( 60001, 60002 );
+@iorbases = ( "NodeApp1.ior", "NodeApp2.ior" );
+@iorfiles = 0;
+@nodenames = ( "SenderNode", "ReceiverNode" );
+
+# ior files other than daemon
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+sub create_targets {
+ # naming service
+ $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+ $tg_naming->AddLibPath ('../lib');
+ # daemon
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n";
+ $tg_daemons[$i]->AddLibPath ('../lib');
+ }
+ # execution manager
+ $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n";
+ $tg_exe_man->AddLibPath ('../lib');
+ # executor (plan_launcher)
+ $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n";
+ $tg_executor->AddLibPath ('../lib');
+}
+
+sub init_ior_files {
+ $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase);
+ $ior_emfile = $tg_exe_man->LocalFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+ delete_ior_files ();
+}
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i]->DeleteFile ($iorbases[$i]);
+ }
+ $tg_naming->DeleteFile ($ior_nsbase);
+ $tg_exe_man->DeleteFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+}
+
+sub kill_node_daemon {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemon ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill (); $EM->TimedWait (1);
+ }
+
+ if ($ns_running == 1) {
+ $NS->Kill (); $NS->TimedWait (1);
+ }
+ # in case shutdown did not perform as expected
+ $tg_executor->KillAll ('dance_locality_manager');
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $DEAMONS[$i]->Spawn ();
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$ns_status = $NS->Spawn ();
+
+if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$em_status = $EM->Spawn ();
+
+if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+}
+
+if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - launch the application -\n";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 60 seconds to allow task to complete\n";
+sleep (60);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
+
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -s");
+$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.idl
new file mode 100644
index 00000000000..916b4c10d05
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file TE_ResetTopic_Base.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef TE_RESETTOPIC_BASE_IDL
+#define TE_RESETTOPIC_BASE_IDL
+
+#pragma ndds typesupport "Base/TE_ResetTopic_BaseSupport.h"
+
+#pragma DCPS_DATA_TYPE "TE_ResetTopicTest"
+#pragma DCPS_DATA_KEY "TE_ResetTopicTest key"
+
+struct TE_ResetTopicTest {
+ string key; //@key
+ long iteration;
+};
+
+typedef sequence<TE_ResetTopicTest> TE_ResetTopicTestSeq;
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.mpc
new file mode 100644
index 00000000000..e167c1d0daa
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Base/TE_ResetTopic_Base.mpc
@@ -0,0 +1,26 @@
+// $Id$
+
+project (TE_ResetTopicBase_stub) : taoidldefaults, dds4ccm_ts_default {
+ sharedname = TE_ResetTopicBase_stub
+ dynamicflags += TE_RESETTOPIC_BASE_STUB_BUILD_DLL
+ libout = ../lib
+
+ idlflags += -SS -Sci \
+ -Wb,stub_export_macro=TE_RESETTOPIC_BASE_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Base_stub_export.h
+
+ IDL_Files {
+ idlflags += -Gxhst
+ TE_ResetTopic_Base.idl
+ }
+
+ opendds_ts_flags += --export=TE_RESETTOPIC_BASE_STUB_Export
+
+ DDSGenerator_Files {
+ TE_ResetTopic_Base.idl
+ }
+
+ Source_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.idl
new file mode 100644
index 00000000000..7fa6bd3d791
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file TE_ResetTopic_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef TE_RESETTOPIC_CONNECTOR_IDL_
+#define TE_RESETTOPIC_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include <ccm_dds.idl>
+
+#include "Base/TE_ResetTopic_Base.idl"
+
+#pragma ciao lem "Connector/TE_ResetTopic_ConnectorE.idl"
+
+module TE_ResetTopic
+{
+ module ::CCM_DDS::Typed < ::TE_ResetTopicTest, ::TE_ResetTopicTestSeq> TE_ResetTopicTestConnector;
+};
+
+#endif /* TE_ResetTopic_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.mpc
new file mode 100644
index 00000000000..dd159226915
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Connector/TE_ResetTopic_Connector.mpc
@@ -0,0 +1,148 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p TE_ResetTopicBase -l .. -o ../lib -u DDS TE_ResetTopic_Connector"
+
+project (TE_ResetTopicConnector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=TE_RESETTOPIC_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Connector_stub_export.h \
+ -Wb,skel_export_macro=TE_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=TE_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,conn_export_macro=TE_RESETTOPIC_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=ResetTopic_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ TE_ResetTopic_Connector.idl
+ }
+}
+
+project (TE_ResetTopicConnector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += TE_ResetTopicConnector_idl_gen
+ idlflags += -Wb,stub_export_macro=TE_RESETTOPIC_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=TE_ResetTopic_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I ..
+
+ IDL_Files {
+ TE_ResetTopic_ConnectorE.idl
+ }
+}
+
+project (TE_ResetTopicConnector_lem_stub) : ccm_svnt, dds4ccm_lem_stub {
+ after += TE_ResetTopicConnector_lem_gen TE_ResetTopicConnector_stub \
+ TE_ResetTopicBase_stub
+ libs += TE_ResetTopicBase_stub TE_ResetTopicConnector_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = TE_ResetTopicConnector_lem_stub
+ dynamicflags += TE_RESETTOPIC_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_ConnectorEC.h
+ TE_ResetTopic_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ TE_ResetTopic_ConnectorEC.inl
+ }
+}
+
+project (TE_ResetTopicConnector_stub) : ccm_stub, dds4ccm_base {
+ after += TE_ResetTopicConnector_idl_gen TE_ResetTopicBase_stub
+ libs += TE_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = TE_ResetTopicConnector_stub
+ dynamicflags += TE_RESETTOPIC_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_ConnectorC.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_ConnectorC.h
+ TE_ResetTopic_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ TE_ResetTopic_ConnectorC.inl
+ }
+}
+
+project (TE_ResetTopicConnector_exec) : ciao_executor, dds4ccm_impl {
+ after += TE_ResetTopicConnector_lem_stub TE_ResetTopicConnector_stub \
+ TE_ResetTopicBase_stub
+ sharedname = TE_ResetTopicConnector_exec
+ libs += TE_ResetTopicConnector_stub TE_ResetTopicConnector_lem_stub \
+ TE_ResetTopicBase_stub TE_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += TE_RESETTOPIC_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_Connector_conn.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_Connector_conn.h
+ TE_ResetTopic_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (TE_ResetTopicConnector_svnt) : ciao_servant, dds4ccm_impl {
+ after += TE_ResetTopicConnector_lem_stub TE_ResetTopicConnector_exec \
+ TE_ResetTopicConnector_stub
+ sharedname = TE_ResetTopicConnector_svnt
+ libs += TE_ResetTopicConnector_stub \
+ TE_ResetTopicConnector_lem_stub \
+ TE_ResetTopicBase_stub \
+ TE_ResetTopicConnector_exec
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += TE_RESETTOPIC_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_ConnectorS.cpp
+ TE_ResetTopic_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_ConnectorS.h
+ TE_ResetTopic_Connector_svnt.h
+ TE_ResetTopic_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ TE_ResetTopic_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/SenderDriver.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/SenderDriver.cpp
new file mode 100644
index 00000000000..56ac8f1daa2
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/SenderDriver.cpp
@@ -0,0 +1,93 @@
+//$Id$
+/*
+ * @file SenderDriver.cpp
+ *
+ * @author Marcel Smit
+ */
+
+
+#include "TE_ResetTopic_SenderC.h"
+#include "ace/streams.h"
+#include "ace/Get_Opt.h"
+
+const ACE_TCHAR *sender_ior = ACE_TEXT ("file://Sender.ior");
+const ACE_TCHAR *topic_name = ACE_TEXT ("");
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("ek:n:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ sender_ior = get_opts.opt_arg ();
+ break;
+
+ case 'n':
+ topic_name = get_opts.opt_arg ();
+ break;
+
+ case 'e':
+ topic_name = "";
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Sender IOR> (default is file://Sender.ior)\n"
+ "-n <new topic>\n"
+ "-e <clearing topic name>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ }
+
+ return 0;
+}
+
+
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ try
+ {
+ // initialize the ORB
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+ if (parse_args (argc, argv) != 0)
+ {
+ return -1;
+ }
+
+ // create the factory object reference,
+ CORBA::Object_var sender_obj =
+ orb->string_to_object (sender_ior);
+
+ // downcast the object reference to the appropriate type
+ ::TE_ResetTopic::Sender_var sender =
+ ::TE_ResetTopic::Sender::_narrow (sender_obj.in ());
+
+ if (CORBA::is_nil (sender.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to acquire 'Sender' objref\n"),
+ -1);
+ }
+ sender->set_new_topic (topic_name);
+
+ orb->destroy ();
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Who is the culprit in the SenderDriver?\n");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Uncaught CORBA exception\n"),
+ 1);
+ }
+ return 0;
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.idl
new file mode 100644
index 00000000000..9712f2257bc
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.idl
@@ -0,0 +1,32 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ *
+ * by-hand idl3 translation of sender components.
+ */
+
+#ifndef TE_RESETTOPIC_SENDER_IDL
+#define TE_RESETTOPIC_SENDER_IDL
+
+#include "Connector/TE_ResetTopic_Connector.idl"
+
+module TE_ResetTopic
+{
+ interface ChangeTopicInterface
+ {
+ void set_new_topic (in string topic_name);
+ };
+
+ component Sender supports ChangeTopicInterface
+ {
+ port TE_ResetTopicTestConnector::DDS_Write info_write;
+ port TE_ResetTopicTestConnector::DDS_Update info_update;
+
+ attribute unsigned short iterations;
+ attribute unsigned short keys;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.mpc
new file mode 100644
index 00000000000..396ab0c1405
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender.mpc
@@ -0,0 +1,166 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p TE_ResetTopicBase -l ../lib -o ../lib -c controller -u DDS Sender"
+
+project (TE_ResetTopicSender_idl_gen) : componentidldefaults, dds4ccm {
+ after += TE_ResetTopicConnector_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 {
+ TE_ResetTopic_Sender.idl
+ }
+}
+
+project (TE_ResetTopicSender_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += TE_ResetTopicSender_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 {
+ TE_ResetTopic_SenderE.idl
+ }
+}
+
+project (TE_ResetTopicSender_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += TE_ResetTopicSender_lem_gen TE_ResetTopicSender_stub TE_ResetTopicBase_stub
+ libs += TE_ResetTopicBase_stub Sender_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Sender_lem_stub
+ dynamicflags += SENDER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_SenderEC.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_SenderEC.h
+ Sender_lem_stub_export.h
+ }
+
+ Inline_Files {
+ TE_ResetTopic_SenderEC.inl
+ }
+}
+
+project (TE_ResetTopicSender_stub) : ccm_stub, dds4ccm_base {
+ after += TE_ResetTopicSender_idl_gen TE_ResetTopicBase_stub TE_ResetTopicConnector_stub
+ libs += TE_ResetTopicBase_stub TE_ResetTopicConnector_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = Sender_stub
+ dynamicflags += SENDER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_SenderC.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_SenderC.h
+ Sender_stub_export.h
+ }
+
+ Inline_Files {
+ TE_ResetTopic_SenderC.inl
+ }
+}
+
+project (TE_ResetTopicSender_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += TE_ResetTopicSender_lem_stub TE_ResetTopicSender_stub \
+ TE_ResetTopicConnector_lem_stub TE_ResetTopicConnector_stub
+ sharedname = Sender_exec
+ libs += Sender_stub Sender_lem_stub TE_ResetTopicBase_stub \
+ TE_ResetTopicConnector_lem_stub TE_ResetTopicConnector_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags += SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_Sender_exec.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_Sender_exec.h
+ Sender_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (TE_ResetTopicSender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += TE_ResetTopicBase_stub TE_ResetTopicSender_lem_stub TE_ResetTopicConnector_stub \
+ TE_ResetTopicConnector_svnt TE_ResetTopicConnector_lem_stub
+ sharedname = Sender_svnt
+ libs += Sender_stub Sender_lem_stub \
+ TE_ResetTopicBase_stub TE_ResetTopicConnector_stub TE_ResetTopicConnector_svnt TE_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += SENDER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TE_ResetTopic_SenderS.cpp
+ TE_ResetTopic_Sender_svnt.cpp
+ }
+
+ Header_Files {
+ TE_ResetTopic_SenderS.h
+ TE_ResetTopic_Sender_svnt.h
+ Sender_svnt_export.h
+ }
+
+ Inline_Files {
+ TE_ResetTopic_SenderS.inl
+ }
+}
+
+project (TE_ResetTopicSender_Driver) : ccm_stub, valuetype, dds4ccm_lem_stub {
+ exename = SenderDriver
+ after += TE_ResetTopicSender_stub TE_ResetTopicConnector_stub
+ libs += Sender_stub TE_ResetTopicBase_stub TE_ResetTopicConnector_stub
+
+ includes += ..
+ libpaths += ../lib
+
+ exeout = ../lib
+ IDL_Files {
+ }
+
+ Source_Files {
+ SenderDriver.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.cpp
new file mode 100644
index 00000000000..c9d10361d79
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.cpp
@@ -0,0 +1,387 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+#include "TE_ResetTopic_Sender_exec.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+namespace CIAO_TE_ResetTopic_Sender_Impl
+{
+
+ /**
+ * Timeout_Handler
+ */
+
+ Timeout_Handler::Timeout_Handler (Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ Timeout_Handler::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ // Notify the subscribers
+ this->callback_.start_event_test ();
+ return 0;
+ }
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ Sender_exec_i::Sender_exec_i (void)
+ : iterations_ (0)
+ , keys_ (0)
+ , to_handler_ (0)
+ , topic_name_ ("TopicI")
+ , old_topic_name_ ("TopicI")
+ {
+ ACE_NEW_THROW_EX (this->to_handler_,
+ Timeout_Handler (*this),
+ ::CORBA::INTERNAL ());
+ }
+
+ Sender_exec_i::~Sender_exec_i (void)
+ {
+ delete this->to_handler_;
+ }
+
+ // Supported operations and attributes.
+ ACE_Reactor*
+ Sender_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ void Sender_exec_i::set_new_topic (const char * topic_name)
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+
+ this->old_topic_name_ = this->topic_name_;
+ this->topic_name_ = topic_name;
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_new_topic - "
+ "New topic name set <%C>\n",
+ topic_name));
+ }
+
+ void
+ Sender_exec_i::create_samples (void)
+ {
+ for (CORBA::UShort i = 1; i < this->keys_ + 1; ++i)
+ {
+ char key[7];
+ TE_ResetTopicTest *new_key = new TE_ResetTopicTest;
+ ACE_OS::sprintf (key, "KEY_%d", i);
+ new_key->key = CORBA::string_dup(key);
+ new_key->iteration = 0;
+ this->tests_[key] = new_key;
+
+ ::TE_ResetTopic::TE_ResetTopicTestConnector::Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data();
+
+ updater->create_one (*new_key);
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::create_samples - "
+ "Sample <%C> created\n",
+ key));
+ }
+ }
+
+ void
+ Sender_exec_i::set_topic_name (const char * topic_name)
+ {
+ if (ACE_OS::strcmp (topic_name, this->old_topic_name_.c_str()) != 0)
+ {
+ this->old_topic_name_ = topic_name;
+ this->set_topic_name_writer (topic_name);
+ this->set_topic_name_updater (topic_name);
+ }
+ }
+
+ void
+ Sender_exec_i::set_topic_name_writer (const char * topic_name)
+ {
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_writer - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ ::TE_ResetTopic::TE_ResetTopicTestConnector:: Writer_var writer =
+ this->ciao_context_->get_connection_info_write_data ();
+ if (::CORBA::is_nil (writer.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to get writer interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::CORBA::Object_var cmp = writer->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::TE_ResetTopic::TE_ResetTopicTestConnector::CCM_DDS_Event_var conn =
+ ::TE_ResetTopic::TE_ResetTopicTestConnector::CCM_DDS_Event::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+ conn->topic_name (topic_name);
+ }
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Caught NonChangeable exception.\n"));
+ }
+ }
+
+ void
+ Sender_exec_i::set_topic_name_updater (const char * topic_name)
+ {
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_updater - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ ::TE_ResetTopic::TE_ResetTopicTestConnector:: Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data ();
+ if (::CORBA::is_nil (updater.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to get updater interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::CORBA::Object_var cmp = updater->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::TE_ResetTopic::TE_ResetTopicTestConnector::CCM_DDS_State_var conn =
+ ::TE_ResetTopic::TE_ResetTopicTestConnector::CCM_DDS_State::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+ conn->topic_name (topic_name);
+ }
+ this->create_samples ();
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Caught NonChangeable exception.\n"));
+ }
+ }
+
+ void
+ Sender_exec_i::start_event_test (void)
+ {
+ // Set the topic name on the connector first. Therefor we need to
+ // get to the connector first.
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - Start\n"));
+
+ try
+ {
+ for (::CORBA::UShort key = 1; key < this->keys_ + 1; ++key)
+ {
+ TE_ResetTopicTest sample;
+ char tmp[7];
+ ACE_OS::sprintf (tmp, "KEY_%d", key);
+ sample.key = CORBA::string_dup(tmp);
+
+ for (::CORBA::UShort iter = 1; iter < this->iterations_ + 1; ++iter)
+ {
+ this->set_topic_name (this->topic_name_.c_str ());
+ ::TE_ResetTopic::TE_ResetTopicTestConnector:: Writer_var writer =
+ this->ciao_context_->get_connection_info_write_data ();
+ sample.iteration = iter;
+ writer->write_one (sample, ::DDS::HANDLE_NIL);
+
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - "
+ "Sample for topic <%C> written : key <%C> - iteration <%d>\n",
+ this->topic_name_.c_str (), tmp, iter));
+
+ ACE_Time_Value tv (0, 5000);
+ ACE_OS::sleep (tv);
+ }
+ }
+ for (Sample_Table::iterator iter = this->tests_.begin ();
+ iter != this->tests_.end ();
+ ++iter)
+ {
+ for (::CORBA::UShort i = 1; i < this->iterations_ + 1; ++i)
+ {
+ this->set_topic_name (this->topic_name_.c_str ());
+ ::TE_ResetTopic::TE_ResetTopicTestConnector:: Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data ();
+ iter->second->iteration = i;
+ updater->update_one (iter->second, ::DDS::HANDLE_NIL);
+
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - "
+ "Sample for topic <%C> updated : key <%C> - iteration <%d>\n",
+ this->topic_name_.c_str (),
+ iter->second->key.in (),
+ i));
+
+ ACE_Time_Value tv (0, 5000);
+ ACE_OS::sleep (tv);
+ }
+ }
+ }
+ catch (const ::CORBA::BAD_INV_ORDER & ex)
+ {
+ if (this->topic_name_.empty())
+ ACE_DEBUG ((LM_DEBUG, "Expected BAD_INV_ORDER caught\n"));
+ else
+ ex._tao_print_exception("ERROR:");
+ }
+ catch (const ::CORBA::Exception & ex)
+ {
+ ex._tao_print_exception("ERROR:");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "Sender_exec_i::start_event_test - "
+ "ERROR: Unexpected and unknown exception caught.\n"));
+ }
+ }
+
+ // Component attributes and port operations.
+
+ ::CORBA::UShort
+ Sender_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Sender_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ ::CORBA::UShort
+ Sender_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Sender_exec_i::keys (
+ const ::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Sender_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::TE_ResetTopic::CCM_Sender_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Sender_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Sender_exec_i::ccm_activate (void)
+ {
+ this->create_samples ();
+ if (this->reactor ()->schedule_timer (
+ this->to_handler_,
+ 0,
+ ACE_Time_Value (5, 0),
+ ACE_Time_Value (5, 0)) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ")
+ ACE_TEXT ("Error scheduling timer")));
+ }
+ }
+
+ void
+ Sender_exec_i::ccm_passivate (void)
+ {
+ this->reactor()->cancel_timer(this->to_handler_);
+ }
+
+ void
+ Sender_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_TE_ResetTopic_Sender_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Sender_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.h
new file mode 100644
index 00000000000..a60008c4a77
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/Sender/TE_ResetTopic_Sender_exec.h
@@ -0,0 +1,147 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_TE_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+#define CIAO_TE_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+
+#include /**/ "ace/pre.h"
+
+#include "TE_ResetTopic_SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+
+#include <map>
+
+namespace CIAO_TE_ResetTopic_Sender_Impl
+{
+ class Sender_exec_i;
+
+ /**
+ * Timeout_Handler
+ */
+ class Timeout_Handler :
+ public ACE_Event_Handler
+ {
+ public:
+ Timeout_Handler (Sender_exec_i &callback);
+ /// Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+ private:
+ /// Maintains a handle that actually process the event
+ Sender_exec_i &callback_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ class Sender_exec_i
+ : public virtual Sender_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Sender_exec_i (void);
+ virtual ~Sender_exec_i (void);
+
+ //@{
+ /** Supported operations and attributes. */
+ virtual void set_new_topic (const char * topic_name);
+ //@}
+
+ //@{
+ /** Component attributes and port operations. */
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+
+ virtual void keys (::CORBA::UShort keys);
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+ void set_topic_name (const char * topic_name);
+ void set_topic_name_writer (const char * topic_name);
+ void set_topic_name_updater (const char * topic_name);
+ void start_event_test (void);
+ //@}
+
+ private:
+ ::TE_ResetTopic::CCM_Sender_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+
+ ::CORBA::UShort iterations_;
+
+ ::CORBA::UShort keys_;
+ //@}
+
+ //@{
+ /** User defined members. */
+ Timeout_Handler *to_handler_;
+ ACE_CString topic_name_, old_topic_name_;
+
+ TAO_SYNCH_RECURSIVE_MUTEX topic_name_lock_;
+
+ typedef std::map<ACE_CString, TE_ResetTopicTest_var> Sample_Table;
+
+ Sample_Table tests_;
+ //@}
+
+ //@{
+ /** User defined private operations. */
+ void create_samples (void);
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
+ };
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_TE_ResetTopic_Sender_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/Plan.cdp
new file mode 100644
index 00000000000..9af446d47d0
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/Plan.cdp
@@ -0,0 +1,338 @@
+<!-- $Id$ -->
+<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>ResetTopic_Depl_1</label>
+ <UUID>ResetTopic_Depl_1</UUID>
+
+ <implementation xmi:id="ResetTopic_EventConnectorImplementation">
+ <name>ResetTopic_EventConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TE_ResetTopic_TE_ResetTopicTestConnector_DDS_Event_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TE_ResetTopic_TE_ResetTopicTestConnector_DDS_Event_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TE_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TE_ResetTopic_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ResetTopic_StateConnectorImplementation">
+ <name>ResetTopic_StateConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TE_ResetTopic_TE_ResetTopicTestConnector_DDS_State_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TE_ResetTopic_TE_ResetTopicTestConnector_DDS_State_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TE_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TE_ResetTopic_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>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TE_ResetTopic_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TE_ResetTopic_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="ResetTopic_SenderEventConnectorInstance">
+ <name>ResetTopic_SenderEventConnectorInstance</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_EventConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_SenderStateConnectorInstance">
+ <name>ResetTopic_SenderStateConnectorInstance</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_StateConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderComponentInstance">
+ <name>SenderComponent</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="SenderComponentImplementation" />
+ <configProperty>
+ <name>rate</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>15</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <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>
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender.ior</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <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="ResetTopic_SenderEventConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>updater_connection</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_update_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_SenderStateConnectorInstance" />
+ </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="ResetTopic_Connector_ExecArtifact">
+ <name>TE_ResetTopic_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>TE_ResetTopicConnector_exec</location>
+ </artifact>
+ <artifact xmi:id="ResetTopic_Connector_SvntArtifact">
+ <name>TE_ResetTopic_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>TE_ResetTopicConnector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_StubArtifact">
+ <name>Receiver_stub</name>
+ <source/>
+ <node/>
+ <location>Receiver_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/run_test.pl
new file mode 100755
index 00000000000..ca093570857
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/ToEmpty/descriptors/run_test.pl
@@ -0,0 +1,265 @@
+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 = ( "SenderNode.ior" );
+@iorfiles = 0;
+@nodenames = ( "SenderNode" );
+
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+sub create_targets {
+ # naming service
+ $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+ $tg_naming->AddLibPath ('../lib');
+ # daemon
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n";
+ $tg_daemons[$i]->AddLibPath ('../lib');
+ }
+ # execution manager
+ $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n";
+ $tg_exe_man->AddLibPath ('../lib');
+ # executor (plan_launcher)
+ $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n";
+ $tg_executor->AddLibPath ('../lib');
+}
+
+sub init_ior_files {
+ $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase);
+ $ior_emfile = $tg_exe_man->LocalFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+ delete_ior_files ();
+}
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i]->DeleteFile ($iorbases[$i]);
+ }
+ $tg_naming->DeleteFile ($ior_nsbase);
+ $tg_exe_man->DeleteFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+}
+
+sub kill_node_daemon {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemon ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill (); $EM->TimedWait (1);
+ }
+
+ if ($ns_running == 1) {
+ $NS->Kill (); $NS->TimedWait (1);
+ }
+ # in case shutdown did not perform as expected
+ $tg_executor->KillAll ('dance_locality_manager');
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $DEAMONS[$i]->Spawn ();
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$ns_status = $NS->Spawn ();
+
+if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$em_status = $EM->Spawn ();
+
+if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+}
+
+if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - launch the application -\n";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 10 seconds before clearing the topic name\n";
+sleep (10);
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-e");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before setting the topic name again\n";
+sleep (10);
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-n TopicIII");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before stopping\n";
+sleep (10);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
+
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -s");
+$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.idl
new file mode 100644
index 00000000000..96ef29afe8b
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file TL_ResetTopic_Base.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef TL_RESETTOPIC_BASE_IDL
+#define TL_RESETTOPIC_BASE_IDL
+
+#pragma ndds typesupport "Base/TL_ResetTopic_BaseSupport.h"
+
+#pragma DCPS_DATA_TYPE "TL_ResetTopicTest"
+#pragma DCPS_DATA_KEY "TL_ResetTopicTest key"
+
+struct TL_ResetTopicTest {
+ string key; //@key
+ long iteration;
+};
+
+typedef sequence<TL_ResetTopicTest> TL_ResetTopicTestSeq;
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.mpc
new file mode 100644
index 00000000000..0ea8e8c66bb
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Base/TL_ResetTopic_Base.mpc
@@ -0,0 +1,26 @@
+// $Id$
+
+project (TL_ResetTopicBase_stub) : taoidldefaults, dds4ccm_ts_default {
+ sharedname = TL_ResetTopicBase_stub
+ dynamicflags += TL_RESETTOPIC_BASE_STUB_BUILD_DLL
+ libout = ../lib
+
+ idlflags += -SS -Sci \
+ -Wb,stub_export_macro=TL_RESETTOPIC_BASE_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Base_stub_export.h
+
+ IDL_Files {
+ idlflags += -Gxhst
+ TL_ResetTopic_Base.idl
+ }
+
+ opendds_ts_flags += --export=TL_RESETTOPIC_BASE_STUB_Export
+
+ DDSGenerator_Files {
+ TL_ResetTopic_Base.idl
+ }
+
+ Source_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.idl
new file mode 100644
index 00000000000..2da5ce49b47
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file TL_ResetTopic_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef TL_RESETTOPIC_CONNECTOR_IDL_
+#define TL_RESETTOPIC_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include <ccm_dds.idl>
+
+#include "Base/TL_ResetTopic_Base.idl"
+
+#pragma ciao lem "Connector/TL_ResetTopic_ConnectorE.idl"
+
+module TL_ResetTopic
+{
+ module ::CCM_DDS::Typed < ::TL_ResetTopicTest, ::TL_ResetTopicTestSeq> TL_ResetTopicTestConnector;
+};
+
+#endif /* TL_ResetTopic_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.mpc
new file mode 100644
index 00000000000..b65dca4b5b5
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Connector/TL_ResetTopic_Connector.mpc
@@ -0,0 +1,148 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p TL_ResetTopicBase -l .. -o ../lib -u DDS TL_ResetTopic_Connector"
+
+project (TL_ResetTopicConnector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=TL_RESETTOPIC_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Connector_stub_export.h \
+ -Wb,skel_export_macro=TL_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=TL_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,conn_export_macro=TL_RESETTOPIC_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=ResetTopic_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ TL_ResetTopic_Connector.idl
+ }
+}
+
+project (TL_ResetTopicConnector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += TL_ResetTopicConnector_idl_gen
+ idlflags += -Wb,stub_export_macro=TL_RESETTOPIC_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=TL_ResetTopic_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I ..
+
+ IDL_Files {
+ TL_ResetTopic_ConnectorE.idl
+ }
+}
+
+project (TL_ResetTopicConnector_lem_stub) : ccm_svnt, dds4ccm_lem_stub {
+ after += TL_ResetTopicConnector_lem_gen TL_ResetTopicConnector_stub \
+ TL_ResetTopicBase_stub
+ libs += TL_ResetTopicBase_stub TL_ResetTopicConnector_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = TL_ResetTopicConnector_lem_stub
+ dynamicflags += TL_RESETTOPIC_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_ConnectorEC.h
+ TL_ResetTopic_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ TL_ResetTopic_ConnectorEC.inl
+ }
+}
+
+project (TL_ResetTopicConnector_stub) : ccm_stub, dds4ccm_base {
+ after += TL_ResetTopicConnector_idl_gen TL_ResetTopicBase_stub
+ libs += TL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = TL_ResetTopicConnector_stub
+ dynamicflags += TL_RESETTOPIC_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_ConnectorC.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_ConnectorC.h
+ TL_ResetTopic_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ TL_ResetTopic_ConnectorC.inl
+ }
+}
+
+project (TL_ResetTopicConnector_exec) : ciao_executor, dds4ccm_impl {
+ after += TL_ResetTopicConnector_lem_stub TL_ResetTopicConnector_stub \
+ TL_ResetTopicBase_stub
+ sharedname = TL_ResetTopicConnector_exec
+ libs += TL_ResetTopicConnector_stub TL_ResetTopicConnector_lem_stub \
+ TL_ResetTopicBase_stub TL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += TL_RESETTOPIC_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_Connector_conn.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_Connector_conn.h
+ TL_ResetTopic_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (TL_ResetTopicConnector_svnt) : ciao_servant, dds4ccm_impl {
+ after += TL_ResetTopicConnector_lem_stub TL_ResetTopicConnector_exec \
+ TL_ResetTopicConnector_stub
+ sharedname = TL_ResetTopicConnector_svnt
+ libs += TL_ResetTopicConnector_stub \
+ TL_ResetTopicConnector_lem_stub \
+ TL_ResetTopicBase_stub \
+ TL_ResetTopicConnector_exec
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += TL_RESETTOPIC_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_ConnectorS.cpp
+ TL_ResetTopic_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_ConnectorS.h
+ TL_ResetTopic_Connector_svnt.h
+ TL_ResetTopic_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ TL_ResetTopic_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/SenderDriver.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/SenderDriver.cpp
new file mode 100644
index 00000000000..a89be8e0002
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/SenderDriver.cpp
@@ -0,0 +1,93 @@
+//$Id$
+/*
+ * @file SenderDriver.cpp
+ *
+ * @author Marcel Smit
+ */
+
+
+#include "TL_ResetTopic_SenderC.h"
+#include "ace/streams.h"
+#include "ace/Get_Opt.h"
+
+const ACE_TCHAR *sender_ior = ACE_TEXT ("file://Sender.ior");
+const ACE_TCHAR *topic_name = ACE_TEXT ("");
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("ek:n:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ sender_ior = get_opts.opt_arg ();
+ break;
+
+ case 'n':
+ topic_name = get_opts.opt_arg ();
+ break;
+
+ case 'e':
+ topic_name = "";
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Sender IOR> (default is file://Sender.ior)\n"
+ "-n <new topic>\n"
+ "-e <clearing topic name>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ }
+
+ return 0;
+}
+
+
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ try
+ {
+ // initialize the ORB
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+ if (parse_args (argc, argv) != 0)
+ {
+ return -1;
+ }
+
+ // create the factory object reference,
+ CORBA::Object_var sender_obj =
+ orb->string_to_object (sender_ior);
+
+ // downcast the object reference to the appropriate type
+ ::TL_ResetTopic::Sender_var sender =
+ ::TL_ResetTopic::Sender::_narrow (sender_obj.in ());
+
+ if (CORBA::is_nil (sender.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to acquire 'Sender' objref\n"),
+ -1);
+ }
+ sender->set_new_topic (topic_name);
+
+ orb->destroy ();
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Who is the culprit in the SenderDriver?\n");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Uncaught CORBA exception\n"),
+ 1);
+ }
+ return 0;
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.idl
new file mode 100644
index 00000000000..c5e00ade823
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.idl
@@ -0,0 +1,32 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ *
+ * by-hand idl3 translation of sender components.
+ */
+
+#ifndef TL_RESETTOPIC_SENDER_IDL
+#define TL_RESETTOPIC_SENDER_IDL
+
+#include "Connector/TL_ResetTopic_Connector.idl"
+
+module TL_ResetTopic
+{
+ interface ChangeTopicInterface
+ {
+ void set_new_topic (in string topic_name);
+ };
+
+ component Sender supports ChangeTopicInterface
+ {
+ port TL_ResetTopicTestConnector::DDS_Write info_write;
+ port TL_ResetTopicTestConnector::DDS_Update info_update;
+
+ attribute unsigned short iterations;
+ attribute unsigned short keys;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.mpc
new file mode 100644
index 00000000000..54d6d13d885
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender.mpc
@@ -0,0 +1,166 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p TL_ResetTopicBase -l ../lib -o ../lib -c controller -u DDS Sender"
+
+project (TL_ResetTopicSender_idl_gen) : componentidldefaults, dds4ccm {
+ after += TL_ResetTopicConnector_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 {
+ TL_ResetTopic_Sender.idl
+ }
+}
+
+project (TL_ResetTopicSender_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += TL_ResetTopicSender_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 {
+ TL_ResetTopic_SenderE.idl
+ }
+}
+
+project (TL_ResetTopicSender_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += TL_ResetTopicSender_lem_gen TL_ResetTopicSender_stub TL_ResetTopicBase_stub
+ libs += TL_ResetTopicBase_stub Sender_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Sender_lem_stub
+ dynamicflags += SENDER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_SenderEC.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_SenderEC.h
+ Sender_lem_stub_export.h
+ }
+
+ Inline_Files {
+ TL_ResetTopic_SenderEC.inl
+ }
+}
+
+project (TL_ResetTopicSender_stub) : ccm_stub, dds4ccm_base {
+ after += TL_ResetTopicSender_idl_gen TL_ResetTopicBase_stub TL_ResetTopicConnector_stub
+ libs += TL_ResetTopicBase_stub TL_ResetTopicConnector_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = Sender_stub
+ dynamicflags += SENDER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_SenderC.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_SenderC.h
+ Sender_stub_export.h
+ }
+
+ Inline_Files {
+ TL_ResetTopic_SenderC.inl
+ }
+}
+
+project (TL_ResetTopicSender_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += TL_ResetTopicSender_lem_stub TL_ResetTopicSender_stub \
+ TL_ResetTopicConnector_lem_stub TL_ResetTopicConnector_stub
+ sharedname = Sender_exec
+ libs += Sender_stub Sender_lem_stub TL_ResetTopicBase_stub \
+ TL_ResetTopicConnector_lem_stub TL_ResetTopicConnector_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags += SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_Sender_exec.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_Sender_exec.h
+ Sender_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (TL_ResetTopicSender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += TL_ResetTopicBase_stub TL_ResetTopicSender_lem_stub TL_ResetTopicConnector_stub \
+ TL_ResetTopicConnector_svnt TL_ResetTopicConnector_lem_stub
+ sharedname = Sender_svnt
+ libs += Sender_stub Sender_lem_stub \
+ TL_ResetTopicBase_stub TL_ResetTopicConnector_stub TL_ResetTopicConnector_svnt TL_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += SENDER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ TL_ResetTopic_SenderS.cpp
+ TL_ResetTopic_Sender_svnt.cpp
+ }
+
+ Header_Files {
+ TL_ResetTopic_SenderS.h
+ TL_ResetTopic_Sender_svnt.h
+ Sender_svnt_export.h
+ }
+
+ Inline_Files {
+ TL_ResetTopic_SenderS.inl
+ }
+}
+
+project (TL_ResetTopicSender_Driver) : ccm_stub, valuetype, dds4ccm_lem_stub {
+ exename = SenderDriver
+ after += TL_ResetTopicSender_stub TL_ResetTopicConnector_stub
+ libs += Sender_stub TL_ResetTopicBase_stub TL_ResetTopicConnector_stub
+
+ includes += ..
+ libpaths += ../lib
+
+ exeout = ../lib
+ IDL_Files {
+ }
+
+ Source_Files {
+ SenderDriver.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.cpp
new file mode 100644
index 00000000000..ae6442eda81
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.cpp
@@ -0,0 +1,427 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+#include "TL_ResetTopic_Sender_exec.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+namespace CIAO_TL_ResetTopic_Sender_Impl
+{
+
+ /**
+ * Timeout_Handler
+ */
+
+ Timeout_Handler::Timeout_Handler (Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ Timeout_Handler::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ // Notify the subscribers
+ this->callback_.start_event_test ();
+ return 0;
+ }
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ Sender_exec_i::Sender_exec_i (void)
+ : iterations_ (0)
+ , keys_ (0)
+ , to_handler_ (0)
+ , topic_name_ ("TopicI")
+ , old_topic_name_ ("TopicI")
+ {
+ ACE_NEW_THROW_EX (this->to_handler_,
+ Timeout_Handler (*this),
+ ::CORBA::INTERNAL ());
+ }
+
+ Sender_exec_i::~Sender_exec_i (void)
+ {
+ delete this->to_handler_;
+ }
+
+ // Supported operations and attributes.
+ ACE_Reactor*
+ Sender_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ void Sender_exec_i::set_new_topic (const char * topic_name)
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+
+ this->old_topic_name_ = this->topic_name_;
+ this->topic_name_ = topic_name;
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_new_topic - "
+ "New topic name set <%C>\n",
+ topic_name));
+ }
+
+ void
+ Sender_exec_i::create_samples (void)
+ {
+ for (CORBA::UShort i = 1; i < this->keys_ + 1; ++i)
+ {
+ char key[7];
+ TL_ResetTopicTest *new_key = new TL_ResetTopicTest;
+ ACE_OS::sprintf (key, "KEY_%d", i);
+ new_key->key = CORBA::string_dup(key);
+ new_key->iteration = 0;
+ this->tests_[key] = new_key;
+
+ ::TL_ResetTopic::TL_ResetTopicTestConnector::Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data();
+
+ updater->create_one (*new_key);
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::create_samples - "
+ "Sample <%C> created\n",
+ key));
+ }
+ }
+
+ bool
+ Sender_exec_i::set_topic_name (const char * topic_name)
+ {
+ if (ACE_OS::strcmp (topic_name, this->old_topic_name_.c_str()) != 0)
+ {
+ this->old_topic_name_ = topic_name;
+ bool ret = this->set_topic_name_writer (topic_name);
+ ret |= this->set_topic_name_updater (topic_name);
+ return ret;
+ }
+ if (ACE_OS::strlen (this->topic_name_.c_str()) > 256)
+ return false;
+ return true;
+ }
+
+ bool
+ Sender_exec_i::set_topic_name_writer (const char * topic_name)
+ {
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_writer - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ ::TL_ResetTopic::TL_ResetTopicTestConnector:: Writer_var writer =
+ this->ciao_context_->get_connection_info_write_data ();
+ if (::CORBA::is_nil (writer.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to get writer interface\n"));
+ return false;
+ }
+ ::CORBA::Object_var cmp = writer->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to get component interface\n"));
+ return false;
+ }
+ ::TL_ResetTopic::TL_ResetTopicTestConnector::CCM_DDS_Event_var conn =
+ ::TL_ResetTopic::TL_ResetTopicTestConnector::CCM_DDS_Event::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to narrow connector interface\n"));
+ return false;
+ }
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_, false);
+ conn->topic_name (topic_name);
+ }
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Caught NonChangeable exception.\n"));
+ return false;
+ }
+ catch (const ::CCM_DDS::InternalError &)
+ {
+ if (ACE_OS::strlen (topic_name) > 256)
+ {
+ ACE_DEBUG ((LM_ERROR, "Sender_exec_i::set_topic_name_writer - "
+ "Expected InternalErr exception caught.\n"));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Caught InternalError exception.\n"));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ bool
+ Sender_exec_i::set_topic_name_updater (const char * topic_name)
+ {
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_updater - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ ::TL_ResetTopic::TL_ResetTopicTestConnector:: Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data ();
+ if (::CORBA::is_nil (updater.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to get updater interface\n"));
+ return false;
+ }
+ ::CORBA::Object_var cmp = updater->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to get component interface\n"));
+ return false;
+ }
+ ::TL_ResetTopic::TL_ResetTopicTestConnector::CCM_DDS_State_var conn =
+ ::TL_ResetTopic::TL_ResetTopicTestConnector::CCM_DDS_State::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to narrow connector interface\n"));
+ return false;
+ }
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_, false);
+ conn->topic_name (topic_name);
+ }
+ this->create_samples ();
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Caught NonChangeable exception.\n"));
+ return false;
+ }
+ catch (const ::CCM_DDS::InternalError &)
+ {
+ if (ACE_OS::strlen (topic_name) > 256)
+ {
+ ACE_DEBUG ((LM_ERROR, "Sender_exec_i::set_topic_name_updater - "
+ "Expected InternalErr exception caught.\n"));
+ }
+ else
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Caught InternalError exception.\n"));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ void
+ Sender_exec_i::start_event_test (void)
+ {
+ // Set the topic name on the connector first. Therefor we need to
+ // get to the connector first.
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - Start\n"));
+
+ try
+ {
+ for (::CORBA::UShort key = 1; key < this->keys_ + 1; ++key)
+ {
+ TL_ResetTopicTest sample;
+ char tmp[7];
+ ACE_OS::sprintf (tmp, "KEY_%d", key);
+ sample.key = CORBA::string_dup(tmp);
+
+ for (::CORBA::UShort iter = 1; iter < this->iterations_ + 1; ++iter)
+ {
+ if (this->set_topic_name (this->topic_name_.c_str ()))
+ {
+ ::TL_ResetTopic::TL_ResetTopicTestConnector:: Writer_var writer =
+ this->ciao_context_->get_connection_info_write_data ();
+ sample.iteration = iter;
+ writer->write_one (sample, ::DDS::HANDLE_NIL);
+
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - "
+ "Sample for topic <%C> written : key <%C> - iteration <%d>\n",
+ this->topic_name_.c_str (), tmp, iter));
+ }
+
+ ACE_Time_Value tv (0, 5000);
+ ACE_OS::sleep (tv);
+ }
+ }
+ for (Sample_Table::iterator iter = this->tests_.begin ();
+ iter != this->tests_.end ();
+ ++iter)
+ {
+ for (::CORBA::UShort i = 1; i < this->iterations_ + 1; ++i)
+ {
+ if (this->set_topic_name (this->topic_name_.c_str ()))
+ {
+ ::TL_ResetTopic::TL_ResetTopicTestConnector:: Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data ();
+ iter->second->iteration = i;
+ updater->update_one (iter->second, ::DDS::HANDLE_NIL);
+
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - "
+ "Sample for topic <%C> updated : key <%C> - iteration <%d>\n",
+ this->topic_name_.c_str (),
+ iter->second->key.in (),
+ i));
+ }
+
+ ACE_Time_Value tv (0, 5000);
+ ACE_OS::sleep (tv);
+ }
+ }
+ }
+ catch (const ::CORBA::BAD_INV_ORDER & ex)
+ {
+ if (this->topic_name_.empty())
+ ACE_DEBUG ((LM_DEBUG, "Expected BAD_INV_ORDER caught\n"));
+ else
+ ex._tao_print_exception("ERROR:");
+ }
+ catch (const ::CORBA::Exception & ex)
+ {
+ ex._tao_print_exception("ERROR:");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "Sender_exec_i::start_event_test - "
+ "ERROR: Unexpected and unknown exception caught.\n"));
+ }
+ }
+
+ // Component attributes and port operations.
+
+ ::CORBA::UShort
+ Sender_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Sender_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ ::CORBA::UShort
+ Sender_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Sender_exec_i::keys (
+ const ::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Sender_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::TL_ResetTopic::CCM_Sender_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Sender_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Sender_exec_i::ccm_activate (void)
+ {
+ this->create_samples ();
+ if (this->reactor ()->schedule_timer (
+ this->to_handler_,
+ 0,
+ ACE_Time_Value (5, 0),
+ ACE_Time_Value (5, 0)) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ")
+ ACE_TEXT ("Error scheduling timer")));
+ }
+ }
+
+ void
+ Sender_exec_i::ccm_passivate (void)
+ {
+ this->reactor()->cancel_timer(this->to_handler_);
+ }
+
+ void
+ Sender_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_TL_ResetTopic_Sender_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Sender_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.h
new file mode 100644
index 00000000000..0c550395a3d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/Sender/TL_ResetTopic_Sender_exec.h
@@ -0,0 +1,147 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_TL_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+#define CIAO_TL_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+
+#include /**/ "ace/pre.h"
+
+#include "TL_ResetTopic_SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+
+#include <map>
+
+namespace CIAO_TL_ResetTopic_Sender_Impl
+{
+ class Sender_exec_i;
+
+ /**
+ * Timeout_Handler
+ */
+ class Timeout_Handler :
+ public ACE_Event_Handler
+ {
+ public:
+ Timeout_Handler (Sender_exec_i &callback);
+ /// Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+ private:
+ /// Maintains a handle that actually process the event
+ Sender_exec_i &callback_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ class Sender_exec_i
+ : public virtual Sender_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Sender_exec_i (void);
+ virtual ~Sender_exec_i (void);
+
+ //@{
+ /** Supported operations and attributes. */
+ virtual void set_new_topic (const char * topic_name);
+ //@}
+
+ //@{
+ /** Component attributes and port operations. */
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+
+ virtual void keys (::CORBA::UShort keys);
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+ bool set_topic_name (const char * topic_name);
+ bool set_topic_name_writer (const char * topic_name);
+ bool set_topic_name_updater (const char * topic_name);
+ void start_event_test (void);
+ //@}
+
+ private:
+ ::TL_ResetTopic::CCM_Sender_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+
+ ::CORBA::UShort iterations_;
+
+ ::CORBA::UShort keys_;
+ //@}
+
+ //@{
+ /** User defined members. */
+ Timeout_Handler *to_handler_;
+ ACE_CString topic_name_, old_topic_name_;
+
+ TAO_SYNCH_RECURSIVE_MUTEX topic_name_lock_;
+
+ typedef std::map<ACE_CString, TL_ResetTopicTest_var> Sample_Table;
+
+ Sample_Table tests_;
+ //@}
+
+ //@{
+ /** User defined private operations. */
+ void create_samples (void);
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
+ };
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_TL_ResetTopic_Sender_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/Plan.cdp
new file mode 100644
index 00000000000..6bad6fc3866
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/Plan.cdp
@@ -0,0 +1,338 @@
+<!-- $Id$ -->
+<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>ResetTopic_Depl_1</label>
+ <UUID>ResetTopic_Depl_1</UUID>
+
+ <implementation xmi:id="ResetTopic_EventConnectorImplementation">
+ <name>ResetTopic_EventConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TL_ResetTopic_TL_ResetTopicTestConnector_DDS_Event_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TL_ResetTopic_TL_ResetTopicTestConnector_DDS_Event_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TL_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TL_ResetTopic_Connector_exec</string>
+ </value>
+ </value>
+ </execParameter>
+ </implementation>
+
+ <implementation xmi:id="ResetTopic_StateConnectorImplementation">
+ <name>ResetTopic_StateConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TL_ResetTopic_TL_ResetTopicTestConnector_DDS_State_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TL_ResetTopic_TL_ResetTopicTestConnector_DDS_State_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TL_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TL_ResetTopic_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>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TL_ResetTopic_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_TL_ResetTopic_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="ResetTopic_SenderEventConnectorInstance">
+ <name>ResetTopic_SenderEventConnectorInstance</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_EventConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_SenderStateConnectorInstance">
+ <name>ResetTopic_SenderStateConnectorInstance</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_StateConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderComponentInstance">
+ <name>SenderComponent</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="SenderComponentImplementation" />
+ <configProperty>
+ <name>rate</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>15</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <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>
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender.ior</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <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="ResetTopic_SenderEventConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>updater_connection</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_update_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_SenderStateConnectorInstance" />
+ </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="ResetTopic_Connector_ExecArtifact">
+ <name>TL_ResetTopic_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>TL_ResetTopicConnector_exec</location>
+ </artifact>
+ <artifact xmi:id="ResetTopic_Connector_SvntArtifact">
+ <name>TL_ResetTopic_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>TL_ResetTopicConnector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_StubArtifact">
+ <name>Receiver_stub</name>
+ <source/>
+ <node/>
+ <location>Receiver_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/run_test.pl
new file mode 100755
index 00000000000..0a1c1735413
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/TooLong/descriptors/run_test.pl
@@ -0,0 +1,265 @@
+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 = ( "SenderNode.ior" );
+@iorfiles = 0;
+@nodenames = ( "SenderNode" );
+
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+sub create_targets {
+ # naming service
+ $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+ $tg_naming->AddLibPath ('../lib');
+ # daemon
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n";
+ $tg_daemons[$i]->AddLibPath ('../lib');
+ }
+ # execution manager
+ $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n";
+ $tg_exe_man->AddLibPath ('../lib');
+ # executor (plan_launcher)
+ $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n";
+ $tg_executor->AddLibPath ('../lib');
+}
+
+sub init_ior_files {
+ $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase);
+ $ior_emfile = $tg_exe_man->LocalFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+ delete_ior_files ();
+}
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i]->DeleteFile ($iorbases[$i]);
+ }
+ $tg_naming->DeleteFile ($ior_nsbase);
+ $tg_exe_man->DeleteFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+}
+
+sub kill_node_daemon {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemon ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill (); $EM->TimedWait (1);
+ }
+
+ if ($ns_running == 1) {
+ $NS->Kill (); $NS->TimedWait (1);
+ }
+ # in case shutdown did not perform as expected
+ $tg_executor->KillAll ('dance_locality_manager');
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $DEAMONS[$i]->Spawn ();
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$ns_status = $NS->Spawn ();
+
+if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$em_status = $EM->Spawn ();
+
+if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+}
+
+if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - launch the application -\n";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 10 seconds before clearing the topic name\n";
+sleep (10);
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-e");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before setting the topic name again\n";
+sleep (10);
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-n ABCEDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCEDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCEDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCEDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCEDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before stopping\n";
+sleep (10);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
+
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -s");
+$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.idl
new file mode 100644
index 00000000000..c90d084978d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file UL_ResetTopic_Base.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef UL_RESETTOPIC_BASE_IDL
+#define UL_RESETTOPIC_BASE_IDL
+
+#pragma ndds typesupport "Base/UL_ResetTopic_BaseSupport.h"
+
+#pragma DCPS_DATA_TYPE "UL_ResetTopicTest"
+#pragma DCPS_DATA_KEY "UL_ResetTopicTest key"
+
+struct UL_ResetTopicTest {
+ string key; //@key
+ long iteration;
+};
+
+typedef sequence<UL_ResetTopicTest> UL_ResetTopicTestSeq;
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.mpc
new file mode 100644
index 00000000000..bd879c16e8d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Base/UL_ResetTopic_Base.mpc
@@ -0,0 +1,26 @@
+// $Id$
+
+project (UL_ResetTopicBase_stub) : taoidldefaults, dds4ccm_ts_default {
+ sharedname = UL_ResetTopicBase_stub
+ dynamicflags += UL_RESETTOPIC_BASE_STUB_BUILD_DLL
+ libout = ../lib
+
+ idlflags += -SS -Sci \
+ -Wb,stub_export_macro=UL_RESETTOPIC_BASE_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Base_stub_export.h
+
+ IDL_Files {
+ idlflags += -Gxhst
+ UL_ResetTopic_Base.idl
+ }
+
+ opendds_ts_flags += --export=UL_RESETTOPIC_BASE_STUB_Export
+
+ DDSGenerator_Files {
+ UL_ResetTopic_Base.idl
+ }
+
+ Source_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.idl
new file mode 100644
index 00000000000..356d663a39a
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file UL_ResetTopic_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef UL_RESETTOPIC_CONNECTOR_IDL_
+#define UL_RESETTOPIC_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include <ccm_dds.idl>
+
+#include "Base/UL_ResetTopic_Base.idl"
+
+#pragma ciao lem "Connector/UL_ResetTopic_ConnectorE.idl"
+
+module UL_ResetTopic
+{
+ module ::CCM_DDS::Typed < ::UL_ResetTopicTest, ::UL_ResetTopicTestSeq> UL_ResetTopicTestConnector;
+};
+
+#endif /* UL_ResetTopic_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.mpc
new file mode 100644
index 00000000000..2c4579b3a4f
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Connector/UL_ResetTopic_Connector.mpc
@@ -0,0 +1,148 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p UL_ResetTopicBase -l .. -o ../lib -u DDS UL_ResetTopic_Connector"
+
+project (UL_ResetTopicConnector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=UL_RESETTOPIC_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Connector_stub_export.h \
+ -Wb,skel_export_macro=UL_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=UL_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,conn_export_macro=UL_RESETTOPIC_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=ResetTopic_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ UL_ResetTopic_Connector.idl
+ }
+}
+
+project (UL_ResetTopicConnector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += UL_ResetTopicConnector_idl_gen
+ idlflags += -Wb,stub_export_macro=UL_RESETTOPIC_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=UL_ResetTopic_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I ..
+
+ IDL_Files {
+ UL_ResetTopic_ConnectorE.idl
+ }
+}
+
+project (UL_ResetTopicConnector_lem_stub) : ccm_svnt, dds4ccm_lem_stub {
+ after += UL_ResetTopicConnector_lem_gen UL_ResetTopicConnector_stub \
+ UL_ResetTopicBase_stub
+ libs += UL_ResetTopicBase_stub UL_ResetTopicConnector_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = UL_ResetTopicConnector_lem_stub
+ dynamicflags += UL_RESETTOPIC_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_ConnectorEC.h
+ UL_ResetTopic_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_ConnectorEC.inl
+ }
+}
+
+project (UL_ResetTopicConnector_stub) : ccm_stub, dds4ccm_base {
+ after += UL_ResetTopicConnector_idl_gen UL_ResetTopicBase_stub
+ libs += UL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = UL_ResetTopicConnector_stub
+ dynamicflags += UL_RESETTOPIC_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_ConnectorC.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_ConnectorC.h
+ UL_ResetTopic_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_ConnectorC.inl
+ }
+}
+
+project (UL_ResetTopicConnector_exec) : ciao_executor, dds4ccm_impl {
+ after += UL_ResetTopicConnector_lem_stub UL_ResetTopicConnector_stub \
+ UL_ResetTopicBase_stub
+ sharedname = UL_ResetTopicConnector_exec
+ libs += UL_ResetTopicConnector_stub UL_ResetTopicConnector_lem_stub \
+ UL_ResetTopicBase_stub UL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += UL_RESETTOPIC_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_Connector_conn.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_Connector_conn.h
+ UL_ResetTopic_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (UL_ResetTopicConnector_svnt) : ciao_servant, dds4ccm_impl {
+ after += UL_ResetTopicConnector_lem_stub UL_ResetTopicConnector_exec \
+ UL_ResetTopicConnector_stub
+ sharedname = UL_ResetTopicConnector_svnt
+ libs += UL_ResetTopicConnector_stub \
+ UL_ResetTopicConnector_lem_stub \
+ UL_ResetTopicBase_stub \
+ UL_ResetTopicConnector_exec
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += UL_RESETTOPIC_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_ConnectorS.cpp
+ UL_ResetTopic_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_ConnectorS.h
+ UL_ResetTopic_Connector_svnt.h
+ UL_ResetTopic_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/ReceiverDriver.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/ReceiverDriver.cpp
new file mode 100644
index 00000000000..7189a56c2e8
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/ReceiverDriver.cpp
@@ -0,0 +1,88 @@
+//$Id$
+/*
+ * @file ReceiverDriver.cpp
+ *
+ * @author Marcel Smit
+ */
+
+
+#include "UL_ResetTopic_ReceiverC.h"
+#include "ace/streams.h"
+#include "ace/Get_Opt.h"
+
+const ACE_TCHAR *receiver_ior = ACE_TEXT ("file://Receiver.ior");
+const ACE_TCHAR *topic_name = ACE_TEXT ("");
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:n:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ receiver_ior = get_opts.opt_arg ();
+ break;
+
+ case 'n':
+ topic_name = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Receiver IOR> (default is file://Receiver.ior)\n"
+ "-n <new topic>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ }
+
+ return 0;
+}
+
+
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ try
+ {
+ // initialize the ORB
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+ if (parse_args (argc, argv) != 0)
+ {
+ return -1;
+ }
+
+ // create the factory object reference,
+ CORBA::Object_var receiver_obj =
+ orb->string_to_object (receiver_ior);
+
+ // downcast the object reference to the appropriate type
+ ::UL_ResetTopic::Receiver_var receiver =
+ ::UL_ResetTopic::Receiver::_narrow (receiver_obj.in ());
+
+ if (CORBA::is_nil (receiver.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to acquire 'Receiver' objref\n"),
+ -1);
+ }
+ receiver->set_new_topic (topic_name);
+
+ orb->destroy ();
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Who is the culprit in the ReceiverDriver?\n");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Uncaught CORBA exception\n"),
+ 1);
+ }
+ return 0;
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.idl
new file mode 100644
index 00000000000..045716c67fa
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.idl
@@ -0,0 +1,28 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef RECEIVER_IDL
+#define RECEIVER_IDL
+
+#include "Connector/UL_ResetTopic_Connector.idl"
+
+module UL_ResetTopic
+{
+ interface ChangeTopicInterface
+ {
+ void set_new_topic (in string topic_name);
+ };
+
+ component Receiver supports ChangeTopicInterface
+ {
+ port UL_ResetTopicTestConnector::DDS_StateListen info_out_state;
+
+ attribute unsigned short iterations;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.mpc
new file mode 100644
index 00000000000..0de0609a041
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver.mpc
@@ -0,0 +1,163 @@
+// $Id$
+
+project (UL_ResetTopicReceiver_idl_gen) : componentidldefaults, dds4ccm {
+ custom_only = 1
+ after += UL_ResetTopicConnector_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 {
+ UL_ResetTopic_Receiver.idl
+ }
+}
+
+project (UL_ResetTopicReceiver_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += UL_ResetTopicReceiver_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 {
+ UL_ResetTopic_ReceiverE.idl
+ }
+}
+
+project (UL_ResetTopicReceiver_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += UL_ResetTopicReceiver_lem_gen UL_ResetTopicReceiver_stub UL_ResetTopicConnector_stub UL_ResetTopicBase_stub
+ libs += Receiver_stub UL_ResetTopicConnector_stub UL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_lem_stub
+ dynamicflags += RECEIVER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_ReceiverEC.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_ReceiverEC.h
+ Receiver_lem_stub_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_ReceiverEC.inl
+ }
+}
+
+project (UL_ResetTopicReceiver_stub) : ccm_stub, dds4ccm_base {
+ after += UL_ResetTopicReceiver_idl_gen UL_ResetTopicConnector_stub UL_ResetTopicBase_stub UL_ResetTopicConnector_lem_gen
+ libs += UL_ResetTopicConnector_stub UL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_stub
+ dynamicflags += RECEIVER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_ReceiverC.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_ReceiverC.h
+ Receiver_stub_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_ReceiverC.inl
+ }
+}
+
+project (UL_ResetTopicReceiver_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += UL_ResetTopicReceiver_lem_stub UL_ResetTopicReceiver_stub \
+ UL_ResetTopicBase_stub UL_ResetTopicConnector_stub \
+ UL_ResetTopicConnector_lem_stub
+ sharedname = Receiver_exec
+ libs += Receiver_stub Receiver_lem_stub UL_ResetTopicBase_stub \
+ UL_ResetTopicConnector_stub UL_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RECEIVER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_Receiver_exec.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_Receiver_exec.h
+ Receiver_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (UL_ResetTopicReceiver_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += UL_ResetTopicReceiver_lem_stub UL_ResetTopicBase_stub UL_ResetTopicConnector_stub UL_ResetTopicConnector_svnt UL_ResetTopicReceiver_exec UL_ResetTopicConnector_lem_stub
+ sharedname = Receiver_svnt
+ libs += Receiver_stub Receiver_lem_stub UL_ResetTopicBase_stub UL_ResetTopicConnector_stub UL_ResetTopicConnector_svnt Receiver_exec UL_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RECEIVER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_ReceiverS.cpp
+ UL_ResetTopic_Receiver_svnt.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_ReceiverS.h
+ UL_ResetTopic_Receiver_svnt.h
+ Receiver_svnt_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_ReceiverS.inl
+ }
+}
+
+project (UL_ResetTopicReceiver_Driver) : ccm_stub, valuetype, dds4ccm_lem_stub {
+ exename = ReceiverDriver
+ after += UL_ResetTopicReceiver_stub UL_ResetTopicConnector_stub
+ libs += Receiver_stub UL_ResetTopicBase_stub UL_ResetTopicConnector_stub
+
+ includes += ..
+ libpaths += ../lib
+
+ exeout = ../lib
+ IDL_Files {
+ }
+
+ Source_Files {
+ ReceiverDriver.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.cpp
new file mode 100644
index 00000000000..7132fb5cb15
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.cpp
@@ -0,0 +1,330 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.4
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+#include "UL_ResetTopic_Receiver_exec.h"
+
+namespace CIAO_UL_ResetTopic_Receiver_Impl
+{
+
+ /**
+ * Facet Executor Implementation Class: info_out_state_data_listener_exec_i
+ */
+
+ info_out_state_data_listener_exec_i::info_out_state_data_listener_exec_i (
+ ::UL_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ Atomic_Boolean &samples_received)
+ : ciao_context_ (
+ ::UL_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ , samples_received_(samples_received)
+ {
+ }
+
+ info_out_state_data_listener_exec_i::~info_out_state_data_listener_exec_i (void)
+ {
+ }
+
+ // Operations from ::UL_ResetTopic::UL_ResetTopicTestConnector::StateListener
+
+ void
+ info_out_state_data_listener_exec_i::on_creation (
+ const ::UL_ResetTopicTest & datum,
+ const ::CCM_DDS::ReadInfo & /* info */)
+ {
+ ACE_DEBUG ((LM_DEBUG, "info_out_state_data_listener_exec_i::on_creation - "
+ "Sample <%C> created\n",
+ datum.key.in ()));
+ }
+
+ void
+ info_out_state_data_listener_exec_i::on_one_update (
+ const ::UL_ResetTopicTest & datum,
+ const ::CCM_DDS::ReadInfo & /* info */)
+ {
+ this->samples_received_ = true;
+ ACE_DEBUG ((LM_DEBUG, "info_out_state_data_listener_exec_i::on_one_update - "
+ "Sample <%C> updated: <%u>\n",
+ datum.key.in (),
+ datum.iteration));
+ }
+
+ void
+ info_out_state_data_listener_exec_i::on_many_updates (
+ const ::UL_ResetTopicTestSeq & /* data */,
+ const ::CCM_DDS::ReadInfoSeq & /* infos */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ info_out_state_data_listener_exec_i::on_deletion (
+ const ::UL_ResetTopicTest & /* datum */,
+ const ::CCM_DDS::ReadInfo & /* info */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Facet Executor Implementation Class: info_out_state_status_exec_i
+ */
+
+ info_out_state_status_exec_i::info_out_state_status_exec_i (
+ ::UL_ResetTopic::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::UL_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ {
+ }
+
+ info_out_state_status_exec_i::~info_out_state_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ info_out_state_status_exec_i::on_requested_deadline_missed (
+ ::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ info_out_state_status_exec_i::on_sample_lost (
+ ::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ Receiver_exec_i::Receiver_exec_i (void)
+ : iterations_ (0)
+ , samples_received_(false)
+ {
+ }
+
+ Receiver_exec_i::~Receiver_exec_i (void)
+ {
+ }
+
+ // Supported operations and attributes.
+ void
+ Receiver_exec_i::set_new_topic (::CORBA::Object_ptr cmp,
+ const char * topic_name)
+ {
+ if (::CORBA::is_nil (cmp))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_topic_name_writer - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_DDS_State_var conn =
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_DDS_State::_narrow (cmp);
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_topic_name_writer - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ conn->topic_name (topic_name);
+
+// ::CCM_DDS::DataListenerControl_var dlc =
+// this->ciao_context_->get_connection_info_out_event_data_control ();
+// dlc->mode (::CCM_DDS::ONE_BY_ONE);
+ }
+
+ void
+ Receiver_exec_i::set_new_topic (const char * topic_name)
+ {
+ // The ReceiverDriver invokes this method. Therefor first check wether
+ // samples were received during last run
+
+ if (this->samples_received_.value())
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::set_new_topic - "
+ "OK, samples received during last run\n"));
+ else
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::set_new_topic - "
+ "ERROR: No samples received during last run\n"));
+
+ this->samples_received_ = false;
+
+ ::CORBA::Object_var cmp;
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::set_new_topic - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ //First listener
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::Reader_var reader =
+ this->ciao_context_->get_connection_info_out_state_data();
+
+ if (::CORBA::is_nil (reader.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_new_topic - "
+ "ciao_info_out_event_data_listener_ seems nil\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ cmp = reader->_get_component ();
+ this->set_new_topic (cmp.in (), topic_name);
+
+ //next listener
+ if (::CORBA::is_nil (this->ciao_info_out_state_status_.in ()))
+ {
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::set_new_topic - "
+ "ciao_info_out_event_status_ seems nil\n"));
+ }
+ else
+ {
+ cmp = this->ciao_info_out_state_status_->_get_component ();
+ this->set_new_topic (cmp.in (), topic_name);
+ }
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_topic_name_writer - "
+ "Caught NonChangeable exception.\n"));
+ }
+ }
+
+ // Component attributes and port operations.
+
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_StateListener_ptr
+ Receiver_exec_i::get_info_out_state_data_listener (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_info_out_state_data_listener_.in ()))
+ {
+ info_out_state_data_listener_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ info_out_state_data_listener_exec_i (
+ this->ciao_context_.in (),
+ this->samples_received_),
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_StateListener::_nil ());
+
+ this->ciao_info_out_state_data_listener_ = tmp;
+ }
+
+ return
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_StateListener::_duplicate (
+ this->ciao_info_out_state_data_listener_.in ());
+ }
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ Receiver_exec_i::get_info_out_state_status (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_info_out_state_status_.in ()))
+ {
+ info_out_state_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ info_out_state_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_info_out_state_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_info_out_state_status_.in ());
+ }
+
+ ::CORBA::UShort
+ Receiver_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Receiver_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Receiver_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::UL_ResetTopic::CCM_Receiver_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Receiver_exec_i::configuration_complete (void)
+ {
+ ::CCM_DDS::StateListenerControl_var dlc =
+ this->ciao_context_->get_connection_info_out_state_data_control ();
+ dlc->mode (::CCM_DDS::ONE_BY_ONE);
+ }
+
+ void
+ Receiver_exec_i::ccm_activate (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Receiver_exec_i::ccm_passivate (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Receiver_exec_i::ccm_remove (void)
+ {
+ if (this->samples_received_.value())
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::ccm_remove - "
+ "OK, samples received during last run\n"));
+ else
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::ccm_remove - "
+ "ERROR: No samples received during last run\n"));
+ }
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_UL_ResetTopic_Receiver_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Receiver_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.h
new file mode 100644
index 00000000000..a534a4378b1
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Receiver/UL_ResetTopic_Receiver_exec.h
@@ -0,0 +1,199 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v2.0.4
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_UL_RESETTOPIC_RECEIVER_EXEC_WHDIFX_H_
+#define CIAO_UL_RESETTOPIC_RECEIVER_EXEC_WHDIFX_H_
+
+#include /**/ "ace/pre.h"
+
+#include "UL_ResetTopic_ReceiverEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Receiver_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO_UL_ResetTopic_Receiver_Impl
+{
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean> Atomic_Boolean;
+
+ /**
+ * Provider Executor Implementation Class: info_out_state_data_listener_exec_i
+ */
+
+ class info_out_state_data_listener_exec_i
+ : public virtual ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_StateListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ info_out_state_data_listener_exec_i (
+ ::UL_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ Atomic_Boolean &samples_received);
+ virtual ~info_out_state_data_listener_exec_i (void);
+
+ /** @name Operations and attributes from UL_ResetTopic::UL_ResetTopicTestConnector::StateListener */
+ //@{
+
+ virtual
+ void on_creation (
+ const ::UL_ResetTopicTest & datum,
+ const ::CCM_DDS::ReadInfo & info);
+
+ virtual
+ void on_one_update (
+ const ::UL_ResetTopicTest & datum,
+ const ::CCM_DDS::ReadInfo & info);
+
+ virtual
+ void on_many_updates (
+ const ::UL_ResetTopicTestSeq & data,
+ const ::CCM_DDS::ReadInfoSeq & infos);
+
+ virtual
+ void on_deletion (
+ const ::UL_ResetTopicTest & datum,
+ const ::CCM_DDS::ReadInfo & info);
+ //@}
+
+ private:
+ ::UL_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ Atomic_Boolean &samples_received_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: info_out_state_status_exec_i
+ */
+
+ class info_out_state_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ info_out_state_status_exec_i (
+ ::UL_ResetTopic::CCM_Receiver_Context_ptr ctx);
+ virtual ~info_out_state_status_exec_i (void);
+
+ /** @name Operations and attributes from CCM_DDS::PortStatusListener */
+ //@{
+
+ virtual
+ void on_requested_deadline_missed (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (
+ ::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::UL_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ class Receiver_exec_i
+ : public virtual Receiver_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Receiver_exec_i (void);
+ virtual ~Receiver_exec_i (void);
+
+ /** @name Supported operations and attributes. */
+ //@{
+
+ virtual void set_new_topic (
+ const char * topic_name);
+
+ //@}
+
+ /** @name Component attributes and port operations. */
+ //@{
+
+ virtual ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_StateListener_ptr
+ get_info_out_state_data_listener (void);
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_info_out_state_status (void);
+
+ virtual ::CORBA::UShort iterations (
+ void);
+
+ virtual void iterations (
+ ::CORBA::UShort iterations);
+ //@}
+
+ /** @name 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);
+ //@}
+
+ /** @name User defined public operations. */
+ //@{
+
+ //@}
+
+ private:
+ ::UL_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+
+ /** @name Component attributes. */
+ //@{
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_StateListener_var ciao_info_out_state_data_listener_;
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_info_out_state_status_;
+
+ ::CORBA::UShort iterations_;
+ //@}
+
+ /** @name User defined members. */
+ //@{
+ Atomic_Boolean samples_received_;
+ //@}
+
+ /** @name User defined private operations. */
+ //@{
+ void set_new_topic (::CORBA::Object_ptr cmp,
+ const char * topic_name);
+
+ //@}
+ };
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_UL_ResetTopic_Receiver_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/SenderDriver.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/SenderDriver.cpp
new file mode 100644
index 00000000000..188954c8b23
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/SenderDriver.cpp
@@ -0,0 +1,88 @@
+//$Id$
+/*
+ * @file SenderDriver.cpp
+ *
+ * @author Marcel Smit
+ */
+
+
+#include "UL_ResetTopic_SenderC.h"
+#include "ace/streams.h"
+#include "ace/Get_Opt.h"
+
+const ACE_TCHAR *sender_ior = ACE_TEXT ("file://Sender.ior");
+const ACE_TCHAR *topic_name = ACE_TEXT ("");
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:n:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ sender_ior = get_opts.opt_arg ();
+ break;
+
+ case 'n':
+ topic_name = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Sender IOR> (default is file://Sender.ior)\n"
+ "-n <new topic>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ }
+
+ return 0;
+}
+
+
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ try
+ {
+ // initialize the ORB
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+ if (parse_args (argc, argv) != 0)
+ {
+ return -1;
+ }
+
+ // create the factory object reference,
+ CORBA::Object_var sender_obj =
+ orb->string_to_object (sender_ior);
+
+ // downcast the object reference to the appropriate type
+ ::UL_ResetTopic::Sender_var sender =
+ ::UL_ResetTopic::Sender::_narrow (sender_obj.in ());
+
+ if (CORBA::is_nil (sender.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to acquire 'Sender' objref\n"),
+ -1);
+ }
+ sender->set_new_topic (topic_name);
+
+ orb->destroy ();
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Who is the culprit in the SenderDriver?\n");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Uncaught CORBA exception\n"),
+ 1);
+ }
+ return 0;
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.idl
new file mode 100644
index 00000000000..2e17d246e34
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.idl
@@ -0,0 +1,31 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ *
+ * by-hand idl3 translation of sender components.
+ */
+
+#ifndef UL_RESETTOPIC_SENDER_IDL
+#define UL_RESETTOPIC_SENDER_IDL
+
+#include "Connector/UL_ResetTopic_Connector.idl"
+
+module UL_ResetTopic
+{
+ interface ChangeTopicInterface
+ {
+ void set_new_topic (in string topic_name);
+ };
+
+ component Sender supports ChangeTopicInterface
+ {
+ port UL_ResetTopicTestConnector::DDS_Update info_update;
+
+ attribute unsigned short iterations;
+ attribute unsigned short keys;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.mpc
new file mode 100644
index 00000000000..d8f536e893c
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender.mpc
@@ -0,0 +1,166 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p UL_ResetTopicBase -l ../lib -o ../lib -c controller -u DDS Sender"
+
+project (UL_ResetTopicSender_idl_gen) : componentidldefaults, dds4ccm {
+ after += UL_ResetTopicConnector_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 {
+ UL_ResetTopic_Sender.idl
+ }
+}
+
+project (UL_ResetTopicSender_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += UL_ResetTopicSender_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 {
+ UL_ResetTopic_SenderE.idl
+ }
+}
+
+project (UL_ResetTopicSender_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += UL_ResetTopicSender_lem_gen UL_ResetTopicSender_stub UL_ResetTopicBase_stub
+ libs += UL_ResetTopicBase_stub Sender_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Sender_lem_stub
+ dynamicflags += SENDER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_SenderEC.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_SenderEC.h
+ Sender_lem_stub_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_SenderEC.inl
+ }
+}
+
+project (UL_ResetTopicSender_stub) : ccm_stub, dds4ccm_base {
+ after += UL_ResetTopicSender_idl_gen UL_ResetTopicBase_stub UL_ResetTopicConnector_stub
+ libs += UL_ResetTopicBase_stub UL_ResetTopicConnector_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = Sender_stub
+ dynamicflags += SENDER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_SenderC.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_SenderC.h
+ Sender_stub_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_SenderC.inl
+ }
+}
+
+project (UL_ResetTopicSender_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += UL_ResetTopicSender_lem_stub UL_ResetTopicSender_stub \
+ UL_ResetTopicConnector_lem_stub UL_ResetTopicConnector_stub
+ sharedname = Sender_exec
+ libs += Sender_stub Sender_lem_stub UL_ResetTopicBase_stub \
+ UL_ResetTopicConnector_lem_stub UL_ResetTopicConnector_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags += SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_Sender_exec.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_Sender_exec.h
+ Sender_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (UL_ResetTopicSender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += UL_ResetTopicBase_stub UL_ResetTopicSender_lem_stub UL_ResetTopicConnector_stub \
+ UL_ResetTopicConnector_svnt UL_ResetTopicConnector_lem_stub
+ sharedname = Sender_svnt
+ libs += Sender_stub Sender_lem_stub \
+ UL_ResetTopicBase_stub UL_ResetTopicConnector_stub UL_ResetTopicConnector_svnt UL_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += SENDER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ UL_ResetTopic_SenderS.cpp
+ UL_ResetTopic_Sender_svnt.cpp
+ }
+
+ Header_Files {
+ UL_ResetTopic_SenderS.h
+ UL_ResetTopic_Sender_svnt.h
+ Sender_svnt_export.h
+ }
+
+ Inline_Files {
+ UL_ResetTopic_SenderS.inl
+ }
+}
+
+project (UL_ResetTopicSender_Driver) : ccm_stub, valuetype, dds4ccm_lem_stub {
+ exename = SenderDriver
+ after += UL_ResetTopicSender_stub UL_ResetTopicConnector_stub
+ libs += Sender_stub UL_ResetTopicBase_stub UL_ResetTopicConnector_stub
+
+ includes += ..
+ libpaths += ../lib
+
+ exeout = ../lib
+ IDL_Files {
+ }
+
+ Source_Files {
+ SenderDriver.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.cpp
new file mode 100644
index 00000000000..28a53498b03
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.cpp
@@ -0,0 +1,335 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+#include "UL_ResetTopic_Sender_exec.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+namespace CIAO_UL_ResetTopic_Sender_Impl
+{
+
+ /**
+ * Timeout_Handler
+ */
+
+ Timeout_Handler::Timeout_Handler (Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ Timeout_Handler::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ // Notify the subscribers
+ this->callback_.start_event_test ();
+ return 0;
+ }
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ Sender_exec_i::Sender_exec_i (void)
+ : iterations_ (0)
+ , keys_ (0)
+ , to_handler_ (0)
+ , topic_name_ ("TopicI")
+ , old_topic_name_ ("TopicI")
+ {
+ ACE_NEW_THROW_EX (this->to_handler_,
+ Timeout_Handler (*this),
+ ::CORBA::INTERNAL ());
+ }
+
+ Sender_exec_i::~Sender_exec_i (void)
+ {
+ delete this->to_handler_;
+ }
+
+ // Supported operations and attributes.
+ ACE_Reactor*
+ Sender_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ void Sender_exec_i::create_samples (void)
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, _guard,
+ this->keys_lock_);
+
+ for (CORBA::UShort i = 1; i < this->keys_ + 1; ++i)
+ {
+ char key[7];
+ UL_ResetTopicTest *new_key = new UL_ResetTopicTest;
+ ACE_OS::sprintf (key, "KEY_%d", i);
+ new_key->key = CORBA::string_dup(key);
+ new_key->iteration = 0;
+ this->tests_[key] = new_key;
+
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data();
+
+ updater->create_one (*new_key);
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::create_samples - "
+ "Sample <%C> created\n",
+ key));
+ }
+ this->last_key_ = this->tests_.begin ();
+ }
+
+ void Sender_exec_i::set_new_topic (const char * topic_name)
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+
+ this->old_topic_name_ = this->topic_name_;
+ this->topic_name_ = topic_name;
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_new_topic - "
+ "New topic name set <%C>\n",
+ topic_name));
+ }
+
+ void
+ Sender_exec_i::set_topic_name_updater (const char * topic_name)
+ {
+ try
+ {
+ if (ACE_OS::strcmp (topic_name, this->old_topic_name_.c_str()) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_updater - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ this->old_topic_name_ = topic_name;
+ ::UL_ResetTopic::UL_ResetTopicTestConnector:: Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data ();
+ if (::CORBA::is_nil (updater.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to get updater interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::CORBA::Object_var cmp = updater->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_DDS_State_var conn =
+ ::UL_ResetTopic::UL_ResetTopicTestConnector::CCM_DDS_State::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_updater - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+ conn->topic_name (topic_name);
+ }
+ this->create_samples ();
+ }
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Caught NonChangeable exception.\n"));
+ }
+ }
+
+ void
+ Sender_exec_i::start_event_test (void)
+ {
+ // Set the topic name on the connector first. Therefor we need to
+ // get to the connector first.
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - Start\n"));
+ try
+ {
+ if (this->last_key_ != this->tests_.end ())
+ {
+ try
+ {
+ this->set_topic_name_updater (this->topic_name_.c_str ());
+ ::UL_ResetTopic::UL_ResetTopicTestConnector:: Updater_var updater =
+ this->ciao_context_->get_connection_info_update_data ();
+
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->keys_lock_)
+ ++this->last_key_->second->iteration;
+ updater->update_one (this->last_key_->second, ::DDS::HANDLE_NIL);
+
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Updated key <%C> with <%d>\n"),
+ this->last_key_->first.c_str (),
+ this->last_key_->second->iteration));
+ }
+ }
+ catch (const CCM_DDS::InternalError& )
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Internal Error while writing KeyedTest info for <%C>.\n",
+ this->last_key_->first.c_str ()));
+ }
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->keys_lock_)
+ ++this->last_key_;
+ }
+ }
+ else
+ {
+ // Onto the next iteration
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->keys_lock_)
+ this->last_key_ = this->tests_.begin ();
+ while (this->last_key_ != this->tests_.end ())
+ {
+ if (this->last_key_->second->iteration == this->iterations_)
+ {
+ ++this->last_key_;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+ catch (const ::CORBA::Exception & ex)
+ {
+ ex._tao_print_exception("ERROR:");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "Sender_exec_i::start_event_test - "
+ "ERROR: Unexpected and unknown exception caught.\n"));
+ }
+ }
+
+ // Component attributes and port operations.
+
+ ::CORBA::UShort
+ Sender_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Sender_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ ::CORBA::UShort
+ Sender_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Sender_exec_i::keys (
+ const ::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Sender_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::UL_ResetTopic::CCM_Sender_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Sender_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Sender_exec_i::ccm_activate (void)
+ {
+ this->create_samples ();
+
+ if (this->reactor ()->schedule_timer (
+ this->to_handler_,
+ 0,
+ ACE_Time_Value (2, 0),
+ ACE_Time_Value (0, 500000)) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ")
+ ACE_TEXT ("Error scheduling timer")));
+ }
+ }
+
+ void
+ Sender_exec_i::ccm_passivate (void)
+ {
+ this->reactor()->cancel_timer(this->to_handler_);
+ }
+
+ void
+ Sender_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_UL_ResetTopic_Sender_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Sender_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.h
new file mode 100644
index 00000000000..9bf485bdaa8
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/Sender/UL_ResetTopic_Sender_exec.h
@@ -0,0 +1,148 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_UL_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+#define CIAO_UL_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+
+#include /**/ "ace/pre.h"
+
+#include "UL_ResetTopic_SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+
+#include <map>
+
+namespace CIAO_UL_ResetTopic_Sender_Impl
+{
+ class Sender_exec_i;
+
+ /**
+ * Timeout_Handler
+ */
+ class Timeout_Handler :
+ public ACE_Event_Handler
+ {
+ public:
+ Timeout_Handler (Sender_exec_i &callback);
+ /// Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+ private:
+ /// Maintains a handle that actually process the event
+ Sender_exec_i &callback_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ class Sender_exec_i
+ : public virtual Sender_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Sender_exec_i (void);
+ virtual ~Sender_exec_i (void);
+
+ //@{
+ /** Supported operations and attributes. */
+ virtual void set_new_topic (const char * topic_name);
+ //@}
+
+ //@{
+ /** Component attributes and port operations. */
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+
+ virtual void keys (::CORBA::UShort keys);
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+ void set_topic_name_updater (const char * topic_name);
+ void start_event_test (void);
+ //@}
+
+ private:
+ ::UL_ResetTopic::CCM_Sender_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+
+ ::CORBA::UShort iterations_;
+
+ ::CORBA::UShort keys_;
+ //@}
+
+ //@{
+ /** User defined members. */
+ Timeout_Handler *to_handler_;
+ ACE_CString topic_name_, old_topic_name_;
+
+ TAO_SYNCH_RECURSIVE_MUTEX topic_name_lock_;
+ TAO_SYNCH_RECURSIVE_MUTEX keys_lock_;
+
+ typedef std::map<ACE_CString, UL_ResetTopicTest_var> Sample_Table;
+
+ Sample_Table tests_;
+ Sample_Table::iterator last_key_;
+
+ //@}
+
+ //@{
+ /** User defined private operations. */
+ void create_samples (void);
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
+ };
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_UL_ResetTopic_Sender_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/Plan.cdp
new file mode 100644
index 00000000000..599fe92554a
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/Plan.cdp
@@ -0,0 +1,407 @@
+<!-- $Id$ -->
+<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>ResetTopic_Depl_1</label>
+ <UUID>ResetTopic_Depl_1</UUID>
+
+ <implementation xmi:id="ReceiverComponentImplementation">
+ <name>ReceiverComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_UL_ResetTopic_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_UL_ResetTopic_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="ResetTopic_StateConnectorImplementation">
+ <name>ResetTopic_StateConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_UL_ResetTopic_UL_ResetTopicTestConnector_DDS_State_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_UL_ResetTopic_UL_ResetTopicTestConnector_DDS_State_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>UL_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>UL_ResetTopic_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>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_UL_ResetTopic_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_UL_ResetTopic_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>
+ <source/>
+ <implementation xmi:idref="ReceiverComponentImplementation" />
+ <configProperty>
+ <name>iterations</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>10</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver.ior</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_SenderStateConnectorInstance">
+ <name>ResetTopic_SenderStateConnectorInstance</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_StateConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_ReceiverStateConnectorInstance">
+ <name>ResetTopic_ReceiverStateConnectorInstance</name>
+ <node>ReceiverNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_StateConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderComponentInstance">
+ <name>SenderComponent</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="SenderComponentImplementation" />
+ <configProperty>
+ <name>rate</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>15</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <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>
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender.ior</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>state_listener</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_out_state_data_listener</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_state_observer_data_listener</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ResetTopic_ReceiverStateConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>state_reader_listener</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_out_state_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_state_observer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_ReceiverStateConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>state_datacontrol</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_out_state_data_control</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_state_observer_data_control</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_ReceiverStateConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>updater_connection</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_update_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="SenderComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>observable_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_SenderStateConnectorInstance" />
+ </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="ResetTopic_Connector_ExecArtifact">
+ <name>UL_ResetTopic_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>UL_ResetTopicConnector_exec</location>
+ </artifact>
+ <artifact xmi:id="ResetTopic_Connector_SvntArtifact">
+ <name>UL_ResetTopic_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>UL_ResetTopicConnector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_StubArtifact">
+ <name>Receiver_stub</name>
+ <source/>
+ <node/>
+ <location>Receiver_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/run_test.pl
new file mode 100755
index 00000000000..0d55bfd5fdc
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/UpdateListen/descriptors/run_test.pl
@@ -0,0 +1,281 @@
+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 = ( "ReceiverNode.ior", "SenderNode.ior" );
+@iorfiles = 0;
+@nodenames = ( "ReceiverNode", "SenderNode" );
+
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+sub create_targets {
+ # naming service
+ $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+ $tg_naming->AddLibPath ('../lib');
+ # daemon
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n";
+ $tg_daemons[$i]->AddLibPath ('../lib');
+ }
+ # execution manager
+ $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n";
+ $tg_exe_man->AddLibPath ('../lib');
+ # executor (plan_launcher)
+ $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n";
+ $tg_executor->AddLibPath ('../lib');
+}
+
+sub init_ior_files {
+ $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase);
+ $ior_emfile = $tg_exe_man->LocalFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+ delete_ior_files ();
+}
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i]->DeleteFile ($iorbases[$i]);
+ }
+ $tg_naming->DeleteFile ($ior_nsbase);
+ $tg_exe_man->DeleteFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+}
+
+sub kill_node_daemon {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemon ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill (); $EM->TimedWait (1);
+ }
+
+ if ($ns_running == 1) {
+ $NS->Kill (); $NS->TimedWait (1);
+ }
+ # in case shutdown did not perform as expected
+ $tg_executor->KillAll ('dance_locality_manager');
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $DEAMONS[$i]->Spawn ();
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$ns_status = $NS->Spawn ();
+
+if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$em_status = $EM->Spawn ();
+
+if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+}
+
+if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - launch the application -\n";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 10 seconds before changing topic name\n";
+sleep (10);
+
+$R = $tg_executor->CreateProcess ("../lib/ReceiverDriver", "-n TopicII");
+$driver_status = $R->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-n TopicII");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before changing topic name\n";
+sleep (10);
+
+$R = $tg_executor->CreateProcess ("../lib/ReceiverDriver", "-n TopicIII");
+$driver_status = $R->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-n TopicIII");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before stopping\n";
+sleep (10);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
+
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -s");
+$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.idl
new file mode 100644
index 00000000000..d98bb51c419
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file WL_ResetTopic_Base.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef WL_RESETTOPIC_BASE_IDL
+#define WL_RESETTOPIC_BASE_IDL
+
+#pragma ndds typesupport "Base/WL_ResetTopic_BaseSupport.h"
+
+#pragma DCPS_DATA_TYPE "WL_ResetTopicTest"
+#pragma DCPS_DATA_KEY "WL_ResetTopicTest key"
+
+struct WL_ResetTopicTest {
+ string key; //@key
+ long iteration;
+};
+
+typedef sequence<WL_ResetTopicTest> WL_ResetTopicTestSeq;
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.mpc
new file mode 100644
index 00000000000..7d4c393fe03
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Base/WL_ResetTopic_Base.mpc
@@ -0,0 +1,26 @@
+// $Id$
+
+project (WL_ResetTopicBase_stub) : taoidldefaults, dds4ccm_ts_default {
+ sharedname = WL_ResetTopicBase_stub
+ dynamicflags += WL_RESETTOPIC_BASE_STUB_BUILD_DLL
+ libout = ../lib
+
+ idlflags += -SS -Sci \
+ -Wb,stub_export_macro=WL_RESETTOPIC_BASE_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Base_stub_export.h
+
+ IDL_Files {
+ idlflags += -Gxhst
+ WL_ResetTopic_Base.idl
+ }
+
+ opendds_ts_flags += --export=WL_RESETTOPIC_BASE_STUB_Export
+
+ DDSGenerator_Files {
+ WL_ResetTopic_Base.idl
+ }
+
+ Source_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.idl
new file mode 100644
index 00000000000..458104748f6
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.idl
@@ -0,0 +1,23 @@
+// $Id$
+
+/**
+ * @file WL_ResetTopic_Connector.idl
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef WL_RESETTOPIC_CONNECTOR_IDL_
+#define WL_RESETTOPIC_CONNECTOR_IDL_
+
+#include <Components.idl>
+#include <ccm_dds.idl>
+
+#include "Base/WL_ResetTopic_Base.idl"
+
+#pragma ciao lem "Connector/WL_ResetTopic_ConnectorE.idl"
+
+module WL_ResetTopic
+{
+ module ::CCM_DDS::Typed < ::WL_ResetTopicTest, ::WL_ResetTopicTestSeq> WL_ResetTopicTestConnector;
+};
+
+#endif /* WL_ResetTopic_CONNECTOR_IDL_ */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.mpc
new file mode 100644
index 00000000000..62db2b36ac7
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Connector/WL_ResetTopic_Connector.mpc
@@ -0,0 +1,148 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p WL_ResetTopicBase -l .. -o ../lib -u DDS WL_ResetTopic_Connector"
+
+project (WL_ResetTopicConnector_idl_gen) : connectoridldefaults, dds4ccm {
+ after += DDS4CCM_idl_gen
+ custom_only = 1
+ idlflags += -Wb,stub_export_macro=WL_RESETTOPIC_CONNECTOR_STUB_Export \
+ -Wb,stub_export_include=ResetTopic_Connector_stub_export.h \
+ -Wb,skel_export_macro=WL_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,skel_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,svnt_export_macro=WL_RESETTOPIC_CONNECTOR_SVNT_Export \
+ -Wb,svnt_export_include=ResetTopic_Connector_svnt_export.h \
+ -Wb,conn_export_macro=WL_RESETTOPIC_CONNECTOR_CONN_Export \
+ -Wb,conn_export_include=ResetTopic_Connector_conn_export.h \
+ -I ..
+
+ IDL_Files {
+ WL_ResetTopic_Connector.idl
+ }
+}
+
+project (WL_ResetTopicConnector_lem_gen) : ciaoidldefaults, dds4ccm {
+ custom_only = 1
+ after += WL_ResetTopicConnector_idl_gen
+ idlflags += -Wb,stub_export_macro=WL_RESETTOPIC_CONNECTOR_LEM_STUB_Export \
+ -Wb,stub_export_include=WL_ResetTopic_Connector_lem_stub_export.h \
+ -SS -Gxhst \
+ -I ..
+
+ IDL_Files {
+ WL_ResetTopic_ConnectorE.idl
+ }
+}
+
+project (WL_ResetTopicConnector_lem_stub) : ccm_svnt, dds4ccm_lem_stub {
+ after += WL_ResetTopicConnector_lem_gen WL_ResetTopicConnector_stub \
+ WL_ResetTopicBase_stub
+ libs += WL_ResetTopicBase_stub WL_ResetTopicConnector_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = WL_ResetTopicConnector_lem_stub
+ dynamicflags += WL_RESETTOPIC_CONNECTOR_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_ConnectorEC.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_ConnectorEC.h
+ WL_ResetTopic_Connector_lem_stub_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_ConnectorEC.inl
+ }
+}
+
+project (WL_ResetTopicConnector_stub) : ccm_stub, dds4ccm_base {
+ after += WL_ResetTopicConnector_idl_gen WL_ResetTopicBase_stub
+ libs += WL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = WL_ResetTopicConnector_stub
+ dynamicflags += WL_RESETTOPIC_CONNECTOR_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_ConnectorC.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_ConnectorC.h
+ WL_ResetTopic_Connector_stub_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_ConnectorC.inl
+ }
+}
+
+project (WL_ResetTopicConnector_exec) : ciao_executor, dds4ccm_impl {
+ after += WL_ResetTopicConnector_lem_stub WL_ResetTopicConnector_stub \
+ WL_ResetTopicBase_stub
+ sharedname = WL_ResetTopicConnector_exec
+ libs += WL_ResetTopicConnector_stub WL_ResetTopicConnector_lem_stub \
+ WL_ResetTopicBase_stub WL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += WL_RESETTOPIC_CONNECTOR_CONN_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_Connector_conn.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_Connector_conn.h
+ WL_ResetTopic_Connector_conn_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (WL_ResetTopicConnector_svnt) : ciao_servant, dds4ccm_impl {
+ after += WL_ResetTopicConnector_lem_stub WL_ResetTopicConnector_exec \
+ WL_ResetTopicConnector_stub
+ sharedname = WL_ResetTopicConnector_svnt
+ libs += WL_ResetTopicConnector_stub \
+ WL_ResetTopicConnector_lem_stub \
+ WL_ResetTopicBase_stub \
+ WL_ResetTopicConnector_exec
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += WL_RESETTOPIC_CONNECTOR_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_ConnectorS.cpp
+ WL_ResetTopic_Connector_svnt.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_ConnectorS.h
+ WL_ResetTopic_Connector_svnt.h
+ WL_ResetTopic_Connector_svnt_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_ConnectorS.inl
+ }
+}
+
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/ReceiverDriver.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/ReceiverDriver.cpp
new file mode 100644
index 00000000000..9f0535437c9
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/ReceiverDriver.cpp
@@ -0,0 +1,88 @@
+//$Id$
+/*
+ * @file ReceiverDriver.cpp
+ *
+ * @author Marcel Smit
+ */
+
+
+#include "WL_ResetTopic_ReceiverC.h"
+#include "ace/streams.h"
+#include "ace/Get_Opt.h"
+
+const ACE_TCHAR *receiver_ior = ACE_TEXT ("file://Receiver.ior");
+const ACE_TCHAR *topic_name = ACE_TEXT ("");
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:n:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ receiver_ior = get_opts.opt_arg ();
+ break;
+
+ case 'n':
+ topic_name = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Receiver IOR> (default is file://Receiver.ior)\n"
+ "-n <new topic>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ }
+
+ return 0;
+}
+
+
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ try
+ {
+ // initialize the ORB
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+ if (parse_args (argc, argv) != 0)
+ {
+ return -1;
+ }
+
+ // create the factory object reference,
+ CORBA::Object_var receiver_obj =
+ orb->string_to_object (receiver_ior);
+
+ // downcast the object reference to the appropriate type
+ ::WL_ResetTopic::Receiver_var receiver =
+ ::WL_ResetTopic::Receiver::_narrow (receiver_obj.in ());
+
+ if (CORBA::is_nil (receiver.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to acquire 'Receiver' objref\n"),
+ -1);
+ }
+ receiver->set_new_topic (topic_name);
+
+ orb->destroy ();
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Who is the culprit in the ReceiverDriver?\n");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Uncaught CORBA exception\n"),
+ 1);
+ }
+ return 0;
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.idl
new file mode 100644
index 00000000000..439c960b511
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.idl
@@ -0,0 +1,28 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ */
+
+#ifndef RECEIVER_IDL
+#define RECEIVER_IDL
+
+#include "Connector/WL_ResetTopic_Connector.idl"
+
+module WL_ResetTopic
+{
+ interface ChangeTopicInterface
+ {
+ void set_new_topic (in string topic_name);
+ };
+
+ component Receiver supports ChangeTopicInterface
+ {
+ port WL_ResetTopicTestConnector::DDS_Listen info_out_event;
+
+ attribute unsigned short iterations;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.mpc
new file mode 100644
index 00000000000..bd7eb36429a
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver.mpc
@@ -0,0 +1,163 @@
+// $Id$
+
+project (WL_ResetTopicReceiver_idl_gen) : componentidldefaults, dds4ccm {
+ custom_only = 1
+ after += WL_ResetTopicConnector_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 {
+ WL_ResetTopic_Receiver.idl
+ }
+}
+
+project (WL_ResetTopicReceiver_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += WL_ResetTopicReceiver_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 {
+ WL_ResetTopic_ReceiverE.idl
+ }
+}
+
+project (WL_ResetTopicReceiver_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += WL_ResetTopicReceiver_lem_gen WL_ResetTopicReceiver_stub WL_ResetTopicConnector_stub WL_ResetTopicBase_stub
+ libs += Receiver_stub WL_ResetTopicConnector_stub WL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_lem_stub
+ dynamicflags += RECEIVER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_ReceiverEC.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_ReceiverEC.h
+ Receiver_lem_stub_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_ReceiverEC.inl
+ }
+}
+
+project (WL_ResetTopicReceiver_stub) : ccm_stub, dds4ccm_base {
+ after += WL_ResetTopicReceiver_idl_gen WL_ResetTopicConnector_stub WL_ResetTopicBase_stub WL_ResetTopicConnector_lem_gen
+ libs += WL_ResetTopicConnector_stub WL_ResetTopicBase_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Receiver_stub
+ dynamicflags += RECEIVER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_ReceiverC.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_ReceiverC.h
+ Receiver_stub_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_ReceiverC.inl
+ }
+}
+
+project (WL_ResetTopicReceiver_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += WL_ResetTopicReceiver_lem_stub WL_ResetTopicReceiver_stub \
+ WL_ResetTopicBase_stub WL_ResetTopicConnector_stub \
+ WL_ResetTopicConnector_lem_stub
+ sharedname = Receiver_exec
+ libs += Receiver_stub Receiver_lem_stub WL_ResetTopicBase_stub \
+ WL_ResetTopicConnector_stub WL_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RECEIVER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_Receiver_exec.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_Receiver_exec.h
+ Receiver_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (WL_ResetTopicReceiver_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += WL_ResetTopicReceiver_lem_stub WL_ResetTopicBase_stub WL_ResetTopicConnector_stub WL_ResetTopicConnector_svnt WL_ResetTopicReceiver_exec WL_ResetTopicConnector_lem_stub
+ sharedname = Receiver_svnt
+ libs += Receiver_stub Receiver_lem_stub WL_ResetTopicBase_stub WL_ResetTopicConnector_stub WL_ResetTopicConnector_svnt Receiver_exec WL_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += RECEIVER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_ReceiverS.cpp
+ WL_ResetTopic_Receiver_svnt.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_ReceiverS.h
+ WL_ResetTopic_Receiver_svnt.h
+ Receiver_svnt_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_ReceiverS.inl
+ }
+}
+
+project (WL_ResetTopicReceiver_Driver) : ccm_stub, valuetype, dds4ccm_lem_stub {
+ exename = ReceiverDriver
+ after += WL_ResetTopicReceiver_stub WL_ResetTopicConnector_stub
+ libs += Receiver_stub WL_ResetTopicBase_stub WL_ResetTopicConnector_stub
+
+ includes += ..
+ libpaths += ../lib
+
+ exeout = ../lib
+ IDL_Files {
+ }
+
+ Source_Files {
+ ReceiverDriver.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.cpp
new file mode 100644
index 00000000000..8acf6fbead4
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.cpp
@@ -0,0 +1,309 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+#include "WL_ResetTopic_Receiver_exec.h"
+#include "dds4ccm/impl/logger/Log_Macros.h"
+
+namespace CIAO_WL_ResetTopic_Receiver_Impl
+{
+
+ /**
+ * Facet Executor Implementation Class: info_out_event_data_listener_exec_i
+ */
+
+ info_out_event_data_listener_exec_i::info_out_event_data_listener_exec_i (
+ ::WL_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ Atomic_Boolean &samples_received)
+ : ciao_context_ (
+ ::WL_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ , samples_received_(samples_received)
+ {
+ }
+
+ info_out_event_data_listener_exec_i::~info_out_event_data_listener_exec_i (void)
+ {
+ }
+
+ // Operations from ::WL_ResetTopic::WL_ResetTopicTestConnector::Listener
+
+ void
+ info_out_event_data_listener_exec_i::on_one_data (const ::WL_ResetTopicTest & datum,
+ const ::CCM_DDS::ReadInfo & /* info */)
+ {
+ this->samples_received_ = true;
+ ACE_DEBUG ((LM_ERROR, ACE_TEXT ("info_out_event_data_listener_exec_i::on_one_data - ")
+ ACE_TEXT ("received data for <%C> at %u\n"),
+ datum.key.in (),
+ datum.iteration));
+ }
+
+ void
+ info_out_event_data_listener_exec_i::on_many_data (const ::WL_ResetTopicTestSeq & /* data */,
+ const ::CCM_DDS::ReadInfoSeq & /* infos */)
+ {
+ ACE_ERROR ((LM_ERROR, "info_out_event_data_listener_exec_i::on_many_data : "
+ "Error: No callback to this method expected.\n"));
+ }
+
+ /**
+ * Facet Executor Implementation Class: info_out_event_status_exec_i
+ */
+
+ info_out_event_status_exec_i::info_out_event_status_exec_i (
+ ::WL_ResetTopic::CCM_Receiver_Context_ptr ctx)
+ : ciao_context_ (
+ ::WL_ResetTopic::CCM_Receiver_Context::_duplicate (ctx))
+ {
+ }
+
+ info_out_event_status_exec_i::~info_out_event_status_exec_i (void)
+ {
+ }
+
+ // Operations from ::CCM_DDS::PortStatusListener
+
+ void
+ info_out_event_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::RequestedDeadlineMissedStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+ void
+ info_out_event_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */,
+ const ::DDS::SampleLostStatus & /* status */)
+ {
+ /* Your code here. */
+ }
+
+
+
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ Receiver_exec_i::Receiver_exec_i (void)
+ : iterations_ (0)
+ , samples_received_(0)
+ {
+ }
+
+ Receiver_exec_i::~Receiver_exec_i (void)
+ {
+ }
+
+ // Supported operations and attributes.
+ void
+ Receiver_exec_i::set_new_topic (::CORBA::Object_ptr cmp,
+ const char * topic_name)
+ {
+ if (::CORBA::is_nil (cmp))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_topic_name_writer - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_DDS_Event_var conn =
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_DDS_Event::_narrow (cmp);
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_topic_name_writer - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ conn->topic_name (topic_name);
+
+// ::CCM_DDS::DataListenerControl_var dlc =
+// this->ciao_context_->get_connection_info_out_event_data_control ();
+// dlc->mode (::CCM_DDS::ONE_BY_ONE);
+ }
+
+ void
+ Receiver_exec_i::set_new_topic (const char * topic_name)
+ {
+
+ if (this->samples_received_.value())
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::set_new_topic - "
+ "OK, samples received during last run\n"));
+ else
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::set_new_topic - "
+ "ERROR: No samples received during last run\n"));
+
+ this->samples_received_ = false;
+
+ ::CORBA::Object_var cmp;
+ try
+ {
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::set_new_topic - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ //First listener
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::Reader_var reader =
+ this->ciao_context_->get_connection_info_out_event_data();
+
+ if (::CORBA::is_nil (reader.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_new_topic - "
+ "ciao_info_out_event_data_listener_ seems nil\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ cmp = reader->_get_component ();
+ this->set_new_topic (cmp.in (), topic_name);
+
+ //next listener
+ if (::CORBA::is_nil (this->ciao_info_out_event_status_.in ()))
+ {
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::set_new_topic - "
+ "ciao_info_out_event_status_ seems nil\n"));
+ }
+ else
+ {
+ cmp = this->ciao_info_out_event_status_->_get_component ();
+ this->set_new_topic (cmp.in (), topic_name);
+ }
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Receiver_exec_i::set_topic_name_writer - "
+ "Caught NonChangeable exception.\n"));
+ }
+ }
+
+ // Component attributes and port operations.
+
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_Listener_ptr
+ Receiver_exec_i::get_info_out_event_data_listener (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_info_out_event_data_listener_.in ()))
+ {
+ info_out_event_data_listener_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ info_out_event_data_listener_exec_i (
+ this->ciao_context_.in (),
+ this->samples_received_),
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_Listener::_nil ());
+
+ this->ciao_info_out_event_data_listener_ = tmp;
+ }
+
+ return
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_Listener::_duplicate (
+ this->ciao_info_out_event_data_listener_.in ());
+ }
+
+ ::CCM_DDS::CCM_PortStatusListener_ptr
+ Receiver_exec_i::get_info_out_event_status (void)
+ {
+ if ( ::CORBA::is_nil (this->ciao_info_out_event_status_.in ()))
+ {
+ info_out_event_status_exec_i *tmp = 0;
+ ACE_NEW_RETURN (
+ tmp,
+ info_out_event_status_exec_i (
+ this->ciao_context_.in ()),
+ ::CCM_DDS::CCM_PortStatusListener::_nil ());
+
+ this->ciao_info_out_event_status_ = tmp;
+ }
+
+ return
+ ::CCM_DDS::CCM_PortStatusListener::_duplicate (
+ this->ciao_info_out_event_status_.in ());
+ }
+
+ ::CORBA::UShort
+ Receiver_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Receiver_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Receiver_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::WL_ResetTopic::CCM_Receiver_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Receiver_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Receiver_exec_i::ccm_activate (void)
+ {
+ ::CCM_DDS::DataListenerControl_var dlc =
+ this->ciao_context_->get_connection_info_out_event_data_control ();
+ dlc->mode (::CCM_DDS::ONE_BY_ONE);
+ }
+
+ void
+ Receiver_exec_i::ccm_passivate (void)
+ {
+ }
+
+ void
+ Receiver_exec_i::ccm_remove (void)
+ {
+ if (this->samples_received_.value())
+ ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::ccm_remove - "
+ "OK, samples received during last run\n"));
+ else
+ ACE_ERROR ((LM_ERROR, "Receiver_exec_i::ccm_remove - "
+ "ERROR: No samples received during last run\n"));
+ }
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_WL_ResetTopic_Receiver_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Receiver_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.h
new file mode 100644
index 00000000000..3bcf2cf692d
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Receiver/WL_ResetTopic_Receiver_exec.h
@@ -0,0 +1,181 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_WL_RESETTOPIC_RECEIVER_EXEC_KKU0OW_H_
+#define CIAO_WL_RESETTOPIC_RECEIVER_EXEC_KKU0OW_H_
+
+#include /**/ "ace/pre.h"
+
+#include "WL_ResetTopic_ReceiverEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Receiver_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO_WL_ResetTopic_Receiver_Impl
+{
+ typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean> Atomic_Boolean;
+
+ /**
+ * Provider Executor Implementation Class: info_out_event_data_listener_exec_i
+ */
+
+ class info_out_event_data_listener_exec_i
+ : public virtual ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_Listener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ info_out_event_data_listener_exec_i (
+ ::WL_ResetTopic::CCM_Receiver_Context_ptr ctx,
+ Atomic_Boolean &samples_received);
+ virtual ~info_out_event_data_listener_exec_i (void);
+
+ //@{
+ /** Operations and attributes from WL_ResetTopic::WL_ResetTopicTestConnector::Listener. */
+
+ virtual
+ void on_one_data (const ::WL_ResetTopicTest & datum,
+ const ::CCM_DDS::ReadInfo & info);
+
+ virtual
+ void on_many_data (const ::WL_ResetTopicTestSeq & data,
+ const ::CCM_DDS::ReadInfoSeq & infos);
+ //@}
+
+ private:
+ ::WL_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ Atomic_Boolean &samples_received_;
+ };
+
+ /**
+ * Provider Executor Implementation Class: info_out_event_status_exec_i
+ */
+
+ class info_out_event_status_exec_i
+ : public virtual ::CCM_DDS::CCM_PortStatusListener,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ info_out_event_status_exec_i (
+ ::WL_ResetTopic::CCM_Receiver_Context_ptr ctx);
+ virtual ~info_out_event_status_exec_i (void);
+
+ //@{
+ /** Operations and attributes from CCM_DDS::PortStatusListener. */
+
+ virtual
+ void on_requested_deadline_missed (::DDS::DataReader_ptr the_reader,
+ const ::DDS::RequestedDeadlineMissedStatus & status);
+
+ virtual
+ void on_sample_lost (::DDS::DataReader_ptr the_reader,
+ const ::DDS::SampleLostStatus & status);
+ //@}
+
+ private:
+ ::WL_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Receiver_exec_i
+ */
+
+ class Receiver_exec_i
+ : public virtual Receiver_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Receiver_exec_i (void);
+ virtual ~Receiver_exec_i (void);
+
+ //@{
+ /** Supported operations and attributes. */
+ virtual void set_new_topic (const char * topic_name);
+ //@}
+
+ //@{
+ /** Component attributes and port operations. */
+
+ virtual ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_Listener_ptr
+ get_info_out_event_data_listener (void);
+
+ virtual ::CCM_DDS::CCM_PortStatusListener_ptr
+ get_info_out_event_status (void);
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+
+ //@}
+
+ private:
+ ::WL_ResetTopic::CCM_Receiver_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_Listener_var ciao_info_out_event_data_listener_;
+ ::CCM_DDS::CCM_PortStatusListener_var ciao_info_out_event_status_;
+
+ ::CORBA::UShort iterations_;
+ //@}
+
+ //@{
+ /** User defined members. */
+ Atomic_Boolean samples_received_;
+
+ //@}
+
+ //@{
+ /** User defined private operations. */
+ void set_new_topic (::CORBA::Object_ptr cmp,
+ const char * topic_name);
+
+ //@}
+ };
+
+ extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_WL_ResetTopic_Receiver_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/SenderDriver.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/SenderDriver.cpp
new file mode 100644
index 00000000000..69163d68adf
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/SenderDriver.cpp
@@ -0,0 +1,88 @@
+//$Id$
+/*
+ * @file SenderDriver.cpp
+ *
+ * @author Marcel Smit
+ */
+
+
+#include "WL_ResetTopic_SenderC.h"
+#include "ace/streams.h"
+#include "ace/Get_Opt.h"
+
+const ACE_TCHAR *sender_ior = ACE_TEXT ("file://Sender.ior");
+const ACE_TCHAR *topic_name = ACE_TEXT ("");
+
+int
+parse_args (int argc, ACE_TCHAR *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:n:"));
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ {
+ switch (c)
+ {
+ case 'k':
+ sender_ior = get_opts.opt_arg ();
+ break;
+
+ case 'n':
+ topic_name = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s\n"
+ "-k <Sender IOR> (default is file://Sender.ior)\n"
+ "-n <new topic>\n"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ }
+
+ return 0;
+}
+
+
+int ACE_TMAIN (int argc, ACE_TCHAR* argv[])
+{
+ try
+ {
+ // initialize the ORB
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv);
+ if (parse_args (argc, argv) != 0)
+ {
+ return -1;
+ }
+
+ // create the factory object reference,
+ CORBA::Object_var sender_obj =
+ orb->string_to_object (sender_ior);
+
+ // downcast the object reference to the appropriate type
+ ::WL_ResetTopic::Sender_var sender =
+ ::WL_ResetTopic::Sender::_narrow (sender_obj.in ());
+
+ if (CORBA::is_nil (sender.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to acquire 'Sender' objref\n"),
+ -1);
+ }
+ sender->set_new_topic (topic_name);
+
+ orb->destroy ();
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Who is the culprit in the SenderDriver?\n");
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Uncaught CORBA exception\n"),
+ 1);
+ }
+ return 0;
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.idl b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.idl
new file mode 100644
index 00000000000..a9f15fccaec
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.idl
@@ -0,0 +1,31 @@
+// $Id$
+
+/**
+ * @file
+ * @author Marcel Smit <msmit@remedy.nl>
+ *
+ * by-hand idl3 translation of sender components.
+ */
+
+#ifndef WL_RESETTOPIC_SENDER_IDL
+#define WL_RESETTOPIC_SENDER_IDL
+
+#include "Connector/WL_ResetTopic_Connector.idl"
+
+module WL_ResetTopic
+{
+ interface ChangeTopicInterface
+ {
+ void set_new_topic (in string topic_name);
+ };
+
+ component Sender supports ChangeTopicInterface
+ {
+ port WL_ResetTopicTestConnector::DDS_Write info_write;
+
+ attribute unsigned short iterations;
+ attribute unsigned short keys;
+ };
+};
+
+#endif
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.mpc b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.mpc
new file mode 100644
index 00000000000..9bc89b7f5fa
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender.mpc
@@ -0,0 +1,166 @@
+// $Id$
+// This file is generated with "generate_component_mpc.pl -p WL_ResetTopicBase -l ../lib -o ../lib -c controller -u DDS Sender"
+
+project (WL_ResetTopicSender_idl_gen) : componentidldefaults, dds4ccm {
+ after += WL_ResetTopicConnector_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 {
+ WL_ResetTopic_Sender.idl
+ }
+}
+
+project (WL_ResetTopicSender_lem_gen) : ciaoidldefaults, dds4ccm {
+ after += WL_ResetTopicSender_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 {
+ WL_ResetTopic_SenderE.idl
+ }
+}
+
+project (WL_ResetTopicSender_lem_stub) : ccm_svnt, dds4ccm_base {
+ after += WL_ResetTopicSender_lem_gen WL_ResetTopicSender_stub WL_ResetTopicBase_stub
+ libs += WL_ResetTopicBase_stub Sender_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ sharedname = Sender_lem_stub
+ dynamicflags += SENDER_LEM_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_SenderEC.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_SenderEC.h
+ Sender_lem_stub_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_SenderEC.inl
+ }
+}
+
+project (WL_ResetTopicSender_stub) : ccm_stub, dds4ccm_base {
+ after += WL_ResetTopicSender_idl_gen WL_ResetTopicBase_stub WL_ResetTopicConnector_stub
+ libs += WL_ResetTopicBase_stub WL_ResetTopicConnector_stub
+ includes += ..
+ libpaths += ../lib
+ libout = ../lib
+ sharedname = Sender_stub
+ dynamicflags += SENDER_STUB_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_SenderC.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_SenderC.h
+ Sender_stub_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_SenderC.inl
+ }
+}
+
+project (WL_ResetTopicSender_exec) : ciao_executor, dds4ccm_lem_stub {
+ after += WL_ResetTopicSender_lem_stub WL_ResetTopicSender_stub \
+ WL_ResetTopicConnector_lem_stub WL_ResetTopicConnector_stub
+ sharedname = Sender_exec
+ libs += Sender_stub Sender_lem_stub WL_ResetTopicBase_stub \
+ WL_ResetTopicConnector_lem_stub WL_ResetTopicConnector_stub
+ libpaths += ../lib
+ includes += ..
+ libout = ../lib
+ dynamicflags += SENDER_EXEC_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_Sender_exec.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_Sender_exec.h
+ Sender_exec_export.h
+ }
+
+ Inline_Files {
+ }
+}
+
+
+project (WL_ResetTopicSender_svnt) : ciao_servant, dds4ccm_lem_stub, dds4ccm_skel {
+ after += WL_ResetTopicBase_stub WL_ResetTopicSender_lem_stub WL_ResetTopicConnector_stub \
+ WL_ResetTopicConnector_svnt WL_ResetTopicConnector_lem_stub
+ sharedname = Sender_svnt
+ libs += Sender_stub Sender_lem_stub \
+ WL_ResetTopicBase_stub WL_ResetTopicConnector_stub WL_ResetTopicConnector_svnt WL_ResetTopicConnector_lem_stub
+ libpaths += ../lib
+ libout = ../lib
+ includes += ..
+ dynamicflags += SENDER_SVNT_BUILD_DLL
+
+ IDL_Files {
+ }
+
+ Source_Files {
+ WL_ResetTopic_SenderS.cpp
+ WL_ResetTopic_Sender_svnt.cpp
+ }
+
+ Header_Files {
+ WL_ResetTopic_SenderS.h
+ WL_ResetTopic_Sender_svnt.h
+ Sender_svnt_export.h
+ }
+
+ Inline_Files {
+ WL_ResetTopic_SenderS.inl
+ }
+}
+
+project (WL_ResetTopicSender_Driver) : ccm_stub, valuetype, dds4ccm_lem_stub {
+ exename = SenderDriver
+ after += WL_ResetTopicSender_stub WL_ResetTopicConnector_stub
+ libs += Sender_stub WL_ResetTopicBase_stub WL_ResetTopicConnector_stub
+
+ includes += ..
+ libpaths += ../lib
+
+ exeout = ../lib
+ IDL_Files {
+ }
+
+ Source_Files {
+ SenderDriver.cpp
+ }
+
+ Header_Files {
+ }
+
+ Inline_Files {
+ }
+}
+
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.cpp
new file mode 100644
index 00000000000..a90f457a4e1
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.cpp
@@ -0,0 +1,283 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+
+#include "WL_ResetTopic_Sender_exec.h"
+#include "tao/ORB_Core.h"
+#include "ace/Reactor.h"
+
+namespace CIAO_WL_ResetTopic_Sender_Impl
+{
+
+ /**
+ * Timeout_Handler
+ */
+
+ Timeout_Handler::Timeout_Handler (Sender_exec_i &callback)
+ : callback_ (callback)
+ {
+ }
+
+ int
+ Timeout_Handler::handle_timeout (const ACE_Time_Value &, const void *)
+ {
+ // Notify the subscribers
+ this->callback_.start_event_test ();
+ return 0;
+ }
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ Sender_exec_i::Sender_exec_i (void)
+ : iterations_ (0)
+ , keys_ (0)
+ , to_handler_ (0)
+ , topic_name_ ("TopicI")
+ , old_topic_name_ ("TopicI")
+ {
+ ACE_NEW_THROW_EX (this->to_handler_,
+ Timeout_Handler (*this),
+ ::CORBA::INTERNAL ());
+ }
+
+ Sender_exec_i::~Sender_exec_i (void)
+ {
+ delete this->to_handler_;
+ }
+
+ // Supported operations and attributes.
+ ACE_Reactor*
+ Sender_exec_i::reactor (void)
+ {
+ ACE_Reactor* reactor = 0;
+ ::CORBA::Object_var ccm_object =
+ this->ciao_context_->get_CCM_object();
+ if (! ::CORBA::is_nil (ccm_object.in ()))
+ {
+ ::CORBA::ORB_var orb = ccm_object->_get_orb ();
+ if (! ::CORBA::is_nil (orb.in ()))
+ {
+ reactor = orb->orb_core ()->reactor ();
+ }
+ }
+ if (reactor == 0)
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ return reactor;
+ }
+
+ void Sender_exec_i::set_new_topic (const char * topic_name)
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+
+ this->old_topic_name_ = this->topic_name_;
+ this->topic_name_ = topic_name;
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_new_topic - "
+ "New topic name set <%C>\n",
+ topic_name));
+ }
+
+ void
+ Sender_exec_i::set_topic_name_writer (const char * topic_name)
+ {
+ try
+ {
+ if (ACE_OS::strcmp (topic_name, this->old_topic_name_.c_str()) != 0)
+ {
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::set_topic_name_writer - "
+ "Setting topic to <%C>\n",
+ topic_name));
+ this->old_topic_name_ = topic_name;
+ ::WL_ResetTopic::WL_ResetTopicTestConnector:: Writer_var writer =
+ this->ciao_context_->get_connection_info_write_data ();
+ if (::CORBA::is_nil (writer.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to get writer interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::CORBA::Object_var cmp = writer->_get_component ();
+ if (::CORBA::is_nil (cmp.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to get component interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_DDS_Event_var conn =
+ ::WL_ResetTopic::WL_ResetTopicTestConnector::CCM_DDS_Event::_narrow (cmp.in ());
+ if (::CORBA::is_nil (conn.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Unable to narrow connector interface\n"));
+ throw ::CORBA::INTERNAL ();
+ }
+ {
+ ACE_GUARD (TAO_SYNCH_RECURSIVE_MUTEX, guard, this->topic_name_lock_);
+ conn->topic_name (topic_name);
+ }
+ }
+ }
+ catch (const ::CCM_DDS::NonChangeable &)
+ {
+ ACE_ERROR ((LM_ERROR, "ERROR: Sender_exec_i::set_topic_name_writer - "
+ "Caught NonChangeable exception.\n"));
+ }
+ }
+
+ void
+ Sender_exec_i::start_event_test (void)
+ {
+ // Set the topic name on the connector first. Therefor we need to
+ // get to the connector first.
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - Start\n"));
+ try
+ {
+ for (::CORBA::UShort key = 1; key < this->keys_ + 1; ++key)
+ {
+ WL_ResetTopicTest sample;
+ char tmp[7];
+ ACE_OS::sprintf (tmp, "KEY_%d", key);
+ sample.key = CORBA::string_dup(tmp);
+
+ for (::CORBA::UShort iter = 1; iter < this->iterations_ + 1; ++iter)
+ {
+ this->set_topic_name_writer (this->topic_name_.c_str ());
+ ::WL_ResetTopic::WL_ResetTopicTestConnector:: Writer_var writer =
+ this->ciao_context_->get_connection_info_write_data ();
+ sample.iteration = iter;
+ writer->write_one (sample, ::DDS::HANDLE_NIL);
+
+ ACE_DEBUG ((LM_DEBUG, "Sender_exec_i::start_event_test - "
+ "Sample for topic <%C> written : key <%C> - iteration <%d>\n",
+ this->topic_name_.c_str (), tmp, iter));
+
+ ACE_Time_Value tv (0, 50000);
+ ACE_OS::sleep (tv);
+ }
+ }
+ }
+ catch (const ::CORBA::Exception & ex)
+ {
+ ex._tao_print_exception("ERROR:");
+ }
+ catch (...)
+ {
+ ACE_ERROR ((LM_ERROR, "Sender_exec_i::start_event_test - "
+ "ERROR: Unexpected and unknown exception caught.\n"));
+ }
+ }
+
+ // Component attributes and port operations.
+
+ ::CORBA::UShort
+ Sender_exec_i::iterations (void)
+ {
+ return this->iterations_;
+ }
+
+ void
+ Sender_exec_i::iterations (
+ const ::CORBA::UShort iterations)
+ {
+ this->iterations_ = iterations;
+ }
+
+ ::CORBA::UShort
+ Sender_exec_i::keys (void)
+ {
+ return this->keys_;
+ }
+
+ void
+ Sender_exec_i::keys (
+ const ::CORBA::UShort keys)
+ {
+ this->keys_ = keys;
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ Sender_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->ciao_context_ =
+ ::WL_ResetTopic::CCM_Sender_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->ciao_context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ Sender_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ Sender_exec_i::ccm_activate (void)
+ {
+ if (this->reactor ()->schedule_timer (
+ this->to_handler_,
+ 0,
+ ACE_Time_Value (5, 0),
+ ACE_Time_Value (5, 0)) == -1)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ")
+ ACE_TEXT ("Error scheduling timer")));
+ }
+ }
+
+ void
+ Sender_exec_i::ccm_passivate (void)
+ {
+ this->reactor()->cancel_timer(this->to_handler_);
+ }
+
+ void
+ Sender_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_WL_ResetTopic_Sender_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_NORETURN (
+ retval,
+ Sender_exec_i);
+
+ return retval;
+ }
+}
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.h
new file mode 100644
index 00000000000..b13f6176bfb
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/Sender/WL_ResetTopic_Sender_exec.h
@@ -0,0 +1,139 @@
+// -*- C++ -*-
+// $Id$
+
+/**
+ * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.2
+ * TAO and the TAO IDL Compiler have been developed by:
+ * Center for Distributed Object Computing
+ * Washington University
+ * St. Louis, MO
+ * USA
+ * http://www.cs.wustl.edu/~schmidt/doc-center.html
+ * and
+ * Distributed Object Computing Laboratory
+ * University of California at Irvine
+ * Irvine, CA
+ * USA
+ * and
+ * Institute for Software Integrated Systems
+ * Vanderbilt University
+ * Nashville, TN
+ * USA
+ * http://www.isis.vanderbilt.edu/
+ *
+ * Information about TAO is available at:
+ * http://www.cs.wustl.edu/~schmidt/TAO.html
+ **/
+#ifndef CIAO_WL_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+#define CIAO_WL_RESETTOPIC_SENDER_EXEC_YSJ9S8_H_
+
+#include /**/ "ace/pre.h"
+
+#include "WL_ResetTopic_SenderEC.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include /**/ "Sender_exec_export.h"
+#include "tao/LocalObject.h"
+
+namespace CIAO_WL_ResetTopic_Sender_Impl
+{
+ class Sender_exec_i;
+
+ /**
+ * Timeout_Handler
+ */
+ class Timeout_Handler :
+ public ACE_Event_Handler
+ {
+ public:
+ Timeout_Handler (Sender_exec_i &callback);
+ /// Handle the timeout.
+ virtual int handle_timeout (const ACE_Time_Value &tv,
+ const void *arg);
+ private:
+ /// Maintains a handle that actually process the event
+ Sender_exec_i &callback_;
+ };
+
+ /**
+ * Component Executor Implementation Class: Sender_exec_i
+ */
+
+ class Sender_exec_i
+ : public virtual Sender_Exec,
+ public virtual ::CORBA::LocalObject
+ {
+ public:
+ Sender_exec_i (void);
+ virtual ~Sender_exec_i (void);
+
+ //@{
+ /** Supported operations and attributes. */
+ virtual void set_new_topic (const char * topic_name);
+ //@}
+
+ //@{
+ /** Component attributes and port operations. */
+
+ virtual ::CORBA::UShort iterations (void);
+
+ virtual void iterations (::CORBA::UShort iterations);
+
+ virtual ::CORBA::UShort keys (void);
+
+ virtual void keys (::CORBA::UShort keys);
+ //@}
+
+ //@{
+ /** Operations from Components::SessionComponent. */
+ virtual void set_session_context (::Components::SessionContext_ptr ctx);
+ virtual void configuration_complete (void);
+ virtual void ccm_activate (void);
+ virtual void ccm_passivate (void);
+ virtual void ccm_remove (void);
+ //@}
+
+ //@{
+ /** User defined public operations. */
+ void set_topic_name_writer (const char * topic_name);
+ void start_event_test (void);
+ //@}
+
+ private:
+ ::WL_ResetTopic::CCM_Sender_Context_var ciao_context_;
+
+ //@{
+ /** Component attributes. */
+
+ ::CORBA::UShort iterations_;
+
+ ::CORBA::UShort keys_;
+ //@}
+
+ //@{
+ /** User defined members. */
+ Timeout_Handler *to_handler_;
+ ACE_CString topic_name_, old_topic_name_;
+
+ TAO_SYNCH_RECURSIVE_MUTEX topic_name_lock_;
+ //@}
+
+ //@{
+ /** User defined private operations. */
+
+ //@}
+
+ /// Get the ACE_Reactor
+ ACE_Reactor* reactor (void);
+ };
+
+ extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
+ create_WL_ResetTopic_Sender_Impl (void);
+}
+
+#include /**/ "ace/post.h"
+
+#endif /* ifndef */
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/Plan.cdp
new file mode 100644
index 00000000000..31cdd7950ce
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/Plan.cdp
@@ -0,0 +1,407 @@
+<!-- $Id$ -->
+<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>ResetTopic_Depl_1</label>
+ <UUID>ResetTopic_Depl_1</UUID>
+
+ <implementation xmi:id="ReceiverComponentImplementation">
+ <name>ReceiverComponentImplementation</name>
+ <source/>
+ <artifact xmi:idref="Receiver_ExecArtifact" />
+ <artifact xmi:idref="Receiver_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_WL_ResetTopic_Receiver_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_WL_ResetTopic_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="ResetTopic_EventConnectorImplementation">
+ <name>ResetTopic_EventConnectorImplementation</name>
+ <source/>
+ <artifact xmi:idref="ResetTopic_Connector_ExecArtifact" />
+ <artifact xmi:idref="ResetTopic_Connector_SvntArtifact" />
+ <execParameter>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_WL_ResetTopic_WL_ResetTopicTestConnector_DDS_Event_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_WL_ResetTopic_WL_ResetTopicTestConnector_DDS_Event_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>WL_ResetTopic_Connector_svnt</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>WL_ResetTopic_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>
+ <name>component factory</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_WL_ResetTopic_Sender_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ <execParameter>
+ <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_WL_ResetTopic_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>
+ <source/>
+ <implementation xmi:idref="ReceiverComponentImplementation" />
+ <configProperty>
+ <name>iterations</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>10</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Receiver.ior</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_SenderEventConnectorInstance">
+ <name>ResetTopic_SenderEventConnectorInstance</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_EventConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="ResetTopic_ReceiverEventConnectorInstance">
+ <name>ResetTopic_ReceiverEventConnectorInstance</name>
+ <node>ReceiverNode</node>
+ <source/>
+ <implementation xmi:idref="ResetTopic_EventConnectorImplementation" />
+ <configProperty>
+ <name>topic_name</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TopicI</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <instance xmi:id="SenderComponentInstance">
+ <name>SenderComponent</name>
+ <node>SenderNode</node>
+ <source/>
+ <implementation xmi:idref="SenderComponentImplementation" />
+ <configProperty>
+ <name>rate</name>
+ <value>
+ <type>
+ <kind>tk_ushort</kind>
+ </type>
+ <value>
+ <ushort>15</ushort>
+ </value>
+ </value>
+ </configProperty>
+ <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>
+ <configProperty>
+ <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>Sender.ior</string>
+ </value>
+ </value>
+ </configProperty>
+ </instance>
+
+ <connection>
+ <name>event_listener</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_out_event_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="ResetTopic_ReceiverEventConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>event_reader_listener</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_out_event_data</portName>
+ <provider>false</provider>
+ <kind>SimplexReceptacle</kind>
+ <instance xmi:idref="ReceiverComponentInstance" />
+ </internalEndpoint>
+ <internalEndpoint>
+ <portName>push_consumer_data</portName>
+ <provider>true</provider>
+ <kind>Facet</kind>
+ <instance xmi:idref="ResetTopic_ReceiverEventConnectorInstance" />
+ </internalEndpoint>
+ </connection>
+
+ <connection>
+ <name>event_datacontrol</name>
+ <deployRequirement>
+ <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name>
+ <resourceType>Local_Interface</resourceType>
+ </deployRequirement>
+ <internalEndpoint>
+ <portName>info_out_event_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="ResetTopic_ReceiverEventConnectorInstance" />
+ </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="ResetTopic_SenderEventConnectorInstance" />
+ </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="ResetTopic_Connector_ExecArtifact">
+ <name>WL_ResetTopic_Connector_exec</name>
+ <source/>
+ <node/>
+ <location>WL_ResetTopicConnector_exec</location>
+ </artifact>
+ <artifact xmi:id="ResetTopic_Connector_SvntArtifact">
+ <name>WL_ResetTopic_Connector_svnt</name>
+ <source/>
+ <node/>
+ <location>WL_ResetTopicConnector_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_ExecArtifact">
+ <name>Receiver_exec</name>
+ <source/>
+ <node/>
+ <location>Receiver_exec</location>
+ </artifact>
+ <artifact xmi:id="Receiver_SvntArtifact">
+ <name>Receiver_svnt</name>
+ <source/>
+ <node/>
+ <location>Receiver_svnt</location>
+ </artifact>
+ <artifact xmi:id="Receiver_StubArtifact">
+ <name>Receiver_stub</name>
+ <source/>
+ <node/>
+ <location>Receiver_stub</location>
+ </artifact>
+</Deployment:DeploymentPlan>
diff --git a/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/run_test.pl
new file mode 100755
index 00000000000..0d55bfd5fdc
--- /dev/null
+++ b/CIAO/connectors/dds4ccm/tests/ResetTopic/WriteListen/descriptors/run_test.pl
@@ -0,0 +1,281 @@
+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 = ( "ReceiverNode.ior", "SenderNode.ior" );
+@iorfiles = 0;
+@nodenames = ( "ReceiverNode", "SenderNode" );
+
+# ior files other than daemon
+$ior_nsbase = "ns.ior";
+$ior_nsfile = 0;
+$ior_embase = "EM.ior";
+$ior_emfile = 0;
+
+# Processes
+$E = 0;
+$EM = 0;
+$NS = 0;
+@DEAMONS = 0;
+
+# targets
+@tg_daemons = 0;
+$tg_naming = 0;
+$tg_exe_man = 0;
+$tg_executor = 0;
+
+$status = 0;
+$cdp_file = "Plan.cdp";
+
+sub create_targets {
+ # naming service
+ $tg_naming = PerlACE::TestTarget::create_target (1) || die "Create target for ns failed\n";
+ $tg_naming->AddLibPath ('../lib');
+ # daemon
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i] = PerlACE::TestTarget::create_target ($i+1) || die "Create target for daemon $i failed\n";
+ $tg_daemons[$i]->AddLibPath ('../lib');
+ }
+ # execution manager
+ $tg_exe_man = PerlACE::TestTarget::create_target (1) || die "Create target for EM failed\n";
+ $tg_exe_man->AddLibPath ('../lib');
+ # executor (plan_launcher)
+ $tg_executor = PerlACE::TestTarget::create_target (1) || die "Create target for executor failed\n";
+ $tg_executor->AddLibPath ('../lib');
+}
+
+sub init_ior_files {
+ $ior_nsfile = $tg_naming->LocalFile ($ior_nsbase);
+ $ior_emfile = $tg_exe_man->LocalFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+ delete_ior_files ();
+}
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $tg_daemons[$i]->DeleteFile ($iorbases[$i]);
+ }
+ $tg_naming->DeleteFile ($ior_nsbase);
+ $tg_exe_man->DeleteFile ($ior_embase);
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorfiles[$i] = $tg_daemons[$i]->LocalFile ($iorbases[$i]);
+ }
+}
+
+sub kill_node_daemon {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemon ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill (); $EM->TimedWait (1);
+ }
+
+ if ($ns_running == 1) {
+ $NS->Kill (); $NS->TimedWait (1);
+ }
+ # in case shutdown did not perform as expected
+ $tg_executor->KillAll ('dance_locality_manager');
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $nr_daemon; ++$i) {
+ $iorbase = $iorbases[$i];
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+ $nodename = $nodenames[$i];
+ $iiop = "iiop://localhost:$port";
+ $node_app = $tg_daemons[$i]->GetArchDir("$DANCE_ROOT/bin/") . "dance_locality_manager";
+
+ $d_cmd = "$DANCE_ROOT/bin/dance_node_manager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService";
+
+ print "Run dance_node_manager with $d_param\n";
+
+ $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param);
+ $DEAMONS[$i]->Spawn ();
+
+ if ($tg_daemons[$i]->WaitForFileTimed($iorbase,
+ $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior $iorfile file of node daemon $i could not be found\n";
+ for (; $i >= 0; --$i) {
+ $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ return 0;
+}
+
+create_targets ();
+init_ior_files ();
+
+# Invoke naming service
+
+$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile");
+
+$ns_status = $NS->Spawn ();
+
+if ($ns_status != 0) {
+ print STDERR "ERROR: Unable to execute the naming service\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n";
+
+if ($tg_naming->WaitForFileTimed ($ior_nsbase,
+ $tg_naming->ProcessStartWaitInterval ()) == -1) {
+ print STDERR "ERROR: cannot find naming service IOR file\n";
+ $NS->Kill (); $NS->TimedWait (1);
+ exit 1;
+}
+
+$ns_running = 1;
+# Set up NamingService environment
+$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService";
+
+# Invoke node daemon.
+print "Invoking node daemon\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemon\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$daemons_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n";
+$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager",
+ "-e$ior_emfile --domain-nc corbaloc:rir:/NameService");
+$em_status = $EM->Spawn ();
+
+if ($em_status != 0) {
+ print STDERR "ERROR: dance_execution_manager returned $em_status";
+ exit 1;
+}
+
+if ($tg_exe_man->WaitForFileTimed ($ior_embase,
+ $tg_exe_man->ProcessStartWaitInterval ()) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - launch the application -\n";
+
+print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n";
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-x $cdp_file -k file://$ior_emfile");
+$pl_status = $E->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+for ($i = 0; $i < $nr_daemon; ++$i) {
+ if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i],
+ $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) {
+ print STDERR "ERROR: The ior file of daemon $i could not be found\n";
+ kill_open_processes ();
+ exit 1;
+ }
+}
+
+print "Sleeping 10 seconds before changing topic name\n";
+sleep (10);
+
+$R = $tg_executor->CreateProcess ("../lib/ReceiverDriver", "-n TopicII");
+$driver_status = $R->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-n TopicII");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before changing topic name\n";
+sleep (10);
+
+$R = $tg_executor->CreateProcess ("../lib/ReceiverDriver", "-n TopicIII");
+$driver_status = $R->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$S = $tg_executor->CreateProcess ("../lib/SenderDriver", "-n TopicIII");
+$driver_status = $S->SpawnWaitKill (2 * $tg_executor->ProcessStartWaitInterval ());
+if ($driver_status != 0) {
+ print STDERR "ERROR: unable to launch driver\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Sleeping 10 seconds before stopping\n";
+sleep (10);
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+print "by running dance_plan_launcher.exe with -k file://$ior_emfile -x $cdp_file\n";
+
+$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher",
+ "-k file://$ior_emfile -x $cdp_file -s");
+$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ());
+
+if ($pl_status != 0) {
+ print STDERR "ERROR: dance_plan_launcher returned $pl_status\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;