diff options
author | msmit <msmit@remedy.nl> | 2010-06-17 14:43:45 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2010-06-17 14:43:45 +0000 |
commit | b30bd4d33c0ca5317ab01859b1e08d90f0c451e8 (patch) | |
tree | 67794f1f24cb75ef8bcaa7f59bdc9fa0412c74ac | |
parent | 695ec7cb454d4d0c76c765286f25fb15e7765486 (diff) | |
download | ATCD-b30bd4d33c0ca5317ab01859b1e08d90f0c451e8.tar.gz |
Thu Jun 17 14:40:00 UTC 2010 Marcel Smit <msmit@remedy.nl>
* connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.h:
* connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.cpp:
* connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.h:
* connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.cpp:
Changed in order to meet the generated code better.
* connectors/dds4ccm/tutorials/Shapes/Tutorial/Code:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Control_comp:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Control_comp/Shapes_Control_comp_exec.cpp:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Receiver_comp:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Receiver_comp/Shapes_Receiver_comp_exec.cpp:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Sender_comp:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Sender_comp/Shapes_Sender_comp_exec.cpp:
* connectors/dds4ccm/tutorials/Shapes/Tutorial/executors.html:
Generated executors.
9 files changed, 704 insertions, 62 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 73d5c774559..e213947f30e 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,21 @@ +Thu Jun 17 14:40:00 UTC 2010 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.h: + * connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.cpp: + * connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.h: + * connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.cpp: + Changed in order to meet the generated code better. + + * connectors/dds4ccm/tutorials/Shapes/Tutorial/Code: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Control_comp: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Control_comp/Shapes_Control_comp_exec.cpp: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Receiver_comp: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Receiver_comp/Shapes_Receiver_comp_exec.cpp: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Sender_comp: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Sender_comp/Shapes_Sender_comp_exec.cpp: + * connectors/dds4ccm/tutorials/Shapes/Tutorial/executors.html: + Generated executors. + Thu Jun 17 13:05:06 UTC 2010 Marcel Smit <msmit@remedy.nl> * connectors/dds4ccm/tutorials/Shapes/Tutorial/executors.html: diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.cpp b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.cpp index 7eea6be956f..3307b1c41ba 100644 --- a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.cpp +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.cpp @@ -11,7 +11,7 @@ namespace CIAO_Shapes_Control_comp_Impl //============================================================ // pulse_Generator //============================================================ - pulse_Generator::pulse_Generator (Control_exec_i &callback) + pulse_Generator::pulse_Generator (Control_comp_exec_i &callback) : pulse_callback_ (callback) { } @@ -28,9 +28,9 @@ namespace CIAO_Shapes_Control_comp_Impl } //============================================================ - // Control_exec_i + // Control_comp_exec_i //============================================================ - Control_exec_i::Control_exec_i (void) + Control_comp_exec_i::Control_comp_exec_i (void) : rate_ (1), max_x_ (100), max_y_ (100), @@ -40,21 +40,20 @@ namespace CIAO_Shapes_Control_comp_Impl y_increasing_ (false), size_increasing_ (false), current_size_ (ACE_OS::rand () % max_size_), - current_color_ (::Shapes::GREEN), current_x_ (ACE_OS::rand () % max_x_), current_y_ (ACE_OS::rand () % max_y_) { this->ticker_ = new pulse_Generator (*this); } - Control_exec_i::~Control_exec_i (void) + Control_comp_exec_i::~Control_comp_exec_i (void) { } // Supported operations and attributes. void - Control_exec_i::tick () + Control_comp_exec_i::tick () { if (this->x_increasing_) { @@ -95,24 +94,24 @@ namespace CIAO_Shapes_Control_comp_Impl { if (control->setSize (this->current_size_) == ::Shapes::RETURN_ERROR) { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Control_exec_i::tick : ") + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Control_comp_exec_i::tick : ") ACE_TEXT ("Setting shapes size\n"))); } else { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Control_exec_i::tick : ") + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Control_comp_exec_i::tick : ") ACE_TEXT ("Size set to <%u>.\n"), this->current_size_)); } if (control->setLocation (this->current_x_, this->current_y_) == ::Shapes::RETURN_ERROR) { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Control_exec_i::tick : ") + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Control_comp_exec_i::tick : ") ACE_TEXT ("Setting shapes location\n"))); } else { - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Control_exec_i::tick : ") + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Control_comp_exec_i::tick : ") ACE_TEXT ("Location set to <%u>, <%u>.\n"), this->current_x_, this->current_y_)); @@ -125,7 +124,7 @@ namespace CIAO_Shapes_Control_comp_Impl } void - Control_exec_i::start (void) + Control_comp_exec_i::start (void) { // calculate the interval time long const usec = 1000000 / this->rate_; @@ -135,86 +134,86 @@ namespace CIAO_Shapes_Control_comp_Impl ACE_Time_Value (0, usec), ACE_Time_Value (0, usec)) == -1) { - ACE_ERROR ((LM_ERROR, ACE_TEXT ("Control_exec_i::start : ") + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Control_comp_exec_i::start : ") ACE_TEXT ("Error scheduling timer\n"))); } } void - Control_exec_i::stop (void) + Control_comp_exec_i::stop (void) { this->context_->get_CCM_object()->_get_orb ()->orb_core ()->reactor ()->cancel_timer (this->ticker_); delete this->ticker_; } ::CORBA::ULong - Control_exec_i::rate (void) + Control_comp_exec_i::rate (void) { return this->rate_; } void - Control_exec_i::rate (::CORBA::ULong rate) + Control_comp_exec_i::rate (::CORBA::ULong rate) { this->rate_ = rate; } ::CORBA::UShort - Control_exec_i::max_x (void) + Control_comp_exec_i::max_x (void) { return this->max_x_; } void - Control_exec_i::max_x (::CORBA::UShort max_x) + Control_comp_exec_i::max_x (::CORBA::UShort max_x) { this->max_x_ = max_x; } ::CORBA::UShort - Control_exec_i::max_y (void) + Control_comp_exec_i::max_y (void) { return this->max_y_; } void - Control_exec_i::max_y (::CORBA::UShort max_y) + Control_comp_exec_i::max_y (::CORBA::UShort max_y) { this->max_y_ = max_y; } ::CORBA::UShort - Control_exec_i::max_size (void) + Control_comp_exec_i::max_size (void) { return this->max_size_; } void - Control_exec_i::max_size (::CORBA::UShort max_size) + Control_comp_exec_i::max_size (::CORBA::UShort max_size) { this->max_size_ = max_size; } void - Control_exec_i::resize_shape (::CORBA::Boolean resize) + Control_comp_exec_i::resize_shape (::CORBA::Boolean resize) { this->resize_ = resize; } ::CORBA::Boolean - Control_exec_i::resize_shape () + Control_comp_exec_i::resize_shape () { return this->resize_; } ::Shapes::CCM_Control_obj_ptr - Control_exec_i::get_control (void) + Control_comp_exec_i::get_control (void) { return ::Shapes::CCM_Control_obj::_nil (); } void - Control_exec_i::set_session_context (::Components::SessionContext_ptr ctx) + Control_comp_exec_i::set_session_context (::Components::SessionContext_ptr ctx) { this->context_ = ::Shapes::CCM_Control_comp_Context::_narrow (ctx); @@ -226,24 +225,24 @@ namespace CIAO_Shapes_Control_comp_Impl } void - Control_exec_i::configuration_complete (void) + Control_comp_exec_i::configuration_complete (void) { } void - Control_exec_i::ccm_activate (void) + Control_comp_exec_i::ccm_activate (void) { this->start (); } void - Control_exec_i::ccm_passivate (void) + Control_comp_exec_i::ccm_passivate (void) { this->stop (); } void - Control_exec_i::ccm_remove (void) + Control_comp_exec_i::ccm_remove (void) { } @@ -255,7 +254,7 @@ namespace CIAO_Shapes_Control_comp_Impl ACE_NEW_NORETURN ( retval, - Control_exec_i); + Control_comp_exec_i); return retval; } diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.h b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.h index 855eef82eb9..8160a174c75 100644 --- a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.h +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.h @@ -17,7 +17,7 @@ namespace CIAO_Shapes_Control_comp_Impl { - class Control_exec_i; + class Control_comp_exec_i; //============================================================ // pulse_Generator @@ -25,26 +25,26 @@ namespace CIAO_Shapes_Control_comp_Impl class pulse_Generator : public ACE_Event_Handler { public: - pulse_Generator (Control_exec_i &callback); + pulse_Generator (Control_comp_exec_i &callback); virtual ~pulse_Generator (); virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg); private: - Control_exec_i &pulse_callback_; + Control_comp_exec_i &pulse_callback_; }; //============================================================ - // Control_exec_i + // Control_comp_exec_i //============================================================ - class Control_exec_i + class SHAPES_CONTROL_COMP_EXEC_Export Control_comp_exec_i : public virtual Control_comp_Exec, public virtual ::CORBA::LocalObject { public: - Control_exec_i (void); - virtual ~Control_exec_i (void); + Control_comp_exec_i (void); + virtual ~Control_comp_exec_i (void); ::CORBA::ULong rate (void); @@ -95,7 +95,6 @@ namespace CIAO_Shapes_Control_comp_Impl bool size_increasing_; ::CORBA::UShort current_size_; - ::Shapes::COLOR current_color_; ::CORBA::UShort current_x_; ::CORBA::UShort current_y_; diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.cpp b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.cpp index ff5c1e6820b..0262e5a161a 100644 --- a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.cpp +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.cpp @@ -10,26 +10,26 @@ namespace CIAO_Shapes_Receiver_comp_Impl { //============================================================ - // ShapeType_Listener_exec_i + // info_out_data_listener_exec_i //============================================================ - ShapeType_Listener_exec_i::ShapeType_Listener_exec_i (void) + info_out_data_listener_exec_i::info_out_data_listener_exec_i (void) { } - ShapeType_Listener_exec_i::~ShapeType_Listener_exec_i (void) + info_out_data_listener_exec_i::~info_out_data_listener_exec_i (void) { } // Operations from ::CCM_DDS::ShapeType_Listener void - ShapeType_Listener_exec_i::on_many_data ( + info_out_data_listener_exec_i::on_many_data ( const ::Shapes::ShapeTypeSeq & /* an_instance */, const ::CCM_DDS::ReadInfoSeq & /* info */) { } void - ShapeType_Listener_exec_i::on_one_data ( + info_out_data_listener_exec_i::on_one_data ( const ShapeType & an_instance , const ::CCM_DDS::ReadInfo & /* info */) { @@ -42,13 +42,13 @@ namespace CIAO_Shapes_Receiver_comp_Impl } //============================================================ - // Receiver_exec_i + // Receiver_comp_exec_i //============================================================ - Receiver_exec_i::Receiver_exec_i (void) + Receiver_comp_exec_i::Receiver_comp_exec_i (void) { } - Receiver_exec_i::~Receiver_exec_i (void) + Receiver_comp_exec_i::~Receiver_comp_exec_i (void) { } @@ -58,20 +58,33 @@ namespace CIAO_Shapes_Receiver_comp_Impl // Port operations. ::Shapes::ShapesConnector::CCM_Listener_ptr - Receiver_exec_i::get_info_out_data_listener (void) + Receiver_comp_exec_i::get_info_out_data_listener (void) { - return new ShapeType_Listener_exec_i (); + 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 (), + ::Shapes::ShapesConnector::CCM_Listener::_nil ()); + + this->ciao_info_out_data_listener_ = tmp; + } + + return + ::Shapes::ShapesConnector::CCM_Listener::_duplicate ( + this->ciao_info_out_data_listener_.in ()); } ::CCM_DDS::CCM_PortStatusListener_ptr - Receiver_exec_i::get_info_out_status (void) + Receiver_comp_exec_i::get_info_out_status (void) { return ::CCM_DDS::CCM_PortStatusListener::_nil (); } // Operations from Components::SessionComponent. void - Receiver_exec_i::set_session_context ( + Receiver_comp_exec_i::set_session_context ( ::Components::SessionContext_ptr ctx) { this->context_ = @@ -83,12 +96,12 @@ namespace CIAO_Shapes_Receiver_comp_Impl } void - Receiver_exec_i::configuration_complete (void) + Receiver_comp_exec_i::configuration_complete (void) { } void - Receiver_exec_i::ccm_activate (void) + Receiver_comp_exec_i::ccm_activate (void) { ::CCM_DDS::DataListenerControl_var lc = this->context_->get_connection_info_out_data_control (); @@ -103,12 +116,12 @@ namespace CIAO_Shapes_Receiver_comp_Impl } void - Receiver_exec_i::ccm_passivate (void) + Receiver_comp_exec_i::ccm_passivate (void) { } void - Receiver_exec_i::ccm_remove (void) + Receiver_comp_exec_i::ccm_remove (void) { } @@ -120,7 +133,7 @@ namespace CIAO_Shapes_Receiver_comp_Impl ACE_NEW_NORETURN ( retval, - Receiver_exec_i); + Receiver_comp_exec_i); return retval; } diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.h b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.h index f5ecd2669e5..fcf581a3764 100644 --- a/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.h +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.h @@ -18,15 +18,15 @@ namespace CIAO_Shapes_Receiver_comp_Impl { //============================================================ - // ShapeType_Listener_exec_i + // info_out_data_listener_exec_i //============================================================ - class SHAPES_RECEIVER_COMP_EXEC_Export ShapeType_Listener_exec_i + class SHAPES_RECEIVER_COMP_EXEC_Export info_out_data_listener_exec_i : public virtual ::Shapes::ShapesConnector::CCM_Listener, public virtual ::CORBA::LocalObject { public: - ShapeType_Listener_exec_i (void); - virtual ~ShapeType_Listener_exec_i (void); + info_out_data_listener_exec_i (); + virtual ~info_out_data_listener_exec_i (void); virtual void on_one_data ( @@ -38,13 +38,13 @@ namespace CIAO_Shapes_Receiver_comp_Impl const ::CCM_DDS::ReadInfoSeq & info); }; - class SHAPES_RECEIVER_COMP_EXEC_Export Receiver_exec_i + class SHAPES_RECEIVER_COMP_EXEC_Export Receiver_comp_exec_i : public virtual Receiver_comp_Exec, public virtual ::CORBA::LocalObject { public: - Receiver_exec_i (void); - virtual ~Receiver_exec_i (void); + Receiver_comp_exec_i (void); + virtual ~Receiver_comp_exec_i (void); // Supported operations and attributes. @@ -70,6 +70,7 @@ namespace CIAO_Shapes_Receiver_comp_Impl private: ::Shapes::CCM_Receiver_comp_Context_var context_; + ::Shapes::ShapesConnector::CCM_Listener_var ciao_info_out_data_listener_; }; extern "C" SHAPES_RECEIVER_COMP_EXEC_Export ::Components::EnterpriseComponent_ptr diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Control_comp/Shapes_Control_comp_exec.cpp b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Control_comp/Shapes_Control_comp_exec.cpp new file mode 100644 index 00000000000..2174154bbb5 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Control_comp/Shapes_Control_comp_exec.cpp @@ -0,0 +1,172 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.7.9 + * 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 + **/ + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1304 + +#include "Shapes_Control_comp_gen_exec.h" + +namespace CIAO_Shapes_Control_comp_Impl +{ + //============================================================ + // Component Executor Implementation Class: Control_comp_exec_i + //============================================================ + + Control_comp_exec_i::Control_comp_exec_i (void) + { + } + + Control_comp_exec_i::~Control_comp_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + ::CORBA::ULong + Control_comp_exec_i::rate (void) + { + /* Your code here. */ + return 0; + } + + void + Control_comp_exec_i::rate ( + ::CORBA::ULong /* rate */) + { + /* Your code here. */ + } + + ::CORBA::UShort + Control_comp_exec_i::max_x (void) + { + /* Your code here. */ + return 0; + } + + void + Control_comp_exec_i::max_x ( + ::CORBA::UShort /* max_x */) + { + /* Your code here. */ + } + + ::CORBA::UShort + Control_comp_exec_i::max_y (void) + { + /* Your code here. */ + return 0; + } + + void + Control_comp_exec_i::max_y ( + ::CORBA::UShort /* max_y */) + { + /* Your code here. */ + } + + ::CORBA::UShort + Control_comp_exec_i::max_size (void) + { + /* Your code here. */ + return 0; + } + + void + Control_comp_exec_i::max_size ( + ::CORBA::UShort /* max_size */) + { + /* Your code here. */ + } + + ::CORBA::Boolean + Control_comp_exec_i::resize_shape (void) + { + /* Your code here. */ + return false; + } + + void + Control_comp_exec_i::resize_shape ( + ::CORBA::Boolean /* resize_shape */) + { + /* Your code here. */ + } + + // Operations from Components::SessionComponent. + + void + Control_comp_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::Shapes::CCM_Control_comp_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Control_comp_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + Control_comp_exec_i::ccm_activate (void) + { + /* Your code here. */ + } + + void + Control_comp_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + Control_comp_exec_i::ccm_remove (void) + { + /* Your code here. */ + } + + extern "C" ::Components::EnterpriseComponent_ptr + create_Shapes_Control_comp_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Control_comp_exec_i); + + return retval; + } +} diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Receiver_comp/Shapes_Receiver_comp_exec.cpp b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Receiver_comp/Shapes_Receiver_comp_exec.cpp new file mode 100644 index 00000000000..a71b7f73b0f --- /dev/null +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Receiver_comp/Shapes_Receiver_comp_exec.cpp @@ -0,0 +1,212 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.7.9 + * 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 + **/ + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1304 + +#include "Shapes_Receiver_comp_gen_exec.h" + +namespace CIAO_Shapes_Receiver_comp_Impl +{ + + // TAO_IDL - Generated from + // be/be_visitor_component/facet_exs.cpp:75 + //============================================================ + // Facet Executor Implementation Class: info_out_data_listener_exec_i + //============================================================ + + info_out_data_listener_exec_i::info_out_data_listener_exec_i ( + ::Shapes::CCM_Receiver_comp_Context_ptr ctx) + : ciao_context_ ( + ::Shapes::CCM_Receiver_comp_Context::_duplicate (ctx)) + { + } + + info_out_data_listener_exec_i::~info_out_data_listener_exec_i (void) + { + } + + // Operations from ::Shapes::ShapesConnector::Listener + + void + info_out_data_listener_exec_i::on_one_data ( + const ::ShapeType & /* datum */, + const ::CCM_DDS::ReadInfo & /* info */) + { + /* Your code here. */ + } + + void + info_out_data_listener_exec_i::on_many_data ( + const ::Shapes::ShapeTypeSeq & /* data */, + const ::CCM_DDS::ReadInfoSeq & /* infos */) + { + /* Your code here. */ + } + + // TAO_IDL - Generated from + // be/be_visitor_component/facet_exs.cpp:75 + //============================================================ + // Facet Executor Implementation Class: info_out_status_exec_i + //============================================================ + + info_out_status_exec_i::info_out_status_exec_i ( + ::Shapes::CCM_Receiver_comp_Context_ptr ctx) + : ciao_context_ ( + ::Shapes::CCM_Receiver_comp_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. */ + } + //============================================================ + // Component Executor Implementation Class: Receiver_comp_exec_i + //============================================================ + + Receiver_comp_exec_i::Receiver_comp_exec_i (void) + { + } + + Receiver_comp_exec_i::~Receiver_comp_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + ::Shapes::ShapesConnector::CCM_Listener_ptr + Receiver_comp_exec_i::get_info_out_data_listener (void) + { + 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 ()), + ::Shapes::ShapesConnector::CCM_Listener::_nil ()); + + this->ciao_info_out_data_listener_ = tmp; + } + + return + ::Shapes::ShapesConnector::CCM_Listener::_duplicate ( + this->ciao_info_out_data_listener_.in ()); + } + + ::CCM_DDS::CCM_PortStatusListener_ptr + Receiver_comp_exec_i::get_info_out_status (void) + { + 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 ()); + } + + // Operations from Components::SessionComponent. + + void + Receiver_comp_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::Shapes::CCM_Receiver_comp_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Receiver_comp_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + Receiver_comp_exec_i::ccm_activate (void) + { + /* Your code here. */ + } + + void + Receiver_comp_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + Receiver_comp_exec_i::ccm_remove (void) + { + /* Your code here. */ + } + + extern "C" ::Components::EnterpriseComponent_ptr + create_Shapes_Receiver_comp_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Receiver_comp_exec_i); + + return retval; + } +} diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Sender_comp/Shapes_Sender_comp_exec.cpp b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Sender_comp/Shapes_Sender_comp_exec.cpp new file mode 100644 index 00000000000..c1aa075c9fc --- /dev/null +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/Code/Shapes_Sender_comp/Shapes_Sender_comp_exec.cpp @@ -0,0 +1,159 @@ +// -*- C++ -*- +// $Id$ + +/** + * Code generated by the The ACE ORB (TAO) IDL Compiler v1.7.9 + * 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 + **/ + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1304 + +#include "Shapes_Sender_comp_gen_exec.h" + +namespace CIAO_Shapes_Sender_comp_Impl +{ + + // TAO_IDL - Generated from + // be/be_visitor_component/facet_exs.cpp:75 + //============================================================ + // Facet Executor Implementation Class: control_exec_i + //============================================================ + + control_exec_i::control_exec_i ( + ::Shapes::CCM_Sender_comp_Context_ptr ctx) + : ciao_context_ ( + ::Shapes::CCM_Sender_comp_Context::_duplicate (ctx)) + { + } + + control_exec_i::~control_exec_i (void) + { + } + + // Operations from ::Shapes::Control_obj + + ::Shapes::ReturnStatus + control_exec_i::setSize ( + ::CORBA::UShort /* size */) + { + /* Your code here. */ + return static_cast< ::Shapes::ReturnStatus> (0UL); + } + + ::Shapes::ReturnStatus + control_exec_i::setLocation ( + ::CORBA::UShort /* x */, + ::CORBA::UShort /* y */) + { + /* Your code here. */ + return static_cast< ::Shapes::ReturnStatus> (0UL); + } + + //============================================================ + // Component Executor Implementation Class: Sender_comp_exec_i + //============================================================ + + Sender_comp_exec_i::Sender_comp_exec_i (void) + { + } + + Sender_comp_exec_i::~Sender_comp_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes and port operations. + + ::Shapes::CCM_Control_obj_ptr + Sender_comp_exec_i::get_control (void) + { + if ( ::CORBA::is_nil (this->ciao_control_.in ())) + { + control_exec_i *tmp = 0; + ACE_NEW_RETURN ( + tmp, + control_exec_i ( + this->ciao_context_.in ()), + ::Shapes::CCM_Control_obj::_nil ()); + + this->ciao_control_ = tmp; + } + + return + ::Shapes::CCM_Control_obj::_duplicate ( + this->ciao_control_.in ()); + } + + // Operations from Components::SessionComponent. + + void + Sender_comp_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->ciao_context_ = + ::Shapes::CCM_Sender_comp_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->ciao_context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + Sender_comp_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + Sender_comp_exec_i::ccm_activate (void) + { + /* Your code here. */ + } + + void + Sender_comp_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + Sender_comp_exec_i::ccm_remove (void) + { + /* Your code here. */ + } + + extern "C" ::Components::EnterpriseComponent_ptr + create_Shapes_Sender_comp_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_NORETURN ( + retval, + Sender_comp_exec_i); + + return retval; + } +} diff --git a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/executors.html b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/executors.html index 6589f9df80b..9894004e2ed 100644 --- a/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/executors.html +++ b/CIAO/connectors/dds4ccm/tutorials/Shapes/Tutorial/executors.html @@ -23,6 +23,75 @@ be done. </p> + <h2>Controller</h2> + <p> + In a command shell windows, navigate to the "src" directory of the + component directory of the Controller (Shapes_asm/Shapes_Control_comp/src). + After that, invoke the TAO IDL compiler by running the following command: + </p> + <p> + <code> + tao_idl -I../ports -I../ports/GeneratedCode + -I../../ports -I%TAO_ROOT% -I%TAO_ROOT%/tao -I%CIAO_ROOT% + -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao -Gex + Shapes_Control_comp.idl + </code> + <br/><br/> + This will generate the executor file with " + Shapes_Control_comp_exec.cpp" as name. Once generated, the user should + implement the business logic for the controller.<br/><br/> + + The generated code can be found + <a href="./Code/Shapes_Control_comp/Shapes_Control_comp_exec.cpp">here</a>.<br/> + The implemented executor can be found + <a href="../Shapes_asm/Shapes_Control_comp/src/Shapes_Control_comp_exec.cpp"> + here</a><br/> + <br/> + </p> + + <h2>Sender</h2> + <p> + Navigate to the Shapes_asm/Shapes_Sender_comp/src and invoke the TAO IDL + compiler by running the following command: + </p> + <p> + <code> + tao_idl -I../ports -I../../Shapes_Control_comp/ports + -I../ports/GeneratedCode -I../../ports -I%TAO_ROOT% + -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao + -DCIAO_DDS4CCM_NDDS -Gex Shapes_Sender_comp.idl + </code> + <br/><br/> + The generated code can be found + <a href="./Code/Shapes_Sender_comp/Shapes_Sender_comp_exec.cpp">here</a>.<br/> + The implemented executor can be found + <a href="../Shapes_asm/Shapes_Sender_comp/src/Shapes_Sender_comp_exec.cpp"> + here</a><br/> + <br/> + </p> + + <h2>Receiver</h2> + <p> + Navigate to the Shapes_asm/Shapes_Receiver_comp/src and invoke the TAO IDL + compiler by running the following command: + </p> + <p> + <code> + tao_idl -I../ports -I../../Shapes_Control_comp/ports + -I../ports/GeneratedCode -I../../ports -I%TAO_ROOT% + -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao + -DCIAO_DDS4CCM_NDDS -Gex Shapes_Receiver_comp.idl + </code> + <br/><br/> + The generated code can be found + <a href="./Code/Shapes_Receiver_comp/Shapes_Receiver_comp_exec.cpp">here</a>.<br/> + The implemented executor can be found + <a href="../Shapes_asm/Shapes_Receiver_comp/src/Shapes_Receiver_comp_exec.cpp"> + here</a><br/> + <br/> + </p> + + <hr /> <table width="100%" border="0"> <tr> |