diff options
author | Marijke Hengstmengel <MHengstmengel@users.noreply.github.com> | 2009-12-10 14:34:15 +0000 |
---|---|---|
committer | Marijke Hengstmengel <MHengstmengel@users.noreply.github.com> | 2009-12-10 14:34:15 +0000 |
commit | f9533c0b704ffa0491f9ee62ddb43ab6f4753e4d (patch) | |
tree | 058a7766e67fa1e2d1e7c98c239a2a42449c4911 | |
parent | 94eb88f90d48ad9e02173dfeac194c65fd8fcc77 (diff) | |
download | ATCD-f9533c0b704ffa0491f9ee62ddb43ab6f4753e4d.tar.gz |
Thu Dec 109 14:31:57 UTC 2009 Marijke Hengstmengel <mhengstmengel@remedy.nl>
* bin/ciao_tests.lst
* connectors/dds4ccm/tests/Updater/Base/Updater_Base.idl:
* connectors/dds4ccm/tests/Updater/Base/Updater_Base.mpc:
* connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.idl:
* connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.mpc:
* connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.cpp:
* connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.h:
* connectors/dds4ccm/tests/Updater/descriptors/Plan.cdp:
* connectors/dds4ccm/tests/Updater/Receiver:
* connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.idl:
* connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.mpc:
* connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp:
* connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.h:
* connectors/dds4ccm/tests/Updater/Sender:
* connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.idl:
* connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.mpc:
* connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.cpp:
* connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.h:
Implement test for Updater functions
17 files changed, 1665 insertions, 154 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index dfcb46632ec..466b80225aa 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,25 @@ +Thu Dec 109 14:31:57 UTC 2009 Marijke Hengstmengel <mhengstmengel@remedy.nl> + + * bin/ciao_tests.lst + * connectors/dds4ccm/tests/Updater/Base/Updater_Base.idl: + * connectors/dds4ccm/tests/Updater/Base/Updater_Base.mpc: + * connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.idl: + * connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.mpc: + * connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.cpp: + * connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.h: + * connectors/dds4ccm/tests/Updater/descriptors/Plan.cdp: + * connectors/dds4ccm/tests/Updater/Receiver: + * connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.idl: + * connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.mpc: + * connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp: + * connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.h: + * connectors/dds4ccm/tests/Updater/Sender: + * connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.idl: + * connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.mpc: + * connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.cpp: + * connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.h: + Implement test for Updater functions + Thu Dec 10 13:30:01 UTC 2009 Marcel Smit <msmit@remedy.nl> * bin/ciao_tests.lst: diff --git a/CIAO/bin/ciao_tests.lst b/CIAO/bin/ciao_tests.lst index 42f04adb847..b2a22054daa 100644 --- a/CIAO/bin/ciao_tests.lst +++ b/CIAO/bin/ciao_tests.lst @@ -56,3 +56,4 @@ TAO/CIAO/connectors/dds4ccm/tests/PSLDeadline/descriptors/run_test.pl: !STATIC ! TAO/CIAO/connectors/dds4ccm/tests/PSLSampleLost/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS TAO/CIAO/connectors/dds4ccm/tests/Getter/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS TAO/CIAO/connectors/dds4ccm/tests/ListenNotEnabled/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS +TAO/CIAO/connectors/dds4ccm/tests/Updater/descriptors/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NOXERCES !ACE_FOR_TAO !ST NDDS diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.idl b/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.idl index e6c56674767..907f7b4a885 100644 --- a/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.idl +++ b/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.idl @@ -8,11 +8,11 @@ #ifndef UPDATER_BASE_IDL #define UPDATER_BASE_IDL -struct UpdaterTest { +struct TestTopic { string key; //@key - long iteration; + long x; }; -typedef sequence<UpdaterTest> UpdaterTest_Seq; +typedef sequence<TestTopic> TestTopic_Seq; #endif diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.mpc b/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.mpc index 742cf59eef8..8b7964b050b 100644 --- a/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.mpc +++ b/CIAO/connectors/dds4ccm/tests/Updater/Base/Updater_Base.mpc @@ -1,11 +1,11 @@ // $Id$ // This file is generated with "generate_component_mpc.pl -o ../lib -u DDS -n Updater_Base" -project(DDS_UpdaterBase_idl_gen) : taoidldefaults, anytypecode { +project(DDS_Updater_Base_idl_gen) : taoidldefaults, anytypecode { custom_only = 1 idlflags -= -St -Sa idlflags += -SS -Gxhst \ - -Wb,stub_export_macro=WRITER_BASE_STUB_Export \ + -Wb,stub_export_macro=UPDATER_BASE_STUB_Export \ -Wb,stub_export_include=Updater_Base_stub_export.h IDL_Files { @@ -13,9 +13,9 @@ project(DDS_UpdaterBase_idl_gen) : taoidldefaults, anytypecode { } } -project(DDS_UpdaterBase_ndds_ts_gen) : ndds_ts_defaults { +project(DDS_Updater_Base_ndds_ts_gen) : ndds_ts_defaults { custom_only = 1 - after += DDS_UpdaterBase_idl_gen + after += DDS_Updater_Base_idl_gen ndds_ts_flags += -corba Updater_BaseC.h -orb ACE_TAO1.7 NDDSTypeSupport_Files { @@ -23,12 +23,12 @@ project(DDS_UpdaterBase_ndds_ts_gen) : ndds_ts_defaults { } } -project(DDS_UpdaterBase_NDDS_TS) : nddslib, taolib { - after += DDS_UpdaterBase_ndds_ts_gen DDS_UpdaterBase_stub - libs += DDS_UpdaterBase_stub +project(DDS_Updater_Base_NDDS_TS) : nddslib, taolib { + after += DDS_Updater_Base_ndds_ts_gen DDS_Updater_Base_stub + libs += DDS_Updater_Base_stub libout = ../lib libpaths += ../lib - sharedname = DDS_UpdaterBase_NDDS_TS + sharedname = DDS_Updater_Base_NDDS_TS dynamicflags = NDDS_USER_DLL_EXPORT verbatim(gnuace, macros) { @@ -51,12 +51,12 @@ project(DDS_UpdaterBase_NDDS_TS) : nddslib, taolib { } } -project(DDS_UpdaterBase_stub) : ccm_stub { - after += DDS_UpdaterBase_idl_gen +project(DDS_Updater_Base_stub) : ccm_stub { + after += DDS_Updater_Base_idl_gen libout = ../lib libpaths += ../lib - sharedname = DDS_UpdaterBase_stub - dynamicflags = WRITER_BASE_STUB_BUILD_DLL + sharedname = DDS_Updater_Base_stub + dynamicflags = UPDATER_BASE_STUB_BUILD_DLL IDL_Files { } diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.idl b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.idl index d19c0d5acbc..bf55d68a218 100644 --- a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.idl +++ b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.idl @@ -14,11 +14,11 @@ #include "Base/Updater_Base.idl" #include "connectors/dds4ccm/idl/ccm_dds.idl" -TYPED_MODULE( ::UpdaterTest, ::UpdaterTest_Seq, UpdaterTest) +TYPED_MODULE( ::TestTopic, ::TestTopic_Seq, TestTopic) module Updater { - connector Updater_Connector : ::CCM_DDS::UpdaterTest::DDS_State + connector Updater_Connector : ::CCM_DDS::TestTopic::DDS_State { }; }; diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.mpc b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.mpc index f904da154b4..96288821ef2 100644 --- a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.mpc +++ b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector.mpc @@ -1,7 +1,7 @@ // $Id$ -// This file is generated with "generate_component_mpc.pl -p DDS_UpdaterBase -l .. -o ../lib -u DDS Updater_Connector" +// This file is generated with "generate_component_mpc.pl -p DDS_Updater_Base -l .. -o ../lib -u DDS Updater_Connector" -project(DDS_UpdaterConnector_idl_gen) : connectoridldefaults { +project(DDS_UPDATER_Connector_idl_gen) : connectoridldefaults { after += DDS4CCM_idl_gen custom_only = 1 idlflags += -Wb,stub_export_macro=UPDATER_CONNECTOR_STUB_Export \ @@ -19,9 +19,9 @@ project(DDS_UpdaterConnector_idl_gen) : connectoridldefaults { } } -project(DDS_UpdaterConnector_lem_gen) : ciaoidldefaults { +project(DDS_UPDATER_Connector_lem_gen) : ciaoidldefaults { custom_only = 1 - after += DDS_UpdaterConnector_idl_gen + after += DDS_UPDATER_Connector_idl_gen idlflags += -Wb,stub_export_macro=UPDATER_CONNECTOR_LEM_STUB_Export \ -Wb,stub_export_include=Updater_Connector_lem_stub_export.h \ -SS -Gxhst \ @@ -32,13 +32,13 @@ project(DDS_UpdaterConnector_lem_gen) : ciaoidldefaults { } } -project(DDS_UpdaterConnector_lem_stub) : ccm_svnt, dds4ccm_base { - after += DDS_UpdaterConnector_lem_gen DDS_UpdaterConnector_stub DDS_UpdaterBase_stub DDS4CCM_lem_stub - libs += DDS_UpdaterBase_stub DDS_UpdaterConnector_stub DDS4CCM_lem_stub +project(DDS_UPDATER_Connector_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_UPDATER_Connector_lem_gen DDS_Updater_Connector_stub DDS_Updater_Base_stub DDS4CCM_lem_stub + libs += DDS_Updater_Base_stub DDS_Updater_Connector_stub DDS4CCM_lem_stub libpaths += ../lib libout = ../lib includes += .. - sharedname = DDS_UpdaterConnector_lem_stub + sharedname = DDS_UPDATER_Connector_lem_stub dynamicflags = UPDATER_CONNECTOR_LEM_STUB_BUILD_DLL IDL_Files { @@ -58,13 +58,13 @@ project(DDS_UpdaterConnector_lem_stub) : ccm_svnt, dds4ccm_base { } } -project(DDS_UpdaterConnector_stub) : ccm_stub, dds4ccm_base { - after += DDS_UpdaterConnector_idl_gen DDS_UpdaterBase_stub - libs += DDS_UpdaterBase_stub +project(DDS_Updater_Connector_stub) : ccm_stub, dds4ccm_base { + after += DDS_UPDATER_Connector_idl_gen DDS_Updater_Base_stub + libs += DDS_Updater_Base_stub libpaths += ../lib libout = ../lib includes += .. - sharedname = DDS_UpdaterConnector_stub + sharedname = DDS_Updater_Connector_stub dynamicflags = UPDATER_CONNECTOR_STUB_BUILD_DLL IDL_Files { @@ -84,10 +84,10 @@ project(DDS_UpdaterConnector_stub) : ccm_stub, dds4ccm_base { } } -project(DDS_UpdaterConnector_exec) : ciao_executor, dds4ccm_skel, nddslib { - after += DDS_UpdaterConnector_lem_stub DDS_UpdaterConnector_stub DDS4CCM_lem_stub CIAO_DDS4CCM_NDDS_Impl DDS_UpdaterBase_NDDS_TS - sharedname = DDS_UpdaterConnector_exec - libs += DDS_UpdaterConnector_stub DDS_UpdaterConnector_lem_stub DDS_UpdaterBase_stub CIAO_DDS4CCM_NDDS_Impl DDS4CCM_lem_stub DDS_UpdaterBase_NDDS_TS +project(DDS_Updater_Connector_exec) : ciao_executor, dds4ccm_skel, nddslib { + after += DDS_UPDATER_Connector_lem_stub DDS_Updater_Connector_stub DDS4CCM_lem_stub CIAO_DDS4CCM_NDDS_Impl DDS_Updater_Base_NDDS_TS + sharedname = DDS_Updater_Connector_exec + libs += DDS_Updater_Connector_stub DDS_UPDATER_Connector_lem_stub DDS_Updater_Base_stub CIAO_DDS4CCM_NDDS_Impl DDS4CCM_lem_stub DDS_Updater_Base_NDDS_TS libpaths += ../lib libout = ../lib includes += .. @@ -110,13 +110,13 @@ project(DDS_UpdaterConnector_exec) : ciao_executor, dds4ccm_skel, nddslib { } -project(DDS_UpdaterConnector_svnt) : ciao_servant, dds4ccm_skel, nddslib { - after += DDS_UpdaterConnector_lem_stub DDS_UpdaterConnector_exec DDS_UpdaterConnector_stub DDS4CCM_lem_stub - sharedname = DDS_UpdaterConnector_svnt - libs += DDS_UpdaterConnector_stub \ - DDS_UpdaterConnector_lem_stub \ - DDS_UpdaterBase_stub \ - DDS_UpdaterConnector_exec \ +project(DDS_Updater_Connector_svnt) : ciao_servant, dds4ccm_skel, nddslib { + after += DDS_UPDATER_Connector_lem_stub DDS_Updater_Connector_exec DDS_Updater_Connector_stub DDS4CCM_lem_stub + sharedname = DDS_Updater_Connector_svnt + libs += DDS_Updater_Connector_stub \ + DDS_UPDATER_Connector_lem_stub \ + DDS_Updater_Base_stub \ + DDS_Updater_Connector_exec \ DDS4CCM_lem_stub libpaths += ../lib libout = ../lib diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.cpp b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.cpp index 9e0a7c968f2..1c366b91ea1 100644 --- a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.cpp @@ -6,7 +6,7 @@ namespace CIAO_Updater_Updater_Connector_Impl { Updater_Connector_exec_i::Updater_Connector_exec_i (void) - : DDS_State_Connector_T<UpdaterTest_DDS_Traits, UpdaterTest_Connector_Traits> () + : DDS_State_Connector_T<TestTopic_DDS_Traits, TestTopic_Connector_Traits> () { } diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.h b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.h index fd375f8520a..6f01473e5a6 100644 --- a/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.h +++ b/CIAO/connectors/dds4ccm/tests/Updater/Connector/Updater_Connector_exec.h @@ -22,28 +22,28 @@ namespace CIAO_Updater_Updater_Connector_Impl { - // @from use of UpdaterTest as a parameter + // @from use of TestTopic as a parameter typedef CIAO::DDS4CCM::RTI::Type_Traits < - UpdaterTest, - UpdaterTestSeq, - UpdaterTestTypeSupport, - UpdaterTestDataWriter, - UpdaterTestDataReader > UpdaterTest_DDS_Traits; + TestTopic, + TestTopicSeq, + TestTopicTypeSupport, + TestTopicDataWriter, + TestTopicDataReader > TestTopic_DDS_Traits; typedef CIAO::DDS4CCM::Connector_Traits < ::CIAO_Updater_Updater_Connector_Impl::Updater_Connector_Exec, - UpdaterTest_Seq, - ::CCM_DDS::UpdaterTest::CCM_Writer, - ::CCM_DDS::UpdaterTest::CCM_Updater, - ::CCM_DDS::UpdaterTest::CCM_Getter, - ::CCM_DDS::UpdaterTest::CCM_Reader, + TestTopic_Seq, + ::CCM_DDS::TestTopic::CCM_Writer, + ::CCM_DDS::TestTopic::CCM_Updater, + ::CCM_DDS::TestTopic::CCM_Getter, + ::CCM_DDS::TestTopic::CCM_Reader, ::Updater::CCM_Updater_Connector_Context, - ::CCM_DDS::UpdaterTest::Listener, - ::CCM_DDS::UpdaterTest::StateListener, - ::CCM_DDS::ConnectorStatusListener> UpdaterTest_Connector_Traits; + ::CCM_DDS::TestTopic::Listener, + ::CCM_DDS::TestTopic::StateListener, + ::CCM_DDS::ConnectorStatusListener> TestTopic_Connector_Traits; class UPDATER_CONNECTOR_EXEC_Export Updater_Connector_exec_i : - public DDS_State_Connector_T <UpdaterTest_DDS_Traits, UpdaterTest_Connector_Traits> + public DDS_State_Connector_T <TestTopic_DDS_Traits, TestTopic_Connector_Traits> { public: Updater_Connector_exec_i (void); diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.idl b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.idl new file mode 100644 index 00000000000..0ad7a721583 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.idl @@ -0,0 +1,26 @@ +// $Id$ + +/** + * @file + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + */ + +#ifndef RECEIVER_IDL +#define RECEIVER_IDL + +#include "Connector/Updater_Connector.idl" +#include "Connector/Updater_ConnectorE.idl" + + +module Updater +{ + component Receiver + { + //port CCM_DDS::TestTopic::DDS_Get info_get; + port CCM_DDS::TestTopic::DDS_StateListen info_out; + //provides CCM_DDS::ConnectorStatusListener info_out_connector_status; + }; +}; + + +#endif diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.mpc new file mode 100644 index 00000000000..9e092ef2551 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver.mpc @@ -0,0 +1,138 @@ +// $Id$ + +project(DDS_Updater_Receiver_idl_gen) : componentidldefaults { + custom_only = 1 + after += DDS_UPDATER_Connector_idl_gen + idlflags += -Wb,stub_export_macro=RECEIVER_STUB_Export \ + -Wb,stub_export_include=Receiver_stub_export.h \ + -Wb,skel_export_macro=RECEIVER_SVNT_Export \ + -Wb,skel_export_include=Receiver_svnt_export.h \ + -Wb,svnt_export_macro=RECEIVER_SVNT_Export \ + -Wb,svnt_export_include=Receiver_svnt_export.h \ + -Wb,exec_export_macro=RECEIVER_EXEC_Export \ + -Wb,exec_export_include=Receiver_exec_export.h -I.. + + IDL_Files { + Updater_Receiver.idl + } +} + +project(DDS_Updater_Receiver_lem_gen) : ciaoidldefaults { + after += DDS_Updater_Receiver_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=RECEIVER_LEM_STUB_Export \ + -Wb,stub_export_include=Receiver_lem_stub_export.h \ + -SS -Gxhst -I.. + + IDL_Files { + Updater_ReceiverE.idl + } +} + +project(DDS_UPDATER_Receiver_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_Updater_Receiver_lem_gen DDS_Updater_Receiver_stub DDS_Updater_Connector_stub DDS_Updater_Base_stub + libs += Receiver_stub DDS_Updater_Connector_stub DDS_Updater_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_lem_stub + dynamicflags = RECEIVER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_ReceiverEC.cpp + } + + Header_Files { + Updater_ReceiverEC.h + Receiver_lem_stub_export.h + } + + Inline_Files { + Updater_ReceiverEC.inl + } +} + +project(DDS_Updater_Receiver_stub) : ccm_stub, dds4ccm_base { + after += DDS_Updater_Receiver_idl_gen DDS_Updater_Connector_stub DDS_Updater_Base_stub DDS_UPDATER_Connector_lem_gen + libs += DDS_Updater_Connector_stub DDS_Updater_Base_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Receiver_stub + dynamicflags = RECEIVER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_ReceiverC.cpp + } + + Header_Files { + Updater_ReceiverC.h + Receiver_stub_export.h + } + + Inline_Files { + Updater_ReceiverC.inl + } +} + +project(DDS_Updater_Receiver_exec) : ciao_executor, dds4ccm_base { + after += DDS_UPDATER_Receiver_lem_stub DDS_Updater_Receiver_stub DDS_Updater_Base_stub DDS_Updater_Connector_stub DDS_UPDATER_Connector_lem_stub DDS4CCM_lem_stub + sharedname = Receiver_exec + libs += Receiver_stub Receiver_lem_stub DDS_Updater_Base_stub DDS_Updater_Connector_stub DDS_UPDATER_Connector_lem_stub DDS4CCM_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = RECEIVER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_Receiver_exec.cpp + } + + Header_Files { + Updater_Receiver_exec.h + Receiver_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_Updater_Receiver_svnt) : ciao_servant, dds4ccm_base, nddslib { + after += DDS_UPDATER_Receiver_lem_stub DDS_Updater_Base_stub DDS_Updater_Connector_stub DDS_Updater_Connector_svnt DDS_Updater_Receiver_exec DDS_UPDATER_Connector_lem_stub DDS4CCM_lem_stub DDS4CCM_skel + sharedname = Receiver_svnt + libs += Receiver_stub Receiver_lem_stub DDS_Updater_Base_stub DDS_Updater_Connector_stub DDS_Updater_Connector_svnt Receiver_exec DDS_UPDATER_Connector_lem_stub DDS4CCM_lem_stub DDS4CCM_skel + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = RECEIVER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_ReceiverS.cpp + Updater_Receiver_svnt.cpp + } + + Header_Files { + Updater_ReceiverS.h + Updater_Receiver_svnt.h + Receiver_svnt_export.h + } + + Inline_Files { + Updater_ReceiverS.inl + } +} + + diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp new file mode 100644 index 00000000000..880508cd541 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.cpp @@ -0,0 +1,239 @@ +// -*- C++ -*- +// +// $Id$ + + +// Test for SAMPLE_LOST status of the subscriber + + +#include "Updater_Receiver_exec.h" +#include "ciao/Logger/Log_Macros.h" +#include "tao/ORB_Core.h" +#include "ace/OS_NS_time.h" +#include "dds4ccm/impl/ndds/Utils.h" + + +namespace CIAO_Updater_Receiver_Impl +{ + + +read_action_Generator::read_action_Generator (Receiver_exec_i &callback) + : pulse_callback_ (callback) + { + } + + read_action_Generator::~read_action_Generator () + { + } + + int + read_action_Generator::handle_timeout (const ACE_Time_Value &, const void *) + { + try + { + // this->pulse_callback_.read_all(); + } + catch (...) + { + // @todo + } + return 0; + } + //============================================================ + // Facet Executor Implementation Class: StateListener_exec_i + //============================================================ + + StateListener_exec_i::StateListener_exec_i (void) + { + } + + StateListener_exec_i::~StateListener_exec_i (void) + { + } + + // Operations from ::CCM_DDS::StateListener + void + StateListener_exec_i::on_creation (const ::TestTopic & /*datum*/, + const ::CCM_DDS::ReadInfo & /*info*/) + {} + + void + StateListener_exec_i::on_one_update ( + const ::TestTopic & /*datum*/, + const ::CCM_DDS::ReadInfo & /*info*/) + {} + + void + StateListener_exec_i::on_many_updates ( + const ::TestTopic_Seq & /*data*/, + const ::CCM_DDS::ReadInfoSeq & /*infos*/) + {} + void + StateListener_exec_i::on_deletion ( + const ::TestTopic & /*datum*/, + const ::CCM_DDS::ReadInfo & /*info*/) + {} + //============================================================ + // Facet Executor Implementation Class: PortStatusListener_exec_i + //============================================================ + PortStatusListener_exec_i::PortStatusListener_exec_i () + { + } + + PortStatusListener_exec_i::~PortStatusListener_exec_i (void) + { + } + + // Operations from ::CCM_DDS::PortStatusListener + void + PortStatusListener_exec_i::on_requested_deadline_missed ( + ::DDS::DataReader_ptr /* the_reader */, + const ::DDS::RequestedDeadlineMissedStatus & /* status */) + { + } + + void + PortStatusListener_exec_i::on_sample_lost ( + ::DDS::DataReader_ptr /* the_reader */, + const ::DDS::SampleLostStatus & /* status */) + { + } + + //============================================================ + // Component Executor Implementation Class: Receiver_exec_iTestTopic_RawListener_exec_i (); + //============================================================ + + Receiver_exec_i::Receiver_exec_i (void) + : rate_ (10) + { + this->ticker_ = new read_action_Generator (*this); + } + + Receiver_exec_i::~Receiver_exec_i (void) + { + } + + // Supported operations and attributes. + void + Receiver_exec_i::read_all (void) + { + if (CORBA::is_nil (this->reader_.in ())) + { + return; + } + TestTopic_Seq_var TestTopic_infos; + ::CCM_DDS::ReadInfoSeq_var readinfoseq; + try{ + this->reader_->read_all(TestTopic_infos.out(), readinfoseq.out()); + for(CORBA::ULong i = 0; i < readinfoseq->length(); ++i) + { + time_t tim = readinfoseq[i].source_timestamp.sec; + tm* time = ACE_OS::localtime(&tim); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL ReadInfo ") + ACE_TEXT ("-> UTC date = %02d:%02d:%02d.%d\n"), + time ? time->tm_hour : 0, + time ? time->tm_min : 0, + time ? time->tm_sec : 0, + readinfoseq[i].source_timestamp.nanosec)); + } + for(CORBA::ULong i = 0; i < TestTopic_infos->length(); ++i) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("READ_ALL keyed test info : ") + ACE_TEXT ("Number <%d> : received TestTopic_info for <%C> at %u\n"), + i, + TestTopic_infos[i].key.in (), + TestTopic_infos[i].x)); + } + } + catch(CCM_DDS::InternalError& ) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("internal error or no data\n"))); + } + } + // Component attributes. + // Port operations. + + ::CCM_DDS::CCM_PortStatusListener_ptr + Receiver_exec_i::get_info_out_status (void) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("new PortStatuslistener\n"))); + return new PortStatusListener_exec_i (); + } + + ::CCM_DDS::TestTopic::CCM_StateListener_ptr + Receiver_exec_i::get_info_out_data_listener (void) + { + return new StateListener_exec_i(); + } + + + // Operations from Components::SessionComponent. + void + Receiver_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->context_ = + ::Updater::CCM_Receiver_Context::_narrow (ctx); + if ( ::CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Receiver_exec_i::configuration_complete (void) + { + this->reader_ = this->context_->get_connection_info_out_data(); + } + + void + Receiver_exec_i::ccm_activate (void) + { + ::CCM_DDS::StateListenerControl_var lc = + this->context_->get_connection_info_out_data_control (); + + if (CORBA::is_nil (lc.in ())) + { + CIAO_ERROR ((LM_INFO, ACE_TEXT ("Error: Listener control receptacle is null!\n"))); + throw CORBA::INTERNAL (); + } + + lc->mode (::CCM_DDS::NOT_ENABLED); + // calculate the interval time + long usec = 1000000 / this->rate_; + if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer ( + this->ticker_, + 0, + ACE_Time_Value(3, usec), + ACE_Time_Value(3, usec)) == -1) + { + CIAO_ERROR ((LM_ERROR, "Unable to schedule Timer\n")); + } + } + + void + Receiver_exec_i::ccm_passivate (void) + { + this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); + delete this->ticker_; + } + + void + Receiver_exec_i::ccm_remove (void) + { + } + + extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Updater_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/Updater/Receiver/Updater_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.h new file mode 100644 index 00000000000..c4c8526f95c --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Receiver/Updater_Receiver_exec.h @@ -0,0 +1,130 @@ +// -*- C++ -*- +// $Id$ + +#ifndef CIAO_RECEIVER_EXEC_H_ +#define CIAO_RECEIVER_EXEC_H_ + +#include "Updater_ReceiverEC.h" + +#include /**/ "Receiver_exec_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/LocalObject.h" +#include "ace/Task.h" +#include "ace/Reactor.h" + +namespace CIAO_Updater_Receiver_Impl +{ + //typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::ULong > Atomic_ULong; + typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Boolean; + + class Receiver_exec_i; + + class read_action_Generator + : public ACE_Event_Handler + { + public: + read_action_Generator (Receiver_exec_i &callback); + + ~read_action_Generator (); + + /// Handle the timeout. + virtual int handle_timeout (const ACE_Time_Value &tv, + const void *arg); + + private: + /// Maintains a handle that actually process the event + Receiver_exec_i &pulse_callback_; + + }; + class RECEIVER_EXEC_Export PortStatusListener_exec_i + : public virtual ::CCM_DDS::CCM_PortStatusListener, + public virtual ::CORBA::LocalObject + { + public: + PortStatusListener_exec_i (void); + virtual ~PortStatusListener_exec_i (void); + + 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); + }; + class RECEIVER_EXEC_Export StateListener_exec_i + : public virtual ::CCM_DDS::TestTopic::CCM_StateListener, + public virtual ::CORBA::LocalObject + { + public: + StateListener_exec_i (void); + virtual ~StateListener_exec_i (void); + + + virtual void + on_creation ( + const ::TestTopic & datum, + const ::CCM_DDS::ReadInfo & info); + + virtual void + on_one_update ( + const ::TestTopic & datum, + const ::CCM_DDS::ReadInfo & info); + + virtual void + on_many_updates ( + const ::TestTopic_Seq & data, + const ::CCM_DDS::ReadInfoSeq & infos); + virtual void + on_deletion ( + const ::TestTopic & datum, + const ::CCM_DDS::ReadInfo & info); + }; + + + class RECEIVER_EXEC_Export Receiver_exec_i + : public virtual Receiver_Exec, + public virtual ::CORBA::LocalObject + { + public: + Receiver_exec_i (void); + virtual ~Receiver_exec_i (void); + + // Port operations. + virtual ::CCM_DDS::TestTopic::CCM_StateListener_ptr + get_info_out_data_listener (void); + + virtual ::CCM_DDS::CCM_PortStatusListener_ptr + get_info_out_status (void); + + // Operations from Components::SessionComponent. + virtual void + set_session_context ( + ::Components::SessionContext_ptr ctx); + + virtual void configuration_complete (void); + + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + void read_all(void); + + private: + ::Updater::CCM_Receiver_Context_var context_; + ::CCM_DDS::TestTopic::Reader_var reader_; + read_action_Generator * ticker_; + CORBA::ULong rate_; +}; + + extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Updater_Receiver_Impl (void); +} + +#endif /* ifndef */ + diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.idl b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.idl new file mode 100644 index 00000000000..bbf82a9b074 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.idl @@ -0,0 +1,25 @@ +// $Id$ + +/** + * @file + * @author Marijke Hengstmengel <mhengstmengel@remedy.nl> + * + * by-hand idl3 translation of sender components. + */ + +#ifndef DDS_UPDATER_SENDER_IDL +#define DDS_UPDATER_SENDER_IDL + +#include "Connector/Updater_Connector.idl" +#include "Connector/Updater_ConnectorE.idl" + + + +module Updater +{ + component Sender + { + port CCM_DDS::TestTopic::DDS_Update test_topic_update; + }; +}; +#endif diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.mpc b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.mpc new file mode 100644 index 00000000000..79958c866f5 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender.mpc @@ -0,0 +1,140 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p DDS_Updater_Base -l ../lib -o ../lib -c controller -u DDS Sender" + +project(DDS_Updater_Sender_idl_gen) : componentidldefaults { + after += DDS_UPDATER_Connector_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_STUB_Export \ + -Wb,stub_export_include=Sender_stub_export.h \ + -Wb,skel_export_macro=SENDER_SVNT_Export \ + -Wb,skel_export_include=Sender_svnt_export.h \ + -Wb,svnt_export_macro=SENDER_SVNT_Export \ + -Wb,svnt_export_include=Sender_svnt_export.h \ + -Wb,exec_export_macro=SENDER_EXEC_Export \ + -Wb,exec_export_include=Sender_exec_export.h \ + -I .. + + IDL_Files { + Updater_Sender.idl + } +} + +project(DDS_Updater_Sender_lem_gen) : ciaoidldefaults { + after += DDS_Updater_Sender_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=SENDER_LEM_STUB_Export \ + -Wb,stub_export_include=Sender_lem_stub_export.h \ + -SS -Gxhst -I $CIAO_ROOT/connectors -I .. + + IDL_Files { + Updater_SenderE.idl + } +} + +project(DDS_Updater_Sender_lem_stub) : ccm_svnt, dds4ccm_base { + after += DDS_Updater_Sender_lem_gen DDS_Updater_Sender_stub DDS_Updater_Base_stub + libs += DDS_Updater_Base_stub Sender_stub + libpaths += ../lib + libout = ../lib + includes += .. + sharedname = Sender_lem_stub + dynamicflags = SENDER_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_SenderEC.cpp + } + + Header_Files { + Updater_SenderEC.h + Sender_lem_stub_export.h + } + + Inline_Files { + Updater_SenderEC.inl + } +} + +project(DDS_Updater_Sender_stub) : ccm_stub, dds4ccm_base { + after += DDS_Updater_Sender_idl_gen DDS_Updater_Base_stub DDS_Updater_Connector_stub + libs += DDS_Updater_Base_stub DDS_Updater_Connector_stub + includes += .. + libpaths += ../lib + libout = ../lib + sharedname = Sender_stub + dynamicflags = SENDER_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_SenderC.cpp + } + + Header_Files { + Updater_SenderC.h + Sender_stub_export.h + } + + Inline_Files { + Updater_SenderC.inl + } +} + +project(DDS_Updater_Sender_exec) : ciao_executor, dds4ccm_base { + after += DDS_Updater_Sender_lem_stub DDS_Updater_Sender_stub DDS_UPDATER_Connector_lem_stub DDS_Updater_Connector_stub DDS4CCM_lem_stub + sharedname = Sender_exec + libs += Sender_stub Sender_lem_stub DDS_Updater_Base_stub DDS_UPDATER_Connector_lem_stub DDS_Updater_Connector_stub DDS4CCM_lem_stub + libpaths += ../lib + includes += .. + libout = ../lib + dynamicflags = SENDER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_Sender_exec.cpp + } + + Header_Files { + Updater_Sender_exec.h + Sender_exec_export.h + } + + Inline_Files { + } +} + + +project(DDS_Updater_Sender_svnt) : ciao_servant, dds4ccm_base, nddslib { + after += DDS_Updater_Base_stub DDS_Updater_Sender_lem_stub DDS4CCM_lem_stub DDS4CCM_skel DDS_Updater_Connector_stub DDS_Updater_Connector_svnt DDS_UPDATER_Connector_lem_stub + sharedname = Sender_svnt + libs += Sender_stub Sender_lem_stub \ + DDS_Updater_Base_stub DDS4CCM_lem_stub DDS4CCM_skel DDS_Updater_Connector_stub DDS_Updater_Connector_svnt DDS_UPDATER_Connector_lem_stub + libpaths += ../lib + libout = ../lib + includes += .. + dynamicflags = SENDER_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + Updater_SenderS.cpp + Updater_Sender_svnt.cpp + } + + Header_Files { + Updater_SenderS.h + Updater_Sender_svnt.h + Sender_svnt_export.h + } + + Inline_Files { + Updater_SenderS.inl + } +} + diff --git a/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.cpp new file mode 100644 index 00000000000..4c7a25bdce7 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.cpp @@ -0,0 +1,671 @@ +// -*- C++ -*- +// $Id$ + +//Test Updater functions +#include "Updater_Sender_exec.h" +#include "ciao/Logger/Log_Macros.h" +#include "tao/ORB_Core.h" +#include "ace/Reactor.h" + +namespace CIAO_Updater_Sender_Impl +{ + //============================================================ + // Pulse generator + //============================================================ + + pulse_Generator::pulse_Generator (Sender_exec_i &callback) + : pulse_callback_ (callback) + { + } + + int + pulse_Generator::handle_timeout (const ACE_Time_Value &, const void *) + { + // Notify the subscribers + this->pulse_callback_.tick (); + return 0; + } + //============================================================ + // Component Executor Implementation Class: Sender_exec_i + //============================================================ + + Sender_exec_i::Sender_exec_i (void) + : test_nr_(UPDATE_CREATE), + test_ok_(true) + { + this->ticker_ = new pulse_Generator (*this); + } + + Sender_exec_i::~Sender_exec_i (void) + { + } + + // Supported operations and attributes. + CORBA::Boolean + Sender_exec_i::create_one() + { + CORBA::Boolean result = true; + TestTopic i = this->topic_seq_one_[0]; + try + { + if (!CORBA::is_nil (this->updater_) ) { + this->updater_->create_one(i); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: create_one with instance key <%s>\n"), + i.key)); + } + else + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: updater_ is nil"))); + result= false; + } + } + catch(CCM_DDS::AlreadyCreated &) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: AlreadyCreated with test updater create_one <%s>.\n"), + i.key)); + result= false; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while create_one for <%s>.\n"), + i.key)); + result=false;; + } + return result; + } + + CORBA::Boolean + Sender_exec_i::create_one_already_exist() + { + CORBA::Boolean result = false; + TestTopic i = this->topic_seq_one_[0]; + //try to create same instance again, this should erase an AlreadyCreated exception + try + { + this->updater_->create_one(i); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: create_one with already existing instance key <%s>\n"), + i.key)); + } + catch(CCM_DDS::AlreadyCreated &) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Expected : Exception AlreadyCreated test updater create_one.\n"))); + result=true; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while create_one for <%s>.\n"), + i.key)); + result=false; + } + return result; + } + + CORBA::Boolean + Sender_exec_i::update_one() + { + //update already created instance with handle nil + CORBA::Boolean result = true; + TestTopic i = this->topic_seq_one_[0]; + try + { + this->updater_->update_one(i, DDS::HANDLE_NIL); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: update_one with already existing instance with DDS::HANDLE_NIL, key <%s>\n"), + i.key)); + } + catch(CCM_DDS::NonExistent &) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater update_one <%s>.\n"), + i.key)); + result = false; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while update_one for <%s>.\n"), + i.key)); + result = false; + } + return result; + } + + CORBA::Boolean + Sender_exec_i::update_one_not_registered() + { + //update a not yet registered instance,expext a NonExistent exception + CORBA::Boolean result = false; + //use second instance of table + TestTopic i = this->topic_seq_one_[1]; + try + { + this->updater_->update_one(i, DDS::HANDLE_NIL); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: update_one with not registerd instance, key <%s>\n"), + i.key)); + } + catch(CCM_DDS::NonExistent &) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Expected : Exception NonExistent test updater updater_one.\n"))); + result=true; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while update_one for <%s>.\n"), + i.key)); + result = false; + } + return result; + } + + CORBA::Boolean + Sender_exec_i::delete_one() + { + //delete registerd instance with DDS::HANDLE_NIL + CORBA::Boolean result = true; + TestTopic i = this->topic_seq_one_[0]; + try + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: delete_one with registerd instance with DDS::HANDLE_NIL, key <%s>\n"), + i.key)); + this->updater_->delete_one(i, DDS::HANDLE_NIL); + } + catch(CCM_DDS::NonExistent &) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater delete_one <%s>.\n"), + i.key)); + result = false; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while delete_one for <%s>.\n"), + i.key)); + result = false; + } + return result; + } + + CORBA::Boolean + Sender_exec_i::delete_one_not_registered() + { + //delete non-existing instance, expect NonExistent exception + CORBA::Boolean result = false; + TestTopic i = this->topic_seq_one_[1]; + try + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: delete_one with not registerd instance, key <%s>\n"), + i.key)); + this->updater_->delete_one(i, DDS::HANDLE_NIL); + } + catch(CCM_DDS::NonExistent &) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Expected : Exception NonExistent test updater delete_one.\n"))); + result = true; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while delete_one for <%s>.\n"), + i.key)); + result = false; + } + return result; + } + + CORBA::Boolean + Sender_exec_i::update_and_delete_one_after_register() + { + //update an instance after registering first, using a handle + CORBA::Boolean result = true; + TestTopic i = this->topic_seq_one_[2]; + //take third instance of table + DDS::InstanceHandle_t hnd = this->updater_->register_instance(i); + try + { + if(hnd.isValid) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: update a new instance after registrating instance, key <%s>\n"), + i.key)); + this->updater_->update_one(i, hnd); + + } + else + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Error, invalid handle for <%s>.\n"), + i.key)); + result = false; + } + } + catch(CCM_DDS::NonExistent &) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater update_one using handle <%s>.\n"), + i.key)); + result = false; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while update_one for <%s>.\n"), + i.key)); + result = false; + } + //update an instance with an instance_handler belonging to an other instance + if(result == true) + { + try + { + result=false; + TestTopic y = this->topic_seq_one_[0]; + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: update an instance with an instance_handler belonging to an other instance\n"))); + this->updater_->update_one(y, hnd); + } + catch(CCM_DDS::NonExistent &) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater update_one with incompatible datum and handle <%s>.\n"))); + result = false; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Expected : Exception InternalError test updater update_one with incompatible datum and handle.\n"))); + result = true; + } + } + if(result==true) + { + try + { + i = this->topic_seq_one_[2]; + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Updater: delete a instance with handle, key <%s>\n"), + i.key)); + this->updater_->delete_one(i, hnd); + } + + catch(CCM_DDS::NonExistent &) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater delett_one with valid handler <%s>.\n"))); + result = false; + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Internal Error while delete_one for <%s>.\n"), + i.key)); + result = false; + } + } + return result; + } + + CORBA::Boolean + Sender_exec_i::create_many() + { + //create many with no exception + CORBA::Boolean result = false; + try + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("create_many : <%u> samples\n"), + this->topic_seq_many_.length ())); + this->updater_->create_many (this->topic_seq_many_); + result=true; + } + catch(CCM_DDS::NonExistent& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater create_many\n"))); + } + catch (CCM_DDS::InternalError& ex) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") + ACE_TEXT ("in updater: create_many: index <%d> - retval <%d>\n"), + ex.index, ex.error_code)); + + } + if(result==true) + { + result=false; + //test create_many with AlreadyCreated exception + + try + { + this->updater_->create_many (this->topic_seq_many_); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("create_many which are already created : <%u> samples\n"), + this->topic_seq_many_.length ())); + + } + catch (CCM_DDS::NonExistent & ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Unexpected Error ") + ACE_TEXT ("in create_many , already created.\n"))); + result=false; + } + catch (CCM_DDS::AlreadyCreated & ) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Expected : Exception AlreadyCreated test updater create_many.\n"))); + result=true; + } + catch (CCM_DDS::InternalError& ex) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") + ACE_TEXT ("in test create_many,already created: index <%d> - retval <%d>\n"), + ex.index, ex.error_code)); + result=false; + } + } + return result; + } + + CORBA::Boolean + Sender_exec_i::update_many() + { + CORBA::Boolean result = false; + try + { + this->updater_->update_many (this->topic_seq_many_); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("update_many : written <%u> samples\n"), + this->topic_seq_many_.length ())); + result=true; + } + catch(CCM_DDS::NonExistent& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater update_many.\n"))); + result=false; + } + catch (CCM_DDS::InternalError& ex) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") + ACE_TEXT ("whit update_many: index <%d> - retval <%d>\n"), + ex.index, ex.error_code)); + result=false; + } + if(result==true) + { + result=false; + //update with exception + // make from the second and third instances a unregistered instance , see above + char key[7]; + TestTopic test_key; + ACE_OS::sprintf (key, "XXX_%d",2); + test_key.key = CORBA::string_dup(key); + test_key.x = 2; + this->topic_seq_many_[1] = test_key; + ACE_OS::sprintf (key, "YYY_%d",3); + test_key.key = CORBA::string_dup(key); + test_key.x = 3; + this->topic_seq_many_[2] = test_key; + try + { + this->updater_->update_many (this->topic_seq_many_); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("create_many : <%u> samples\n"), + this->topic_seq_many_.length ())); + } + catch (CCM_DDS::NonExistent & ex) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Expected : Exception NonExistent test updater update_many.\n"), + ACE_TEXT ("index length expected = 2 and value = %d, expected index[0] = 1 and value = %d.\n"), + ex.indexes.length(),ex.indexes[0])); + + if((ex.indexes.length() != 2) || (ex.indexes[0] != 1) ||(ex.indexes[1] != 2)) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Create_maney:expected exception: NonExistent gives wrong indexes.\n"))); + result=false; + } + else + { + result=true; + } + } + catch (CCM_DDS::InternalError& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") + ACE_TEXT ("test update_many with not registerd instances\n"))); + } + catch (CCM_DDS::AlreadyCreated & ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: AlreadyCreated with test update_many with not registerd instances.\n"))); + result=false; + } + } + return result; + } + + CORBA::Boolean + Sender_exec_i::delete_many() + { + CORBA::Boolean result = false; + result=false; + //delete_many with exception + // make from the second and third instances a unregistered instance + try + { + this->updater_->delete_many (this->topic_seq_many_); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("create_many : <%u> samples\n"), + this->topic_seq_many_.length ())); + } + catch (CCM_DDS::NonExistent & ex) + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Expected : Exception NonExistent test updater delete_many.\n"), + ACE_TEXT ("index length expected = 2 and value = %d, expected index[0] = 1 and value = %d.\n"), + ex.indexes.length(),ex.indexes[0])); + + if((ex.indexes.length() != 2) || (ex.indexes[0] != 1) ||(ex.indexes[1] != 2)) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Create_many:expected exception: NonExistent gives wrong indices.\n"))); + result=false; + } + else + { + result=true; + } + } + catch (CCM_DDS::InternalError& ex) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") + ACE_TEXT ("test updater delete_many with inregisterd instances, info: index <%d> - retval <%d>\n"), + ex.index, ex.error_code)); + result=false; + } + catch (CCM_DDS::AlreadyCreated &) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: AlreadyCreated with test updater delete_many.\n"))); + result=false; + } + if(result==true) + { + //delete many with no exception + //reset instances to original values + for (int i = 1; i < 4; i++) + { + char key[7]; + TestTopic new_key; + ACE_OS::sprintf (key, "many_%d", i); + new_key.key = CORBA::string_dup(key); + new_key.x = i; + this->topic_seq_many_[i-1] = new_key; + } + try + { + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_many : deleted <%u> samples\n"), + this->topic_seq_many_.length ())); + + this->updater_->delete_many (this->topic_seq_many_); + result=true; + } + catch(CCM_DDS::NonExistent& ) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Unexpected exception: NonExistent with test updater delete_many\n"))); + result=false; + } + catch (CCM_DDS::InternalError& ex) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Internal Error ") + ACE_TEXT ("with test updater delete_many: index <%d> - retval <%d>\n"), + ex.index, ex.error_code)); + result=false; + } + } + return result; + } + + void + Sender_exec_i::add_instances_of_topic () + { + //make 2 sequences of instances as testdata + CORBA::UShort total = 3; + this->topic_seq_one_.length (total); + //sequence for tests with .._one + for (int i = 1; i < (total + 1); i++) + { + char key[7]; + TestTopic new_key; + ACE_OS::sprintf (key, "KEY_%d", i); + new_key.key = CORBA::string_dup(key); + new_key.x = i; + this->topic_seq_one_[i-1] = new_key; + } + //sequence for tests with .._many + this->topic_seq_many_.length (total); + for (int i = 1; i < (total + 1); i++) + { + char key[7]; + TestTopic new_key; + ACE_OS::sprintf (key, "many_%d", i); + new_key.key = CORBA::string_dup(key); + new_key.x = i; + this->topic_seq_many_[i-1] = new_key; + } + } + + void + Sender_exec_i::tick () + { + if(this->test_ok_.value()) + { + switch (this->test_nr_) + { + case UPDATE_CREATE: + this->test_ok_ = this->create_one(); + if(this->test_ok_.value()) + { + this->test_nr_ = UPDATE_CREATE_ALREADY_EXIST; + } + else + { + this->test_nr_ = END_TEST; + } + break; + case UPDATE_CREATE_ALREADY_EXIST: + this->test_ok_ = this->create_one_already_exist(); + this->test_nr_ = UPDATE_ONE; + break; + case UPDATE_ONE: + this->test_ok_ = this->update_one(); + this->test_nr_ = UPDATE_ONE_NOT_REGISTERED; + break; + case UPDATE_ONE_NOT_REGISTERED: + this->test_ok_ = this->update_one_not_registered(); + this->test_nr_ = DELETE_ONE; + break; + case DELETE_ONE: + this->test_ok_ = this->delete_one(); + this->test_nr_ = DELETE_ONE_NOT_REGISTERED; + break; + case DELETE_ONE_NOT_REGISTERED: + this->test_ok_ = this->delete_one_not_registered(); + this->test_nr_ = UPDATE_DELETE_REGISTER; + break; + case UPDATE_DELETE_REGISTER: + this->test_ok_ = this->update_and_delete_one_after_register(); + this->test_nr_ = CREATE_MANY; + break; + case CREATE_MANY: + this->test_ok_ = this->create_many(); + if(this->test_ok_.value()) + { + this->test_nr_ = UPDATE_MANY; + } + else + { + this->test_nr_ = END_TEST; + } + this->test_nr_ = UPDATE_MANY; + break; + case UPDATE_MANY: + this->test_ok_ = this->update_many(); + this->test_nr_ = DELETE_MANY; + break; + case DELETE_MANY: + this->test_ok_ = this->delete_many(); + this->test_nr_ = END_TEST; + break; + default: + break; + } + } + } + void + Sender_exec_i::start (void) + { + long sec = 3L; + long usec = 0L; + if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer ( + this->ticker_, + 0, + ACE_Time_Value (sec, usec), + ACE_Time_Value (sec, usec)) == -1) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("Sender_exec_i::start : ") + ACE_TEXT ("Error scheduling timer"))); + } + } + + void + Sender_exec_i::stop (void) + { + this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); + CIAO_DEBUG ((LM_DEBUG, ACE_TEXT ("Sender_exec_i::stop : Timer canceled.\n"))); + delete this->ticker_; + } + + void + Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx) + { + this->context_ = ::Updater::CCM_Sender_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Sender_exec_i::configuration_complete (void) + { + this->updater_ = this->context_->get_connection_test_topic_update_data (); + } + void + Sender_exec_i::ccm_activate (void) + { + this->add_instances_of_topic (); + this->start (); + } + + void + Sender_exec_i::ccm_passivate (void) + { + this->stop (); + } + + void + Sender_exec_i::ccm_remove (void) + { + if(!this->test_ok_.value()) + { + CIAO_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Error in Updater in Sender"))); + } + } + + extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Updater_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/Updater/Sender/Updater_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.h new file mode 100644 index 00000000000..6bfe43a0a9a --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/Updater/Sender/Updater_Sender_exec.h @@ -0,0 +1,95 @@ +// -*- C++ -*- +// $Id$ + +#ifndef CIAO_SENDER_EXEC_H_ +#define CIAO_SENDER_EXEC_H_ + + +#include "Updater_SenderEC.h" + +#include /**/ "Sender_exec_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/LocalObject.h" + +#include <map> + +namespace CIAO_Updater_Sender_Impl +{ + typedef ACE_Atomic_Op <TAO_SYNCH_MUTEX, CORBA::Boolean > Atomic_Boolean; + + class Sender_exec_i; + + enum UPDATER_TEST { + UPDATE_CREATE, + UPDATE_CREATE_ALREADY_EXIST, + UPDATE_ONE, + UPDATE_ONE_NOT_REGISTERED, + DELETE_ONE, + DELETE_ONE_NOT_REGISTERED, + UPDATE_DELETE_REGISTER, + CREATE_MANY, + UPDATE_MANY, + DELETE_MANY, + END_TEST + }; + + class pulse_Generator : + public ACE_Event_Handler + { + public: + pulse_Generator (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 &pulse_callback_; + }; + + class Sender_exec_i + : public virtual Sender_Exec, + public virtual ::CORBA::LocalObject + { + public: + Sender_exec_i (void); + virtual ~Sender_exec_i (void); + virtual void set_session_context (::Components::SessionContext_ptr ctx); + virtual void configuration_complete (void); + virtual void ccm_activate (void); + virtual void ccm_passivate (void); + virtual void ccm_remove (void); + void tick (void); + + private: + void start (void); + void stop (void); + void add_instances_of_topic (void); + CORBA::Boolean create_one(void); + CORBA::Boolean create_one_already_exist(void); + CORBA::Boolean update_one(void); + CORBA::Boolean update_one_not_registered(void); + CORBA::Boolean delete_one(void); + CORBA::Boolean delete_one_not_registered(void); + CORBA::Boolean update_and_delete_one_after_register(void); + CORBA::Boolean create_many(void); + CORBA::Boolean update_many(void); + CORBA::Boolean delete_many(void); + + pulse_Generator * ticker_; + ::Updater::CCM_Sender_Context_var context_; + CCM_DDS::TestTopic::Updater_var updater_; + UPDATER_TEST test_nr_; + Atomic_Boolean test_ok_; + //TAO_SYNCH_MUTEX mutex_; + TestTopic_Seq topic_seq_one_; + TestTopic_Seq topic_seq_many_; + }; + extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Updater_Sender_Impl (void); +} + +#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/Updater/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/Updater/descriptors/Plan.cdp index da5c2c2d006..3d2bc340ed6 100644 --- a/CIAO/connectors/dds4ccm/tests/Updater/descriptors/Plan.cdp +++ b/CIAO/connectors/dds4ccm/tests/Updater/descriptors/Plan.cdp @@ -3,8 +3,8 @@ 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>KeyedWriter_Depl_1</label> - <UUID>KeyedWriter_Depl_1</UUID> + <label>Updater_Depl_1</label> + <UUID>Updater_Depl_1</UUID> <implementation xmi:id="ReceiverComponentImplementation"> <name>ReceiverComponentImplementation</name> @@ -19,7 +19,7 @@ <kind>tk_string</kind> </type> <value> - <string>create_Writer_Receiver_Impl</string> + <string>create_Updater_Receiver_Impl</string> </value> </value> </execParameter> @@ -30,7 +30,7 @@ <kind>tk_string</kind> </type> <value> - <string>create_Writer_Receiver_Servant</string> + <string>create_Updater_Receiver_Servant</string> </value> </value> </execParameter> @@ -58,11 +58,11 @@ </execParameter> </implementation> - <implementation xmi:id="Writer_ConnectorComponentImplementation"> - <name>Writer_ConnectorComponentImplementation</name> + <implementation xmi:id="Updater_ConnectorComponentImplementation"> + <name>Updater_ConnectorComponentImplementation</name> <source/> - <artifact xmi:idref="Writer_Connector_ExecArtifact" /> - <artifact xmi:idref="Writer_Connector_SvntArtifact" /> + <artifact xmi:idref="Updater_Connector_ExecArtifact" /> + <artifact xmi:idref="Updater_Connector_SvntArtifact" /> <execParameter> <!-- entrypoint as exec parameter (see 10.6.1) --> <name>component factory</name> @@ -71,7 +71,7 @@ <kind>tk_string</kind> </type> <value> - <string>create_Writer_Writer_Connector_Impl</string> + <string>create_Updater_Updater_Connector_Impl</string> </value> </value> </execParameter> @@ -82,7 +82,7 @@ <kind>tk_string</kind> </type> <value> - <string>create_Writer_Writer_Connector_Servant</string> + <string>create_Updater_Updater_Connector_Servant</string> </value> </value> </execParameter> @@ -93,7 +93,7 @@ <kind>tk_string</kind> </type> <value> - <string>Writer_Connector_svnt</string> + <string>Updater_Connector_svnt</string> </value> </value> </execParameter> @@ -104,11 +104,13 @@ <kind>tk_string</kind> </type> <value> - <string>Writer_Connector_exec</string> + <string>Updater_Connector_exec</string> </value> </value> </execParameter> </implementation> + + <implementation xmi:id="SenderComponentImplementation"> <name>SenderComponentImplementation</name> <source/> @@ -122,7 +124,7 @@ <kind>tk_string</kind> </type> <value> - <string>create_Writer_Sender_Impl</string> + <string>create_Updater_Sender_Impl</string> </value> </value> </execParameter> @@ -133,7 +135,7 @@ <kind>tk_string</kind> </type> <value> - <string>create_Writer_Sender_Servant</string> + <string>create_Updater_Sender_Servant</string> </value> </value> </execParameter> @@ -167,12 +169,13 @@ <source/> <implementation xmi:idref="ReceiverComponentImplementation" /> </instance> - <instance xmi:id="Writer_ConnectorComponentInstance"> - <name>Writer_ConnectorComponent</name> + + <instance xmi:id="Updater_ConnectorComponentInstance"> + <name>Updater_ConnectorComponent</name> <node>SenderNode</node> <!-- hostname --> <source/> - <implementation xmi:idref="Writer_ConnectorComponentImplementation" /> + <implementation xmi:idref="Updater_ConnectorComponentImplementation" /> <configProperty> <name>topic_name</name> <value> @@ -180,28 +183,17 @@ <kind>tk_string</kind> </type> <value> - <string>KeyedWriter</string> - </value> - </value> - </configProperty> - <configProperty> - <name>qos_profile</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>KeyedWriter_Library#KeyedWriter_Profile</string> + <string>TestQoS</string> </value> </value> </configProperty> </instance> - <instance xmi:id="Writer_ConnectorComponentInstance2"> - <name>Writer_ConnectorComponent2</name> + <instance xmi:id="Updater_ConnectorComponentInstance2"> + <name>Updater_ConnectorComponent2</name> <node>ReceiverNode</node> <!-- hostname --> <source/> - <implementation xmi:idref="Writer_ConnectorComponentImplementation" /> + <implementation xmi:idref="Updater_ConnectorComponentImplementation" /> <configProperty> <name>topic_name</name> <value> @@ -209,18 +201,7 @@ <kind>tk_string</kind> </type> <value> - <string>KeyedWriter</string> - </value> - </value> - </configProperty> - <configProperty> - <name>qos_profile</name> - <value> - <type> - <kind>tk_string</kind> - </type> - <value> - <string>KeyedWriter_Library#KeyedWriter_Profile</string> + <string>TestQoS</string> </value> </value> </configProperty> @@ -231,42 +212,54 @@ <!-- hostname --> <source/> <implementation xmi:idref="SenderComponentImplementation" /> - <configProperty> - <name>rate</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>1</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>iterations</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>3</ushort> - </value> - </value> - </configProperty> - <configProperty> - <name>keys</name> - <value> - <type> - <kind>tk_ushort</kind> - </type> - <value> - <ushort>2</ushort> - </value> - </value> - </configProperty> </instance> <connection> + <name>_listenercontrol</name> + <internalEndpoint> + <portName>info_out_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="Updater_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + <connection> + <name>_statelistener</name> + <internalEndpoint> + <portName>info_out_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="Updater_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + <connection> + <name>_portstatuslistener</name> + <internalEndpoint> + <portName>info_out_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>push_state_observer_status</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Updater_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + <!--connection> <name>_rawlistner</name> <internalEndpoint> <portName>info_out_data_listener</portName> @@ -278,41 +271,70 @@ <portName>push_consumer_data_listener</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> - <instance xmi:idref="Writer_ConnectorComponentInstance2" /> + <instance xmi:idref="Updater_ConnectorComponentInstance2" /> </internalEndpoint> - </connection> - + </connection--> <connection> - <name>_datacontrol</name> + <name>info_out_data</name> <internalEndpoint> - <portName>info_out_data_control</portName> + <portName>info_out_data</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="ReceiverComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>push_consumer_data_control</portName> + <portName>push_state_observer_data</portName> <provider>true</provider> <kind>Facet</kind> - <instance xmi:idref="Writer_ConnectorComponentInstance2" /> + <instance xmi:idref="Updater_ConnectorComponentInstance2" /> </internalEndpoint> </connection> - + <!-->connection> + <name>info_out_connector_status_receiver</name> + <internalEndpoint> + <portName>info_out_connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="ReceiverComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Updater_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection--> + <!-->connection> + <name>test_topic_connector_status_sender</name> + <internalEndpoint> + <portName>test_topic_connector_status</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="SenderComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>error_listener</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Updater_ConnectorComponentInstance" /> + </internalEndpoint> + </connection--> <connection> - <name>writer_connection</name> + <name>updater_connection</name> <internalEndpoint> - <portName>info_write_data</portName> + <portName>test_topic_update_data</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> <instance xmi:idref="SenderComponentInstance" /> </internalEndpoint> <internalEndpoint> - <portName>supplier_data</portName> + <portName>observable_data</portName> <provider>true</provider> <kind>Facet</kind> - <instance xmi:idref="Writer_ConnectorComponentInstance" /> + <instance xmi:idref="Updater_ConnectorComponentInstance" /> </internalEndpoint> </connection> + <artifact xmi:id="Sender_ExecArtifact"> <name>Sender_exec</name> @@ -332,24 +354,26 @@ <node/> <location>Sender_stub</location> </artifact> - <artifact xmi:id="Writer_Connector_ExecArtifact"> - <name>Writer_Connector_exec</name> + <artifact xmi:id="Updater_Connector_ExecArtifact"> + <name>Updater_Connector_exec</name> <source/> <node/> - <location>DDS_KeyedWriterConnector_exec</location> + <location>DDS_Updater_Connector_exec</location> </artifact> - <artifact xmi:id="Writer_Connector_SvntArtifact"> - <name>Writer_Connector_svnt</name> + <artifact xmi:id="Updater_Connector_SvntArtifact"> + <name>Updater_Connector_svnt</name> <source/> <node/> - <location>DDS_KeyedWriterConnector_svnt</location> + <location>DDS_Updater_Connector_svnt</location> </artifact> - <artifact xmi:id="Writer_Connector_StubArtifact"> - <name>Writer_Connector_stub</name> + <artifact xmi:id="Updater_Connector_StubArtifact"> + <name>Updater_Connector_stub</name> <source/> <node/> - <location>DDS_KeyedWriterConnector_stub</location> + <location>DDS_Updater_Connector_stub</location> </artifact> + + <artifact xmi:id="Receiver_ExecArtifact"> <name>Receiver_exec</name> <source/> |