diff options
author | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-06-28 17:22:10 +0000 |
---|---|---|
committer | jai <jai@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-06-28 17:22:10 +0000 |
commit | 4397056b28963b08060c24b73cf6315eb4921bba (patch) | |
tree | 70325e43ff8629c096610901487a5b75796f8585 | |
parent | 1f9388816fee94570017e8a676f00da2f2d60d13 (diff) | |
download | ATCD-4397056b28963b08060c24b73cf6315eb4921bba.tar.gz |
Mon Jun 28 11:58:01 2004 Jaiganesh B <jai@dre.vanderbilt.edu>
41 files changed, 3080 insertions, 1 deletions
diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.cidl b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.cidl new file mode 100644 index 00000000000..4908c11cd8d --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.cidl @@ -0,0 +1,12 @@ +// $Id$ +#include "HumanMachineInterface.idl" + +composition session HumanMachineInterface_Impl +{ + home executor HumanMachineInterfaceHome_Exec + { + implements RobotAssembly::HumanMachineInterfaceHome; + manages HumanMachineInterface_Exec; + }; +}; + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.idl b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.idl new file mode 100644 index 00000000000..41807830445 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.idl @@ -0,0 +1,17 @@ +// $Id$ +#include "../Robot_Base.idl" + +module RobotAssembly +{ + component HumanMachineInterface + { + // Production Interfaces. + uses WorkOrderResponses HumanResponse; + consumes DisplayWork WorkDisplayUpdate; + + // Development Interfaces. + provides HMIController Controller; + }; + home HumanMachineInterfaceHome manages HumanMachineInterface {}; + +}; diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.mpc b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.mpc new file mode 100644 index 00000000000..aae47e4c1d5 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface.mpc @@ -0,0 +1,55 @@ +// $Id$ +project(HumanMachineInterface_stub): ciao_client_dnc { + after += RobotAssembly_stub + sharedname = HumanMachineInterface_stub + libs += RobotAssembly_stub + idlflags += -Wb,stub_export_macro=HUMANMACHINEINTERFACE_STUB_Export -Wb,stub_export_include=HumanMachineInterface_stub_export.h -Wb,skel_export_macro=HUMANMACHINEINTERFACE_SVNT_Export -Wb,skel_export_include=HumanMachineInterface_svnt_export.h + dynamicflags = HUMANMACHINEINTERFACE_STUB_BUILD_DLL + + IDL_Files { + HumanMachineInterface.idl + } + + Source_Files { + HumanMachineInterfaceC.cpp + } +} + +project(HumanMachineInterface_svnt) : ciao_servant_dnc { + after += HumanMachineInterface_stub + sharedname = HumanMachineInterface_svnt + libs += HumanMachineInterface_stub RobotAssembly_stub RobotAssembly_svnt + + idlflags += -Wb,export_macro=HUMANMACHINEINTERFACE_SVNT_Export -Wb,export_include=HumanMachineInterface_svnt_export.h + dynamicflags = HUMANMACHINEINTERFACE_SVNT_BUILD_DLL + + CIDL_Files { + HumanMachineInterface.cidl + } + + IDL_Files { + HumanMachineInterfaceE.idl + } + + Source_Files { + HumanMachineInterfaceEC.cpp + HumanMachineInterfaceS.cpp + HumanMachineInterface_svnt.cpp + } +} + +project(HumanMachineInterface_exec) : ciao_component_dnc { + after += HumanMachineInterface_svnt + sharedname = HumanMachineInterface_exec + libs += RobotAssembly_stub RobotAssembly_svnt HumanMachineInterface_stub HumanMachineInterface_svnt + libpaths += .. + idlflags += -Wb,export_macro=HUMANMACHINEINTERFACE_EXEC_Export -Wb,export_include=RobotManger_exec_export.h + dynamicflags = HUMANMACHINEINTERFACE_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + HumanMachineInterface_exec.cpp + } +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec.cpp b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec.cpp new file mode 100644 index 00000000000..6ce0187efa4 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec.cpp @@ -0,0 +1,198 @@ +// $Id$ +// HumanMachineInterface_exec.cpp + +#include "HumanMachineInterface_exec.h" + +// MangementWorkInstructions_exec_i +// +// +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::~HumanMachineInterface_exec_i () +{ +} + +// consumes DisplayWork WorkDisplayUpdate; +void +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::push_WorkDisplayUpdate (RobotAssembly::DisplayWork *ev ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, "HumanMachineInterface - In push_WorkDisplayUpdate event sink \n")); + /* eventtype DisplayWork { + public DisplayRequest Display; + public WorkOrder Order; + public StatusType Status; + }; +*/ + // Following Code Simulates what will happen when the gui is attached + // This codes should eventually be removed and replaced + + RobotAssembly::StatusType myStatus = ev->Status(); + RobotAssembly::WorkOrder myOrder = ev->Order(); + RobotAssembly::DisplayRequest myDisplay = ev->Display(); + + if (myStatus == RobotAssembly::unacknowledged) { + printf("\tWorkOrder %d was unacknowledged and is changed to accepted (2e) \n", myOrder.OrderNumber); + myStatus = RobotAssembly::accepted; + // 1f call + // void AcceptWorkOrderResponse(in WorkOrder Order, in StatusType Status); + RobotAssembly::WorkOrderResponses_var rev + = this->context_->get_connection_HumanResponse (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (CORBA::is_nil (rev.in ())) + ACE_THROW (CORBA::BAD_INV_ORDER ()); + + rev->AcceptWorkOrderResponse(myOrder, myStatus ACE_ENV_SINGLE_ARG_PARAMETER); + + + } else if (myStatus == RobotAssembly::accepted) { + printf("\tWorkOrder %d was accepted and is changed to ready (6e) \n", myOrder.OrderNumber); + myStatus = RobotAssembly::ready; + // 2f call + // void SetTimeResponse(in WorkOrder Order, in StatusType Status); + RobotAssembly::WorkOrderResponses_var rev + = this->context_->get_connection_HumanResponse (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (CORBA::is_nil (rev.in ())) + ACE_THROW (CORBA::BAD_INV_ORDER ()); + + rev->SetTimeResponse(myOrder, myStatus ACE_ENV_SINGLE_ARG_PARAMETER); + + } else if (myStatus == RobotAssembly::ready) { + printf("\tWorkOrder %d was ready and is changed to completed (9e) \n", myOrder.OrderNumber); + myStatus = RobotAssembly::complete; + // 3f call + // void AcceptFinalProductResponse(in WorkOrder, in StatusType Status); + RobotAssembly::WorkOrderResponses_var rev + = this->context_->get_connection_HumanResponse (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + if (CORBA::is_nil (rev.in ())) + ACE_THROW (CORBA::BAD_INV_ORDER ()); + + rev->AcceptFinalProductResponse(myOrder, myStatus ACE_ENV_SINGLE_ARG_PARAMETER); + } else { + printf("\tERROR: WorkOrder %d has an invalid status value\n", myOrder.OrderNumber); + } + +} + +RobotAssembly::CCM_HMIController_ptr +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::get_Controller (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, "HumanMachineInterface_Impl::HumanMachineInterface_exec.i::get_Controller called\n ")); + return (new HMIController_Impl (*this)); +} + +// provides HMIController Controller; +// string TextToDisplay(); +char * +HumanMachineInterface_Impl::HMIController_Impl::TextToDisplay (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return "TextToDisplay"; +} + +// void KeyResponse( in short key); +void +HumanMachineInterface_Impl::HMIController_Impl::KeyResponse (CORBA::Short key ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + +// string getHost(); +char * +HumanMachineInterface_Impl::HMIController_Impl::getHost (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return "getHost"; +} + + + +// Operations from Components::SessionComponen +void +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::set_session_context (Components::SessionContext_ptr ctx ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "HumanMachineInterface_Impl::HumanMachineInterface_exec_i::set_session_context\n")); + + this->context_ = HumanMachineInterface_Impl::HumanMachineInterface_Exec_Context::_narrow (ctx ACE_ENV_ARG_PARAMETER); + + ACE_CHECK; + + if (CORBA::is_nil (this->context_.in ())) + + ACE_THROW (CORBA::INTERNAL ()); + // Urm, we actually discard exceptions thown from this operation. +} + +void +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ciao_preactivate\n")); +} + +void +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ccm_activate\n")); +} + +void +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ciao_postactivate\n")); +} + + +void +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ccm_passivate\n")); +} + +void +HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "HumanMachineInterface_Impl::HumanMachineInterface_exec_i::ccm_remove\n")); +} + + +// HumanMachineInterfaceHome_exec_i +// +// +HumanMachineInterface_Impl::HumanMachineInterfaceHome_exec_i::HumanMachineInterfaceHome_exec_i () +{ +} + +HumanMachineInterface_Impl::HumanMachineInterfaceHome_exec_i::~HumanMachineInterfaceHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +HumanMachineInterface_Impl::HumanMachineInterfaceHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + return new HumanMachineInterface_Impl::HumanMachineInterface_exec_i; +} + + +extern "C" HUMANMACHINEINTERFACE_EXEC_Export ::Components::HomeExecutorBase_ptr +createHumanMachineInterfaceHome_Impl (void) +{ + return new HumanMachineInterface_Impl::HumanMachineInterfaceHome_exec_i (); +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec.h b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec.h new file mode 100644 index 00000000000..2532fc33c5b --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec.h @@ -0,0 +1,137 @@ +// $Id$ +// HumanMachineInterface_exec.h +//============================================================ +/** +* @file HumanMachineInterface_exec.h +* +* Header file for the Executor implementation. +*/ +//============================================================ + +//#ifndef HUMANMACHINEINTERFACE_EXEC_H +//#define HUMANMACHINEINTERFACE_EXEC_H + +#include "HumanMachineInterfaceEC.h" +#include "HumanMachineInterface_exec_export.h" + +#include "tao/LocalObject.h" + +namespace HumanMachineInterface_Impl +{ +/** +* @class HumanMachineInterface_exec_i +* +* HumanMachineInterface executor implementation class. + */ + + class HUMANMACHINEINTERFACE_EXEC_Export HumanMachineInterface_exec_i : + public virtual HumanMachineInterface_Exec, + public virtual TAO_Local_RefCounted_Object + { + + public: + /// Default constructor. + HumanMachineInterface_exec_i () { } + + /// Default destructor. + virtual ~HumanMachineInterface_exec_i (); + + +// consumes DisplayWork WorkDisplayUpdate; + virtual void push_WorkDisplayUpdate (RobotAssembly::DisplayWork *ev ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual RobotAssembly::CCM_HMIController_ptr get_Controller (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + + protected: + /// Component specific context + HumanMachineInterface_Exec_Context_var context_; + friend class HMIController_Impl; + }; + + +// provides HMIController Controller; + class HMIController_Impl : public virtual RobotAssembly::CCM_HMIController, + public virtual TAO_Local_RefCounted_Object + { + public: + HMIController_Impl(HumanMachineInterface_exec_i& component) : component_ (component) + { } + + // string TextToDisplay(); + virtual char * TextToDisplay (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // void KeyResponse( in short key); + virtual void KeyResponse (CORBA::Short key ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + // string getHost(); + virtual char * getHost (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + + private: + HumanMachineInterface_exec_i& component_; + }; + + + + + /** + * @class HumanMachineInterfaceHome_exec_i + * +* HumanMachineInterface home executor implementation class. +*/ +class HUMANMACHINEINTERFACE_EXEC_Export HumanMachineInterfaceHome_exec_i : +public virtual HumanMachineInterfaceHome_Exec, +public virtual TAO_Local_RefCounted_Object +{ +public: + /// Default ctor. + HumanMachineInterfaceHome_exec_i (); + + /// Default dtor. + virtual ~HumanMachineInterfaceHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); +}; + +} + +extern "C" HUMANMACHINEINTERFACE_EXEC_Export ::Components::HomeExecutorBase_ptr +createHumanMachineInterfaceHome_Impl (void); + +//#endif /* MANAGEMENTWORKINSTRUCTONS_EXEC_H */ diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec_export.h new file mode 100644 index 00000000000..764854134cf --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_exec_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl HUMANMACHINEINTERFACE_EXEC +// ------------------------------ +#ifndef HUMANMACHINEINTERFACE_EXEC_EXPORT_H +#define HUMANMACHINEINTERFACE_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (HUMANMACHINEINTERFACE_EXEC_HAS_DLL) +# define HUMANMACHINEINTERFACE_EXEC_HAS_DLL 1 +#endif /* ! HUMANMACHINEINTERFACE_EXEC_HAS_DLL */ + +#if defined (HUMANMACHINEINTERFACE_EXEC_HAS_DLL) && (HUMANMACHINEINTERFACE_EXEC_HAS_DLL == 1) +# if defined (HUMANMACHINEINTERFACE_EXEC_BUILD_DLL) +# define HUMANMACHINEINTERFACE_EXEC_Export ACE_Proper_Export_Flag +# define HUMANMACHINEINTERFACE_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define HUMANMACHINEINTERFACE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* HUMANMACHINEINTERFACE_EXEC_BUILD_DLL */ +# define HUMANMACHINEINTERFACE_EXEC_Export ACE_Proper_Import_Flag +# define HUMANMACHINEINTERFACE_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define HUMANMACHINEINTERFACE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* HUMANMACHINEINTERFACE_EXEC_BUILD_DLL */ +#else /* HUMANMACHINEINTERFACE_EXEC_HAS_DLL == 1 */ +# define HUMANMACHINEINTERFACE_EXEC_Export +# define HUMANMACHINEINTERFACE_EXEC_SINGLETON_DECLARATION(T) +# define HUMANMACHINEINTERFACE_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* HUMANMACHINEINTERFACE_EXEC_HAS_DLL == 1 */ + +// Set HUMANMACHINEINTERFACE_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (HUMANMACHINEINTERFACE_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define HUMANMACHINEINTERFACE_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define HUMANMACHINEINTERFACE_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !HUMANMACHINEINTERFACE_EXEC_NTRACE */ + +#if (HUMANMACHINEINTERFACE_EXEC_NTRACE == 1) +# define HUMANMACHINEINTERFACE_EXEC_TRACE(X) +#else /* (HUMANMACHINEINTERFACE_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define HUMANMACHINEINTERFACE_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (HUMANMACHINEINTERFACE_EXEC_NTRACE == 1) */ + +#endif /* HUMANMACHINEINTERFACE_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_stub_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_stub_export.h new file mode 100644 index 00000000000..9956f4c80bd --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_stub_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl HUMANMACHINEINTERFACE_STUB +// ------------------------------ +#ifndef HUMANMACHINEINTERFACE_STUB_EXPORT_H +#define HUMANMACHINEINTERFACE_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (HUMANMACHINEINTERFACE_STUB_HAS_DLL) +# define HUMANMACHINEINTERFACE_STUB_HAS_DLL 1 +#endif /* ! HUMANMACHINEINTERFACE_STUB_HAS_DLL */ + +#if defined (HUMANMACHINEINTERFACE_STUB_HAS_DLL) && (HUMANMACHINEINTERFACE_STUB_HAS_DLL == 1) +# if defined (HUMANMACHINEINTERFACE_STUB_BUILD_DLL) +# define HUMANMACHINEINTERFACE_STUB_Export ACE_Proper_Export_Flag +# define HUMANMACHINEINTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define HUMANMACHINEINTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* HUMANMACHINEINTERFACE_STUB_BUILD_DLL */ +# define HUMANMACHINEINTERFACE_STUB_Export ACE_Proper_Import_Flag +# define HUMANMACHINEINTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define HUMANMACHINEINTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* HUMANMACHINEINTERFACE_STUB_BUILD_DLL */ +#else /* HUMANMACHINEINTERFACE_STUB_HAS_DLL == 1 */ +# define HUMANMACHINEINTERFACE_STUB_Export +# define HUMANMACHINEINTERFACE_STUB_SINGLETON_DECLARATION(T) +# define HUMANMACHINEINTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* HUMANMACHINEINTERFACE_STUB_HAS_DLL == 1 */ + +// Set HUMANMACHINEINTERFACE_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (HUMANMACHINEINTERFACE_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define HUMANMACHINEINTERFACE_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define HUMANMACHINEINTERFACE_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !HUMANMACHINEINTERFACE_STUB_NTRACE */ + +#if (HUMANMACHINEINTERFACE_STUB_NTRACE == 1) +# define HUMANMACHINEINTERFACE_STUB_TRACE(X) +#else /* (HUMANMACHINEINTERFACE_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define HUMANMACHINEINTERFACE_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (HUMANMACHINEINTERFACE_STUB_NTRACE == 1) */ + +#endif /* HUMANMACHINEINTERFACE_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_svnt_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_svnt_export.h new file mode 100644 index 00000000000..9e348f1b8e6 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/HumanMachineInterface/HumanMachineInterface_svnt_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl HUMANMACHINEINTERFACE_SVNT +// ------------------------------ +#ifndef HUMANMACHINEINTERFACE_SVNT_EXPORT_H +#define HUMANMACHINEINTERFACE_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (HUMANMACHINEINTERFACE_SVNT_HAS_DLL) +# define HUMANMACHINEINTERFACE_SVNT_HAS_DLL 1 +#endif /* ! HUMANMACHINEINTERFACE_SVNT_HAS_DLL */ + +#if defined (HUMANMACHINEINTERFACE_SVNT_HAS_DLL) && (HUMANMACHINEINTERFACE_SVNT_HAS_DLL == 1) +# if defined (HUMANMACHINEINTERFACE_SVNT_BUILD_DLL) +# define HUMANMACHINEINTERFACE_SVNT_Export ACE_Proper_Export_Flag +# define HUMANMACHINEINTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define HUMANMACHINEINTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* HUMANMACHINEINTERFACE_SVNT_BUILD_DLL */ +# define HUMANMACHINEINTERFACE_SVNT_Export ACE_Proper_Import_Flag +# define HUMANMACHINEINTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define HUMANMACHINEINTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* HUMANMACHINEINTERFACE_SVNT_BUILD_DLL */ +#else /* HUMANMACHINEINTERFACE_SVNT_HAS_DLL == 1 */ +# define HUMANMACHINEINTERFACE_SVNT_Export +# define HUMANMACHINEINTERFACE_SVNT_SINGLETON_DECLARATION(T) +# define HUMANMACHINEINTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* HUMANMACHINEINTERFACE_SVNT_HAS_DLL == 1 */ + +// Set HUMANMACHINEINTERFACE_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (HUMANMACHINEINTERFACE_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define HUMANMACHINEINTERFACE_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define HUMANMACHINEINTERFACE_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !HUMANMACHINEINTERFACE_SVNT_NTRACE */ + +#if (HUMANMACHINEINTERFACE_SVNT_NTRACE == 1) +# define HUMANMACHINEINTERFACE_SVNT_TRACE(X) +#else /* (HUMANMACHINEINTERFACE_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define HUMANMACHINEINTERFACE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (HUMANMACHINEINTERFACE_SVNT_NTRACE == 1) */ + +#endif /* HUMANMACHINEINTERFACE_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.cidl b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.cidl new file mode 100644 index 00000000000..798fd664958 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.cidl @@ -0,0 +1,13 @@ +// $Id$ +#include "ManagementWorkInstructions.idl" + +composition session ManagementWorkInstructions_Impl +{ + home executor ManagementWorkInstructionsHome_Exec + { + implements RobotAssembly::ManagementWorkInstructionsHome; + manages ManagementWorkInstructions_Exec; + }; +}; + + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.idl b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.idl new file mode 100644 index 00000000000..f85d01af0ad --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.idl @@ -0,0 +1,20 @@ +// $Id$ +#include "../Robot_Base.idl" + +module RobotAssembly +{ + component ManagementWorkInstructions + { + // ProductionInterfaces + consumes ProductionStatus ProductionReport; + publishes ProductionWorkOrder sendWorkOrder; + + // Development interface + provides MWIController Controller; + }; + home ManagementWorkInstructionsHome manages ManagementWorkInstructions + { + }; +}; + + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.mpc b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.mpc new file mode 100644 index 00000000000..6f5f5b4d3cc --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions.mpc @@ -0,0 +1,56 @@ +// $Id$ + +project(ManagementWorkInstructions_stub): ciao_client_dnc { + after += RobotAssembly_stub + sharedname = ManagementWorkInstructions_stub + libs += RobotAssembly_stub + idlflags += -Wb,stub_export_macro=MANAGEMENTWORKINSTRUCTIONS_STUB_Export -Wb,stub_export_include=ManagementWorkInstructions_stub_export.h -Wb,skel_export_macro=MANAGEMENTWORKINSTRUCTIONS_SVNT_Export -Wb,skel_export_include=ManagementWorkInstructions_svnt_export.h + dynamicflags = MANAGEMENTWORKINSTRUCTIONS_STUB_BUILD_DLL + + IDL_Files { + ManagementWorkInstructions.idl + } + + Source_Files { + ManagementWorkInstructionsC.cpp + } +} + +project(ManagementWorkInstructions_svnt) : ciao_servant_dnc { + after += ManagementWorkInstructions_stub + sharedname = ManagementWorkInstructions_svnt + libs += ManagementWorkInstructions_stub RobotAssembly_stub RobotAssembly_svnt + + idlflags += -Wb,export_macro=MANAGEMENTWORKINSTRUCTIONS_SVNT_Export -Wb,export_include=ManagementWorkInstructions_svnt_export.h + dynamicflags = MANAGEMENTWORKINSTRUCTIONS_SVNT_BUILD_DLL + + CIDL_Files { + ManagementWorkInstructions.cidl + } + + IDL_Files { + ManagementWorkInstructionsE.idl + } + + Source_Files { + ManagementWorkInstructionsEC.cpp + ManagementWorkInstructionsS.cpp + ManagementWorkInstructions_svnt.cpp + } +} + +project(ManagementWorkInstructions_exec) : ciao_component_dnc { + after += ManagementWorkInstructions_svnt + sharedname = ManagementWorkInstructions_exec + libs += RobotAssembly_stub RobotAssembly_svnt ManagementWorkInstructions_stub ManagementWorkInstructions_svnt + libpaths += .. + idlflags += -Wb,export_macro=MANAGEMENTWORKINSTRUCTIONS_EXEC_Export -Wb,export_include=RobotManger_exec_export.h + dynamicflags = MANAGEMENTWORKINSTRUCTIONS_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + ManagementWorkInstructions_exec.cpp + } +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec.cpp b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec.cpp new file mode 100644 index 00000000000..d50bd91b1f0 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec.cpp @@ -0,0 +1,192 @@ +// $Id$ +// ManagementWorkInstructions_exec.cpp + +#include "ManagementWorkInstructions_exec.h" + +// MangementWorkInstructions_exec_i +// +// +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::~ManagementWorkInstructions_exec_i () +{ +} + +// consumes ProductionStatus ProductionReport; +// 3e, 12e +// eventtype ProductionStatus { +// public StatusType Status; +// public WorkOrder Order; +// }; + +void +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::push_ProductionReport (RobotAssembly::ProductionStatus *ev ACE_ENV_ARG_DECL_WITH_DEFAULTS) +ACE_THROW_SPEC ((CORBA::SystemException)) { + printf("ManagmentWorkInstructions - In consumes ProductionStatus Production Report\n"); + // 3e, 12e + /*eventtype ProductionStatus { + public StatusType Status; + public WorkOrder Order; + };*/ + + RobotAssembly::StatusType myStatus = ev->Status(); + RobotAssembly::WorkOrder myOrder = ev->Order(); + + if (myStatus == RobotAssembly::accepted) { + printf("\tWorkOrder %d was accepted (3e) \n", myOrder.OrderNumber); + } /*else if (myStatus == RobotAssembly::rejected) { + printf("\tWorkOrder %d was rejected\n", myOrder.OrderNumber); + } */else if (myStatus == RobotAssembly::complete) { + printf("\tYEAH WE REACHED THE END\n\tWorkOrder %d was complete (12e)\n", myOrder.OrderNumber); + } /*else if (myStatus == RobotAssembly::failed) { + printf("\tWorkOrder %d failed\n", myOrder.OrderNumber); + } */else { + printf("\tERROR: WorkOrder %d has an invalid status value\n", myOrder.OrderNumber); + } +} + + +RobotAssembly::CCM_MWIController_ptr +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::get_Controller (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, "ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec.i::get_Controller called\n ")); + return (new MWIController_Impl (*this)); +} + + +void +ManagementWorkInstructions_Impl::MWIController_Impl::SendStringTest (const char *testString ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, "ManagementWorkInstructions initiates the process.\n")); + printf("********************************************\n"); + ACE_DEBUG ((LM_DEBUG, "testString = %s\n", testString)); + printf("********************************************\n"); + +// RobotAssembly::ProductionWorkOrder_var event = new OBV_RobotAssembly::ProductionWorkOrder; +// this->component_.context_->push_sendWorkOrder(event ACE_ENV_ARG_PARAMETER); +} + + +void +ManagementWorkInstructions_Impl::MWIController_Impl::SendOrder(const ::RobotAssembly::WorkOrder & testOrder ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + printf("ManagementWorkInstructions - In Send Order\n"); + RobotAssembly::ProductionWorkOrder_var event = new OBV_RobotAssembly::ProductionWorkOrder; + + event->Order(testOrder); + + this->component_.context_->push_sendWorkOrder(event ACE_ENV_ARG_PARAMETER); + +} + +RobotAssembly::ProductionStatusType ManagementWorkInstructions_Impl::MWIController_Impl::GetOrderStatus (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // FILL IN IMPLEMENTATION CODE + printf("Inside MWI:GetOrderStatus\n"); + RobotAssembly::ProductionStatusType pType; + pType.OrderNumber = 1; + pType.ProductNumber = 2; + pType.Status = RobotAssembly::accepted; + // pType.TimeComplete = 5; + pType.RequestedProduction = 333; + pType.ActualProduction = 342; + + return pType; +} + +char * ManagementWorkInstructions_Impl::MWIController_Impl::getHost (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // FILL IN IMPLEMENTATION CODE + printf("Inside MWI: getHost\n"); + return ""; +} + +// Operations from Components::SessionComponen +void +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::set_session_context\n")); + + this->context_ = ManagementWorkInstructions_Impl::ManagementWorkInstructions_Exec_Context::_narrow (ctx ACE_ENV_ARG_PARAMETER); + + ACE_CHECK; + + if (CORBA::is_nil (this->context_.in ())) + + ACE_THROW (CORBA::INTERNAL ()); + // Urm, we actually discard exceptions thown from this operation. +} + +void +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ciao_preactivate\n")); +} + +void +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ccm_activate\n")); +} + +void +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ciao_postactivate\n")); +} + + +void +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ccm_passivate\n")); +} + +void +ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i::ccm_remove\n")); +} + + +// ManagementWorkInstructionsHome_exec_i +// +// +ManagementWorkInstructions_Impl::ManagementWorkInstructionsHome_exec_i::ManagementWorkInstructionsHome_exec_i () +{ +} + +ManagementWorkInstructions_Impl::ManagementWorkInstructionsHome_exec_i::~ManagementWorkInstructionsHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +ManagementWorkInstructions_Impl::ManagementWorkInstructionsHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + return new ManagementWorkInstructions_Impl::ManagementWorkInstructions_exec_i; +} + + +extern "C" MANAGEMENTWORKINSTRUCTIONS_EXEC_Export ::Components::HomeExecutorBase_ptr +createManagementWorkInstructionsHome_Impl (void) +{ + return new ManagementWorkInstructions_Impl::ManagementWorkInstructionsHome_exec_i (); +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec.h b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec.h new file mode 100644 index 00000000000..99a8facdb63 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec.h @@ -0,0 +1,139 @@ +// $Id$ +// ManagementWorkInstructions_exec.h +//============================================================ +/** +* @file ManagementWorkInstructions_exec.h +* +* Header file for the Executor implementation. +*/ +//============================================================ + +//#ifndef MANAGEMENTWORKINSTRUCTIONS_EXEC_H +//#define MANAGEMENTWORKINSTRUCTIONS_EXEC_H + +#include "ManagementWorkInstructionsEC.h" +#include "ManagementWorkInstructions_exec_export.h" + +#include "tao/LocalObject.h" + +namespace ManagementWorkInstructions_Impl +{ +/** +* @class ManagementWorkInstructions_exec_i +* +* ManagementWorkInstructions executor implementation class. + */ + + class MANAGEMENTWORKINSTRUCTIONS_EXEC_Export ManagementWorkInstructions_exec_i : + public virtual ManagementWorkInstructions_Exec, + public virtual TAO_Local_RefCounted_Object + { + + public: + /// Default constructor. + ManagementWorkInstructions_exec_i () { } + + /// Default destructor. + virtual ~ManagementWorkInstructions_exec_i (); + + + /* Operations for obtaining the interface reference. */ + /* This method will be used in the assembly face so the + * ObjRef of this read_message facet will be sent to the + * client side(receptacle). + */ + virtual RobotAssembly::CCM_MWIController_ptr get_Controller (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + +// consumes ProductionStatus ProductionReport; + virtual void push_ProductionReport (RobotAssembly::ProductionStatus *ev ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + + protected: + /// Component specific context + ManagementWorkInstructions_Exec_Context_var context_; + + friend class MWIController_Impl; + + }; + + class MWIController_Impl : public virtual RobotAssembly::CCM_MWIController, + public virtual TAO_Local_RefCounted_Object + { + public: + MWIController_Impl(ManagementWorkInstructions_exec_i& component) : component_ (component) + { } + + virtual void SendStringTest (const char *testString ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void SendOrder( const ::RobotAssembly::WorkOrder & testOrder ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual RobotAssembly::ProductionStatusType GetOrderStatus (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual char * getHost (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + ManagementWorkInstructions_exec_i& component_; + }; + + /** + * @class ManagementWorkInstructionsHome_exec_i + * + * ManagementWorkInstructions home executor implementation class. + */ + class MANAGEMENTWORKINSTRUCTIONS_EXEC_Export ManagementWorkInstructionsHome_exec_i : + public virtual ManagementWorkInstructionsHome_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + /// Default ctor. + ManagementWorkInstructionsHome_exec_i (); + + /// Default dtor. + virtual ~ManagementWorkInstructionsHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + }; + +} + +extern "C" MANAGEMENTWORKINSTRUCTIONS_EXEC_Export ::Components::HomeExecutorBase_ptr +createManagementWorkInstructionsHome_Impl (void); + +//#endif /* MANAGEMENTWORKINSTRUCTONS_EXEC_H */ diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec_export.h new file mode 100644 index 00000000000..5209b689836 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_exec_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl MANAGEMENTWORKINSTRUCTIONS_EXEC +// ------------------------------ +#ifndef MANAGEMENTWORKINSTRUCTIONS_EXEC_EXPORT_H +#define MANAGEMENTWORKINSTRUCTIONS_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (MANAGEMENTWORKINSTRUCTIONS_EXEC_HAS_DLL) +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_HAS_DLL 1 +#endif /* ! MANAGEMENTWORKINSTRUCTIONS_EXEC_HAS_DLL */ + +#if defined (MANAGEMENTWORKINSTRUCTIONS_EXEC_HAS_DLL) && (MANAGEMENTWORKINSTRUCTIONS_EXEC_HAS_DLL == 1) +# if defined (MANAGEMENTWORKINSTRUCTIONS_EXEC_BUILD_DLL) +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_Export ACE_Proper_Export_Flag +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* MANAGEMENTWORKINSTRUCTIONS_EXEC_BUILD_DLL */ +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_Export ACE_Proper_Import_Flag +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* MANAGEMENTWORKINSTRUCTIONS_EXEC_BUILD_DLL */ +#else /* MANAGEMENTWORKINSTRUCTIONS_EXEC_HAS_DLL == 1 */ +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_Export +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_SINGLETON_DECLARATION(T) +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* MANAGEMENTWORKINSTRUCTIONS_EXEC_HAS_DLL == 1 */ + +// Set MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE */ + +#if (MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE == 1) +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_TRACE(X) +#else /* (MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define MANAGEMENTWORKINSTRUCTIONS_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (MANAGEMENTWORKINSTRUCTIONS_EXEC_NTRACE == 1) */ + +#endif /* MANAGEMENTWORKINSTRUCTIONS_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_stub_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_stub_export.h new file mode 100644 index 00000000000..86aa0fd74f3 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_stub_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl MANAGEMENTWORKINSTRUCTIONS_STUB +// ------------------------------ +#ifndef MANAGEMENTWORKINSTRUCTIONS_STUB_EXPORT_H +#define MANAGEMENTWORKINSTRUCTIONS_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (MANAGEMENTWORKINSTRUCTIONS_STUB_HAS_DLL) +# define MANAGEMENTWORKINSTRUCTIONS_STUB_HAS_DLL 1 +#endif /* ! MANAGEMENTWORKINSTRUCTIONS_STUB_HAS_DLL */ + +#if defined (MANAGEMENTWORKINSTRUCTIONS_STUB_HAS_DLL) && (MANAGEMENTWORKINSTRUCTIONS_STUB_HAS_DLL == 1) +# if defined (MANAGEMENTWORKINSTRUCTIONS_STUB_BUILD_DLL) +# define MANAGEMENTWORKINSTRUCTIONS_STUB_Export ACE_Proper_Export_Flag +# define MANAGEMENTWORKINSTRUCTIONS_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define MANAGEMENTWORKINSTRUCTIONS_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* MANAGEMENTWORKINSTRUCTIONS_STUB_BUILD_DLL */ +# define MANAGEMENTWORKINSTRUCTIONS_STUB_Export ACE_Proper_Import_Flag +# define MANAGEMENTWORKINSTRUCTIONS_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define MANAGEMENTWORKINSTRUCTIONS_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* MANAGEMENTWORKINSTRUCTIONS_STUB_BUILD_DLL */ +#else /* MANAGEMENTWORKINSTRUCTIONS_STUB_HAS_DLL == 1 */ +# define MANAGEMENTWORKINSTRUCTIONS_STUB_Export +# define MANAGEMENTWORKINSTRUCTIONS_STUB_SINGLETON_DECLARATION(T) +# define MANAGEMENTWORKINSTRUCTIONS_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* MANAGEMENTWORKINSTRUCTIONS_STUB_HAS_DLL == 1 */ + +// Set MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE */ + +#if (MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE == 1) +# define MANAGEMENTWORKINSTRUCTIONS_STUB_TRACE(X) +#else /* (MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define MANAGEMENTWORKINSTRUCTIONS_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (MANAGEMENTWORKINSTRUCTIONS_STUB_NTRACE == 1) */ + +#endif /* MANAGEMENTWORKINSTRUCTIONS_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_svnt_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_svnt_export.h new file mode 100644 index 00000000000..3f644ee62ed --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/ManagementWorkInstructions/ManagementWorkInstructions_svnt_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl MANAGEMENTWORKINSTRUCTIONS_SVNT +// ------------------------------ +#ifndef MANAGEMENTWORKINSTRUCTIONS_SVNT_EXPORT_H +#define MANAGEMENTWORKINSTRUCTIONS_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (MANAGEMENTWORKINSTRUCTIONS_SVNT_HAS_DLL) +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_HAS_DLL 1 +#endif /* ! MANAGEMENTWORKINSTRUCTIONS_SVNT_HAS_DLL */ + +#if defined (MANAGEMENTWORKINSTRUCTIONS_SVNT_HAS_DLL) && (MANAGEMENTWORKINSTRUCTIONS_SVNT_HAS_DLL == 1) +# if defined (MANAGEMENTWORKINSTRUCTIONS_SVNT_BUILD_DLL) +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_Export ACE_Proper_Export_Flag +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* MANAGEMENTWORKINSTRUCTIONS_SVNT_BUILD_DLL */ +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_Export ACE_Proper_Import_Flag +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* MANAGEMENTWORKINSTRUCTIONS_SVNT_BUILD_DLL */ +#else /* MANAGEMENTWORKINSTRUCTIONS_SVNT_HAS_DLL == 1 */ +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_Export +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_SINGLETON_DECLARATION(T) +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* MANAGEMENTWORKINSTRUCTIONS_SVNT_HAS_DLL == 1 */ + +// Set MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE */ + +#if (MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE == 1) +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_TRACE(X) +#else /* (MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define MANAGEMENTWORKINSTRUCTIONS_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (MANAGEMENTWORKINSTRUCTIONS_SVNT_NTRACE == 1) */ + +#endif /* MANAGEMENTWORKINSTRUCTIONS_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.cidl b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.cidl new file mode 100644 index 00000000000..17e73a54dbd --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.cidl @@ -0,0 +1,11 @@ +// $Id$ +#include "PalletConveyorManager.idl" + +composition session PalletConveyorManager_Impl +{ + home executor PalletConveyorManagerHome_Exec + { + implements RobotAssembly::PalletConveyorManagerHome; + manages PalletConveyorManager_Exec; + }; +}; diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.idl b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.idl new file mode 100644 index 00000000000..1d10fd95435 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.idl @@ -0,0 +1,20 @@ +// $Id$ +#include "../Robot_Base.idl" + +module RobotAssembly +{ + component PalletConveyorManager + { + // Production Interfaces. + consumes MovePalletRequest PalletRequests; + publishes PalletStatusResponse PalletStatus; + + // Development Interfaces. + provides PCMController Controller; + }; + + home PalletConveyorManagerHome manages PalletConveyorManager {}; + +}; + + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.mpc b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.mpc new file mode 100644 index 00000000000..1b7c89cd2fd --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager.mpc @@ -0,0 +1,56 @@ +// $Id$ + +project(PalletConveyorManager_stub): ciao_client_dnc { + after += RobotAssembly_stub + sharedname = PalletConveyorManager_stub + libs += RobotAssembly_stub + idlflags += -Wb,stub_export_macro=PALLETCONVEYORMANAGER_STUB_Export -Wb,stub_export_include=PalletConveyorManager_stub_export.h -Wb,skel_export_macro=PALLETCONVEYORMANAGER_SVNT_Export -Wb,skel_export_include=PalletConveyorManager_svnt_export.h + dynamicflags = PALLETCONVEYORMANAGER_STUB_BUILD_DLL + + IDL_Files { + PalletConveyorManager.idl + } + + Source_Files { + PalletConveyorManagerC.cpp + } +} + +project(PalletConveyorManager_svnt) : ciao_servant_dnc { + after += PalletConveyorManager_stub + sharedname = PalletConveyorManager_svnt + libs += PalletConveyorManager_stub RobotAssembly_stub RobotAssembly_svnt + + idlflags += -Wb,export_macro=PALLETCONVEYORMANAGER_SVNT_Export -Wb,export_include=PalletConveyorManager_svnt_export.h + dynamicflags = PALLETCONVEYORMANAGER_SVNT_BUILD_DLL + + CIDL_Files { + PalletConveyorManager.cidl + } + + IDL_Files { + PalletConveyorManagerE.idl + } + + Source_Files { + PalletConveyorManagerEC.cpp + PalletConveyorManagerS.cpp + PalletConveyorManager_svnt.cpp + } +} + +project(PalletConveyorManager_exec) : ciao_component_dnc { + after += PalletConveyorManager_svnt + sharedname = PalletConveyorManager_exec + libs += RobotAssembly_stub RobotAssembly_svnt PalletConveyorManager_stub PalletConveyorManager_svnt + libpaths += .. + idlflags += -Wb,export_macro=PALLETCONVEYORMANAGER_EXEC_Export -Wb,export_include=RobotManger_exec_export.h + dynamicflags = PALLETCONVEYORMANAGER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + PalletConveyorManager_exec.cpp + } +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec.cpp b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec.cpp new file mode 100644 index 00000000000..72921ef8b45 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec.cpp @@ -0,0 +1,196 @@ +// $Id$ +// PalletConveyorManager_exec.cpp + +#include "PalletConveyorManager_exec.h" + +// MangementWorkInstructions_exec_i +// +// +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::~PalletConveyorManager_exec_i () +{ +} + +//consumes MovePalletRequest PalletRequests; +void +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::push_PalletRequests (RobotAssembly::MovePalletRequest *ev ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, "PalletConveyorManager - In push_PalletStatus event sink (4e, 10e)\n")); + // eventtype MovePalletRequest { + // public MoveRequestType MoveRequest; + // public WorkOrder Order; + // }; + + RobotAssembly::WorkOrder myWorkOrder = ev->Order(); + RobotAssembly::MoveRequestType myMoveRequestType = ev->MoveRequest(); + if (myMoveRequestType == RobotAssembly::GetPalletProductToProcess) { + printf("\tMoveRequestType = GetPalletProductToProcess (4e)\n"); + // Simulate Pallet Ready - this code should be moved to the PCMController once the GUIs are attached + // eventtype PalletStatusResponse { + // public StatusType Status; + // public WorkOrder Order; + // }; + // 5e + // publishes PalletStatusResponse PalletStatus; + RobotAssembly::PalletStatusResponse_var palletStatusResponse_event = new OBV_RobotAssembly::PalletStatusResponse; + palletStatusResponse_event->Order(myWorkOrder); + palletStatusResponse_event->Status(RobotAssembly::palletInPlace); + this->context_->push_PalletStatus(palletStatusResponse_event ACE_ENV_ARG_PARAMETER); + + } else if (myMoveRequestType == RobotAssembly::MovePalletToFinishingArea) { + printf("\tMoveRequestType = MovePalletToFinishingArea (10e)\n"); + // Simulate Pallet Ready - this code should be moved to the PCMController once the GUIs are attached + // eventtype PalletStatusResponse { + // public StatusType Status; + // public WorkOrder Order; + // }; + // 11e + // publishes PalletStatusResponse PalletStatus; + RobotAssembly::PalletStatusResponse_var palletStatusResponse_event = new OBV_RobotAssembly::PalletStatusResponse; + palletStatusResponse_event->Order(myWorkOrder); + palletStatusResponse_event->Status(RobotAssembly::complete); + this->context_->push_PalletStatus(palletStatusResponse_event ACE_ENV_ARG_PARAMETER); + + } +} + +RobotAssembly::CCM_PCMController_ptr +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::get_Controller (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, "PalletConveyorManager_Impl::PalletConveyorManager_exec.i::get_Controller called\n ")); + return (new PCMController_Impl (*this)); +} + +// void SetDiscrete( in Discretes discrete); +void +PalletConveyorManager_Impl::PCMController_Impl::SetPalletStatus (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + +// DiscreteValue GetDiscreteStatus( in Discretes discrete); +RobotAssembly::MovePalletRequestType +PalletConveyorManager_Impl::PCMController_Impl::GetOrderStatus (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + RobotAssembly::MovePalletRequestType returnVal; + return returnVal; +} + +// MovePalletRequestType GetOrderStatus(); +RobotAssembly::DiscreteValue +PalletConveyorManager_Impl::PCMController_Impl::GetDiscreteStatus (RobotAssembly::Discretes discrete ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + RobotAssembly::DiscreteValue returnVal; + return returnVal; +} + +// void SetPalletStatus(); +void +PalletConveyorManager_Impl::PCMController_Impl::SetDiscrete (RobotAssembly::Discretes discrete ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} +// string getHost(); +char * +PalletConveyorManager_Impl::PCMController_Impl::getHost (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return "getHost"; +} + + + + + + + + +// Operations from Components::SessionComponen +void +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "PalletConveyorManager_Impl::PalletConveyorManager_exec_i::set_session_context\n")); + + this->context_ = PalletConveyorManager_Impl::PalletConveyorManager_Exec_Context::_narrow (ctx ACE_ENV_ARG_PARAMETER); + + ACE_CHECK; + + if (CORBA::is_nil (this->context_.in ())) + + ACE_THROW (CORBA::INTERNAL ()); + // Urm, we actually discard exceptions thown from this operation. +} + +void +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ciao_preactivate\n")); +} + +void +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ccm_activate\n")); +} + +void +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ciao_postactivate\n")); +} + + +void +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ccm_passivate\n")); +} + +void +PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "PalletConveyorManager_Impl::PalletConveyorManager_exec_i::ccm_remove\n")); +} + + +// PalletConveyorManagerHome_exec_i +// +// +PalletConveyorManager_Impl::PalletConveyorManagerHome_exec_i::PalletConveyorManagerHome_exec_i () +{ +} + +PalletConveyorManager_Impl::PalletConveyorManagerHome_exec_i::~PalletConveyorManagerHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +PalletConveyorManager_Impl::PalletConveyorManagerHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + return new PalletConveyorManager_Impl::PalletConveyorManager_exec_i; +} + + +extern "C" PALLETCONVEYORMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr +createPalletConveyorManagerHome_Impl (void) +{ + return new PalletConveyorManager_Impl::PalletConveyorManagerHome_exec_i (); +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec.h b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec.h new file mode 100644 index 00000000000..297affb6f47 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec.h @@ -0,0 +1,142 @@ +// $Id$ +// PalletConveyorManager_exec.h +//============================================================ +/** +* @file PalletConveyorManager_exec.h +* +* Header file for the Executor implementation. +*/ +//============================================================ + +//#ifndef PALLETCONVEYORMANAGER_EXEC_H +//#define PALLETCONVEYORMANAGER_EXEC_H + +#include "PalletConveyorManagerEC.h" +#include "PalletConveyorManager_exec_export.h" + +#include "tao/LocalObject.h" + +namespace PalletConveyorManager_Impl +{ +/** +* @class PalletConveyorManager_exec_i +* +* PalletConveyorManager executor implementation class. + */ + + class PALLETCONVEYORMANAGER_EXEC_Export PalletConveyorManager_exec_i : + public virtual PalletConveyorManager_Exec, + public virtual TAO_Local_RefCounted_Object + { + + public: + /// Default constructor. + PalletConveyorManager_exec_i () { } + + /// Default destructor. + virtual ~PalletConveyorManager_exec_i (); + + + //consumes MovePalletRequest PalletRequests; + virtual void push_PalletRequests (RobotAssembly::MovePalletRequest *ev ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual RobotAssembly::CCM_PCMController_ptr get_Controller (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + + protected: + /// Component specific context + PalletConveyorManager_Exec_Context_var context_; + friend class PCMController_Impl; + + }; + +// provides PCMController Controller; + class PCMController_Impl : public virtual RobotAssembly::CCM_PCMController, + public virtual TAO_Local_RefCounted_Object + { + public: + PCMController_Impl(PalletConveyorManager_exec_i& component) : component_ (component) + { } + // void SetDiscrete( in Discretes discrete); + virtual void SetPalletStatus (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // DiscreteValue GetDiscreteStatus( in Discretes discrete); + virtual RobotAssembly::MovePalletRequestType GetOrderStatus (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // MovePalletRequestType GetOrderStatus(); + virtual RobotAssembly::DiscreteValue GetDiscreteStatus (RobotAssembly::Discretes discrete ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // void SetPalletStatus(); + virtual void SetDiscrete (RobotAssembly::Discretes discrete ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // string getHost(); + virtual char * getHost (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + PalletConveyorManager_exec_i& component_; + }; + + + /** + * @class PalletConveyorManagerHome_exec_i + * +* PalletConveyorManager home executor implementation class. +*/ +class PALLETCONVEYORMANAGER_EXEC_Export PalletConveyorManagerHome_exec_i : +public virtual PalletConveyorManagerHome_Exec, +public virtual TAO_Local_RefCounted_Object +{ +public: + /// Default ctor. + PalletConveyorManagerHome_exec_i (); + + /// Default dtor. + virtual ~PalletConveyorManagerHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); +}; + +} + +extern "C" PALLETCONVEYORMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr +createPalletConveyorManagerHome_Impl (void); + +//#endif /* PALLETCONVEYORMANAGER_EXEC_H */ diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec_export.h new file mode 100644 index 00000000000..7acb8d6b279 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_exec_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PALLETCONVEYORMANAGER_EXEC +// ------------------------------ +#ifndef PALLETCONVEYORMANAGER_EXEC_EXPORT_H +#define PALLETCONVEYORMANAGER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PALLETCONVEYORMANAGER_EXEC_HAS_DLL) +# define PALLETCONVEYORMANAGER_EXEC_HAS_DLL 1 +#endif /* ! PALLETCONVEYORMANAGER_EXEC_HAS_DLL */ + +#if defined (PALLETCONVEYORMANAGER_EXEC_HAS_DLL) && (PALLETCONVEYORMANAGER_EXEC_HAS_DLL == 1) +# if defined (PALLETCONVEYORMANAGER_EXEC_BUILD_DLL) +# define PALLETCONVEYORMANAGER_EXEC_Export ACE_Proper_Export_Flag +# define PALLETCONVEYORMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PALLETCONVEYORMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PALLETCONVEYORMANAGER_EXEC_BUILD_DLL */ +# define PALLETCONVEYORMANAGER_EXEC_Export ACE_Proper_Import_Flag +# define PALLETCONVEYORMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PALLETCONVEYORMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PALLETCONVEYORMANAGER_EXEC_BUILD_DLL */ +#else /* PALLETCONVEYORMANAGER_EXEC_HAS_DLL == 1 */ +# define PALLETCONVEYORMANAGER_EXEC_Export +# define PALLETCONVEYORMANAGER_EXEC_SINGLETON_DECLARATION(T) +# define PALLETCONVEYORMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PALLETCONVEYORMANAGER_EXEC_HAS_DLL == 1 */ + +// Set PALLETCONVEYORMANAGER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PALLETCONVEYORMANAGER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define PALLETCONVEYORMANAGER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PALLETCONVEYORMANAGER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PALLETCONVEYORMANAGER_EXEC_NTRACE */ + +#if (PALLETCONVEYORMANAGER_EXEC_NTRACE == 1) +# define PALLETCONVEYORMANAGER_EXEC_TRACE(X) +#else /* (PALLETCONVEYORMANAGER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PALLETCONVEYORMANAGER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PALLETCONVEYORMANAGER_EXEC_NTRACE == 1) */ + +#endif /* PALLETCONVEYORMANAGER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_stub_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_stub_export.h new file mode 100644 index 00000000000..038a8b9306a --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_stub_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PALLETCONVEYORMANAGER_STUB +// ------------------------------ +#ifndef PALLETCONVEYORMANAGER_STUB_EXPORT_H +#define PALLETCONVEYORMANAGER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PALLETCONVEYORMANAGER_STUB_HAS_DLL) +# define PALLETCONVEYORMANAGER_STUB_HAS_DLL 1 +#endif /* ! PALLETCONVEYORMANAGER_STUB_HAS_DLL */ + +#if defined (PALLETCONVEYORMANAGER_STUB_HAS_DLL) && (PALLETCONVEYORMANAGER_STUB_HAS_DLL == 1) +# if defined (PALLETCONVEYORMANAGER_STUB_BUILD_DLL) +# define PALLETCONVEYORMANAGER_STUB_Export ACE_Proper_Export_Flag +# define PALLETCONVEYORMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PALLETCONVEYORMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PALLETCONVEYORMANAGER_STUB_BUILD_DLL */ +# define PALLETCONVEYORMANAGER_STUB_Export ACE_Proper_Import_Flag +# define PALLETCONVEYORMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PALLETCONVEYORMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PALLETCONVEYORMANAGER_STUB_BUILD_DLL */ +#else /* PALLETCONVEYORMANAGER_STUB_HAS_DLL == 1 */ +# define PALLETCONVEYORMANAGER_STUB_Export +# define PALLETCONVEYORMANAGER_STUB_SINGLETON_DECLARATION(T) +# define PALLETCONVEYORMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PALLETCONVEYORMANAGER_STUB_HAS_DLL == 1 */ + +// Set PALLETCONVEYORMANAGER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PALLETCONVEYORMANAGER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PALLETCONVEYORMANAGER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PALLETCONVEYORMANAGER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PALLETCONVEYORMANAGER_STUB_NTRACE */ + +#if (PALLETCONVEYORMANAGER_STUB_NTRACE == 1) +# define PALLETCONVEYORMANAGER_STUB_TRACE(X) +#else /* (PALLETCONVEYORMANAGER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PALLETCONVEYORMANAGER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PALLETCONVEYORMANAGER_STUB_NTRACE == 1) */ + +#endif /* PALLETCONVEYORMANAGER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_svnt_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_svnt_export.h new file mode 100644 index 00000000000..2a4de04b217 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/PalletConveyorManager/PalletConveyorManager_svnt_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PALLETCONVEYORMANAGER_SVNT +// ------------------------------ +#ifndef PALLETCONVEYORMANAGER_SVNT_EXPORT_H +#define PALLETCONVEYORMANAGER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PALLETCONVEYORMANAGER_SVNT_HAS_DLL) +# define PALLETCONVEYORMANAGER_SVNT_HAS_DLL 1 +#endif /* ! PALLETCONVEYORMANAGER_SVNT_HAS_DLL */ + +#if defined (PALLETCONVEYORMANAGER_SVNT_HAS_DLL) && (PALLETCONVEYORMANAGER_SVNT_HAS_DLL == 1) +# if defined (PALLETCONVEYORMANAGER_SVNT_BUILD_DLL) +# define PALLETCONVEYORMANAGER_SVNT_Export ACE_Proper_Export_Flag +# define PALLETCONVEYORMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PALLETCONVEYORMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PALLETCONVEYORMANAGER_SVNT_BUILD_DLL */ +# define PALLETCONVEYORMANAGER_SVNT_Export ACE_Proper_Import_Flag +# define PALLETCONVEYORMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PALLETCONVEYORMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PALLETCONVEYORMANAGER_SVNT_BUILD_DLL */ +#else /* PALLETCONVEYORMANAGER_SVNT_HAS_DLL == 1 */ +# define PALLETCONVEYORMANAGER_SVNT_Export +# define PALLETCONVEYORMANAGER_SVNT_SINGLETON_DECLARATION(T) +# define PALLETCONVEYORMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PALLETCONVEYORMANAGER_SVNT_HAS_DLL == 1 */ + +// Set PALLETCONVEYORMANAGER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PALLETCONVEYORMANAGER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PALLETCONVEYORMANAGER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PALLETCONVEYORMANAGER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PALLETCONVEYORMANAGER_SVNT_NTRACE */ + +#if (PALLETCONVEYORMANAGER_SVNT_NTRACE == 1) +# define PALLETCONVEYORMANAGER_SVNT_TRACE(X) +#else /* (PALLETCONVEYORMANAGER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PALLETCONVEYORMANAGER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PALLETCONVEYORMANAGER_SVNT_NTRACE == 1) */ + +#endif /* PALLETCONVEYORMANAGER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.cidl b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.cidl new file mode 100644 index 00000000000..2eeb891dd89 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.cidl @@ -0,0 +1,12 @@ +// $Id$ +#include "RobotManager.idl" + +composition session RobotManager_Impl +{ + home executor RobotManagerHome_Exec + { + implements RobotAssembly::RobotManagerHome; + manages RobotManager_Exec; + }; +}; + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.idl b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.idl new file mode 100644 index 00000000000..f85598c8a1c --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.idl @@ -0,0 +1,20 @@ +// $Id$ +#include "../Robot_Base.idl" + +module RobotAssembly +{ + component RobotManager + { + // Production Interfaces. + consumes ProcessPallet ProcessPalletCommands; + publishes PalletProcessingStatus ProcessingStatus; + + // Development Interfaces. + provides RMController Controller; + + }; + home RobotManagerHome manages RobotManager {}; + +}; + + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.mpc b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.mpc new file mode 100644 index 00000000000..f88bb92a1c7 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager.mpc @@ -0,0 +1,55 @@ +// $Id$ +project(RobotManager_stub): ciao_client_dnc { + after += RobotAssembly_stub + sharedname = RobotManager_stub + libs += RobotAssembly_stub + idlflags += -Wb,stub_export_macro=ROBOTMANAGER_STUB_Export -Wb,stub_export_include=RobotManager_stub_export.h -Wb,skel_export_macro=ROBOTMANAGER_SVNT_Export -Wb,skel_export_include=RobotManager_svnt_export.h + dynamicflags = ROBOTMANAGER_STUB_BUILD_DLL + + IDL_Files { + RobotManager.idl + } + + Source_Files { + RobotManagerC.cpp + } +} + +project(RobotManager_svnt) : ciao_servant_dnc { + after += RobotManager_stub + sharedname = RobotManager_svnt + libs += RobotManager_stub RobotAssembly_stub RobotAssembly_svnt + + idlflags += -Wb,export_macro=ROBOTMANAGER_SVNT_Export -Wb,export_include=RobotManager_svnt_export.h + dynamicflags = ROBOTMANAGER_SVNT_BUILD_DLL + + CIDL_Files { + RobotManager.cidl + } + + IDL_Files { + RobotManagerE.idl + } + + Source_Files { + RobotManagerEC.cpp + RobotManagerS.cpp + RobotManager_svnt.cpp + } +} + +project(RobotManager_exec) : ciao_component_dnc { + after += RobotManager_svnt + sharedname = RobotManager_exec + libs += RobotAssembly_stub RobotAssembly_svnt RobotManager_stub RobotManager_svnt + libpaths += .. + idlflags += -Wb,export_macro=ROBOTMANAGER_EXEC_Export -Wb,export_include=RobotManger_exec_export.h + dynamicflags = ROBOTMANAGER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + RobotManager_exec.cpp + } +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec.cpp b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec.cpp new file mode 100644 index 00000000000..17aa1a3b8be --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec.cpp @@ -0,0 +1,164 @@ +// $Id$ +// RobotManager_exec.cpp + +#include "RobotManager_exec.h" + +// RobotManager_exec_i +// +// +RobotManager_Impl::RobotManager_exec_i::~RobotManager_exec_i () +{ +} + +// consumes ProcessPallet ProcessPalletCommands; +void +RobotManager_Impl::RobotManager_exec_i::push_ProcessPalletCommands (RobotAssembly::ProcessPallet *ev ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + + // eventtype ProcessPallet { + // public ProcessingOrderType ProcessingOrder; + // public WorkOrder Order; + // }; + + RobotAssembly::WorkOrder myWorkOrder = ev->Order(); + // myProcessingOrderType should have value BeginProcessingPallet + RobotAssembly::ProcessingOrderType myProcessingOrderType = ev->ProcessingOrder(); + + ACE_DEBUG ((LM_DEBUG, "RobotManager - In push_ProcessPalletCommands event sink (7e)\n")); + + // Simulate call 8e - this code should be move to the RMController once the GUI is added + // eventtype PalletProcessingStatus { + // public StatusType Status; + // public WorkOrder Order; + // }; + // 8e publishes PalletProcessingStatus ProcessingStatus; + RobotAssembly::PalletProcessingStatus_var palletProcessingStatus_event = new OBV_RobotAssembly::PalletProcessingStatus; + palletProcessingStatus_event->Order(myWorkOrder); + palletProcessingStatus_event->Status(RobotAssembly::palletProcessed); + this->context_->push_ProcessingStatus(palletProcessingStatus_event ACE_ENV_ARG_PARAMETER); + +} + +RobotAssembly::CCM_RMController_ptr +RobotManager_Impl::RobotManager_exec_i::get_Controller (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + ACE_DEBUG ((LM_DEBUG, "RobotManager_Impl::RobotManager_exec.i::get_Controller called\n ")); + return (new RMController_Impl (*this)); +} + +// provides RMController Controller; +void +RobotManager_Impl::RMController_Impl::SetProcessingStatus (RobotAssembly::ProcessingOrderType Status ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} + +// ProcessingOrderType GetProcessingStatus(); +RobotAssembly::ProcessingOrderType +RobotManager_Impl::RMController_Impl::GetProcessingStatus (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + RobotAssembly::ProcessingOrderType returnType; + return returnType; +} + +// string getHost(); +char * +RobotManager_Impl::RMController_Impl::getHost (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + return "getHost"; +} + + + + + +// Operations from Components::SessionComponen +void +RobotManager_Impl::RobotManager_exec_i::set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "RobotManager_Impl::RobotManager_exec_i::set_session_context\n")); + + this->context_ = RobotManager_Impl::RobotManager_Exec_Context::_narrow (ctx ACE_ENV_ARG_PARAMETER); + + ACE_CHECK; + + if (CORBA::is_nil (this->context_.in ())) + + ACE_THROW (CORBA::INTERNAL ()); + // Urm, we actually discard exceptions thown from this operation. +} + +void +RobotManager_Impl::RobotManager_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"RobotManager_Impl::RobotManager_exec_i::ciao_preactivate\n")); +} + +void +RobotManager_Impl::RobotManager_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"RobotManager_Impl::RobotManager_exec_i::ccm_activate\n")); +} + +void +RobotManager_Impl::RobotManager_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG,"RobotManager_Impl::RobotManager_exec_i::ciao_postactivate\n")); +} + + +void +RobotManager_Impl::RobotManager_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "RobotManager_Impl::RobotManager_exec_i::ccm_passivate\n")); +} + +void +RobotManager_Impl::RobotManager_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "RobotManager_Impl::RobotManager_exec_i::ccm_remove\n")); +} + + +// RobotManagerHome_exec_i +// +// +RobotManager_Impl::RobotManagerHome_exec_i::RobotManagerHome_exec_i () +{ +} + +RobotManager_Impl::RobotManagerHome_exec_i::~RobotManagerHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +RobotManager_Impl::RobotManagerHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) +ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + return new RobotManager_Impl::RobotManager_exec_i; +} + + +extern "C" ROBOTMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr +createRobotManagerHome_Impl (void) +{ + return new RobotManager_Impl::RobotManagerHome_exec_i (); +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec.h b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec.h new file mode 100644 index 00000000000..ae05287e246 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec.h @@ -0,0 +1,137 @@ +// $Id$ +// RobotManager_exec.h +//============================================================ +/** +* @file RobotManager_exec.h +* +* Header file for the Executor implementation. +*/ +//============================================================ + +//#ifndef ROBOTMANAGER_EXEC_H +//#define ROBOTMANAGER_EXEC_H + +#include "RobotManagerEC.h" +#include "RobotManager_exec_export.h" + +#include "tao/LocalObject.h" + +namespace RobotManager_Impl +{ +/** +* @class RobotManager_exec_i +* +* RobotManager executor implementation class. +*/ + + class ROBOTMANAGER_EXEC_Export RobotManager_exec_i : + public virtual RobotManager_Exec, + public virtual TAO_Local_RefCounted_Object + { + + public: + /// Default constructor. + RobotManager_exec_i () { } + + /// Default destructor. + virtual ~RobotManager_exec_i (); + + // consumes ProcessPallet ProcessPalletCommands; + virtual void push_ProcessPalletCommands (RobotAssembly::ProcessPallet *ev ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual RobotAssembly::CCM_RMController_ptr get_Controller (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + + protected: + /// Component specific context + RobotManager_Exec_Context_var context_; + friend class RMController_Impl; + + }; + // provides RMController Controller; + class RMController_Impl : public virtual RobotAssembly::CCM_RMController, + public virtual TAO_Local_RefCounted_Object + { + public: + RMController_Impl(RobotManager_exec_i& component) : component_ (component) + { } + + // void SetProcessingStatus(in ProcessingOrderType Status); + virtual void SetProcessingStatus (RobotAssembly::ProcessingOrderType Status ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // ProcessingOrderType GetProcessingStatus(); + RobotAssembly::ProcessingOrderType GetProcessingStatus (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // string getHost(); + virtual char * getHost (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + RobotManager_exec_i& component_; + }; + + + + + + /** + * @class RobotManagerHome_exec_i + * +* RobotManager home executor implementation class. +*/ +class ROBOTMANAGER_EXEC_Export RobotManagerHome_exec_i : +public virtual RobotManagerHome_Exec, +public virtual TAO_Local_RefCounted_Object +{ +public: + /// Default ctor. + RobotManagerHome_exec_i (); + + /// Default dtor. + virtual ~RobotManagerHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); +}; + +} + +extern "C" ROBOTMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr +createRobotManagerHome_Impl (void); + +//#endif /* ROBOTMANAGER_EXEC_H */ diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec_export.h new file mode 100644 index 00000000000..e270d3c7421 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_exec_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ROBOTMANAGER_EXEC +// ------------------------------ +#ifndef ROBOTMANAGER_EXEC_EXPORT_H +#define ROBOTMANAGER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (ROBOTMANAGER_EXEC_HAS_DLL) +# define ROBOTMANAGER_EXEC_HAS_DLL 1 +#endif /* ! ROBOTMANAGER_EXEC_HAS_DLL */ + +#if defined (ROBOTMANAGER_EXEC_HAS_DLL) && (ROBOTMANAGER_EXEC_HAS_DLL == 1) +# if defined (ROBOTMANAGER_EXEC_BUILD_DLL) +# define ROBOTMANAGER_EXEC_Export ACE_Proper_Export_Flag +# define ROBOTMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ROBOTMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ROBOTMANAGER_EXEC_BUILD_DLL */ +# define ROBOTMANAGER_EXEC_Export ACE_Proper_Import_Flag +# define ROBOTMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ROBOTMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ROBOTMANAGER_EXEC_BUILD_DLL */ +#else /* ROBOTMANAGER_EXEC_HAS_DLL == 1 */ +# define ROBOTMANAGER_EXEC_Export +# define ROBOTMANAGER_EXEC_SINGLETON_DECLARATION(T) +# define ROBOTMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ROBOTMANAGER_EXEC_HAS_DLL == 1 */ + +// Set ROBOTMANAGER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ROBOTMANAGER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define ROBOTMANAGER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ROBOTMANAGER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ROBOTMANAGER_EXEC_NTRACE */ + +#if (ROBOTMANAGER_EXEC_NTRACE == 1) +# define ROBOTMANAGER_EXEC_TRACE(X) +#else /* (ROBOTMANAGER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ROBOTMANAGER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ROBOTMANAGER_EXEC_NTRACE == 1) */ + +#endif /* ROBOTMANAGER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_stub_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_stub_export.h new file mode 100644 index 00000000000..c34d3efb41c --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_stub_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ROBOTMANAGER_STUB +// ------------------------------ +#ifndef ROBOTMANAGER_STUB_EXPORT_H +#define ROBOTMANAGER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (ROBOTMANAGER_STUB_HAS_DLL) +# define ROBOTMANAGER_STUB_HAS_DLL 1 +#endif /* ! ROBOTMANAGER_STUB_HAS_DLL */ + +#if defined (ROBOTMANAGER_STUB_HAS_DLL) && (ROBOTMANAGER_STUB_HAS_DLL == 1) +# if defined (ROBOTMANAGER_STUB_BUILD_DLL) +# define ROBOTMANAGER_STUB_Export ACE_Proper_Export_Flag +# define ROBOTMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ROBOTMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ROBOTMANAGER_STUB_BUILD_DLL */ +# define ROBOTMANAGER_STUB_Export ACE_Proper_Import_Flag +# define ROBOTMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ROBOTMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ROBOTMANAGER_STUB_BUILD_DLL */ +#else /* ROBOTMANAGER_STUB_HAS_DLL == 1 */ +# define ROBOTMANAGER_STUB_Export +# define ROBOTMANAGER_STUB_SINGLETON_DECLARATION(T) +# define ROBOTMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ROBOTMANAGER_STUB_HAS_DLL == 1 */ + +// Set ROBOTMANAGER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ROBOTMANAGER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define ROBOTMANAGER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ROBOTMANAGER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ROBOTMANAGER_STUB_NTRACE */ + +#if (ROBOTMANAGER_STUB_NTRACE == 1) +# define ROBOTMANAGER_STUB_TRACE(X) +#else /* (ROBOTMANAGER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ROBOTMANAGER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ROBOTMANAGER_STUB_NTRACE == 1) */ + +#endif /* ROBOTMANAGER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_svnt_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_svnt_export.h new file mode 100644 index 00000000000..1575b5179f3 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/RobotManager/RobotManager_svnt_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ROBOTMANAGER_SVNT +// ------------------------------ +#ifndef ROBOTMANAGER_SVNT_EXPORT_H +#define ROBOTMANAGER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (ROBOTMANAGER_SVNT_HAS_DLL) +# define ROBOTMANAGER_SVNT_HAS_DLL 1 +#endif /* ! ROBOTMANAGER_SVNT_HAS_DLL */ + +#if defined (ROBOTMANAGER_SVNT_HAS_DLL) && (ROBOTMANAGER_SVNT_HAS_DLL == 1) +# if defined (ROBOTMANAGER_SVNT_BUILD_DLL) +# define ROBOTMANAGER_SVNT_Export ACE_Proper_Export_Flag +# define ROBOTMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ROBOTMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ROBOTMANAGER_SVNT_BUILD_DLL */ +# define ROBOTMANAGER_SVNT_Export ACE_Proper_Import_Flag +# define ROBOTMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ROBOTMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ROBOTMANAGER_SVNT_BUILD_DLL */ +#else /* ROBOTMANAGER_SVNT_HAS_DLL == 1 */ +# define ROBOTMANAGER_SVNT_Export +# define ROBOTMANAGER_SVNT_SINGLETON_DECLARATION(T) +# define ROBOTMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ROBOTMANAGER_SVNT_HAS_DLL == 1 */ + +// Set ROBOTMANAGER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ROBOTMANAGER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define ROBOTMANAGER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ROBOTMANAGER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ROBOTMANAGER_SVNT_NTRACE */ + +#if (ROBOTMANAGER_SVNT_NTRACE == 1) +# define ROBOTMANAGER_SVNT_TRACE(X) +#else /* (ROBOTMANAGER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ROBOTMANAGER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ROBOTMANAGER_SVNT_NTRACE == 1) */ + +#endif /* ROBOTMANAGER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/Robot_Base.idl b/TAO/CIAO/DnC/tests/RobotAssembly/Robot_Base.idl index 355710807f0..e63bf19c820 100644 --- a/TAO/CIAO/DnC/tests/RobotAssembly/Robot_Base.idl +++ b/TAO/CIAO/DnC/tests/RobotAssembly/Robot_Base.idl @@ -1,4 +1,4 @@ -$Id$ +// $Id$ #include <Components.idl> module RobotAssembly diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.cidl b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.cidl new file mode 100644 index 00000000000..ea622c8bb82 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.cidl @@ -0,0 +1,12 @@ +// $Id$ +#include "WatchSettingManager.idl" + +composition session WatchSettingManager_Impl +{ + home executor WatchSettingManagerHome_Exec + { + implements RobotAssembly::WatchSettingManagerHome; + manages WatchSettingManager_Exec; + }; +}; + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.idl b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.idl new file mode 100644 index 00000000000..503840c27ca --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.idl @@ -0,0 +1,24 @@ +// $Id$ +#include "../Robot_Base.idl" + +module RobotAssembly +{ + component WatchSettingManager + { + //Production Interfaces + publishes DisplayWork Display; + publishes ProcessPallet ProductionControl; + publishes MovePalletRequest MovePallet; + publishes ProductionStatus ProductionReport; + consumes PalletProcessingStatus ProcessingStatus; + consumes PalletStatusResponse PalletStatus; + + provides WorkOrderResponses DisplayResponse; + consumes ProductionWorkOrder recvWorkOrder; + + }; + home WatchSettingManagerHome manages WatchSettingManager {}; + +}; + + diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.mpc b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.mpc new file mode 100644 index 00000000000..cdd02f44573 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager.mpc @@ -0,0 +1,56 @@ +// $Id$ + +project(WatchSettingManager_stub): ciao_client_dnc { + after += RobotAssembly_stub + sharedname = WatchSettingManager_stub + libs += RobotAssembly_stub + idlflags += -Wb,stub_export_macro=WATCHSETTINGMANAGER_STUB_Export -Wb,stub_export_include=WatchSettingManager_stub_export.h -Wb,skel_export_macro=WATCHSETTINGMANAGER_SVNT_Export -Wb,skel_export_include=WatchSettingManager_svnt_export.h + dynamicflags = WATCHSETTINGMANAGER_STUB_BUILD_DLL + + IDL_Files { + WatchSettingManager.idl + } + + Source_Files { + WatchSettingManagerC.cpp + } +} + +project(WatchSettingManager_svnt) : ciao_servant_dnc { + after += WatchSettingManager_stub + sharedname = WatchSettingManager_svnt + libs += WatchSettingManager_stub RobotAssembly_stub RobotAssembly_svnt + + idlflags += -Wb,export_macro=WATCHSETTINGMANAGER_SVNT_Export -Wb,export_include=WatchSettingManager_svnt_export.h + dynamicflags = WATCHSETTINGMANAGER_SVNT_BUILD_DLL + + CIDL_Files { + WatchSettingManager.cidl + } + + IDL_Files { + WatchSettingManagerE.idl + } + + Source_Files { + WatchSettingManagerEC.cpp + WatchSettingManagerS.cpp + WatchSettingManager_svnt.cpp + } +} + +project(WatchSettingManager_exec) : ciao_component_dnc { + after += WatchSettingManager_svnt + sharedname = WatchSettingManager_exec + libs += RobotAssembly_stub RobotAssembly_svnt WatchSettingManager_stub WatchSettingManager_svnt + libpaths += .. + idlflags += -Wb,export_macro=WATCHSETTINGMANAGER_EXEC_Export -Wb,export_include=RobotManger_exec_export.h + dynamicflags = WATCHSETTINGMANAGER_EXEC_BUILD_DLL + + IDL_Files { + } + + Source_Files { + WatchSettingManager_exec.cpp + } +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec.cpp b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec.cpp new file mode 100644 index 00000000000..f632d011569 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec.cpp @@ -0,0 +1,367 @@ +//$Id$ +/* + * @file WatchSettingManager_exec.cpp + * + * @author Tao Lu <lu@dre.vanderbilt.edu> + */ + +#include "WatchSettingManager_exec.h" +#include "CIAO_common.h" + +WatchSettingManager_Impl::WatchSettingManager_exec_i::WatchSettingManager_exec_i () +{ +} + +WatchSettingManager_Impl::WatchSettingManager_exec_i::~WatchSettingManager_exec_i () +{ +} + + +RobotAssembly::CCM_WorkOrderResponses_ptr +WatchSettingManager_Impl::WatchSettingManager_exec_i::get_DisplayResponse (ACE_ENV_SINGLE_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) { + ACE_DEBUG ((LM_DEBUG, "WatchSettingManager_Impl::WatchSettingManager_exec.i::get_DisplayResponse called\n ")); + return (new WorkOrderResponses_Impl (*this)); +} + + + +// provides WorkOrderResponses DisplayResponse; +// void AcceptWorkOrderResponse(in WorkOrder Order, in StatusType Status); +// 1f +void +WatchSettingManager_Impl::WorkOrderResponses_Impl::AcceptWorkOrderResponse (const RobotAssembly::WorkOrder & Order, RobotAssembly::StatusType Status ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + printf("WatchSettingManager - In AcceptWorkOrderResponse (1f)\n"); + if (Status == RobotAssembly::accepted) { + printf("\tAccept work order Product\n"); + // eventtype ProductionStatus { + // public StatusType Status; + // public WorkOrder Order; + // }; + // Follow 3e - publishes ProductionStatus ProductionReport + RobotAssembly::ProductionStatus_var productionStatus_event = new OBV_RobotAssembly::ProductionStatus; + productionStatus_event->Order(Order); + productionStatus_event->Status(RobotAssembly::accepted); + this->component_.context_->push_ProductionReport(productionStatus_event ACE_ENV_ARG_PARAMETER); + + // eventtype MovePalletRequest { + // public MoveRequestType MoveRequest; + // public WorkOrder Order; + // }; + + // Follow 4e - publishes MovePalletRequest MovePallet + RobotAssembly::MovePalletRequest_var movePalletRequest_event = new OBV_RobotAssembly::MovePalletRequest; + movePalletRequest_event->Order(Order); + movePalletRequest_event->MoveRequest(RobotAssembly::GetPalletProductToProcess); + this->component_.context_->push_MovePallet(movePalletRequest_event ACE_ENV_ARG_PARAMETER); + + + } else if (Status == RobotAssembly::rejected) { + printf("\tReject work order Product\n"); + } else { + printf("\tInvalid response to Accept Work Order Question\n"); + } +} + +// void SetTimeResponse(in WorkOrder Order, in StatusType Status); +// 2f +void +WatchSettingManager_Impl::WorkOrderResponses_Impl::SetTimeResponse (const RobotAssembly::WorkOrder & Order, RobotAssembly::StatusType Status ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + printf("WatchSettingManager - In SetTimeResponse (2f)\n"); + if (Status == RobotAssembly::ready) { + printf("\tReady to set time\n"); + + // eventtype ProcessPallet { + // public ProcessingOrderType ProcessingOrder; + // public WorkOrder Order; + // }; + // Follow 7e - publishes ProcessPallet ProductionControl + RobotAssembly::ProcessPallet_var processPallet_event = new OBV_RobotAssembly::ProcessPallet; + processPallet_event->Order(Order); + processPallet_event->ProcessingOrder(RobotAssembly::BeginProcessingPallet); + this->component_.context_->push_ProductionControl(processPallet_event ACE_ENV_ARG_PARAMETER); + + } else if (Status == RobotAssembly::rejected) { + printf("\tRejected Setting the time\n"); + } else { + printf("\tInvalid response to Set Time Question\n"); + } +} + +// void AcceptFinalProductResponse(in WorkOrder, in StatusType Status); +// 3f +void +WatchSettingManager_Impl::WorkOrderResponses_Impl::AcceptFinalProductResponse (const RobotAssembly::WorkOrder & Order, RobotAssembly::StatusType Status ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + printf("WatchSettingManager - In AcceptFinalProductResponse (3f)\n"); + if (Status == RobotAssembly::complete) { + printf("\tAccept final Product\n"); + // eventtype MovePalletRequest { + // public MoveRequestType MoveRequest; + // public WorkOrder Order; + // }; + // Follow 10e - publishes MovePalletRequest MovePallet + RobotAssembly::MovePalletRequest_var movePalletRequest_event = new OBV_RobotAssembly::MovePalletRequest; + movePalletRequest_event->Order(Order); + movePalletRequest_event->MoveRequest(RobotAssembly::MovePalletToFinishingArea); + this->component_.context_->push_MovePallet(movePalletRequest_event ACE_ENV_ARG_PARAMETER); + + } else if (Status == RobotAssembly::rejected) { + printf("\tReject final Product\n"); + } else { + printf("\tInvalid response to Accept Final Product Question\n"); + } +} + + + + + + +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::push_recvWorkOrder (RobotAssembly::ProductionWorkOrder *ev + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + //Get the message from the Sender first. + ACE_DEBUG ((LM_DEBUG,"WatchSettingManager - In recvWorkOrder \n")); + + RobotAssembly::WorkOrder myWorkOrder = ev->Order(); + printf("Work Order Number %d, ProductNumber = %d\n", myWorkOrder.OrderNumber, myWorkOrder.ProductNumber); + + + + // RobotAssembly::ProductionWorkOrder_var event = new OBV_RobotAssembly::ProductionWorkOrder; + +// event->Order(testOrder); + +// this->component_.context_->push_sendWorkOrder(event ACE_ENV_ARG_PARAMETER); + + // Send work order to HMI to prompt user as to if it should be accepted + RobotAssembly::DisplayWork_var displayWork_event = new OBV_RobotAssembly::DisplayWork; + displayWork_event->Display(RobotAssembly::DisplayWorkOrder); + displayWork_event->Order(myWorkOrder); + displayWork_event->Status(RobotAssembly::unacknowledged); + // 2e + this->context_->push_Display(displayWork_event ACE_ENV_ARG_PARAMETER); +/* eventtype DisplayWork { + public DisplayRequest Display; + public WorkOrder Order; + public StatusType Status; + }; +*/ + +} + + +// consumes PalletProcessingStatus ProcessingStatus; +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::push_ProcessingStatus (RobotAssembly::PalletProcessingStatus *ev ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + + RobotAssembly::WorkOrder myWorkOrder = ev->Order(); + RobotAssembly::StatusType myStatus = ev->Status(); + // eventtype PalletProcessingStatus { + // public StatusType Status; + // public WorkOrder Order; + // }; + ACE_DEBUG ((LM_DEBUG, "WatchSettingManager - In push_ProcessingStatus event sink (8e) \n")); + // if (palletProcessed (call was 5e)) 9e + // eventtype DisplayWork { + // public DisplayRequest Display; + // public WorkOrder Order; + // public StatusType Status; + // }; + // 9e publishes DisplayWork Display; + RobotAssembly::DisplayWork_var displayWork_event = new OBV_RobotAssembly::DisplayWork; + displayWork_event->Display(RobotAssembly::DisplayWorkProductionComplete); + displayWork_event->Order(myWorkOrder); + displayWork_event->Status(RobotAssembly::ready); + this->context_->push_Display(displayWork_event ACE_ENV_ARG_PARAMETER); + +} +// consumes PalletStatusResponse PalletStatus; +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::push_PalletStatus (RobotAssembly::PalletStatusResponse *ev ACE_ENV_ARG_DECL) +ACE_THROW_SPEC ((CORBA::SystemException)) +{ + // eventtype PalletStatusResponse { + // public StatusType Status; + // public WorkOrder Order; + // }; + RobotAssembly::WorkOrder myWorkOrder = ev->Order(); + RobotAssembly::StatusType myStatus = ev->Status(); + + ACE_DEBUG ((LM_DEBUG, "WatchSettingManager - In push_PalletStatus event sink \n")); + if (myStatus == RobotAssembly::palletInPlace) { + printf("\tStatus = palletInPlace (call was 5e)\n"); + // if (palletInPlace (call was 5e)) 6e + //6e + // eventtype DisplayWork { + // public DisplayRequest Display; + // public WorkOrder Order; + // public StatusType Status; + // }; + // 6e publishes DisplayWork Display; + RobotAssembly::DisplayWork_var displayWork_event = new OBV_RobotAssembly::DisplayWork; + displayWork_event->Display(RobotAssembly::ReadytoProduce); + displayWork_event->Order(myWorkOrder); + displayWork_event->Status(RobotAssembly::accepted); + this->context_->push_Display(displayWork_event ACE_ENV_ARG_PARAMETER); + + } else if (myStatus == RobotAssembly::complete) { + printf("\tStatus = complete (call was 11e)\n"); + // else if (complete(call was 11e)) 12e + // 12e + // eventtype ProductionStatus { + // public StatusType Status; + // public WorkOrder Order; + // }; + // 12e publishes ProductionStatus ProductionReport + RobotAssembly::ProductionStatus_var productionStatus_event = new OBV_RobotAssembly::ProductionStatus; + productionStatus_event->Order(myWorkOrder); + productionStatus_event->Status(RobotAssembly::complete); + this->context_->push_ProductionReport(productionStatus_event ACE_ENV_ARG_PARAMETER); + + } else { + printf("\tInvalid status value\n"); + } + + /* + + if (myMoveRequestType == RobotAssembly::GetPalletProductToProcess) { + // Simulate Pallet Ready - this code should be moved to the PCMController once the GUIs are attached + + // 5e + // publishes PalletStatusResponse PalletStatus; + RobotAssembly::PalletStatusResponse_var palletStatusResponse_event = new OBV_RobotAssembly::PalletStatusResponse; + palletStatusResponse_event->Order(myWorkOrder); + palletStatusResponse_event->Status(RobotAssembly::palletInPlace); + this->context_->push_PalletStatus(palletStatusResponse_event ACE_ENV_ARG_PARAMETER); + + } else if (myMoveRequestType == RobotAssembly::MovePalletToFinishingArea) { + // Simulate Pallet Ready - this code should be moved to the PCMController once the GUIs are attached + // eventtype PalletStatusResponse { + // public StatusType Status; + // public WorkOrder Order; + // }; + // 11e + // publishes PalletStatusResponse PalletStatus; + RobotAssembly::PalletStatusResponse_var palletStatusResponse_event = new OBV_RobotAssembly::PalletStatusResponse; + palletStatusResponse_event->Order(myWorkOrder); + palletStatusResponse_event->Status(RobotAssembly::palletProcessed); + this->context_->push_PalletStatus(palletStatusResponse_event ACE_ENV_ARG_PARAMETER); + + } + */ +} + + + +// Operations from Components::SessionComponen +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "WatchSettingManager_Impl::WatchSettingManager_exec_i::set_session_context\n")); + + this->context_ = + WatchSettingManager_Impl::WatchSettingManager_Exec_Context::_narrow (ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (CORBA::is_nil (this->context_.in ())) + ACE_THROW (CORBA::INTERNAL ()); + // Urm, we actually discard exceptions thown from this operation. +} + +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, + "WatchSettingManager_Impl::WatchSettingManager_exec_i::ciao_preactivate\n")); +} + +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::ccm_activate (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "WatchSettingManager_Impl::WatchSettingManager_exec_i::ccm_activate\n")); + + // @@ This hack work around a missing feature in CIAO's assembly + // mechanism where a Softpkg descriptor can specify it's dependency + // to a valuetype factory and instruct the deployment framework to + // initialize and register the corresponding valuefactory in the + // component server. Here, we are registering the valuefactory + // explicitly to work around this problem. + char *argv[1] = { "WatchSettingManager_exec"}; + int argc = sizeof(argv)/sizeof(argv[0]); + CORBA::ORB_var orb = CORBA::ORB_init (argc,argv, "" ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + CIAO_REGISTER_VALUE_FACTORY (orb.in(),RobotAssembly::ProductionWorkOrder_init, + RobotAssembly::ProductionWorkOrder); +} + +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, + "WatchSettingManager_Impl::WatchSettingManager_exec_i::ciao_postactivate\n")); +} + +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "WatchSettingManager_Impl::WatchSettingManager_exec_i::ccm_passivate\n")); +} + +void +WatchSettingManager_Impl::WatchSettingManager_exec_i::ccm_remove (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + ACE_DEBUG ((LM_DEBUG, "WatchSettingManager_Impl::WatchSettingManager_exec_i::ccm_remove\n")); +} + + +WatchSettingManager_Impl::WatchSettingManagerHome_exec_i::WatchSettingManagerHome_exec_i () +{ +} + +WatchSettingManager_Impl::WatchSettingManagerHome_exec_i::~WatchSettingManagerHome_exec_i () +{ +} + +::Components::EnterpriseComponent_ptr +WatchSettingManager_Impl::WatchSettingManagerHome_exec_i::create (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)) +{ + Components::EnterpriseComponent_ptr tmp; + ACE_NEW_THROW_EX (tmp,WatchSettingManager_Impl::WatchSettingManager_exec_i, + CORBA::NO_MEMORY ()); + return tmp; +} + + +extern "C" WATCHSETTINGMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr +createWatchSettingManagerHome_Impl (void) +{ + return new WatchSettingManager_Impl::WatchSettingManagerHome_exec_i (); +} diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec.h b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec.h new file mode 100644 index 00000000000..5dd43f9f062 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec.h @@ -0,0 +1,158 @@ +//$Id$: +//============================================================ +/** +* @file WatchSettingManager_exec.h +* +* Header file for the Executor implementation. +* @author Tao Lu <lu@dre.vanderbilt.edu> +*/ +//============================================================ + +#ifndef WATCHSETTINGMANAGER_EXEC_H +#define WATCHSETTINGMANAGER_EXEC_H + +#include "WatchSettingManagerEC.h" +#include "WatchSettingManager_exec_export.h" +#include "tao/LocalObject.h" + +namespace WatchSettingManager_Impl +{ + +/** +* @class WatchSettingManager_exec_i +* +* WatchSettingManager executor implementation class. + */ + + class WATCHSETTINGMANAGER_EXEC_Export WatchSettingManager_exec_i : + public virtual WatchSettingManager_Exec, + public virtual TAO_Local_RefCounted_Object + { + + public: + /// Default constructor. + WatchSettingManager_exec_i (); + + /// Default destructor. + ~WatchSettingManager_exec_i (); + +// publishes DisplayWork Display; +// publishes ProcessPallet ProductionControl; +// publishes MovePalletRequest MovePallet; +// publishes ProductionStatus ProductionReport; + + +// provides WorkOrderResponses DisplayResponse; + + + virtual RobotAssembly::CCM_WorkOrderResponses_ptr get_DisplayResponse (ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + +// consumes ProductionWorkOrder recvWorkOrder; + virtual void + push_recvWorkOrder (RobotAssembly::ProductionWorkOrder *ev + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); +// consumes PalletProcessingStatus ProcessingStatus; + virtual void + push_ProcessingStatus (RobotAssembly::PalletProcessingStatus *ev + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); +// consumes PalletStatusResponse PalletStatus; + virtual void + push_PalletStatus (RobotAssembly::PalletStatusResponse *ev + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // Operations from Components::SessionComponent + virtual void set_session_context (Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_preactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_activate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ciao_postactivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + + virtual void ccm_passivate (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + virtual void ccm_remove (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + + protected: + /// Copmponent specific context + WatchSettingManager_Exec_Context_var context_; + friend class WorkOrderResponses_Impl; + }; + + // provides WorkOrderResponses DisplayResponse; + class WorkOrderResponses_Impl : public virtual RobotAssembly::CCM_WorkOrderResponses, + public virtual TAO_Local_RefCounted_Object + { + public: + WorkOrderResponses_Impl(WatchSettingManager_exec_i& component) : component_ (component) + { } + + // 1f + // void AcceptWorkOrderResponse(in WorkOrder Order, in StatusType Status); + virtual void AcceptWorkOrderResponse(const RobotAssembly::WorkOrder & Order, RobotAssembly::StatusType Status ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // 2f + // void SetTimeResponse(in WorkOrder Order, in StatusType Status); + virtual void SetTimeResponse (const RobotAssembly::WorkOrder & Order, RobotAssembly::StatusType Status ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // 3f + // void AcceptFinalProductResponse(in WorkOrder, in StatusType Status); + virtual void AcceptFinalProductResponse (const RobotAssembly::WorkOrder & Order,::RobotAssembly::StatusType Status ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)); + + + private: + WatchSettingManager_exec_i& component_; + }; + + + /** + * @class WatchSettingManagerHome_exec_i + * + * WatchSettingManager home executor implementation class. + */ + class WATCHSETTINGMANAGER_EXEC_Export WatchSettingManagerHome_exec_i : + public virtual WatchSettingManagerHome_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + /// Default ctor. + WatchSettingManagerHome_exec_i (); + + /// Default dtor. + ~WatchSettingManagerHome_exec_i (); + + // Implicit home operations. + + virtual ::Components::EnterpriseComponent_ptr + create (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException, + Components::CCMException)); + }; + +} + +extern "C" WATCHSETTINGMANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr +createWatchSettingManagerHome_Impl (void); + +#endif /* WATCHSETTINGMANAGER_EXEC_H */ diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec_export.h new file mode 100644 index 00000000000..1ce8dc5e841 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_exec_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl WATCHSETTINGMANAGER_EXEC +// ------------------------------ +#ifndef WATCHSETTINGMANAGER_EXEC_EXPORT_H +#define WATCHSETTINGMANAGER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (WATCHSETTINGMANAGER_EXEC_HAS_DLL) +# define WATCHSETTINGMANAGER_EXEC_HAS_DLL 1 +#endif /* ! WATCHSETTINGMANAGER_EXEC_HAS_DLL */ + +#if defined (WATCHSETTINGMANAGER_EXEC_HAS_DLL) && (WATCHSETTINGMANAGER_EXEC_HAS_DLL == 1) +# if defined (WATCHSETTINGMANAGER_EXEC_BUILD_DLL) +# define WATCHSETTINGMANAGER_EXEC_Export ACE_Proper_Export_Flag +# define WATCHSETTINGMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define WATCHSETTINGMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* WATCHSETTINGMANAGER_EXEC_BUILD_DLL */ +# define WATCHSETTINGMANAGER_EXEC_Export ACE_Proper_Import_Flag +# define WATCHSETTINGMANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define WATCHSETTINGMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* WATCHSETTINGMANAGER_EXEC_BUILD_DLL */ +#else /* WATCHSETTINGMANAGER_EXEC_HAS_DLL == 1 */ +# define WATCHSETTINGMANAGER_EXEC_Export +# define WATCHSETTINGMANAGER_EXEC_SINGLETON_DECLARATION(T) +# define WATCHSETTINGMANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* WATCHSETTINGMANAGER_EXEC_HAS_DLL == 1 */ + +// Set WATCHSETTINGMANAGER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (WATCHSETTINGMANAGER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define WATCHSETTINGMANAGER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define WATCHSETTINGMANAGER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !WATCHSETTINGMANAGER_EXEC_NTRACE */ + +#if (WATCHSETTINGMANAGER_EXEC_NTRACE == 1) +# define WATCHSETTINGMANAGER_EXEC_TRACE(X) +#else /* (WATCHSETTINGMANAGER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define WATCHSETTINGMANAGER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (WATCHSETTINGMANAGER_EXEC_NTRACE == 1) */ + +#endif /* WATCHSETTINGMANAGER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_stub_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_stub_export.h new file mode 100644 index 00000000000..2e53d21261b --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_stub_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl WATCHSETTINGMANAGER_STUB +// ------------------------------ +#ifndef WATCHSETTINGMANAGER_STUB_EXPORT_H +#define WATCHSETTINGMANAGER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (WATCHSETTINGMANAGER_STUB_HAS_DLL) +# define WATCHSETTINGMANAGER_STUB_HAS_DLL 1 +#endif /* ! WATCHSETTINGMANAGER_STUB_HAS_DLL */ + +#if defined (WATCHSETTINGMANAGER_STUB_HAS_DLL) && (WATCHSETTINGMANAGER_STUB_HAS_DLL == 1) +# if defined (WATCHSETTINGMANAGER_STUB_BUILD_DLL) +# define WATCHSETTINGMANAGER_STUB_Export ACE_Proper_Export_Flag +# define WATCHSETTINGMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define WATCHSETTINGMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* WATCHSETTINGMANAGER_STUB_BUILD_DLL */ +# define WATCHSETTINGMANAGER_STUB_Export ACE_Proper_Import_Flag +# define WATCHSETTINGMANAGER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define WATCHSETTINGMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* WATCHSETTINGMANAGER_STUB_BUILD_DLL */ +#else /* WATCHSETTINGMANAGER_STUB_HAS_DLL == 1 */ +# define WATCHSETTINGMANAGER_STUB_Export +# define WATCHSETTINGMANAGER_STUB_SINGLETON_DECLARATION(T) +# define WATCHSETTINGMANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* WATCHSETTINGMANAGER_STUB_HAS_DLL == 1 */ + +// Set WATCHSETTINGMANAGER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (WATCHSETTINGMANAGER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define WATCHSETTINGMANAGER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define WATCHSETTINGMANAGER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !WATCHSETTINGMANAGER_STUB_NTRACE */ + +#if (WATCHSETTINGMANAGER_STUB_NTRACE == 1) +# define WATCHSETTINGMANAGER_STUB_TRACE(X) +#else /* (WATCHSETTINGMANAGER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define WATCHSETTINGMANAGER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (WATCHSETTINGMANAGER_STUB_NTRACE == 1) */ + +#endif /* WATCHSETTINGMANAGER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_svnt_export.h b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_svnt_export.h new file mode 100644 index 00000000000..dd64ee76464 --- /dev/null +++ b/TAO/CIAO/DnC/tests/RobotAssembly/WatchSettingManager/WatchSettingManager_svnt_export.h @@ -0,0 +1,54 @@ +// $Id$ +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl WATCHSETTINGMANAGER_SVNT +// ------------------------------ +#ifndef WATCHSETTINGMANAGER_SVNT_EXPORT_H +#define WATCHSETTINGMANAGER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (WATCHSETTINGMANAGER_SVNT_HAS_DLL) +# define WATCHSETTINGMANAGER_SVNT_HAS_DLL 1 +#endif /* ! WATCHSETTINGMANAGER_SVNT_HAS_DLL */ + +#if defined (WATCHSETTINGMANAGER_SVNT_HAS_DLL) && (WATCHSETTINGMANAGER_SVNT_HAS_DLL == 1) +# if defined (WATCHSETTINGMANAGER_SVNT_BUILD_DLL) +# define WATCHSETTINGMANAGER_SVNT_Export ACE_Proper_Export_Flag +# define WATCHSETTINGMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define WATCHSETTINGMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* WATCHSETTINGMANAGER_SVNT_BUILD_DLL */ +# define WATCHSETTINGMANAGER_SVNT_Export ACE_Proper_Import_Flag +# define WATCHSETTINGMANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define WATCHSETTINGMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* WATCHSETTINGMANAGER_SVNT_BUILD_DLL */ +#else /* WATCHSETTINGMANAGER_SVNT_HAS_DLL == 1 */ +# define WATCHSETTINGMANAGER_SVNT_Export +# define WATCHSETTINGMANAGER_SVNT_SINGLETON_DECLARATION(T) +# define WATCHSETTINGMANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* WATCHSETTINGMANAGER_SVNT_HAS_DLL == 1 */ + +// Set WATCHSETTINGMANAGER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (WATCHSETTINGMANAGER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define WATCHSETTINGMANAGER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define WATCHSETTINGMANAGER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !WATCHSETTINGMANAGER_SVNT_NTRACE */ + +#if (WATCHSETTINGMANAGER_SVNT_NTRACE == 1) +# define WATCHSETTINGMANAGER_SVNT_TRACE(X) +#else /* (WATCHSETTINGMANAGER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define WATCHSETTINGMANAGER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (WATCHSETTINGMANAGER_SVNT_NTRACE == 1) */ + +#endif /* WATCHSETTINGMANAGER_SVNT_EXPORT_H */ + +// End of auto generated file. |