diff options
author | msmit <msmit@remedy.nl> | 2009-08-19 07:59:27 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2009-08-19 07:59:27 +0000 |
commit | 4c976d5b45f34501524ba7c40adc639b554eaa02 (patch) | |
tree | 4bbd040a8f1dff33cc6c38ccca3788ac72dece08 | |
parent | f386e337396d00aaccde3da08f0fe9a65430f363 (diff) | |
download | ATCD-4c976d5b45f34501524ba7c40adc639b554eaa02.tar.gz |
Wed Aug 19 07:58:49 UTC 2009 Marcel Smit <msmit@remedy.nl>
* tests/AMI_CCM/AMI:
* tests/AMI_CCM/AMI/AMI.idl:
* tests/AMI_CCM/AMI/AMI.mpc:
* tests/AMI_CCM/AMI/AMI_exec.h:
* tests/AMI_CCM/AMI/AMI_exec.cpp:
* tests/AMI_CCM/Hello_Base/Hello_Base.idl:
* tests/AMI_CCM/Receiver/Hello_Receiver.idl:
* tests/AMI_CCM/Receiver/Hello_Receiver.mpc:
* tests/AMI_CCM/Receiver/Hello_Receiver_exec.h:
* tests/AMI_CCM/Receiver/Hello_Receiver_exec.cpp:
* tests/AMI_CCM/Sender/Hello_Sender.idl:
* tests/AMI_CCM/Sender/Hello_Sender.mpc:
* tests/AMI_CCM/Sender/Hello_Sender_exec.h:
* tests/AMI_CCM/Sender/Hello_Sender_exec.cpp:
* tests/AMI_CCM/descriptors/Plan.cdp:
Changed to deploy the third component (AMI). None of the
executors are implemented yet. Deploymentplan and IDL files
are prepared to deploy the AMI component.
-rw-r--r-- | modules/CIAO/ChangeLog | 21 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/AMI/AMI.idl | 29 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/AMI/AMI.mpc | 134 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.cpp | 187 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.h | 130 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Hello_Base/Hello_Base.idl | 18 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.idl | 4 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.mpc | 16 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.cpp | 19 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.h | 13 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.idl | 7 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.mpc | 16 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.cpp | 80 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.h | 54 | ||||
-rw-r--r-- | modules/CIAO/tests/AMI_CCM/descriptors/Plan.cdp | 181 |
15 files changed, 750 insertions, 159 deletions
diff --git a/modules/CIAO/ChangeLog b/modules/CIAO/ChangeLog index b3d8dc78d89..ff5d966334c 100644 --- a/modules/CIAO/ChangeLog +++ b/modules/CIAO/ChangeLog @@ -1,3 +1,24 @@ +Wed Aug 19 07:58:49 UTC 2009 Marcel Smit <msmit@remedy.nl> + + * tests/AMI_CCM/AMI: + * tests/AMI_CCM/AMI/AMI.idl: + * tests/AMI_CCM/AMI/AMI.mpc: + * tests/AMI_CCM/AMI/AMI_exec.h: + * tests/AMI_CCM/AMI/AMI_exec.cpp: + * tests/AMI_CCM/Hello_Base/Hello_Base.idl: + * tests/AMI_CCM/Receiver/Hello_Receiver.idl: + * tests/AMI_CCM/Receiver/Hello_Receiver.mpc: + * tests/AMI_CCM/Receiver/Hello_Receiver_exec.h: + * tests/AMI_CCM/Receiver/Hello_Receiver_exec.cpp: + * tests/AMI_CCM/Sender/Hello_Sender.idl: + * tests/AMI_CCM/Sender/Hello_Sender.mpc: + * tests/AMI_CCM/Sender/Hello_Sender_exec.h: + * tests/AMI_CCM/Sender/Hello_Sender_exec.cpp: + * tests/AMI_CCM/descriptors/Plan.cdp: + Changed to deploy the third component (AMI). None of the + executors are implemented yet. Deploymentplan and IDL files + are prepared to deploy the AMI component. + Tue Aug 18 09:59:07 UTC 2009 Marcel Smit <msmit@remedy.nl> * tests/AMI_CCM/Hello_Base/Hello_Base.idl: diff --git a/modules/CIAO/tests/AMI_CCM/AMI/AMI.idl b/modules/CIAO/tests/AMI_CCM/AMI/AMI.idl new file mode 100644 index 00000000000..0e482404fcb --- /dev/null +++ b/modules/CIAO/tests/AMI_CCM/AMI/AMI.idl @@ -0,0 +1,29 @@ +// $Id$ + +#ifndef AMI_IDL +#define AMI_IDL + +#include <Components.idl> + +#include "../Hello_Base/Hello_Base.idl" + +module Hello_AMI +{ + component AMI + { + //provides the interface for Sender + provides CCM_AMI::AMI_ami_foo perform_asynch_foo; + + //uses the interface of the Receiver ('server') + uses CCM_AMI::AMI_foo receiver_foo; + + //uses the callback interface of the sender + uses CCM_AMI::AMI_foo_callback callback_foo; + }; + + home AMIHome manages AMI + { + }; +}; + +#endif diff --git a/modules/CIAO/tests/AMI_CCM/AMI/AMI.mpc b/modules/CIAO/tests/AMI_CCM/AMI/AMI.mpc new file mode 100644 index 00000000000..bba183cb3f0 --- /dev/null +++ b/modules/CIAO/tests/AMI_CCM/AMI/AMI.mpc @@ -0,0 +1,134 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p Hello_Base AMI" + +project(Hello_Base_AMI_idl_gen) : componentidldefaults { + custom_only = 1 + idlflags += -Wb,stub_export_macro=AMI_STUB_Export \ + -Wb,stub_export_include=AMI_stub_export.h \ + -Wb,skel_export_macro=AMI_SVNT_Export \ + -Wb,skel_export_include=AMI_svnt_export.h \ + -Wb,exec_export_macro=AMI_EXEC_Export \ + -Wb,exec_export_include=AMI_exec_export.h + + IDL_Files { + AMI.idl + } +} + +project(Hello_Base_AMI_lem_gen) : ciaoidldefaults { + after += Hello_Base_AMI_idl_gen + custom_only = 1 + idlflags += -Wb,stub_export_macro=AMI_LEM_STUB_Export \ + -Wb,stub_export_include=AMI_lem_stub_export.h \ + -SS -Gxhst + + IDL_Files { + AMIE.idl + } +} + +project(Hello_Base_AMI_lem_stub) : ccm_svnt { + after += Hello_Base_AMI_lem_gen Hello_Base_AMI_stub Hello_Base_stub + libs += Hello_Base_stub AMI_stub + libpaths += ../lib + libout = ../lib + sharedname = AMI_lem_stub + dynamicflags = AMI_LEM_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + AMIEC.cpp + } + + Header_Files { + AMIEC.h + AMI_lem_stub_export.h + } + + Inline_Files { + AMIEC.inl + } +} + +project(Hello_Base_AMI_stub) : ccm_stub { + after += Hello_Base_AMI_idl_gen Hello_Base_stub + libs += Hello_Base_stub + libpaths += ../lib + libout = ../lib + sharedname = AMI_stub + dynamicflags = AMI_STUB_BUILD_DLL + + IDL_Files { + } + + Source_Files { + AMIC.cpp + } + + Header_Files { + AMIC.h + AMI_stub_export.h + } + + Inline_Files { + AMIC.inl + } +} + +project(Hello_Base_AMI_exec) : ciao_executor { + after += Hello_Base_AMI_lem_stub Hello_Base_AMI_stub + sharedname = AMI_exec + libs += AMI_stub AMI_lem_stub Hello_Base_stub + libpaths += ../lib + libout = ../lib + dynamicflags = AMI_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + AMI_exec.cpp + } + + Header_Files { + AMI_exec.h + AMI_exec_export.h + } + + Inline_Files { + } +} + + +project(Hello_Base_AMI_svnt) : ciao_servant { + after += Hello_Base_skel Hello_Base_AMI_lem_stub + sharedname = AMI_svnt + libs += AMI_stub AMI_lem_stub \ + Hello_Base_skel \ + Hello_Base_stub + libpaths += ../lib + libout = ../lib + dynamicflags = AMI_SVNT_BUILD_DLL + + IDL_Files { + } + + Source_Files { + AMIS.cpp + AMI_svnt.cpp + } + + Header_Files { + AMIS.h + AMI_svnt.h + AMI_svnt_export.h + } + + Inline_Files { + AMIS.inl + } +} + + diff --git a/modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.cpp b/modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.cpp new file mode 100644 index 00000000000..525c9449ce1 --- /dev/null +++ b/modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.cpp @@ -0,0 +1,187 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler v1.7.1 **** +// 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 +// http://doc.ece.uci.edu/ +// 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:1278 + +#include "AMI_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIAO_Hello_AMI_AMI_Impl +{ + //============================================================ + // Facet Executor Implementation Class: AMI_ami_foo_exec_i + //============================================================ + + AMI_ami_foo_exec_i::AMI_ami_foo_exec_i (void) + { + } + + AMI_ami_foo_exec_i::~AMI_ami_foo_exec_i (void) + { + } + + // Operations from ::CCM_AMI::AMI_ami_foo + + void + AMI_ami_foo_exec_i::sendc_asynch_foo ( + const char * /* in_str */, + ::CCM_AMI::AMI_foo_callback_ptr /* foo_callback */) + { + /* Your code here. */ + } + + //============================================================ + // Component Executor Implementation Class: AMI_exec_i + //============================================================ + + AMI_exec_i::AMI_exec_i (void) + { + } + + AMI_exec_i::~AMI_exec_i (void) + { + } + + // Supported operations and attributes. + + // Component attributes. + + // Port operations. + + ::CCM_AMI::CCM_AMI_ami_foo_ptr + AMI_exec_i::get_perform_asynch_foo (void) + { + /* Your code here. */ + return ::CCM_AMI::CCM_AMI_ami_foo::_nil (); + } + + // Operations from Components::SessionComponent. + + void + AMI_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + { + this->context_ = + ::Hello_AMI::CCM_AMI_Context::_narrow (ctx); + + if ( ::CORBA::is_nil (this->context_.in ())) + { + throw ::CORBA::INTERNAL (); + } + } + + void + AMI_exec_i::configuration_complete (void) + { + /* Your code here. */ + } + + void + AMI_exec_i::ccm_activate (void) + { + /* Your code here. */ + } + + void + AMI_exec_i::ccm_passivate (void) + { + /* Your code here. */ + } + + void + AMI_exec_i::ccm_remove (void) + { + /* Your code here. */ + } + + extern "C" ::Components::EnterpriseComponent_ptr + create_Hello_AMI_AMI_Impl (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_RETURN ( + retval, + AMI_exec_i, + ::Components::EnterpriseComponent::_nil ()); + + return retval; + } +} + +namespace CIAO_Hello_AMI_AMI_Impl +{ + //============================================================ + // Home Executor Implementation Class: AMIHome_exec_i + //============================================================ + + AMIHome_exec_i::AMIHome_exec_i (void) + { + } + + AMIHome_exec_i::~AMIHome_exec_i (void) + { + } + + // All operations and attributes. + + // Factory operations. + + // Finder operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + AMIHome_exec_i::create (void) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + AMI_exec_i, + ::CORBA::NO_MEMORY ()); + + return retval; + } + + extern "C" ::Components::HomeExecutorBase_ptr + create_Hello_AMI_AMIHome_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + AMIHome_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } +} + diff --git a/modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.h b/modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.h new file mode 100644 index 00000000000..f287fc1cbe9 --- /dev/null +++ b/modules/CIAO/tests/AMI_CCM/AMI/AMI_exec.h @@ -0,0 +1,130 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler v1.7.1 **** +// 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 +// http://doc.ece.uci.edu/ +// 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:1217 + +#ifndef CIAO_AMI_EXEC_H_ +#define CIAO_AMI_EXEC_H_ + + +#include "AMIEC.h" +#include "AMI_exec_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/LocalObject.h" + +namespace CIAO_Hello_AMI_AMI_Impl +{ + class AMI_ami_foo_exec_i + : public virtual ::CCM_AMI::CCM_AMI_ami_foo, + public virtual ::CORBA::LocalObject + { + public: + AMI_ami_foo_exec_i (void); + virtual ~AMI_ami_foo_exec_i (void); + + // Operations and attributes from ::CCM_AMI::AMI_ami_foo + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void + sendc_asynch_foo ( + const char * in_str, + ::CCM_AMI::AMI_foo_callback_ptr foo_callback); + }; + + class AMI_exec_i + : public virtual AMI_Exec, + public virtual ::CORBA::LocalObject + { + public: + AMI_exec_i (void); + virtual ~AMI_exec_i (void); + + // Supported operations and attributes. + + // Component attributes. + + // Port operations. + + virtual ::CCM_AMI::CCM_AMI_ami_foo_ptr + get_perform_asynch_foo (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); + + private: + ::Hello_AMI::CCM_AMI_Context_var context_; + }; + + extern "C" AMI_EXEC_Export ::Components::EnterpriseComponent_ptr + create_Hello_AMI_AMI_Impl (void); +} + +namespace CIAO_Hello_AMI_AMI_Impl +{ + class AMIHome_exec_i + : public virtual AMIHome_Exec, + public virtual ::CORBA::LocalObject + { + public: + AMIHome_exec_i (void); + + virtual ~AMIHome_exec_i (void); + + // All operations and attributes. + + // Factory operations. + + // Finder operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create (void); + }; + + extern "C" AMI_EXEC_Export ::Components::HomeExecutorBase_ptr + create_Hello_AMI_AMIHome_Impl (void); +} + +#endif /* ifndef */ + diff --git a/modules/CIAO/tests/AMI_CCM/Hello_Base/Hello_Base.idl b/modules/CIAO/tests/AMI_CCM/Hello_Base/Hello_Base.idl index ae3bda94d5b..dd8366dda3c 100644 --- a/modules/CIAO/tests/AMI_CCM/Hello_Base/Hello_Base.idl +++ b/modules/CIAO/tests/AMI_CCM/Hello_Base/Hello_Base.idl @@ -7,10 +7,24 @@ module CCM_AMI string error; }; + // Sender/Receiver interface interface AMI_foo { - long asynch_foo (in string in_str) + long asynch_foo (in string in_str, out string answer) raises (InternalError); - void foo_callback (in long result, in string answer); + }; + + // callback interface from AMI-component to Sender component + interface AMI_foo_callback + { + void foo_callback_handler (in long result, in string answer); + void foo_callback_excep (in string callback_exception); + }; + + // AMI component. Sender calls AMI-component and AMI-component calls Receiver + // using the AMI_foo interface. + interface AMI_ami_foo + { + void sendc_asynch_foo (in string in_str, in AMI_foo_callback foo_callback); }; }; diff --git a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.idl b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.idl index e2cf42ae8db..0e727564815 100644 --- a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.idl +++ b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.idl @@ -11,8 +11,8 @@ module Hello_AMI { component Receiver { - provides CCM_AMI::AMI_foo perform_asynch_foo; - //uses CCM_AMI::AMI_foo callback_foo; + //provides + provides CCM_AMI::AMI_foo do_asynch_foo; }; home ReceiverHome manages Receiver diff --git a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.mpc b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.mpc index 720edd13c63..8b925a2c1a8 100644 --- a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.mpc +++ b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver.mpc @@ -30,10 +30,8 @@ project(Hello_Base_Hello_Receiver_lem_gen) : ciaoidldefaults { project(Hello_Base_Hello_Receiver_lem_stub) : ccm_svnt { after += Hello_Base_Hello_Receiver_lem_gen Hello_Base_Hello_Receiver_stub Hello_Base_stub libs += Hello_Base_stub Hello_Receiver_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib sharedname = Hello_Receiver_lem_stub dynamicflags = HELLO_RECEIVER_LEM_STUB_BUILD_DLL @@ -57,10 +55,8 @@ project(Hello_Base_Hello_Receiver_lem_stub) : ccm_svnt { project(Hello_Base_Hello_Receiver_stub) : ccm_stub { after += Hello_Base_Hello_Receiver_idl_gen Hello_Base_stub libs += Hello_Base_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib sharedname = Hello_Receiver_stub dynamicflags = HELLO_RECEIVER_STUB_BUILD_DLL @@ -85,10 +81,8 @@ project(Hello_Base_Hello_Receiver_exec) : ciao_executor { after += Hello_Base_Hello_Receiver_lem_stub Hello_Base_Hello_Receiver_stub sharedname = Hello_Receiver_exec libs += Hello_Receiver_stub Hello_Receiver_lem_stub Hello_Base_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib dynamicflags = HELLO_RECEIVER_EXEC_BUILD_DLL IDL_Files { @@ -114,10 +108,8 @@ project(Hello_Base_Hello_Receiver_svnt) : ciao_servant { libs += Hello_Receiver_stub Hello_Receiver_lem_stub \ Hello_Base_skel \ Hello_Base_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib dynamicflags = HELLO_RECEIVER_SVNT_BUILD_DLL IDL_Files { diff --git a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.cpp b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.cpp index f9dfe329243..d91a0856c05 100644 --- a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.cpp +++ b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.cpp @@ -49,19 +49,11 @@ namespace CIAO_Hello_AMI_Receiver_Impl ::CORBA::Long AMI_foo_exec_i::asynch_foo ( - const char * in_str ) - { - /* Your code here. */ - printf ("\n\n\n\n\nReceived string <%s>!!!!\n", in_str); - return 15; - } - - void - AMI_foo_exec_i::foo_callback ( - ::CORBA::Long /* result */, - const char * /* answer */) + const char * /* in_str */, + ::CORBA::String_out /* answer */) { /* Your code here. */ + return 0; } //============================================================ @@ -83,11 +75,10 @@ namespace CIAO_Hello_AMI_Receiver_Impl // Port operations. ::CCM_AMI::CCM_AMI_foo_ptr - Receiver_exec_i::get_perform_asynch_foo (void) + Receiver_exec_i::get_do_asynch_foo (void) { /* Your code here. */ - return new AMI_foo_exec_i (); - //return ::CCM_AMI::CCM_AMI_foo::_nil (); + return ::CCM_AMI::CCM_AMI_foo::_nil (); } // Operations from Components::SessionComponent. diff --git a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.h b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.h index b7f501a5848..837555c9bb3 100644 --- a/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.h +++ b/modules/CIAO/tests/AMI_CCM/Receiver/Hello_Receiver_exec.h @@ -58,15 +58,8 @@ namespace CIAO_Hello_AMI_Receiver_Impl virtual ::CORBA::Long asynch_foo ( - const char * in_str); - - // TAO_IDL - Generated from - // be/be_visitor_operation/operation_ch.cpp:46 - - virtual void - foo_callback ( - ::CORBA::Long result, - const char * answer); + const char * in_str, + ::CORBA::String_out answer); }; class Receiver_exec_i @@ -84,7 +77,7 @@ namespace CIAO_Hello_AMI_Receiver_Impl // Port operations. virtual ::CCM_AMI::CCM_AMI_foo_ptr - get_perform_asynch_foo (void); + get_do_asynch_foo (void); // Operations from Components::SessionComponent. diff --git a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.idl b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.idl index f87b683701c..5d82a899440 100644 --- a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.idl +++ b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.idl @@ -11,8 +11,11 @@ module Hello_AMI { component Sender { - uses CCM_AMI::AMI_foo run_asynch_foo; - //provides CCM_AMI::AMI_foo callback_foo; + //uses the ami component. + uses CCM_AMI::AMI_ami_foo run_asynch_foo; + + //provides the callback function/exception for the AMI component. + provides CCM_AMI::AMI_foo_callback the_foo_callback; }; home SenderHome manages Sender diff --git a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.mpc b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.mpc index 8b803e5c941..e39403920bf 100644 --- a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.mpc +++ b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender.mpc @@ -30,10 +30,8 @@ project(Hello_Base_Hello_Sender_lem_gen) : ciaoidldefaults { project(Hello_Base_Hello_Sender_lem_stub) : ccm_svnt { after += Hello_Base_Hello_Sender_lem_gen Hello_Base_Hello_Sender_stub Hello_Base_stub libs += Hello_Base_stub Hello_Sender_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib sharedname = Hello_Sender_lem_stub dynamicflags = HELLO_SENDER_LEM_STUB_BUILD_DLL @@ -57,10 +55,8 @@ project(Hello_Base_Hello_Sender_lem_stub) : ccm_svnt { project(Hello_Base_Hello_Sender_stub) : ccm_stub { after += Hello_Base_Hello_Sender_idl_gen Hello_Base_stub libs += Hello_Base_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib sharedname = Hello_Sender_stub dynamicflags = HELLO_SENDER_STUB_BUILD_DLL @@ -85,10 +81,8 @@ project(Hello_Base_Hello_Sender_exec) : ciao_executor { after += Hello_Base_Hello_Sender_lem_stub Hello_Base_Hello_Sender_stub sharedname = Hello_Sender_exec libs += Hello_Sender_stub Hello_Sender_lem_stub Hello_Base_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib dynamicflags = HELLO_SENDER_EXEC_BUILD_DLL IDL_Files { @@ -114,10 +108,8 @@ project(Hello_Base_Hello_Sender_svnt) : ciao_servant { libs += Hello_Sender_stub Hello_Sender_lem_stub \ Hello_Base_skel \ Hello_Base_stub - libout = ../lib libpaths += ../lib - - + libout = ../lib dynamicflags = HELLO_SENDER_SVNT_BUILD_DLL IDL_Files { diff --git a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.cpp b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.cpp index ff715aa8304..9d3aa3c5cbe 100644 --- a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.cpp +++ b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.cpp @@ -31,45 +31,42 @@ #include "Hello_Sender_exec.h" #include "ciao/CIAO_common.h" - - - namespace CIAO_Hello_AMI_Sender_Impl { - -pulse_generator::pulse_generator (::CCM_AMI::AMI_foo_ptr foo_receiver) - : foo_receiver_ (::CCM_AMI::AMI_foo::_duplicate (foo_receiver)) -{ - printf ("pulse_generator::pulse_generator\n"); -} - -pulse_generator::~pulse_generator () -{ -} - -int pulse_generator::svc () -{ - printf ("pulse_generator::svc"); - ACE_OS::sleep (10); - while (1) - { - if (CORBA::is_nil (foo_receiver_)) - printf ("foo_receiver is NIL !!!\n"); - foo_receiver_->asynch_foo ("@#$%~!@$&%$^&*#$%@!# Do something funny %^*&%^$%^#%#@!$%"); - printf ("asynch_foo called\n"); - ACE_OS::sleep (2); - } - return 0; -} - - - + //============================================================ + // Facet Executor Implementation Class: AMI_foo_callback_exec_i + //============================================================ + + AMI_foo_callback_exec_i::AMI_foo_callback_exec_i (void) + { + } + + AMI_foo_callback_exec_i::~AMI_foo_callback_exec_i (void) + { + } + + // Operations from ::CCM_AMI::AMI_foo_callback + + void + AMI_foo_callback_exec_i::foo_callback_handler ( + ::CORBA::Long /* result */, + const char * /* answer */) + { + /* Your code here. */ + } + + void + AMI_foo_callback_exec_i::foo_callback_excep ( + const char * /* callback_exception */) + { + /* Your code here. */ + } + //============================================================ // Component Executor Implementation Class: Sender_exec_i //============================================================ Sender_exec_i::Sender_exec_i (void) - :pulser_(0) { } @@ -83,6 +80,13 @@ int pulse_generator::svc () // Port operations. + ::CCM_AMI::CCM_AMI_foo_callback_ptr + Sender_exec_i::get_the_foo_callback (void) + { + /* Your code here. */ + return ::CCM_AMI::CCM_AMI_foo_callback::_nil (); + } + // Operations from Components::SessionComponent. void @@ -97,23 +101,17 @@ int pulse_generator::svc () throw ::CORBA::INTERNAL (); } } - + void Sender_exec_i::configuration_complete (void) { + /* Your code here. */ } void Sender_exec_i::ccm_activate (void) { - printf ("\n\nCCM active\n"); - ::CCM_AMI::AMI_foo_var foo = - this->context_->get_connection_run_asynch_foo (); - - this->pulser_= new pulse_generator (foo); - - this->pulser_->activate (THR_NEW_LWP | THR_JOINABLE, - 1); + /* Your code here. */ } void diff --git a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.h b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.h index 45f41326219..e03bedb565d 100644 --- a/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.h +++ b/modules/CIAO/tests/AMI_CCM/Sender/Hello_Sender_exec.h @@ -45,32 +45,51 @@ namespace CIAO_Hello_AMI_Sender_Impl { - class Sender_exec_i; - - class pulse_generator : public virtual ACE_Task_Base + class AMI_foo_callback_exec_i + : public virtual ::CCM_AMI::CCM_AMI_foo_callback, + public virtual ::CORBA::LocalObject { public: - pulse_generator (::CCM_AMI::AMI_foo_ptr foo_receiver); - - ~pulse_generator (); - - virtual int svc (void); - - private: - /// Maintains a handle that actually process the event - ::CCM_AMI::AMI_foo_var foo_receiver_; - + AMI_foo_callback_exec_i (void); + virtual ~AMI_foo_callback_exec_i (void); + + // Operations and attributes from ::CCM_AMI::AMI_foo_callback + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void + foo_callback_handler ( + ::CORBA::Long result, + const char * answer); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void + foo_callback_excep ( + const char * callback_exception); }; - + class Sender_exec_i : public virtual Sender_Exec, public virtual ::CORBA::LocalObject { public: Sender_exec_i (void); - virtual ~Sender_exec_i (void); - + + // Supported operations and attributes. + + // Component attributes. + + // Port operations. + + virtual ::CCM_AMI::CCM_AMI_foo_callback_ptr + get_the_foo_callback (void); + + // Operations from Components::SessionComponent. + virtual void set_session_context ( ::Components::SessionContext_ptr ctx); @@ -83,8 +102,7 @@ namespace CIAO_Hello_AMI_Sender_Impl private: ::Hello_AMI::CCM_Sender_Context_var context_; - pulse_generator* pulser_; - }; + }; extern "C" HELLO_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr create_Hello_AMI_Sender_Impl (void); diff --git a/modules/CIAO/tests/AMI_CCM/descriptors/Plan.cdp b/modules/CIAO/tests/AMI_CCM/descriptors/Plan.cdp index 025eb226043..20016d2180a 100644 --- a/modules/CIAO/tests/AMI_CCM/descriptors/Plan.cdp +++ b/modules/CIAO/tests/AMI_CCM/descriptors/Plan.cdp @@ -3,11 +3,11 @@ <UUID>6D382DAE-9024-4C4D-B91B-A0F9176AFACF</UUID> - <implementation xmi:id="_9A1A0A25-6C91-4BD3-971B-257A2614531C"> - <name>Hello.ComponentImplementations.ReceiverImplementation.ReceiverMonolithicImpl</name> + <implementation xmi:id="Hello_ReceiverHomeImplementation"> + <name>Hello_ReceiverHomeImplementation</name> <source/> - <artifact xmi:idref="_8314E4CE-EE5F-4EF1-8D7A-EDAA4C18E70C"/> - <artifact xmi:idref="_6C99E1A6-14DA-43DF-A0AD-7AC397F90899"/> + <artifact xmi:idref="Hello_Receiver_ExecArtifact"/> + <artifact xmi:idref="Hello_Receiver_SvntArtifact"/> <execParameter> <name>component factory</name> <value> @@ -54,11 +54,11 @@ </execParameter> </implementation> - <implementation xmi:id="_F436EF3D-3D93-4D47-9742-EAB68547A060"> - <name>Hello.ComponentImplementations.SenderImplementation.SenderMonolithicImpl</name> + <implementation xmi:id="Hello_SenderHomeImplementation"> + <name>Hello_SenderHomeImplementation</name> <source/> - <artifact xmi:idref="_F8E73326-0724-48CF-AD27-2271E9C57D09"/> - <artifact xmi:idref="_4583C8AD-7711-4C96-8FD5-CE2FAE6F89ED"/> + <artifact xmi:idref="Hello_Sender_ExecArtifact"/> + <artifact xmi:idref="Hello_Sender_SvntArtifact"/> <execParameter> <name>component factory</name> <value> @@ -105,11 +105,62 @@ </execParameter> </implementation> + <implementation xmi:id="Hello_AMIHomeImplementation"> + <name>Hello_AMIHomeImplementation</name> + <source/> + <artifact xmi:idref="Hello_AMI_ExecArtifact"/> + <artifact xmi:idref="Hello_AMI_SvntArtifact"/> + <execParameter> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_AMI_AMI_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello.ImplementationArtifacts.AMIArtifacts.AMI_exec</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_AMI_AMI_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Hello.ImplementationArtifacts.AMIArtifacts.AMI_svnt</string> + </value> + </value> + </execParameter> + </implementation> + <instance xmi:id="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver"> <name>Hello.ComponentImplementations.HelloImplementation.Hello.Receiver</name> <node>Receiver</node> <source/> - <implementation xmi:idref="_9A1A0A25-6C91-4BD3-971B-257A2614531C"/> + <implementation xmi:idref="Hello_ReceiverHomeImplementation"/> <configProperty> <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> <value> @@ -127,7 +178,7 @@ <name>Hello.ComponentImplementations.HelloImplementation.Hello.Sender</name> <node>Sender</node> <source/> - <implementation xmi:idref="_F436EF3D-3D93-4D47-9742-EAB68547A060"/> + <implementation xmi:idref="Hello_SenderHomeImplementation"/> <configProperty> <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> <value> @@ -141,13 +192,31 @@ </configProperty> </instance> + <instance xmi:id="Hello.ComponentImplementations.HelloImplementation.Hello.AMI"> + <name>Hello.ComponentImplementations.HelloImplementation.Hello.AMI</name> + <node>AMI</node> + <source/> + <implementation xmi:idref="Hello_AMIHomeImplementation"/> + <configProperty> + <name>edu.vanderbilt.dre.DAnCE.InstanceIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>AMI.ior</string> + </value> + </value> + </configProperty> + </instance> + <connection> - <name>asynch_foo_connection</name> + <name>run_asynch_foo_connection</name> <internalEndpoint> <portName>perform_asynch_foo</portName> <provider>true</provider> <kind>Facet</kind> - <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver" /> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.AMI" /> </internalEndpoint> <internalEndpoint> <portName>run_asynch_foo</portName> @@ -157,10 +226,10 @@ </internalEndpoint> </connection> - <!--connection> - <name>callback_foo_connection</name> + <connection> + <name>foo_callback_connection</name> <internalEndpoint> - <portName>callback_foo</portName> + <portName>the_foo_callback</portName> <provider>true</provider> <kind>Facet</kind> <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Sender" /> @@ -169,43 +238,63 @@ <portName>callback_foo</portName> <provider>false</provider> <kind>SimplexReceptacle</kind> - <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver" /> - </internalEndpoint> - </connection--> - - <!--connection> - <name>Hello.ComponentImplementations.HelloImplementation.Hello.Receiver:read_quoter-Hello.ComponentImplementations.HelloImplementation.Hello.Sender:push_quoter</name> - <internalEndpoint> - <portName>read_quoter</portName> - <provider>false</provider> - <kind>SimplexReceptacle</kind> - <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver"/> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.AMI" /> </internalEndpoint> + </connection> + + <connection> + <name>do_foo_connection</name> <internalEndpoint> - <portName>push_quoter</portName> + <portName>do_asynch_foo</portName> <provider>true</provider> <kind>Facet</kind> - <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Sender"/> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver" /> </internalEndpoint> - </connection--> - - <!--connection> - <name>Hello.ComponentImplementations.HelloImplementation.Hello.Sender:notify_out-Hello.ComponentImplementations.HelloImplementation.Hello.Receiver:notify_in</name> <internalEndpoint> - <portName>notify_out</portName> + <portName>receiver_foo</portName> <provider>false</provider> - <kind>EventPublisher</kind> - <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Sender"/> - </internalEndpoint> - <internalEndpoint> - <portName>notify_in</portName> - <provider>true</provider> - <kind>EventConsumer</kind> - <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver"/> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.AMI" /> </internalEndpoint> - </connection--> + </connection> + + <artifact xmi:id="Hello_AMI_SvntArtifact"> + <name>Hello.ImplementationArtifacts.AMIArtifacts.AMI_svnt</name> + <source/> + <node/> + <location>AMI_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_AMI_AMIHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact xmi:id="Hello_AMI_ExecArtifact"> + <name>Hello.ImplementationArtifacts.AMIArtifacts.AMI_exec</name> + <source/> + <node/> + <location>AMI_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_AMI_AMIHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> - <artifact xmi:id="_6C99E1A6-14DA-43DF-A0AD-7AC397F90899"> + <artifact xmi:id="Hello_Receiver_SvntArtifact"> <name>Hello.ImplementationArtifacts.ReceiverArtifacts.Receiver_svnt</name> <source/> <node/> @@ -223,7 +312,7 @@ </execParameter> </artifact> - <artifact xmi:id="_8314E4CE-EE5F-4EF1-8D7A-EDAA4C18E70C"> + <artifact xmi:id="Hello_Receiver_ExecArtifact"> <name>Hello.ImplementationArtifacts.ReceiverArtifacts.Receiver_exec</name> <source/> <node/> @@ -241,7 +330,7 @@ </execParameter> </artifact> - <artifact xmi:id="_4583C8AD-7711-4C96-8FD5-CE2FAE6F89ED"> + <artifact xmi:id="Hello_Sender_SvntArtifact"> <name>Hello.ImplementationArtifacts.SenderArtifacts.Sender_svnt</name> <source/> <node/> @@ -259,7 +348,7 @@ </execParameter> </artifact> - <artifact xmi:id="_F8E73326-0724-48CF-AD27-2271E9C57D09"> + <artifact xmi:id="Hello_Sender_ExecArtifact"> <name>Hello.ImplementationArtifacts.SenderArtifacts.Sender_exec</name> <source/> <node/> |