diff options
author | msmit <msmit@remedy.nl> | 2010-02-22 14:29:07 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2010-02-22 14:29:07 +0000 |
commit | 6eadbc6105c25b84b724425fc47fb70da1dbfec4 (patch) | |
tree | c6499a98d2ed5d7f89044f26f5ccf11d890d64e9 | |
parent | 98184d5cc69997d0decb23f30b17ad88fb9ca80e (diff) | |
download | ATCD-6eadbc6105c25b84b724425fc47fb70da1dbfec4.tar.gz |
Mon Feb 22 14:26:16 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tests/Getter/Base/Get_Invoker.idl:
* connectors/dds4ccm/tests/Getter/Base/Getter_Test_Base.idl:
* connectors/dds4ccm/tests/Getter/Connector/Getter_Test_Connector.idl:
* connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver.idl:
* connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.h:
* connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.cpp:
* connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender.idl:
* connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.h:
* connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.cpp:
* connectors/dds4ccm/tests/Getter/descriptors/Plan.cdp:
Extended test with an extra connector which handles a fixed
size struct.
11 files changed, 378 insertions, 44 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 2d24b04829d..d9754316085 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,18 @@ +Mon Feb 22 14:26:16 UTC 2010 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/tests/Getter/Base/Get_Invoker.idl: + * connectors/dds4ccm/tests/Getter/Base/Getter_Test_Base.idl: + * connectors/dds4ccm/tests/Getter/Connector/Getter_Test_Connector.idl: + * connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver.idl: + * connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.h: + * connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.cpp: + * connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender.idl: + * connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.h: + * connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.cpp: + * connectors/dds4ccm/tests/Getter/descriptors/Plan.cdp: + Extended test with an extra connector which handles a fixed + size struct. + Mon Feb 22 13:48:38 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl> * connectors/dds4ccm/examples/Hello/Base/Hello_Base.idl diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Base/Get_Invoker.idl b/CIAO/connectors/dds4ccm/tests/Getter/Base/Get_Invoker.idl index 1ae28f92876..5709fe39c20 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Base/Get_Invoker.idl +++ b/CIAO/connectors/dds4ccm/tests/Getter/Base/Get_Invoker.idl @@ -14,7 +14,7 @@ interface GetInvoker { void start_timeout_get_one (); void start_timeout_get_many (); - void start_get_one (in string key, in long iteration); + void start_get_one (in string key, in long fixed_key, in long iteration); void start_get_many (in short keys, in long iterations); }; diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Base/Getter_Test_Base.idl b/CIAO/connectors/dds4ccm/tests/Getter/Base/Getter_Test_Base.idl index 5c3bcc779fd..52e7455c2a9 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Base/Getter_Test_Base.idl +++ b/CIAO/connectors/dds4ccm/tests/Getter/Base/Getter_Test_Base.idl @@ -17,7 +17,12 @@ struct GetterTest { string key; long iteration; }; - typedef sequence<GetterTest> GetterTest_Seq; +struct GetterFixed { + long key; + long iteration; +}; +typedef sequence<GetterFixed> GetterFixed_Seq; + #endif diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Connector/Getter_Test_Connector.idl b/CIAO/connectors/dds4ccm/tests/Getter/Connector/Getter_Test_Connector.idl index 937fc22bba9..dbf1699555b 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Connector/Getter_Test_Connector.idl +++ b/CIAO/connectors/dds4ccm/tests/Getter/Connector/Getter_Test_Connector.idl @@ -14,16 +14,17 @@ #pragma ciao lem "Connector/Getter_Test_ConnectorE.idl" -module CCM_DDS -{ - module ::CCM_DDS::Typed < ::GetterTest, ::GetterTest_Seq> GetterTest; -}; - module Getter_Test { - connector Getter_Test_Connector : ::CCM_DDS::GetterTest::DDS_Event + module ::CCM_DDS::Typed < ::GetterTest, ::GetterTest_Seq> GetterTestConn; + connector Getter_Test_Connector : GetterTestConn::DDS_Event + { + }; + + module ::CCM_DDS::Typed < ::GetterFixed, ::GetterFixed_Seq> GetterFixedConn; + connector Getter_Fixed_Connector : GetterFixedConn::DDS_Event { }; }; -#endif /* Getter_Test_CONNECTOR_IDL_ */ +#endif /* GETTER_TEST_CONNECTOR_IDL_ */ diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver.idl b/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver.idl index dffe9828ae7..a034cfa12cf 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver.idl +++ b/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver.idl @@ -15,7 +15,8 @@ module Getter_Test { component Receiver { - port CCM_DDS::GetterTest::DDS_Get info_get; + port GetterTestConn::DDS_Get info_get; + port GetterFixedConn::DDS_Get info_fixed; provides GetInvoker getter_invoke; }; diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.cpp index 55d851da9c5..0bc81c1f2d1 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.cpp @@ -1,4 +1,4 @@ -// -*- C++ -*- +// // -*- C++ -*- // // $Id$ @@ -36,9 +36,10 @@ namespace CIAO_Getter_Test_Receiver_Impl void Invoker_exec_i::start_get_one (const char * key, - CORBA::Long iteration) + ::CORBA::Long fixed_key, + ::CORBA::Long iteration) { - this->callback_.start_get_one (key, iteration); + this->callback_.start_get_one (key, fixed_key, iteration); } void @@ -52,9 +53,11 @@ namespace CIAO_Getter_Test_Receiver_Impl //============================================================ GetOneHandler::GetOneHandler (Receiver_exec_i &callback, const char * key, + CORBA::Long fixed_key, CORBA::Long iteration) : callback_ (callback), key_ (key), + fixed_key_ (fixed_key), iteration_ (iteration) { } @@ -66,7 +69,7 @@ namespace CIAO_Getter_Test_Receiver_Impl int GetOneHandler::handle_exception (ACE_HANDLE) { - this->callback_.get_one (this->key_, this->iteration_); + this->callback_.get_one (this->key_, this->fixed_key_, this->iteration_); return 0; } @@ -106,9 +109,13 @@ namespace CIAO_Getter_Test_Receiver_Impl void Receiver_exec_i::start_get_one (const char * key, - CORBA::Long iteration) + CORBA::Long fixed_key, + CORBA::Long iteration) { - GetOneHandler* rh = new GetOneHandler (*this, CORBA::string_dup (key), iteration); + GetOneHandler* rh = new GetOneHandler (*this, + CORBA::string_dup (key), + fixed_key, + iteration); this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->notify (rh); } @@ -174,13 +181,90 @@ namespace CIAO_Getter_Test_Receiver_Impl } void - Receiver_exec_i::get_one (const char * key, CORBA::Long iteration) + Receiver_exec_i::get_one_fixed (CORBA::Long fixed_key, CORBA::Long iteration) + { + DDS::Duration_t to; + to.sec = 5; + to.nanosec = 0; + this->fixed_->time_out (to); + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::get_one_fixed: " + "Start getting data from DDS: " + "key <%u> - iteration <%d> " + " with timeout: " + "sec <%u> - nanosec <%u>\n", + fixed_key, iteration, + this->getter_->time_out ().sec, + this->getter_->time_out ().nanosec)); + GetterFixed gettertest_info; + ::CCM_DDS::ReadInfo readinfo; + ACE_Time_Value tv = ACE_OS::gettimeofday (); + bool result = this->fixed_->get_one (gettertest_info, readinfo); + if (result) + { + ACE_Time_Value dur = ACE_OS::gettimeofday () - tv; + ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::get_one_fixed: " + "get_one took <%#T>\n", + &dur)); + if (gettertest_info.key != fixed_key) + { + ACE_ERROR ((LM_ERROR, CLINFO "ERROR FIXED: GET ONE: " + "Expected key does " + "not match received key: " + "expected <%u> - received <%C>\n", + fixed_key, + gettertest_info.key)); + } + if (gettertest_info.iteration != iteration) + { + ACE_ERROR ((LM_ERROR, CLINFO "ERROR FIXED: GET ONE: " + "Expected iteration does " + "not match received iteration: " + "expected <%d> - received <%d>\n", + iteration, + gettertest_info.iteration)); + } + // check readinfo struct. + if (readinfo.instance_handle.isValid) + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR FIXED: GET MANY: ") + ACE_TEXT ("received instance handle should be invalid ") + ACE_TEXT ("for unkeyed data: ") + ACE_TEXT ("key <%u> - iteration <%u>\n"), + gettertest_info.key, + gettertest_info.iteration)); + } + if (readinfo.source_timestamp.sec == 0 && + readinfo.source_timestamp.nanosec == 0) + { + ACE_ERROR ((LM_ERROR, "ERROR FIXED: READ ONE LAST: " + "source timestamp seems to be invalid (nil) " + "key <%u> - iteration <%d>\n", + gettertest_info.key, + gettertest_info.iteration)); + } + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::get_one_fixed: " + "Returned data : key <%u> - iteration <%d>\n", + gettertest_info.key, + gettertest_info.iteration)); + } + else + { + ACE_ERROR ((LM_ERROR, CLINFO "ERROR FIXED: GET ONE: " + "Time out while waiting for " + "key <%u> - iteration <%d>\n", + fixed_key, + iteration)); + } + } + + void + Receiver_exec_i::get_one_variable (const char * key, CORBA::Long iteration) { DDS::Duration_t to; to.sec = 5; to.nanosec = 0; this->getter_->time_out (to); - ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::get_one: " + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::get_one_variable: " "Start getting data from DDS: " "key <%C> - iteration <%d> " " with timeout: " @@ -195,12 +279,12 @@ namespace CIAO_Getter_Test_Receiver_Impl if (result) { ACE_Time_Value dur = ACE_OS::gettimeofday () - tv; - ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::get_one: " + ACE_DEBUG ((LM_DEBUG, "Receiver_exec_i::get_one_variable: " "get_one took <%#T>\n", &dur)); if (ACE_OS::strcmp (gettertest_info->key, key) != 0) { - ACE_ERROR ((LM_ERROR, CLINFO "ERROR: GET ONE: " + ACE_ERROR ((LM_ERROR, CLINFO "ERROR VARIABLE: GET ONE: " "Expected key does " "not match received key: " "expected <%C> - received <%C>\n", @@ -209,7 +293,7 @@ namespace CIAO_Getter_Test_Receiver_Impl } if (gettertest_info->iteration != iteration) { - ACE_ERROR ((LM_ERROR, CLINFO "ERROR: GET ONE: " + ACE_ERROR ((LM_ERROR, CLINFO "ERROR VARIABLE: GET ONE: " "Expected iteration does " "not match received iteration: " "expected <%d> - received <%d>\n", @@ -219,7 +303,7 @@ namespace CIAO_Getter_Test_Receiver_Impl // check readinfo struct. if (readinfo.instance_handle.isValid) { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: GET MANY: ") + ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR VARIABLE: GET MANY: ") ACE_TEXT ("received instance handle should be invalid ") ACE_TEXT ("for unkeyed data: ") ACE_TEXT ("key <%C> - iteration <%u>\n"), @@ -229,20 +313,20 @@ namespace CIAO_Getter_Test_Receiver_Impl if (readinfo.source_timestamp.sec == 0 && readinfo.source_timestamp.nanosec == 0) { - ACE_ERROR ((LM_ERROR, "ERROR: READ ONE LAST: " + ACE_ERROR ((LM_ERROR, "ERROR VARIABLE: READ ONE LAST: " "source timestamp seems to be invalid (nil) " "key <%C> - iteration <%d>\n", gettertest_info->key.in (), gettertest_info->iteration)); } - ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::get_one: " + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::get_one_variable: " "Returned data : key <%C> - iteration <%d>\n", gettertest_info->key.in (), gettertest_info->iteration)); } else { - ACE_ERROR ((LM_ERROR, CLINFO "ERROR: GET ONE: " + ACE_ERROR ((LM_ERROR, CLINFO "ERROR VARIABLE: GET ONE: " "Time out while waiting for " "key <%C> - iteration <%d>\n", key, @@ -251,7 +335,58 @@ namespace CIAO_Getter_Test_Receiver_Impl } void - Receiver_exec_i::timeout_get_one () + Receiver_exec_i::get_one (const char * key, + CORBA::Long fixed_key, + CORBA::Long iteration) + { + this->get_one_variable (key, iteration); + this->get_one_fixed (fixed_key, iteration); + } + + void + Receiver_exec_i::timeout_get_one_fixed () + { + try + { + DDS::Duration_t to; + to.sec = 1; + to.nanosec = 0; + this->fixed_->time_out (to); + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::timeout_get_one_fixed: " + "Start getting data from DDS: timeout: " + "sec <%d> - nanosec <%u>\n", + this->fixed_->time_out ().sec, + this->fixed_->time_out ().nanosec)); + GetterFixed gettertest_info; + ::CCM_DDS::ReadInfo readinfo; + bool result = this->fixed_->get_one (gettertest_info, readinfo); + if (result) + { + ACE_ERROR ((LM_ERROR, CLINFO "ERROR FIXED: TIMEOUT GET ONE: " + "Returning true when get no data.\n")); + } + else + { + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::timeout_get_one_fixed: " + "Expected to return no data.\n")); + } + } + catch (const CCM_DDS::InternalError& ) + { + ACE_ERROR ((LM_ERROR, "ERROR FIXED: TIMEOUT GET ONE: " + "Caught unexcepted InternalError " + "exception\n")); + } + catch (const CORBA::Exception& ex) + { + ex._tao_print_exception ("ERROR FIXED: TIMEOUT GET ONE:"); + ACE_ERROR ((LM_ERROR, + "ERROR: Receiver_exec_i::timeout_get_one_fixed : Exception caught\n")); + } + } + + void + Receiver_exec_i::timeout_get_one_variable () { try { @@ -259,7 +394,7 @@ namespace CIAO_Getter_Test_Receiver_Impl to.sec = 1; to.nanosec = 0; this->getter_->time_out (to); - ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::timeout_get_one: " + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::timeout_get_one_variable: " "Start getting data from DDS: timeout: " "sec <%d> - nanosec <%u>\n", this->getter_->time_out ().sec, @@ -269,30 +404,37 @@ namespace CIAO_Getter_Test_Receiver_Impl bool result = this->getter_->get_one (gettertest_info, readinfo); if (result) { - ACE_ERROR ((LM_ERROR, CLINFO "ERROR: TIMEOUT GET ONE: " + ACE_ERROR ((LM_ERROR, CLINFO "ERROR VARIABLE: TIMEOUT GET ONE: " "Returning true when get no data.\n")); } else { - ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::timeout_get_one: " + ACE_DEBUG ((LM_DEBUG, CLINFO "Receiver_exec_i::timeout_get_one_variable: " "Expected to return no data.\n")); } } catch (const CCM_DDS::InternalError& ) { - ACE_ERROR ((LM_ERROR, "ERROR: TIMEOUT GET ONE: " + ACE_ERROR ((LM_ERROR, "ERROR VARIABLE: TIMEOUT GET ONE: " "Caught unexcepted InternalError " "exception\n")); } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ("ERROR: TIMEOUT GET ONE:"); + ex._tao_print_exception ("ERROR VARIABLE: TIMEOUT GET ONE:"); ACE_ERROR ((LM_ERROR, - "ERROR: Receiver_exec_i::timeout_get_one : Exception caught\n")); + "ERROR: Receiver_exec_i::timeout_get_one_variable : Exception caught\n")); } } void + Receiver_exec_i::timeout_get_one () + { + this->timeout_get_one_variable (); + this->timeout_get_one_fixed (); + } + + void Receiver_exec_i::timeout_get_many () { try @@ -334,16 +476,22 @@ namespace CIAO_Getter_Test_Receiver_Impl } } - ::CCM_DDS::GetterTest::CCM_Listener_ptr + ::Getter_Test::GetterTestConn::CCM_Listener_ptr Receiver_exec_i::get_info_out_data_listener (void) { - return 0; + return ::Getter_Test::GetterTestConn::CCM_Listener::_nil (); } ::CCM_DDS::CCM_PortStatusListener_ptr Receiver_exec_i::get_info_get_status (void) { - return 0; + return ::CCM_DDS::CCM_PortStatusListener::_nil (); + } + + ::CCM_DDS::CCM_PortStatusListener_ptr + Receiver_exec_i::get_info_fixed_status (void) + { + return ::CCM_DDS::CCM_PortStatusListener::_nil (); } ::CCM_GetInvoker_ptr @@ -368,6 +516,7 @@ namespace CIAO_Getter_Test_Receiver_Impl Receiver_exec_i::configuration_complete (void) { this->getter_ = this->context_->get_connection_info_get_fresh_data (); + this->fixed_ = this->context_->get_connection_info_fixed_fresh_data (); } void diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.h index abb08d9db15..f23118c7b86 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.h +++ b/CIAO/connectors/dds4ccm/tests/Getter/Receiver/Getter_Test_Receiver_exec.h @@ -27,6 +27,7 @@ namespace CIAO_Getter_Test_Receiver_Impl public: GetOneHandler (Receiver_exec_i &, const char * key, + CORBA::Long fixed_key, CORBA::Long iteration); virtual ~GetOneHandler (); @@ -35,6 +36,7 @@ namespace CIAO_Getter_Test_Receiver_Impl private: Receiver_exec_i &callback_; const char * key_; + CORBA::Long fixed_key_; CORBA::Long iteration_; }; @@ -73,7 +75,8 @@ namespace CIAO_Getter_Test_Receiver_Impl virtual void start_timeout_get_many (); virtual void start_get_one (const char * key, - ::CORBA::Long iteration); + ::CORBA::Long fixed_key, + ::CORBA::Long iteration); virtual void start_get_many (::CORBA::Short keys , ::CORBA::Long iterations); private: @@ -91,25 +94,31 @@ namespace CIAO_Getter_Test_Receiver_Impl Receiver_exec_i (void); virtual ~Receiver_exec_i (void); - virtual ::CCM_DDS::GetterTest::CCM_Listener_ptr + virtual ::Getter_Test::GetterTestConn::CCM_Listener_ptr get_info_out_data_listener (void); virtual ::CCM_DDS::CCM_PortStatusListener_ptr get_info_get_status (void); + virtual ::CCM_DDS::CCM_PortStatusListener_ptr + get_info_fixed_status (void); + virtual ::CCM_GetInvoker_ptr get_getter_invoke (); - void timeout_get_one (); - void timeout_get_many (); void start_get_one (const char * key, + CORBA::Long fixed_key, CORBA::Long iteration); + void timeout_get_one (); + void timeout_get_many (); void get_one (const char * key, + CORBA::Long fixed_key, CORBA::Long iteration); void start_get_many (CORBA::Short keys, CORBA::Long iterations); + void get_many (CORBA::Short keys, CORBA::Long iterations); @@ -125,7 +134,16 @@ namespace CIAO_Getter_Test_Receiver_Impl private: ::Getter_Test::CCM_Receiver_Context_var context_; - ::CCM_DDS::GetterTest::Getter_var getter_; + ::Getter_Test::GetterTestConn::Getter_var getter_; + ::Getter_Test::GetterFixedConn::Getter_var fixed_; + + void timeout_get_one_fixed (); + void timeout_get_one_variable (); + + void get_one_fixed (CORBA::Long fixed_key, + CORBA::Long iteration); + void get_one_variable (const char * key, + CORBA::Long iteration); }; extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender.idl b/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender.idl index d7903029ee5..fa49687b75c 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender.idl +++ b/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender.idl @@ -17,7 +17,9 @@ module Getter_Test { component Sender { - port CCM_DDS::GetterTest::DDS_Write info_write; + port GetterTestConn::DDS_Write info_write; + port GetterFixedConn::DDS_Write info_fixed; + provides CCM_DDS::ConnectorStatusListener info_out_connector_status; uses GetInvoker invoke_getter; diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.cpp index a12801101d7..d4f9f8dda1f 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.cpp @@ -161,17 +161,25 @@ namespace CIAO_Getter_Test_Sender_Impl { if (this->last_iter_ <= this->iterations_) { + GetterFixed fixed_key; GetterTest *new_key = new GetterTest; new_key->key = CORBA::string_dup("KEY_1"); + fixed_key.key = 1; this->invoker_->start_get_one ( CORBA::string_dup("KEY_1"), + 1, last_iter_); new_key->iteration = last_iter_; + fixed_key.iteration = last_iter_; + ACE_Time_Value tv (0, 50000); ACE_OS::sleep (tv); + this->writer_->write_one (*new_key, ::DDS::HANDLE_NIL); - ACE_DEBUG ((LM_DEBUG, CLINFO "Written key <%C> with <%d>\n", - new_key->key.in (), last_iter_)); + this->fixed_->write_one (fixed_key, ::DDS::HANDLE_NIL); + ACE_DEBUG ((LM_DEBUG, CLINFO "Written keys <%C> and <%u> with <%d>\n", + new_key->key.in (), fixed_key.key, last_iter_)); + ++last_iter_; } else @@ -234,6 +242,7 @@ namespace CIAO_Getter_Test_Sender_Impl try { this->writer_ = this->context_->get_connection_info_write_data (); + this->fixed_ = this->context_->get_connection_info_fixed_data (); this->invoker_ = this->context_->get_connection_invoke_getter (); this->ccm_activated_ = true; } diff --git a/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.h index 834f61bd720..8d7cde811e6 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.h +++ b/CIAO/connectors/dds4ccm/tests/Getter/Sender/Getter_Test_Sender_exec.h @@ -102,7 +102,8 @@ namespace CIAO_Getter_Test_Sender_Impl private: ::Getter_Test::CCM_Sender_Context_var context_; - CCM_DDS::GetterTest::Writer_var writer_; + ::Getter_Test::GetterTestConn::Writer_var writer_; + ::Getter_Test::GetterFixedConn::Writer_var fixed_; GetInvoker_var invoker_; CORBA::UShort iterations_; diff --git a/CIAO/connectors/dds4ccm/tests/Getter/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/Getter/descriptors/Plan.cdp index f097c53dae7..53497bcb9f5 100644 --- a/CIAO/connectors/dds4ccm/tests/Getter/descriptors/Plan.cdp +++ b/CIAO/connectors/dds4ccm/tests/Getter/descriptors/Plan.cdp @@ -58,6 +58,58 @@ </execParameter> </implementation> + <implementation xmi:id="Getter_Fixed_ConnectorComponentImplementation"> + <name>Getter_Fixed_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="Getter_Test_Connector_ExecArtifact" /> + <artifact xmi:idref="Getter_Test_Connector_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Getter_Test_Getter_Fixed_Connector_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Getter_Test_Getter_Fixed_Connector_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Getter_Test_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Getter_Test_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + <implementation xmi:id="Getter_Test_ConnectorComponentImplementation"> <name>Getter_Test_ConnectorComponentImplementation</name> <source/> @@ -160,6 +212,7 @@ </value> </execParameter> </implementation> + <instance xmi:id="ReceiverComponentInstance"> <name>ReceiverComponent</name> <node>ReceiverNode</node> @@ -167,6 +220,7 @@ <source/> <implementation xmi:idref="ReceiverComponentImplementation" /> </instance> + <instance xmi:id="Getter_Test_ConnectorComponentInstance"> <name>Getter_Test_ConnectorComponent</name> <node>SenderNode</node> @@ -203,6 +257,45 @@ </value> </configProperty> </instance> + + <!-- FIXED --> + <instance xmi:id="Getter_Fixed_ConnectorComponentInstance"> + <name>Getter_Fixed_ConnectorComponent</name> + <node>SenderNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Getter_Fixed_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Getter_Test</string> + </value> + </value> + </configProperty> + </instance> + <instance xmi:id="Getter_Fixed_ConnectorComponentInstance2"> + <name>Getter_Fixed_ConnectorComponent2</name> + <node>ReceiverNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="Getter_Fixed_ConnectorComponentImplementation" /> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Getter_Test</string> + </value> + </value> + </configProperty> + </instance> + <instance xmi:id="SenderComponentInstance"> <name>SenderComponent</name> <node>SenderNode</node> @@ -254,6 +347,26 @@ </connection> <connection> + <name>info_fixed_data</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>info_fixed_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="Getter_Fixed_ConnectorComponentInstance2" /> + </internalEndpoint> + </connection> + + <connection> <name>info_out_connector_status_sender</name> <deployRequirement> <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> @@ -294,6 +407,26 @@ </connection> <connection> + <name>fixed_writer_connection</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>info_fixed_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="Getter_Fixed_ConnectorComponentInstance" /> + </internalEndpoint> + </connection> + + <connection> <name>reader_starter</name> <internalEndpoint> <portName>invoke_getter</portName> |