diff options
author | msmit <msmit@remedy.nl> | 2010-11-30 09:56:21 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2010-11-30 09:56:21 +0000 |
commit | 56c2b5bd64fa95a7bdd29aaa237eedee1e1eb037 (patch) | |
tree | a0f1c37154df453bc74f73ee5c1e47d2410cb40d /CIAO/connectors/dds4ccm/tests | |
parent | a8b119c8c16274fefb3d0949f6ec4c286a7249fd (diff) | |
download | ATCD-56c2b5bd64fa95a7bdd29aaa237eedee1e1eb037.tar.gz |
Tue Nov 30 09:56:39 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/impl/ConditionManager.cpp:
Removed unnecessary checks for nil pointers.
* connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver.mpc:
* connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h:
* connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp:
* connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h:
* connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp:
* connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver.mpc:
* connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.h:
* connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.cpp:
* connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender.mpc:
* connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.h:
* connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.cpp:
Rewritten, using the generated executor files.
Diffstat (limited to 'CIAO/connectors/dds4ccm/tests')
11 files changed, 1176 insertions, 341 deletions
diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver.mpc index 6b074df52d9..d23c076ce5c 100755 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver.mpc +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver.mpc @@ -10,7 +10,8 @@ project(QC_ReadGet_Test_Receiver_idl_gen) : componentidldefaults, dds4ccm { -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.. + -Wb,exec_export_include=Receiver_exec_export.h \ + -I.. IDL_Files { ReadGet_Test_Receiver.idl diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp index 21f3e89f771..9695ee4cc0f 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.cpp @@ -1,15 +1,33 @@ // -*- C++ -*- -// // $Id$ -#include "ReadGet_Test_Receiver_exec.h" +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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 "ace/OS_NS_unistd.h" +#include "ReadGet_Test_Receiver_exec.h" #include "tao/ORB_Core.h" #include "ace/Reactor.h" -#include "ace/Log_Msg.h" - -#include "dds4ccm/impl/dds4ccm_conf.h" #define QUERY "( (iteration > %0) AND (iteration < %1) )" @@ -38,10 +56,11 @@ namespace CIAO_ReadGet_Test_Receiver_Impl { - //============================================================ - // read_action_Generator - //============================================================ - read_action_Generator::read_action_Generator (Receiver_exec_i &callback, int run) + /** + * Read Action Generator + */ + read_action_Generator::read_action_Generator (Receiver_exec_i &callback, + int run) : callback_ (callback), run_ (run) { @@ -63,45 +82,116 @@ namespace CIAO_ReadGet_Test_Receiver_Impl return 0; } - //============================================================ - // Starter_exec_i - //============================================================ - Starter_exec_i::Starter_exec_i (Receiver_exec_i & callback) - : callback_ (callback) + /** + * Facet Executor Implementation Class: get_port_status_exec_i + */ + + get_port_status_exec_i::get_port_status_exec_i ( + ::ReadGet_Test::CCM_Receiver_Context_ptr ctx) + : ciao_context_ ( + ::ReadGet_Test::CCM_Receiver_Context::_duplicate (ctx)) + { + } + + get_port_status_exec_i::~get_port_status_exec_i (void) + { + } + + // Operations from ::CCM_DDS::PortStatusListener + + void + get_port_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::RequestedDeadlineMissedStatus & /* status */) + { + /* Your code here. */ + } + + void + get_port_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::SampleLostStatus & /* status */) + { + /* Your code here. */ + } + + /** + * Facet Executor Implementation Class: check_port_status_exec_i + */ + + check_port_status_exec_i::check_port_status_exec_i ( + ::ReadGet_Test::CCM_Receiver_Context_ptr ctx) + : ciao_context_ ( + ::ReadGet_Test::CCM_Receiver_Context::_duplicate (ctx)) + { + } + + check_port_status_exec_i::~check_port_status_exec_i (void) + { + } + + // Operations from ::CCM_DDS::PortStatusListener + + void + check_port_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::RequestedDeadlineMissedStatus & /* status */) + { + /* Your code here. */ + } + + void + check_port_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::SampleLostStatus & /* status */) + { + /* Your code here. */ + } + + /** + * Facet Executor Implementation Class: reader_start_exec_i + */ + + reader_start_exec_i::reader_start_exec_i ( + ::ReadGet_Test::CCM_Receiver_Context_ptr ctx, + Receiver_exec_i &callback) + : ciao_context_ ( + ::ReadGet_Test::CCM_Receiver_Context::_duplicate (ctx)) + , callback_ (callback) { } - Starter_exec_i::~Starter_exec_i (void) + reader_start_exec_i::~reader_start_exec_i (void) { } + // Operations from ::ReadGetStarter + void - Starter_exec_i::set_reader_properties (CORBA::UShort nr_keys, - CORBA::UShort nr_iterations) + reader_start_exec_i::set_reader_properties (::CORBA::UShort nr_keys, + ::CORBA::UShort nr_iterations) { this->callback_.keys (nr_keys); this->callback_.iterations (nr_iterations); } void - Starter_exec_i::start_read (CORBA::UShort run) + reader_start_exec_i::start_read (::CORBA::UShort run) { this->callback_.start_read (run); } - //============================================================ - // Receiver_exec_i - //============================================================ + /** + * Component Executor Implementation Class: Receiver_exec_i + */ + Receiver_exec_i::Receiver_exec_i (void) - : iterations_ (20), - keys_ (5), - current_min_iteration_ (ACE_OS::atoi (MIN_ITERATION_1)), - current_max_iteration_ (ACE_OS::atoi (MAX_ITERATION_1)), - ticker_ (0), - samples_expected_getter_ (0), - samples_received_getter_ (0), - samples_expected_reader_ (0), - samples_received_reader_ (0) + : iterations_ (20) + , keys_ (5) + , current_min_iteration_ (ACE_OS::atoi (MIN_ITERATION_1)) + , current_max_iteration_ (ACE_OS::atoi (MAX_ITERATION_1)) + , ticker_ (0) + , samples_expected_getter_ (0) + , samples_received_getter_ (0) + , samples_expected_reader_ (0) + , samples_received_reader_ (0) + { } @@ -109,12 +199,33 @@ namespace CIAO_ReadGet_Test_Receiver_Impl { } + // Supported operations and attributes. + ACE_Reactor* + Receiver_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; + } bool Receiver_exec_i::check_last () { ::ReadGet_Test::QueryConditionTestConnector::Reader_var reader = - this->context_->get_connection_get_port_data (); + this->ciao_context_->get_connection_get_port_data (); try { @@ -180,7 +291,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl Receiver_exec_i::read_all (void) { ::ReadGet_Test::QueryConditionTestConnector::Reader_var reader = - this->context_->get_connection_get_port_data (); + this->ciao_context_->get_connection_get_port_data (); QueryConditionTestSeq queryfiltertest_info_seq; ::CCM_DDS::ReadInfoSeq readinfo_seq; @@ -201,7 +312,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl Receiver_exec_i::get_all (void) { ::ReadGet_Test::QueryConditionTestConnector::Getter_var getter = - this->context_->get_connection_get_port_fresh_data (); + this->ciao_context_->get_connection_get_port_fresh_data (); if (::CORBA::is_nil (getter.in ())) { @@ -243,7 +354,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl Receiver_exec_i::check_all (void) { ::ReadGet_Test::QueryConditionTestConnector::Reader_var reader = - this->context_->get_connection_check_port_data (); + this->ciao_context_->get_connection_check_port_data (); QueryConditionTestSeq queryfiltertest_info_seq; ::CCM_DDS::ReadInfoSeq readinfo_seq; @@ -329,7 +440,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl { ::CCM_DDS::QueryFilter_var query; ::ReadGet_Test::QueryConditionTestConnector::Reader_var reader = - this->context_->get_connection_get_port_data (); + this->ciao_context_->get_connection_get_port_data (); try { @@ -358,7 +469,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl { ::CCM_DDS::QueryFilter_var filter; ::ReadGet_Test::QueryConditionTestConnector::Reader_var reader = - this->context_->get_connection_get_port_data (); + this->ciao_context_->get_connection_get_port_data (); try { filter = reader->query (); @@ -435,7 +546,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl try { ::ReadGet_Test::QueryConditionTestConnector::Reader_var reader = - this->context_->get_connection_get_port_data (); + this->ciao_context_->get_connection_get_port_data (); ::CCM_DDS::QueryFilter filter; filter.expression = CORBA::string_dup (QUERY); @@ -471,8 +582,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl { ACE_DEBUG ((LM_DEBUG, "Set filter\n")); ::ReadGet_Test::QueryConditionTestConnector::Reader_var reader = - this->context_->get_connection_get_port_data (); - + this->ciao_context_->get_connection_get_port_data (); ::CCM_DDS::QueryFilter filter; filter.expression = CORBA::string_dup (QUERY); filter.parameters.length (2); @@ -485,8 +595,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl Receiver_exec_i::start_read (CORBA::UShort run) { this->ticker_ = new read_action_Generator (*this, run); - if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer ( - this->ticker_, + if (this->reactor ()->schedule_timer (this->ticker_, 0, ACE_Time_Value(1, 0), ACE_Time_Value(1, 0)) == -1) @@ -500,7 +609,7 @@ namespace CIAO_ReadGet_Test_Receiver_Impl { if (this->ticker_) { - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); + this->reactor ()->cancel_timer (this->ticker_); delete this->ticker_; this->ticker_ = 0; } @@ -549,33 +658,79 @@ namespace CIAO_ReadGet_Test_Receiver_Impl this->samples_expected_reader_ = (this->keys_) * SAMPLES_PER_KEY_READER; } - // Port operations. + // Component attributes and port operations. + ::CCM_DDS::CCM_PortStatusListener_ptr Receiver_exec_i::get_get_port_status (void) { - return ::CCM_DDS::CCM_PortStatusListener::_nil (); + if ( ::CORBA::is_nil (this->ciao_get_port_status_.in ())) + { + get_port_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + get_port_status_exec_i ( + this->ciao_context_.in ()), + ::CCM_DDS::CCM_PortStatusListener::_nil ()); + + this->ciao_get_port_status_ = tmp; + } + + return + ::CCM_DDS::CCM_PortStatusListener::_duplicate ( + this->ciao_get_port_status_.in ()); } ::CCM_DDS::CCM_PortStatusListener_ptr Receiver_exec_i::get_check_port_status (void) { - return ::CCM_DDS::CCM_PortStatusListener::_nil (); + if ( ::CORBA::is_nil (this->ciao_check_port_status_.in ())) + { + check_port_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + check_port_status_exec_i ( + this->ciao_context_.in ()), + ::CCM_DDS::CCM_PortStatusListener::_nil ()); + + this->ciao_check_port_status_ = tmp; + } + + return + ::CCM_DDS::CCM_PortStatusListener::_duplicate ( + this->ciao_check_port_status_.in ()); } ::CCM_ReadGetStarter_ptr - Receiver_exec_i::get_reader_start () + Receiver_exec_i::get_reader_start (void) { - return new Starter_exec_i (*this); + if ( ::CORBA::is_nil (this->ciao_reader_start_.in ())) + { + reader_start_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + reader_start_exec_i ( + this->ciao_context_.in (), + *this), + ::CCM_ReadGetStarter::_nil ()); + + this->ciao_reader_start_ = tmp; + } + + return + ::CCM_ReadGetStarter::_duplicate ( + this->ciao_reader_start_.in ()); } // Operations from Components::SessionComponent. + void Receiver_exec_i::set_session_context ( ::Components::SessionContext_ptr ctx) { - this->context_ = + this->ciao_context_ = ::ReadGet_Test::CCM_Receiver_Context::_narrow (ctx); - if ( ::CORBA::is_nil (this->context_.in ())) + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) { throw ::CORBA::INTERNAL (); } @@ -584,13 +739,14 @@ namespace CIAO_ReadGet_Test_Receiver_Impl void Receiver_exec_i::configuration_complete (void) { + /* Your code here. */ } void Receiver_exec_i::ccm_activate (void) { ::ReadGet_Test::QueryConditionTestConnector::Getter_var getter = - this->context_->get_connection_get_port_fresh_data (); + this->ciao_context_->get_connection_get_port_fresh_data (); DDS::Duration_t to; to.sec = 5; to.nanosec = 0; @@ -602,15 +758,15 @@ namespace CIAO_ReadGet_Test_Receiver_Impl { ACE_ERROR ((LM_ERROR, "ERROR: Unable to set time out.\n")); } - this->restarter_ = this->context_->get_connection_writer_restart (); -} + this->restarter_ = this->ciao_context_->get_connection_writer_restart (); + } void Receiver_exec_i::ccm_passivate (void) { if (this->ticker_) { - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); + this->reactor ()->cancel_timer (this->ticker_); delete this->ticker_; this->ticker_ = 0; } @@ -666,4 +822,3 @@ namespace CIAO_ReadGet_Test_Receiver_Impl return retval; } } - diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h index 34ea6e07c53..9de8de6fb8a 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Receiver/ReadGet_Test_Receiver_exec.h @@ -1,26 +1,50 @@ // -*- C++ -*- // $Id$ -#ifndef CIAO_RECEIVER_EXEC_H_ -#define CIAO_RECEIVER_EXEC_H_ +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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_READGET_TEST_RECEIVER_EXEC_WOPYWH_H_ +#define CIAO_READGET_TEST_RECEIVER_EXEC_WOPYWH_H_ + +#include /**/ "ace/pre.h" #include "ReadGet_Test_ReceiverEC.h" -#include /**/ "Receiver_exec_export.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_ReadGet_Test_Receiver_Impl { class Receiver_exec_i; - //============================================================ - // read_action_Generator - //============================================================ + /** + * Read action generator + */ class read_action_Generator : public ACE_Event_Handler { @@ -38,29 +62,100 @@ namespace CIAO_ReadGet_Test_Receiver_Impl }; - //============================================================ - // Starter_exec_i - //============================================================ - class Starter_exec_i + + /** + * Provider Executor Implementation Class: get_port_status_exec_i + */ + + class get_port_status_exec_i + : public virtual ::CCM_DDS::CCM_PortStatusListener, + public virtual ::CORBA::LocalObject + { + public: + get_port_status_exec_i ( + ::ReadGet_Test::CCM_Receiver_Context_ptr ctx); + virtual ~get_port_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: + ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_; + }; + + /** + * Provider Executor Implementation Class: check_port_status_exec_i + */ + + class check_port_status_exec_i + : public virtual ::CCM_DDS::CCM_PortStatusListener, + public virtual ::CORBA::LocalObject + { + public: + check_port_status_exec_i ( + ::ReadGet_Test::CCM_Receiver_Context_ptr ctx); + virtual ~check_port_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: + ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_; + }; + + /** + * Provider Executor Implementation Class: reader_start_exec_i + */ + + class reader_start_exec_i : public virtual ::CCM_ReadGetStarter, public virtual ::CORBA::LocalObject { public: - Starter_exec_i (Receiver_exec_i & callback); - virtual ~Starter_exec_i (void); + reader_start_exec_i ( + ::ReadGet_Test::CCM_Receiver_Context_ptr ctx, + Receiver_exec_i &callback); + virtual ~reader_start_exec_i (void); + + //@{ + /** Operations and attributes from ::ReadGetStarter. */ + + virtual + void set_reader_properties (::CORBA::UShort nr_keys, + ::CORBA::UShort nr_iterations); - virtual void set_reader_properties (CORBA::UShort nr_keys, - CORBA::UShort nr_iterations); - virtual void start_read (CORBA::UShort run); + virtual + void start_read (::CORBA::UShort run); + //@} private: + ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_; Receiver_exec_i &callback_; }; - //============================================================ - // Receiver_exec_i - //============================================================ - class RECEIVER_EXEC_Export Receiver_exec_i + /** + * Component Executor Implementation Class: Receiver_exec_i + */ + + class Receiver_exec_i : public virtual Receiver_Exec, public virtual ::CORBA::LocalObject { @@ -68,15 +163,13 @@ namespace CIAO_ReadGet_Test_Receiver_Impl Receiver_exec_i (void); virtual ~Receiver_exec_i (void); - // Supported operations and attributes. - void iterations (CORBA::UShort iterations); - void keys (::CORBA::UShort keys); + //@{ + /** Supported operations and attributes. */ - // Component attributes. + //@} - // Port operations. - virtual ::CCM_ReadGetStarter_ptr - get_reader_start (); + //@{ + /** Component attributes and port operations. */ virtual ::CCM_DDS::CCM_PortStatusListener_ptr get_get_port_status (void); @@ -84,38 +177,58 @@ namespace CIAO_ReadGet_Test_Receiver_Impl virtual ::CCM_DDS::CCM_PortStatusListener_ptr get_check_port_status (void); - bool check_last (); - void start_read (CORBA::UShort run); - void run (CORBA::UShort run); - - // Operations from Components::SessionComponent. - virtual void - set_session_context ( - ::Components::SessionContext_ptr ctx); + virtual ::CCM_ReadGetStarter_ptr + get_reader_start (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); + //@} + + //@{ + /** User defined public operations. */ + void iterations (CORBA::UShort iterations); + void keys (::CORBA::UShort keys); + + bool check_last (void); + void start_read (::CORBA::UShort run); + void run (::CORBA::UShort run); + //@} private: - ::ReadGet_Test::CCM_Receiver_Context_var context_; + ::ReadGet_Test::CCM_Receiver_Context_var ciao_context_; + //@{ + /** Component attributes. */ + ::CCM_DDS::CCM_PortStatusListener_var ciao_get_port_status_; + ::CCM_DDS::CCM_PortStatusListener_var ciao_check_port_status_; + ::CCM_ReadGetStarter_var ciao_reader_start_; + //@} + + //@{ + /** User defined members. */ ReadGetRestarter_var restarter_; - CORBA::UShort iterations_; - CORBA::UShort keys_; + ::CORBA::UShort iterations_; + ::CORBA::UShort keys_; int current_min_iteration_; int current_max_iteration_; read_action_Generator *ticker_; - CORBA::ULong samples_expected_getter_; - CORBA::ULong samples_received_getter_; - CORBA::ULong samples_expected_reader_; - CORBA::ULong samples_received_reader_; + ::CORBA::ULong samples_expected_getter_; + ::CORBA::ULong samples_received_getter_; + ::CORBA::ULong samples_expected_reader_; + ::CORBA::ULong samples_received_reader_; + //@} + //@{ + /** User defined private operations. */ void test_all (void); void read_all (void); void get_all (void); @@ -126,11 +239,17 @@ namespace CIAO_ReadGet_Test_Receiver_Impl void test_exception (void); void test_set_query_parameters (void); void set_filter (void); + + //@} + + /// Get the ACE_Reactor + ACE_Reactor* reactor (void); }; extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr create_ReadGet_Test_Receiver_Impl (void); } -#endif /* ifndef */ +#include /**/ "ace/post.h" +#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp index 63a763b9d94..149e08018ee 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.cpp @@ -1,18 +1,42 @@ // -*- C++ -*- // $Id$ +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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 "ReadGet_Test_Sender_exec.h" #include "tao/ORB_Core.h" #include "ace/Reactor.h" -#include "ace/Log_Msg.h" #define ITERATIONS 20 namespace CIAO_ReadGet_Test_Sender_Impl { - //============================================================ - // WriteHandler - //============================================================ + /** + * Writehandler + */ + WriteHandler::WriteHandler (Sender_exec_i &callback) : callback_ (callback) { @@ -25,53 +49,94 @@ namespace CIAO_ReadGet_Test_Sender_Impl return 0; } - //============================================================ - // Restarter_exec_i - //============================================================ - Restarter_exec_i::Restarter_exec_i (Sender_exec_i & callback) - : callback_ (callback) + /** + * Facet Executor Implementation Class: restart_writer_exec_i + */ + + restart_writer_exec_i::restart_writer_exec_i ( + ::ReadGet_Test::CCM_Sender_Context_ptr ctx, + Sender_exec_i &callback) + : ciao_context_ ( + ::ReadGet_Test::CCM_Sender_Context::_duplicate (ctx)) + , callback_ (callback) { } - Restarter_exec_i::~Restarter_exec_i (void) + restart_writer_exec_i::~restart_writer_exec_i (void) { } + // Operations from ::ReadGetRestarter + void - Restarter_exec_i::restart_write () + restart_writer_exec_i::restart_write (void) { this->callback_.restart (); } - //============================================================ - // Component Executor Implementation Class: Sender_exec_i - //============================================================ + /** + * Component Executor Implementation Class: Sender_exec_i + */ + Sender_exec_i::Sender_exec_i (void) - : iterations_ (ITERATIONS), - keys_ (5), - run_ (1) + : keys_ (5) + , iterations_ (ITERATIONS) + , run_ (1) { + ACE_NEW_THROW_EX (this->wh_, + WriteHandler (*this), + ::CORBA::NO_MEMORY ()); } Sender_exec_i::~Sender_exec_i (void) { + delete this->wh_; + } + + // 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::restart (void) { ++this->run_; - WriteHandler *wh = new WriteHandler (*this); - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->notify (wh); + if (this->wh_) + { + delete this->wh_; + this->wh_ = 0; + } + ACE_NEW_THROW_EX (this->wh_, + WriteHandler (*this), + ::CORBA::NO_MEMORY ()); + this->reactor ()->notify (this->wh_); } void Sender_exec_i::start (void) { ::ReadGet_Test::QueryConditionTestConnector::Writer_var writer = - this->context_->get_connection_info_write_data (); + this->ciao_context_->get_connection_info_write_data (); ReadGetStarter_var starter = - this->context_->get_connection_start_reader (); + this->ciao_context_->get_connection_start_reader (); if (! ::CORBA::is_nil (starter.in ())) { @@ -109,6 +174,29 @@ namespace CIAO_ReadGet_Test_Sender_Impl starter->start_read (this->run_); } + // Component attributes and port operations. + + ::CCM_ReadGetRestarter_ptr + Sender_exec_i::get_restart_writer (void) + { + if ( ::CORBA::is_nil (this->ciao_restart_writer_.in ())) + { + restart_writer_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + restart_writer_exec_i ( + this->ciao_context_.in (), + *this), + ::CCM_ReadGetRestarter::_nil ()); + + this->ciao_restart_writer_ = tmp; + } + + return + ::CCM_ReadGetRestarter::_duplicate ( + this->ciao_restart_writer_.in ()); + } + ::CORBA::UShort Sender_exec_i::keys (void) { @@ -116,24 +204,22 @@ namespace CIAO_ReadGet_Test_Sender_Impl } void - Sender_exec_i::keys (::CORBA::UShort keys) + Sender_exec_i::keys ( + const ::CORBA::UShort keys) { this->keys_ = keys; } - ::CCM_ReadGetRestarter_ptr - Sender_exec_i::get_restart_writer (void) - { - return new Restarter_exec_i (*this); - } + // Operations from Components::SessionComponent. void - Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx) + Sender_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) { - this->context_ = + this->ciao_context_ = ::ReadGet_Test::CCM_Sender_Context::_narrow (ctx); - if ( ::CORBA::is_nil (this->context_.in ())) + if ( ::CORBA::is_nil (this->ciao_context_.in ())) { throw ::CORBA::INTERNAL (); } @@ -142,6 +228,7 @@ namespace CIAO_ReadGet_Test_Sender_Impl void Sender_exec_i::configuration_complete (void) { + /* Your code here. */ } void @@ -149,8 +236,7 @@ namespace CIAO_ReadGet_Test_Sender_Impl { try { - WriteHandler *wh = new WriteHandler (*this); - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->notify (wh); + this->reactor ()->notify (this->wh_); } catch (const ::CORBA::Exception& ex) { @@ -168,11 +254,13 @@ namespace CIAO_ReadGet_Test_Sender_Impl void Sender_exec_i::ccm_passivate (void) { + /* Your code here. */ } void Sender_exec_i::ccm_remove (void) { + /* Your code here. */ } extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr diff --git a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h index 87c13534c04..f955431a65a 100644 --- a/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h +++ b/CIAO/connectors/dds4ccm/tests/QueryCondition/ReadGet/Sender/ReadGet_Test_Sender_exec.h @@ -1,27 +1,49 @@ // -*- C++ -*- // $Id$ -#ifndef CIAO_SENDER_EXEC_H_ -#define CIAO_SENDER_EXEC_H_ - +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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_READGET_TEST_SENDER_EXEC_CB6ML7_H_ +#define CIAO_READGET_TEST_SENDER_EXEC_CB6ML7_H_ + +#include /**/ "ace/pre.h" #include "ReadGet_Test_SenderEC.h" -#include /**/ "Sender_exec_export.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_ReadGet_Test_Sender_Impl { class Sender_exec_i; - - //============================================================ - // WriteHandler - //============================================================ + /** + * Write Handler + */ class WriteHandler : public ACE_Event_Handler { @@ -32,26 +54,36 @@ namespace CIAO_ReadGet_Test_Sender_Impl Sender_exec_i &callback_; }; - //============================================================ - // Restarter_exec_i - //============================================================ - class Restarter_exec_i + /** + * Provider Executor Implementation Class: restart_writer_exec_i + */ + + class restart_writer_exec_i : public virtual ::CCM_ReadGetRestarter, public virtual ::CORBA::LocalObject { public: - Restarter_exec_i (Sender_exec_i & callback); - virtual ~Restarter_exec_i (void); + restart_writer_exec_i ( + ::ReadGet_Test::CCM_Sender_Context_ptr ctx, + Sender_exec_i & callback); + virtual ~restart_writer_exec_i (void); - virtual void restart_write (); + //@{ + /** Operations and attributes from ::ReadGetRestarter. */ + + virtual + void restart_write (void); + //@} private: + ::ReadGet_Test::CCM_Sender_Context_var ciao_context_; Sender_exec_i &callback_; }; - //============================================================ - // Sender_exec_i - //============================================================ + /** + * Component Executor Implementation Class: Sender_exec_i + */ + class Sender_exec_i : public virtual Sender_Exec, public virtual ::CORBA::LocalObject @@ -60,34 +92,68 @@ namespace CIAO_ReadGet_Test_Sender_Impl Sender_exec_i (void); virtual ~Sender_exec_i (void); + //@{ + /** Supported operations and attributes. */ + + //@} + + //@{ + /** Component attributes and port operations. */ + + virtual ::CCM_ReadGetRestarter_ptr + get_restart_writer (void); + virtual ::CORBA::UShort keys (void); virtual void keys (::CORBA::UShort keys); + //@} - virtual ::CCM_ReadGetRestarter_ptr get_restart_writer (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); + //@} + //@{ + /** User defined public operations. */ void start (void); void restart (void); + //@} + private: - ::ReadGet_Test::CCM_Sender_Context_var context_; + ::ReadGet_Test::CCM_Sender_Context_var ciao_context_; + + //@{ + /** Component attributes. */ + ::CCM_ReadGetRestarter_var ciao_restart_writer_; + + ::CORBA::UShort keys_; + //@} - CORBA::UShort iterations_; - CORBA::UShort keys_; - CORBA::UShort run_; + //@{ + /** User defined members. */ + ::CORBA::UShort iterations_; + ::CORBA::UShort run_; + WriteHandler *wh_; + //@} + + //@{ + /** User defined private operations. */ + + //@} + + /// Get the ACE_Reactor + ACE_Reactor* reactor (void); }; extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr create_ReadGet_Test_Sender_Impl (void); } -#endif /* ifndef */ +#include /**/ "ace/post.h" +#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver.mpc b/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver.mpc index e3cc08db939..363cb84e998 100755 --- a/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver.mpc +++ b/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver.mpc @@ -10,7 +10,8 @@ project(DDS_Reader_Test_Receiver_idl_gen) : componentidldefaults, dds4ccm { -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.. + -Wb,exec_export_include=Receiver_exec_export.h \ + -I.. IDL_Files { Reader_Test_Receiver.idl diff --git a/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.cpp b/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.cpp index 6a8536bbcb6..4603ee91592 100644 --- a/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.cpp @@ -1,6 +1,28 @@ // -*- C++ -*- -// // $Id$ +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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 "Reader_Test_Receiver_exec.h" #include "ace/Log_Msg.h" @@ -10,9 +32,9 @@ namespace CIAO_Reader_Test_Receiver_Impl { - //============================================================ - // read_action_Generator - //============================================================ + /** + * Read action generator + */ read_action_Generator::read_action_Generator (Receiver_exec_i &callback) : callback_ (callback) { @@ -32,58 +54,146 @@ namespace CIAO_Reader_Test_Receiver_Impl return 0; } - //============================================================ - // Starter_exec_i - //============================================================ - Starter_exec_i::Starter_exec_i (Receiver_exec_i & callback) - : callback_ (callback) + /** + * Facet Executor Implementation Class: info_out_data_listener_exec_i + */ + + info_out_data_listener_exec_i::info_out_data_listener_exec_i ( + ::Reader_Test::CCM_Receiver_Context_ptr ctx) + : ciao_context_ ( + ::Reader_Test::CCM_Receiver_Context::_duplicate (ctx)) { } - Starter_exec_i::~Starter_exec_i (void) + info_out_data_listener_exec_i::~info_out_data_listener_exec_i (void) { } + // Operations from ::Reader_Test::ReaderTestConnector::Listener + void - Starter_exec_i::set_reader_properties (CORBA::UShort nr_keys, - CORBA::UShort nr_iterations) + info_out_data_listener_exec_i::on_one_data (const ::ReaderTest & /* datum */, + const ::CCM_DDS::ReadInfo & /* info */) { - this->callback_.keys (nr_keys); - this->callback_.iterations (nr_iterations); + /* Your code here. */ + } + + void + info_out_data_listener_exec_i::on_many_data (const ::ReaderTestSeq & /* data */, + const ::CCM_DDS::ReadInfoSeq & /* infos */) + { + /* Your code here. */ } + /** + * Facet Executor Implementation Class: info_out_status_exec_i + */ + + info_out_status_exec_i::info_out_status_exec_i ( + ::Reader_Test::CCM_Receiver_Context_ptr ctx) + : ciao_context_ ( + ::Reader_Test::CCM_Receiver_Context::_duplicate (ctx)) + { + } + + info_out_status_exec_i::~info_out_status_exec_i (void) + { + } + + // Operations from ::CCM_DDS::PortStatusListener + + void + info_out_status_exec_i::on_requested_deadline_missed (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::RequestedDeadlineMissedStatus & /* status */) + { + /* Your code here. */ + } + + void + info_out_status_exec_i::on_sample_lost (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::SampleLostStatus & /* status */) + { + /* Your code here. */ + } + + /** + * Facet Executor Implementation Class: reader_start_exec_i + */ + + reader_start_exec_i::reader_start_exec_i ( + ::Reader_Test::CCM_Receiver_Context_ptr ctx, + Receiver_exec_i &callback) + : ciao_context_ ( + ::Reader_Test::CCM_Receiver_Context::_duplicate (ctx)) + , callback_ (callback) + { + } + + reader_start_exec_i::~reader_start_exec_i (void) + { + } + + // Operations from ::ReaderStarter + void - Starter_exec_i::start_read () + reader_start_exec_i::start_read (void) { this->callback_.start_read (); } void - Starter_exec_i::read_no_data () + reader_start_exec_i::read_no_data (void) { this->callback_.read_no_data (); } - //============================================================ - // Receiver_exec_i - //============================================================ + void + reader_start_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), - has_run_ (false) { - this->ticker_ = new read_action_Generator (*this); } Receiver_exec_i::~Receiver_exec_i (void) { } + // Supported operations and attributes. + ACE_Reactor* + Receiver_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; + } + bool Receiver_exec_i::check_last () { ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); try { @@ -124,7 +234,7 @@ namespace CIAO_Reader_Test_Receiver_Impl Receiver_exec_i::read_one_last (bool test_handles) { ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); try { @@ -184,7 +294,7 @@ namespace CIAO_Reader_Test_Receiver_Impl Receiver_exec_i::read_one_all (bool test_handles) { ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); try { @@ -264,7 +374,7 @@ namespace CIAO_Reader_Test_Receiver_Impl Receiver_exec_i::read_last (void) { ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); try { @@ -315,7 +425,7 @@ namespace CIAO_Reader_Test_Receiver_Impl Receiver_exec_i::read_all (void) { ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); try { @@ -412,7 +522,7 @@ namespace CIAO_Reader_Test_Receiver_Impl // test exception handling bool except_caught = false; ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); try { @@ -442,7 +552,7 @@ namespace CIAO_Reader_Test_Receiver_Impl { // test exception handling ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); bool except_caught = false; try @@ -475,7 +585,7 @@ namespace CIAO_Reader_Test_Receiver_Impl Receiver_exec_i::read_no_data () { ::Reader_Test::ReaderTestConnector::Reader_var reader = - this->context_->get_connection_info_out_data(); + this->ciao_context_->get_connection_info_out_data(); try { @@ -519,7 +629,7 @@ namespace CIAO_Reader_Test_Receiver_Impl void Receiver_exec_i::run () { - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); + this->reactor ()->cancel_timer (this->ticker_); delete this->ticker_; this->ticker_ = 0; @@ -538,8 +648,10 @@ namespace CIAO_Reader_Test_Receiver_Impl void Receiver_exec_i::start_read () { - if (this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->schedule_timer ( - this->ticker_, + ACE_NEW_THROW_EX (this->ticker_, + read_action_Generator (*this), + ::CORBA::NO_MEMORY ()); + if (this->reactor ()->schedule_timer (this->ticker_, 0, ACE_Time_Value(1, 0), ACE_Time_Value(1, 0)) == -1) @@ -548,6 +660,7 @@ namespace CIAO_Reader_Test_Receiver_Impl } } + // Component attributes and port operations. ::CORBA::UShort Receiver_exec_i::iterations (void) { @@ -572,33 +685,77 @@ namespace CIAO_Reader_Test_Receiver_Impl this->keys_ = keys; } - // Port operations. ::Reader_Test::ReaderTestConnector::CCM_Listener_ptr Receiver_exec_i::get_info_out_data_listener (void) { - return ::Reader_Test::ReaderTestConnector::CCM_Listener::_nil (); + if ( ::CORBA::is_nil (this->ciao_info_out_data_listener_.in ())) + { + info_out_data_listener_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + info_out_data_listener_exec_i ( + this->ciao_context_.in ()), + ::Reader_Test::ReaderTestConnector::CCM_Listener::_nil ()); + + this->ciao_info_out_data_listener_ = tmp; + } + + return + ::Reader_Test::ReaderTestConnector::CCM_Listener::_duplicate ( + this->ciao_info_out_data_listener_.in ()); } ::CCM_DDS::CCM_PortStatusListener_ptr Receiver_exec_i::get_info_out_status (void) { - return ::CCM_DDS::CCM_PortStatusListener::_nil (); + if ( ::CORBA::is_nil (this->ciao_info_out_status_.in ())) + { + info_out_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + info_out_status_exec_i ( + this->ciao_context_.in ()), + ::CCM_DDS::CCM_PortStatusListener::_nil ()); + + this->ciao_info_out_status_ = tmp; + } + + return + ::CCM_DDS::CCM_PortStatusListener::_duplicate ( + this->ciao_info_out_status_.in ()); } ::CCM_ReaderStarter_ptr - Receiver_exec_i::get_reader_start () + Receiver_exec_i::get_reader_start (void) { - return new Starter_exec_i (*this); + if ( ::CORBA::is_nil (this->ciao_reader_start_.in ())) + { + reader_start_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + reader_start_exec_i ( + this->ciao_context_.in (), + *this), + ::CCM_ReaderStarter::_nil ()); + + this->ciao_reader_start_ = tmp; + } + + return + ::CCM_ReaderStarter::_duplicate ( + this->ciao_reader_start_.in ()); } // Operations from Components::SessionComponent. + void Receiver_exec_i::set_session_context ( ::Components::SessionContext_ptr ctx) { - this->context_ = + this->ciao_context_ = ::Reader_Test::CCM_Receiver_Context::_narrow (ctx); - if ( ::CORBA::is_nil (this->context_.in ())) + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) { throw ::CORBA::INTERNAL (); } @@ -607,16 +764,19 @@ namespace CIAO_Reader_Test_Receiver_Impl 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 @@ -625,7 +785,7 @@ namespace CIAO_Reader_Test_Receiver_Impl if (this->ticker_) { ACE_ERROR ((LM_ERROR, "Still checking DDS upon exit\n")); - this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); + this->reactor ()->cancel_timer (this->ticker_); delete this->ticker_; this->ticker_ = 0; } @@ -651,4 +811,3 @@ namespace CIAO_Reader_Test_Receiver_Impl return retval; } } - diff --git a/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.h b/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.h index 6da725df253..4cb328fb92a 100644 --- a/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.h +++ b/CIAO/connectors/dds4ccm/tests/Reader/Receiver/Reader_Test_Receiver_exec.h @@ -1,17 +1,41 @@ // -*- C++ -*- // $Id$ -#ifndef CIAO_RECEIVER_EXEC_H_ -#define CIAO_RECEIVER_EXEC_H_ +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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_READER_TEST_RECEIVER_EXEC_G1FCGC_H_ +#define CIAO_READER_TEST_RECEIVER_EXEC_G1FCGC_H_ + +#include /**/ "ace/pre.h" #include "Reader_Test_ReceiverEC.h" -#include /**/ "Receiver_exec_export.h" - #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +#include /**/ "Receiver_exec_export.h" #include "tao/LocalObject.h" #include <map> @@ -20,9 +44,9 @@ namespace CIAO_Reader_Test_Receiver_Impl { class Receiver_exec_i; - //============================================================ - // read_action_Generator - //============================================================ + /** + * Read Action Generator + */ class read_action_Generator : public ACE_Event_Handler { @@ -38,31 +62,102 @@ namespace CIAO_Reader_Test_Receiver_Impl }; - //============================================================ - // Starter_exec_i - //============================================================ - class Starter_exec_i + /** + * Provider Executor Implementation Class: info_out_data_listener_exec_i + */ + + class info_out_data_listener_exec_i + : public virtual ::Reader_Test::ReaderTestConnector::CCM_Listener, + public virtual ::CORBA::LocalObject + { + public: + info_out_data_listener_exec_i ( + ::Reader_Test::CCM_Receiver_Context_ptr ctx); + virtual ~info_out_data_listener_exec_i (void); + + //@{ + /** Operations and attributes from ::Reader_Test::ReaderTestConnector::Listener. */ + + virtual + void on_one_data (const ::ReaderTest & datum, + const ::CCM_DDS::ReadInfo & info); + + virtual + void on_many_data (const ::ReaderTestSeq & data, + const ::CCM_DDS::ReadInfoSeq & infos); + //@} + + private: + ::Reader_Test::CCM_Receiver_Context_var ciao_context_; + }; + + /** + * Provider Executor Implementation Class: info_out_status_exec_i + */ + + class info_out_status_exec_i + : public virtual ::CCM_DDS::CCM_PortStatusListener, + public virtual ::CORBA::LocalObject + { + public: + info_out_status_exec_i ( + ::Reader_Test::CCM_Receiver_Context_ptr ctx); + virtual ~info_out_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: + ::Reader_Test::CCM_Receiver_Context_var ciao_context_; + }; + + /** + * Provider Executor Implementation Class: reader_start_exec_i + */ + + class reader_start_exec_i : public virtual ::CCM_ReaderStarter, public virtual ::CORBA::LocalObject { public: - Starter_exec_i (Receiver_exec_i & callback); - virtual ~Starter_exec_i (void); + reader_start_exec_i ( + ::Reader_Test::CCM_Receiver_Context_ptr ctx, + Receiver_exec_i & callback); + virtual ~reader_start_exec_i (void); + + //@{ + /** Operations and attributes from ::ReaderStarter. */ + + virtual + void start_read (void); - virtual void set_reader_properties (CORBA::UShort nr_keys, - CORBA::UShort nr_iterations); + virtual + void read_no_data (void); - virtual void read_no_data (); - virtual void start_read (); + virtual + void set_reader_properties (::CORBA::UShort nr_keys, + ::CORBA::UShort nr_iterations); + //@} private: + ::Reader_Test::CCM_Receiver_Context_var ciao_context_; Receiver_exec_i &callback_; }; - //============================================================ - // Receiver_exec_i - //============================================================ - class RECEIVER_EXEC_Export Receiver_exec_i + /** + * Component Executor Implementation Class: Receiver_exec_i + */ + + class Receiver_exec_i : public virtual Receiver_Exec, public virtual ::CORBA::LocalObject { @@ -70,7 +165,14 @@ namespace CIAO_Reader_Test_Receiver_Impl Receiver_exec_i (void); virtual ~Receiver_exec_i (void); - // Port operations. + //@{ + /** Supported operations and attributes. */ + + //@} + + //@{ + /** Component attributes and port operations. */ + virtual ::Reader_Test::ReaderTestConnector::CCM_Listener_ptr get_info_out_data_listener (void); @@ -78,8 +180,20 @@ namespace CIAO_Reader_Test_Receiver_Impl get_info_out_status (void); virtual ::CCM_ReaderStarter_ptr - get_reader_start (); + get_reader_start (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); + //@} + //@{ + /** User defined public operations. */ void read_no_data (); void start_read (); bool check_last (); @@ -92,22 +206,32 @@ namespace CIAO_Reader_Test_Receiver_Impl ::CORBA::UShort keys (void); void keys (::CORBA::UShort keys); + //@} - // Operations from Components::SessionComponent. - virtual void set_session_context (::Components::SessionContext_ptr ctx); - - virtual void configuration_complete (void); + private: + ::Reader_Test::CCM_Receiver_Context_var ciao_context_; - virtual void ccm_activate (void); - virtual void ccm_passivate (void); - virtual void ccm_remove (void); + //@{ + /** Component attributes. */ + ::Reader_Test::ReaderTestConnector::CCM_Listener_var ciao_info_out_data_listener_; + ::CCM_DDS::CCM_PortStatusListener_var ciao_info_out_status_; + ::CCM_ReaderStarter_var ciao_reader_start_; + //@} - private: - ::Reader_Test::CCM_Receiver_Context_var context_; + //@{ + /** User defined members. */ CORBA::UShort iterations_; CORBA::UShort keys_; CORBA::Boolean has_run_; + read_action_Generator *ticker_; + + typedef std::map<ACE_CString, DDS::InstanceHandle_t> Handle_Table; + Handle_Table handles_; + //@} + + //@{ + /** User defined private operations. */ void read_all (); void read_last (); void read_one_all (bool test_handles = false); @@ -115,15 +239,16 @@ namespace CIAO_Reader_Test_Receiver_Impl void test_exception (); void test_exception_with_handles (); - read_action_Generator *ticker_; + //@} - typedef std::map<ACE_CString, DDS::InstanceHandle_t> Handle_Table; - Handle_Table handles_; + /// Get the ACE_Reactor + ACE_Reactor* reactor (void); }; extern "C" RECEIVER_EXEC_Export ::Components::EnterpriseComponent_ptr create_Reader_Test_Receiver_Impl (void); } -#endif /* ifndef */ +#include /**/ "ace/post.h" +#endif /* ifndef */ diff --git a/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender.mpc b/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender.mpc index 5677d410fcb..509cd971428 100755 --- a/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender.mpc +++ b/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender.mpc @@ -89,11 +89,11 @@ project(DDS_Reader_Test_Sender_stub) : ccm_stub, dds4ccm_base { project(DDS_Reader_Test_Sender_exec) : ciao_executor, dds4ccm_lem_stub { after += DDS_Reader_Test_Sender_lem_stub DDS_Reader_Test_Sender_stub \ - DDS_Reader_Test_Connector_lem_stub DDS_Reader_Test_Connector_stub + DDS_Reader_Test_Connector_lem_stub DDS_Reader_Test_Connector_stub sharedname = Sender_exec libs += Sender_stub Sender_lem_stub DDS_Reader_Test_Base_stub \ DDS_Reader_Test_Connector_lem_stub DDS_Reader_Test_Connector_stub \ - Reader_Starter_stub + Reader_Starter_stub libpaths += ../lib includes += .. libout = ../lib diff --git a/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.cpp b/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.cpp index e37c13bdf2a..3dda047a9fd 100644 --- a/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.cpp +++ b/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.cpp @@ -1,71 +1,106 @@ // -*- C++ -*- // $Id$ +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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 "Reader_Test_Sender_exec.h" -#include "ace/Log_Msg.h" namespace CIAO_Reader_Test_Sender_Impl { - //============================================================ - // ConnectorStatusListener_exec_i - //============================================================ - ConnectorStatusListener_exec_i::ConnectorStatusListener_exec_i (Sender_exec_i &callback) - : callback_ (callback) + + /** + * Facet Executor Implementation Class: info_out_connector_status_exec_i + */ + + info_out_connector_status_exec_i::info_out_connector_status_exec_i ( + ::Reader_Test::CCM_Sender_Context_ptr ctx, + Sender_exec_i &callback) + : ciao_context_ ( + ::Reader_Test::CCM_Sender_Context::_duplicate (ctx)) + , callback_ (callback) { } - ConnectorStatusListener_exec_i::~ConnectorStatusListener_exec_i (void) + info_out_connector_status_exec_i::~info_out_connector_status_exec_i (void) { } // Operations from ::CCM_DDS::ConnectorStatusListener - void ConnectorStatusListener_exec_i::on_inconsistent_topic( - ::DDS::Topic_ptr , - const DDS::InconsistentTopicStatus & ) + + void + info_out_connector_status_exec_i::on_inconsistent_topic (::DDS::Topic_ptr /* the_topic */, + const ::DDS::InconsistentTopicStatus & /* status */) { + /* Your code here. */ } - void ConnectorStatusListener_exec_i::on_requested_incompatible_qos( - ::DDS::DataReader_ptr , - const DDS::RequestedIncompatibleQosStatus & ) + void + info_out_connector_status_exec_i::on_requested_incompatible_qos (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::RequestedIncompatibleQosStatus & /* status */) { + /* Your code here. */ } - void ConnectorStatusListener_exec_i::on_sample_rejected( - ::DDS::DataReader_ptr , - const DDS::SampleRejectedStatus & ) + void + info_out_connector_status_exec_i::on_sample_rejected (::DDS::DataReader_ptr /* the_reader */, + const ::DDS::SampleRejectedStatus & /* status */) { + /* Your code here. */ } - void ConnectorStatusListener_exec_i::on_offered_deadline_missed( - ::DDS::DataWriter_ptr , - const DDS::OfferedDeadlineMissedStatus & ) + void + info_out_connector_status_exec_i::on_offered_deadline_missed (::DDS::DataWriter_ptr /* the_writer */, + const ::DDS::OfferedDeadlineMissedStatus & /* status */) { + /* Your code here. */ } - void ConnectorStatusListener_exec_i::on_offered_incompatible_qos( - ::DDS::DataWriter_ptr , - const DDS::OfferedIncompatibleQosStatus & ) + void + info_out_connector_status_exec_i::on_offered_incompatible_qos (::DDS::DataWriter_ptr /* the_writer */, + const ::DDS::OfferedIncompatibleQosStatus & /* status */) { + /* Your code here. */ } - void ConnectorStatusListener_exec_i::on_unexpected_status( - ::DDS::Entity_ptr /*the_entity*/, - ::DDS::StatusKind status_kind) + void + info_out_connector_status_exec_i::on_unexpected_status (::DDS::Entity_ptr /* the_entity */, + ::DDS::StatusKind status_kind) { if (status_kind == ::DDS::PUBLICATION_MATCHED_STATUS) - this->callback_.start (); + this->callback_.start (); } + /** + * Component Executor Implementation Class: Sender_exec_i + */ - //============================================================ - // Component Executor Implementation Class: Sender_exec_i - //============================================================ Sender_exec_i::Sender_exec_i (void) - : iterations_ (10), - keys_ (5), - done_ (false), - ccm_activated_ (false) + : keys_ (5) + , iterations_ (10) + , done_ (false) + , ccm_activated_ (false) { } @@ -73,13 +108,14 @@ namespace CIAO_Reader_Test_Sender_Impl { } - void + // Supported operations and attributes. +void Sender_exec_i::start (void) { ::Reader_Test::ReaderTestConnector::Writer_var writer = - this->context_->get_connection_info_write_data (); + this->ciao_context_->get_connection_info_write_data (); ReaderStarter_var starter = - this->context_->get_connection_start_reader (); + this->ciao_context_->get_connection_start_reader (); //start can be called more than once... if (!this->done_ && this->ccm_activated_) @@ -108,21 +144,33 @@ namespace CIAO_Reader_Test_Sender_Impl ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Written key <%C> with <%d>\n"), key, iter)); } + delete new_key; } starter->start_read (); } } - ::CORBA::UShort - Sender_exec_i::iterations (void) - { - return this->iterations_; - } + // Component attributes and port operations. - void - Sender_exec_i::iterations (::CORBA::UShort iterations) + ::CCM_DDS::CCM_ConnectorStatusListener_ptr + Sender_exec_i::get_info_out_connector_status (void) { - this->iterations_ = iterations; + if ( ::CORBA::is_nil (this->ciao_info_out_connector_status_.in ())) + { + info_out_connector_status_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + info_out_connector_status_exec_i ( + this->ciao_context_.in (), + *this), + ::CCM_DDS::CCM_ConnectorStatusListener::_nil ()); + + this->ciao_info_out_connector_status_ = tmp; + } + + return + ::CCM_DDS::CCM_ConnectorStatusListener::_duplicate ( + this->ciao_info_out_connector_status_.in ()); } ::CORBA::UShort @@ -132,24 +180,35 @@ namespace CIAO_Reader_Test_Sender_Impl } void - Sender_exec_i::keys (::CORBA::UShort keys) + Sender_exec_i::keys ( + const ::CORBA::UShort keys) { this->keys_ = keys; } - ::CCM_DDS::CCM_ConnectorStatusListener_ptr - Sender_exec_i::get_info_out_connector_status (void) + ::CORBA::UShort + Sender_exec_i::iterations (void) + { + return this->iterations_; + } + + void + Sender_exec_i::iterations ( + const ::CORBA::UShort iterations) { - return new ConnectorStatusListener_exec_i (*this); + this->iterations_ = iterations; } + // Operations from Components::SessionComponent. + void - Sender_exec_i::set_session_context (::Components::SessionContext_ptr ctx) + Sender_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) { - this->context_ = + this->ciao_context_ = ::Reader_Test::CCM_Sender_Context::_narrow (ctx); - if ( ::CORBA::is_nil (this->context_.in ())) + if ( ::CORBA::is_nil (this->ciao_context_.in ())) { throw ::CORBA::INTERNAL (); } @@ -158,36 +217,25 @@ namespace CIAO_Reader_Test_Sender_Impl void Sender_exec_i::configuration_complete (void) { + /* Your code here. */ } void Sender_exec_i::ccm_activate (void) { - try - { - this->ccm_activated_ = true; - } - catch (const ::CORBA::Exception& ex) - { - ex._tao_print_exception ("Exception caught:"); - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: GET_CONNECTION_START_READER : Exception caught\n"))); - } - catch (...) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("ERROR: GET_CONNECTION_START_READER : Unknown exception caught\n"))); - } + this->ccm_activated_ = true; } void Sender_exec_i::ccm_passivate (void) { + /* Your code here. */ } void Sender_exec_i::ccm_remove (void) { + /* Your code here. */ } extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr diff --git a/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.h b/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.h index c7e36499ef8..0105a075f86 100644 --- a/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.h +++ b/CIAO/connectors/dds4ccm/tests/Reader/Sender/Reader_Test_Sender_exec.h @@ -1,55 +1,99 @@ // -*- C++ -*- // $Id$ -#ifndef CIAO_SENDER_EXEC_H_ -#define CIAO_SENDER_EXEC_H_ - +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.8.3 + * 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_READER_TEST_SENDER_EXEC_NO0JUV_H_ +#define CIAO_READER_TEST_SENDER_EXEC_NO0JUV_H_ + +#include /**/ "ace/pre.h" #include "Reader_Test_SenderEC.h" -#include /**/ "Sender_exec_export.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_Reader_Test_Sender_Impl { + class Sender_exec_i; - class SENDER_EXEC_Export ConnectorStatusListener_exec_i + /** + * Provider Executor Implementation Class: info_out_connector_status_exec_i + */ + + class info_out_connector_status_exec_i : public virtual ::CCM_DDS::CCM_ConnectorStatusListener, public virtual ::CORBA::LocalObject { public: - ConnectorStatusListener_exec_i (Sender_exec_i &); - virtual ~ConnectorStatusListener_exec_i (void); + info_out_connector_status_exec_i ( + ::Reader_Test::CCM_Sender_Context_ptr ctx, + Sender_exec_i &callback); + virtual ~info_out_connector_status_exec_i (void); + + //@{ + /** Operations and attributes from ::CCM_DDS::ConnectorStatusListener. */ virtual - void on_inconsistent_topic( ::DDS::Topic_ptr , - const DDS::InconsistentTopicStatus & ); + void on_inconsistent_topic (::DDS::Topic_ptr the_topic, + const ::DDS::InconsistentTopicStatus & status); + virtual - void on_requested_incompatible_qos( ::DDS::DataReader_ptr , - const DDS::RequestedIncompatibleQosStatus & ); + void on_requested_incompatible_qos (::DDS::DataReader_ptr the_reader, + const ::DDS::RequestedIncompatibleQosStatus & status); + virtual - void on_sample_rejected( ::DDS::DataReader_ptr , - const DDS::SampleRejectedStatus & ); + void on_sample_rejected (::DDS::DataReader_ptr the_reader, + const ::DDS::SampleRejectedStatus & status); + virtual - void on_offered_deadline_missed( ::DDS::DataWriter_ptr , - const DDS::OfferedDeadlineMissedStatus & ); + void on_offered_deadline_missed (::DDS::DataWriter_ptr the_writer, + const ::DDS::OfferedDeadlineMissedStatus & status); + virtual - void on_offered_incompatible_qos( ::DDS::DataWriter_ptr , - const DDS::OfferedIncompatibleQosStatus & ); + void on_offered_incompatible_qos (::DDS::DataWriter_ptr the_writer, + const ::DDS::OfferedIncompatibleQosStatus & status); + virtual - void on_unexpected_status( ::DDS::Entity_ptr , - ::DDS::StatusKind ); + void on_unexpected_status (::DDS::Entity_ptr the_entity, + ::DDS::StatusKind status_kind); + //@} + private: - /// Maintains a handle that actually process the event + ::Reader_Test::CCM_Sender_Context_var ciao_context_; Sender_exec_i &callback_; }; + /** + * Component Executor Implementation Class: Sender_exec_i + */ + class Sender_exec_i : public virtual Sender_Exec, public virtual ::CORBA::LocalObject @@ -58,39 +102,68 @@ namespace CIAO_Reader_Test_Sender_Impl Sender_exec_i (void); virtual ~Sender_exec_i (void); - virtual ::CORBA::UShort iterations (void); + //@{ + /** Supported operations and attributes. */ - virtual void iterations (::CORBA::UShort iterations); + //@} + + //@{ + /** Component attributes and port operations. */ + + virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr + get_info_out_connector_status (void); virtual ::CORBA::UShort keys (void); virtual void keys (::CORBA::UShort keys); - virtual ::CCM_DDS::CCM_ConnectorStatusListener_ptr - get_info_out_connector_status (void); + virtual ::CORBA::UShort iterations (void); - virtual void set_session_context (::Components::SessionContext_ptr ctx); + 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. */ void start (void); + //@} private: - ::Reader_Test::CCM_Sender_Context_var context_; + ::Reader_Test::CCM_Sender_Context_var ciao_context_; + + //@{ + /** Component attributes. */ + ::CCM_DDS::CCM_ConnectorStatusListener_var ciao_info_out_connector_status_; + + ::CORBA::UShort keys_; + + ::CORBA::UShort iterations_; + //@} - CORBA::UShort iterations_; - CORBA::UShort keys_; - bool done_; - bool ccm_activated_; + //@{ + /** User defined members. */ + bool done_; + bool ccm_activated_; + //@} + + //@{ + /** User defined private operations. */ + + //@} }; extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr create_Reader_Test_Sender_Impl (void); } -#endif /* ifndef */ +#include /**/ "ace/post.h" +#endif /* ifndef */ |