diff options
author | nshankar <nshankar@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-05 20:55:39 +0000 |
---|---|---|
committer | nshankar <nshankar@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-09-05 20:55:39 +0000 |
commit | f4b714fbc6567e6f5678d85de958d89a63f277d1 (patch) | |
tree | d9a1cd7f4d23539b0edc5fa09dbcc6833df5283d | |
parent | 3f3373b6e86a4c7fb03a0e81b4798f48dae3be00 (diff) | |
download | ATCD-f4b714fbc6567e6f5678d85de958d89a63f277d1.tar.gz |
Tue Sep 5 20:33:35 UTC 2006 Nishanth Shankaran <nshankar@dre.vanderbilt.edu>
124 files changed, 12994 insertions, 0 deletions
diff --git a/Controller/Component/Controller.cidl b/Controller/Component/Controller.cidl new file mode 100644 index 00000000000..981fa42caea --- /dev/null +++ b/Controller/Component/Controller.cidl @@ -0,0 +1,28 @@ +// Controller.cidl,v 1.1 2006/01/23 16:58:01 nshankar Exp +#ifndef RACE_CONTROLLER_CIDL +#define RACE_CONTROLLER_CIDL + +/* + * @file Controller.cidl + * @brief This file contains the Controller component implementation defination. + */ + +#include "Controller.idl" + +module CIAO +{ + module RACE + { + composition session Controller_Impl + { + home executor Controller_Home_Exec + { + implements Controller_Home; + manages Controller_Exec; + }; + }; + }; +}; + + +#endif /* RACE_CONTROLLER_CIDL */ diff --git a/Controller/Component/Controller.idl b/Controller/Component/Controller.idl new file mode 100644 index 00000000000..7362a9c7875 --- /dev/null +++ b/Controller/Component/Controller.idl @@ -0,0 +1,62 @@ +#ifndef RACE_CONTROLLER_IDL +#define RACE_CONTROLLER_IDL + +/** + * @file Controller.idl + * + * @brief Controller Component of RACE. + * + * This file declares a Controller of the RACE framework. + * + * @author Nishanth Shankaran <nshankar@dre.vanderbilt.edu> + */ + +#include <Components.idl> +#include "ciao/Target_Data.idl" +#include "TargetManager/TargetManagerExt.idl" +#include "Interface.idl" +#include "RACE/Monitor/Central_Monitor/Monitor.idl" + +/** + * @module CIAO + * @brief The CIAO module. + */ + +module CIAO +{ + module RACE + { + + struct component_info + { + string id; + string node; + }; + + /** + * @component Controller + * @brief The Controller component of RACE. + */ + + component Controller supports Trigger + { + /// Obtain resource utilization infromation from the target manager. + uses CIAO::TargetManagerExt target_mgr_ext; + uses Deployment::TargetManager target_mgr; + + uses ::CIAO::RACE::Execution_Time_Monitor monitor; + + + /// Facet to which the descrpters can be pushed. + provides Descriptors descriptors; + + /// The sampling period of the controller. + readonly attribute long sampling_period; + }; + + home Controller_Home manages Controller + { + }; + }; +}; +#endif /* RACE_CONTROLLER_IDL */ diff --git a/Controller/Component/Controller.mpc b/Controller/Component/Controller.mpc new file mode 100644 index 00000000000..4c33a09fdd4 --- /dev/null +++ b/Controller/Component/Controller.mpc @@ -0,0 +1,130 @@ +project(Path_stub): taolib_with_idl { + + sharedname = Path_stub + idlflags += -Wb,stub_export_macro=PATH_STUB_Export \ + -Wb,stub_export_include=Path_stub_export.h \ + -Wb,skel_export_macro=PATH_SVNT_Export \ + -Wb,skel_export_include=Path_svnt_export.h + + dynamicflags = PATH_STUB_BUILD_DLL + + IDL_Files { + Path.idl + } + + Source_Files { + PathC.cpp + } +} +project(Controller_stub): ciao_deployment_stub { + + after += CIAO_TargetManager_stub \ + Monitor_stub + + sharedname = Controller_stub + + libs += TargetManager_stub \ + Monitor_stub + + idlflags += -Wb,stub_export_macro=CONTROLLER_STUB_Export \ + -Wb,stub_export_include=Controller_stub_export.h \ + -Wb,skel_export_macro=CONTROLLER_SVNT_Export \ + -Wb,skel_export_include=Controller_svnt_export.h + + dynamicflags = CONTROLLER_STUB_BUILD_DLL + + IDL_Files { + Controller.idl + Interface.idl + } + + Source_Files { + ControllerC.cpp + InterfaceC.cpp + } +} + +project(Controller_svnt) : ciao_servant_dnc { + after += Controller_stub \ + CIAO_TargetManager_svnt + + sharedname = Controller_svnt + + libs += Controller_stub \ + TargetManager_stub \ + TargetManager_svnt + + idlflags += -Wb,export_macro=CONTROLLER_SVNT_Export \ + -Wb,export_include=Controller_svnt_export.h + + dynamicflags = CONTROLLER_SVNT_BUILD_DLL + + CIDL_Files { + Controller.cidl + } + + IDL_Files { + ControllerE.idl + } + + Source_Files { + ControllerEC.cpp + ControllerS.cpp + InterfaceS.cpp + Controller_svnt.cpp + } +} + +project(Controller_exec) : ciao_component_dnc, ciao_config_handlers { + after += Controller_svnt \ + XSC_Config_Handlers \ + Path_stub + + sharedname = Controller_exec + includes += $(CIAO_ROOT)/DAnCE/ + + libs += Controller_stub \ + Controller_svnt \ + TargetManager_stub \ + TargetManager_svnt \ + Path_stub + + idlflags += -Wb,export_macro=CONTROLLER_EXEC_Export \ + -Wb,export_include=Controller_exec_export.h + dynamicflags = CONTROLLER_EXEC_BUILD_DLL + + IDL_Files { + } + + Header_Files { + RACE_common.h + Poller.h + Descriptor.h + } + + Source_Files { + Poller.cpp + Descriptor.cpp + Controller_exec.cpp + } +} + + +project (Controller_Starter) : ciao_client_dnc, valuetype { + exename = starter + after += Controller_stub + libs += Controller_stub + + IDL_Files { + } + + Source_Files { + starter.cpp + } + + Header_Files { + } + + Inline_Files { + } +} diff --git a/Controller/Component/Controller_exec.cpp b/Controller/Component/Controller_exec.cpp new file mode 100644 index 00000000000..131670f4201 --- /dev/null +++ b/Controller/Component/Controller_exec.cpp @@ -0,0 +1,200 @@ +#include "Controller_exec.h" +#include "ciao/CIAO_common.h" +#include "RACE_common.h" +#include "tao/ORB_Core.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Controller_Impl + { + Controller_exec_i::Controller_exec_i (void) + :sampling_period_ (100) + { + } + + Controller_exec_i::~Controller_exec_i (void) + { + } + + CIAO::RACE::CCM_Descriptors_ptr + Controller_exec_i::get_descriptors () + throw (::CORBA::SystemException) + { + return new Descriptor (this->poller_.get ()); + + } + + void + Controller_exec_i::start_poller () + throw (::CORBA::SystemException) + { + this->poller_->start_poller (); + } + + void + Controller_exec_i::stop_poller () + throw (::CORBA::SystemException) + { + this->poller_->stop_poller (); + } + + void + Controller_exec_i::start_controller () + throw (::CORBA::SystemException) + { + // this->poller_->start_controller (); + } + + void + Controller_exec_i::stop_controller () + throw (::CORBA::SystemException) + { + // this->poller_->stop_controller (); + } + + ::CORBA::Long + Controller_exec_i::sampling_period () + throw (CORBA::SystemException) + { + return this->sampling_period_; + } + + void + Controller_exec_i::sampling_period + (::CORBA::Long period) + throw (CORBA::SystemException) + { + this->sampling_period_ = period; + } + + void + Controller_exec_i::set_session_context + (::Components::SessionContext_ptr ctx) + throw (::CORBA::SystemException, + ::Components::CCMException) + { + this->context_ = + Controller_Context::_narrow (ctx); + + if (this->context_ == 0) + { + throw CORBA::INTERNAL (); + } + } + + void + Controller_exec_i::ciao_preactivate () + throw (::CORBA::SystemException, ::Components::CCMException) + { + } + + void + Controller_exec_i::ciao_postactivate () + throw (::CORBA::SystemException, ::Components::CCMException) + { + try + { + RACE_DEBUG (RACE_NORMAL, "Trying to contact TM.\n"); + CIAO::TargetManagerExt_var TM = + this->context_->get_connection_target_mgr_ext (); + + if (CORBA::is_nil (TM.in ())) + { + RACE_ERROR ("Unable to connect to TM!\n"); + throw CORBA::BAD_INV_ORDER (); + } + RACE_DEBUG (RACE_NORMAL, + "Done! Connection established with TM!\n"); + RACE_DEBUG (RACE_NORMAL, + "Now creating the poller object.\n"); + + ::CIAO::RACE::Execution_Time_Monitor_var monitor = + this->context_->get_connection_monitor (); + + if (CORBA::is_nil (monitor.in ())) + { + RACE_ERROR ("Unable to connect to Central Monitor!\n"); + throw CORBA::BAD_INV_ORDER (); + } + + + ACE_Reactor *reactor = + this->context_->_ciao_the_Container ()->the_ORB ()->orb_core ()->reactor (); + + this->poller_.reset (new Poller (TM.in (), + monitor.in (), + reactor, + this->sampling_period_)); + this->poller_->init (); + RACE_DEBUG (RACE_NORMAL, + "Done creating the poller object.\n"); + } + catch (CORBA::Exception & ex) + { + ACE_PRINT_EXCEPTION (ex, "(%P|%T|%N|%l) [RACE:] Exception caught " + "in Controller_exec_i::ciao_postactivate ()"); + } + + } + + + void + Controller_exec_i::ccm_activate () + throw (::CORBA::SystemException, ::Components::CCMException) + { + } + + void + Controller_exec_i::ccm_passivate () + throw (::CORBA::SystemException, ::Components::CCMException) + { + } + + + void + Controller_exec_i::ccm_remove () + throw (::CORBA::SystemException, ::Components::CCMException) + { + } + + //================================================================== + // Home Executor Implementation Class: Controller_Home_exec_i + //================================================================== + + Controller_Home_exec_i::Controller_Home_exec_i (void) + { + } + + Controller_Home_exec_i::~Controller_Home_exec_i (void) + { + } + + ::Components::EnterpriseComponent_ptr + Controller_Home_exec_i::create () + throw (::CORBA::SystemException, ::Components::CCMException) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX (retval, Controller_exec_i, CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" CONTROLLER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Controller_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN (retval, + Controller_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + return retval; + } + } + } +} diff --git a/Controller/Component/Controller_exec.h b/Controller/Component/Controller_exec.h new file mode 100644 index 00000000000..75aeb60f3c9 --- /dev/null +++ b/Controller/Component/Controller_exec.h @@ -0,0 +1,107 @@ +#ifndef CIAO_CONTROLLER_EXEC_H +#define CIAO_CONTROLLER_EXEC_H + +#include "Controller_svnt.h" +#include "Poller.h" +#include "ace/Auto_Ptr.h" +#include "Descriptor.h" + +#include "Controller_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Controller_Impl + { + + class CONTROLLER_EXEC_Export Controller_exec_i + : public virtual Controller_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Controller_exec_i (void); + + virtual ~Controller_exec_i (void); + + // Supported operations. + virtual void start_poller () + throw (::CORBA::SystemException); + + virtual void stop_poller () + throw (::CORBA::SystemException); + + virtual void start_controller () + throw (::CORBA::SystemException); + + virtual void stop_controller () + throw (::CORBA::SystemException); + + // Attribute operations. + virtual ::CORBA::Long + sampling_period () + throw (CORBA::SystemException); + + virtual void + sampling_period (::CORBA::Long period) + throw (CORBA::SystemException); + + // Facet + virtual ::CIAO::RACE::CCM_Descriptors_ptr + get_descriptors () + throw (::CORBA::SystemException); + + virtual void + set_session_context (::Components::SessionContext_ptr ctx) + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void + ciao_preactivate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void + ciao_postactivate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void + ccm_activate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void + ccm_passivate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void + ccm_remove () + throw (::CORBA::SystemException, ::Components::CCMException); + + protected: + Controller_Context *context_; + + auto_ptr <Poller> poller_; + + CORBA::Long sampling_period_; + + }; + + class CONTROLLER_EXEC_Export Controller_Home_exec_i + : public virtual Controller_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Controller_Home_exec_i (void); + virtual ~Controller_Home_exec_i (void); + + virtual ::Components::EnterpriseComponent_ptr + create () + throw (::CORBA::SystemException, ::Components::CCMException); + }; + + extern "C" CONTROLLER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Controller_Home_Impl (void); + } + } +} + +#endif /* CIAO_CONTROLLER_EXEC_H */ diff --git a/Controller/Component/Controller_exec_export.h b/Controller/Component/Controller_exec_export.h new file mode 100644 index 00000000000..c53792cd002 --- /dev/null +++ b/Controller/Component/Controller_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Controller_exec_export.h,v 1.1 2006/01/23 17:00:43 nshankar Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl CONTROLLER_EXEC +// ------------------------------ +#ifndef CONTROLLER_EXEC_EXPORT_H +#define CONTROLLER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (CONTROLLER_EXEC_HAS_DLL) +# define CONTROLLER_EXEC_HAS_DLL 1 +#endif /* ! CONTROLLER_EXEC_HAS_DLL */ + +#if defined (CONTROLLER_EXEC_HAS_DLL) && (CONTROLLER_EXEC_HAS_DLL == 1) +# if defined (CONTROLLER_EXEC_BUILD_DLL) +# define CONTROLLER_EXEC_Export ACE_Proper_Export_Flag +# define CONTROLLER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define CONTROLLER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* CONTROLLER_EXEC_BUILD_DLL */ +# define CONTROLLER_EXEC_Export ACE_Proper_Import_Flag +# define CONTROLLER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define CONTROLLER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* CONTROLLER_EXEC_BUILD_DLL */ +#else /* CONTROLLER_EXEC_HAS_DLL == 1 */ +# define CONTROLLER_EXEC_Export +# define CONTROLLER_EXEC_SINGLETON_DECLARATION(T) +# define CONTROLLER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* CONTROLLER_EXEC_HAS_DLL == 1 */ + +// Set CONTROLLER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (CONTROLLER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define CONTROLLER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define CONTROLLER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !CONTROLLER_EXEC_NTRACE */ + +#if (CONTROLLER_EXEC_NTRACE == 1) +# define CONTROLLER_EXEC_TRACE(X) +#else /* (CONTROLLER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define CONTROLLER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (CONTROLLER_EXEC_NTRACE == 1) */ + +#endif /* CONTROLLER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Controller/Component/Controller_stub_export.h b/Controller/Component/Controller_stub_export.h new file mode 100644 index 00000000000..27354106759 --- /dev/null +++ b/Controller/Component/Controller_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Controller_stub_export.h,v 1.1 2006/01/23 17:01:07 nshankar Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl CONTROLLER_STUB +// ------------------------------ +#ifndef CONTROLLER_STUB_EXPORT_H +#define CONTROLLER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (CONTROLLER_STUB_HAS_DLL) +# define CONTROLLER_STUB_HAS_DLL 1 +#endif /* ! CONTROLLER_STUB_HAS_DLL */ + +#if defined (CONTROLLER_STUB_HAS_DLL) && (CONTROLLER_STUB_HAS_DLL == 1) +# if defined (CONTROLLER_STUB_BUILD_DLL) +# define CONTROLLER_STUB_Export ACE_Proper_Export_Flag +# define CONTROLLER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define CONTROLLER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* CONTROLLER_STUB_BUILD_DLL */ +# define CONTROLLER_STUB_Export ACE_Proper_Import_Flag +# define CONTROLLER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define CONTROLLER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* CONTROLLER_STUB_BUILD_DLL */ +#else /* CONTROLLER_STUB_HAS_DLL == 1 */ +# define CONTROLLER_STUB_Export +# define CONTROLLER_STUB_SINGLETON_DECLARATION(T) +# define CONTROLLER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* CONTROLLER_STUB_HAS_DLL == 1 */ + +// Set CONTROLLER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (CONTROLLER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define CONTROLLER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define CONTROLLER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !CONTROLLER_STUB_NTRACE */ + +#if (CONTROLLER_STUB_NTRACE == 1) +# define CONTROLLER_STUB_TRACE(X) +#else /* (CONTROLLER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define CONTROLLER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (CONTROLLER_STUB_NTRACE == 1) */ + +#endif /* CONTROLLER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Controller/Component/Controller_svnt_export.h b/Controller/Component/Controller_svnt_export.h new file mode 100644 index 00000000000..0752d79427f --- /dev/null +++ b/Controller/Component/Controller_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Controller_svnt_export.h,v 1.1 2006/01/23 17:01:16 nshankar Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl CONTROLLER_SVNT +// ------------------------------ +#ifndef CONTROLLER_SVNT_EXPORT_H +#define CONTROLLER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (CONTROLLER_SVNT_HAS_DLL) +# define CONTROLLER_SVNT_HAS_DLL 1 +#endif /* ! CONTROLLER_SVNT_HAS_DLL */ + +#if defined (CONTROLLER_SVNT_HAS_DLL) && (CONTROLLER_SVNT_HAS_DLL == 1) +# if defined (CONTROLLER_SVNT_BUILD_DLL) +# define CONTROLLER_SVNT_Export ACE_Proper_Export_Flag +# define CONTROLLER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define CONTROLLER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* CONTROLLER_SVNT_BUILD_DLL */ +# define CONTROLLER_SVNT_Export ACE_Proper_Import_Flag +# define CONTROLLER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define CONTROLLER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* CONTROLLER_SVNT_BUILD_DLL */ +#else /* CONTROLLER_SVNT_HAS_DLL == 1 */ +# define CONTROLLER_SVNT_Export +# define CONTROLLER_SVNT_SINGLETON_DECLARATION(T) +# define CONTROLLER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* CONTROLLER_SVNT_HAS_DLL == 1 */ + +// Set CONTROLLER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (CONTROLLER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define CONTROLLER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define CONTROLLER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !CONTROLLER_SVNT_NTRACE */ + +#if (CONTROLLER_SVNT_NTRACE == 1) +# define CONTROLLER_SVNT_TRACE(X) +#else /* (CONTROLLER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define CONTROLLER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (CONTROLLER_SVNT_NTRACE == 1) */ + +#endif /* CONTROLLER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Controller/Component/Descriptor.cpp b/Controller/Component/Descriptor.cpp new file mode 100644 index 00000000000..d4efb62e4bf --- /dev/null +++ b/Controller/Component/Descriptor.cpp @@ -0,0 +1,332 @@ +#ifndef DESCRIPTOR_CPP +#define DESCRIPTOR_CPP + +#include "Descriptor.h" +#include "Config_Handlers/DnC_Dump.h" +#include <sstream> +#include "ace/SString.h" +#include "RACE_common.h" +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Controller_Impl + { + #define CRITICAL_PATH "edu.vanderbilt.dre.CIAO.RACE.criticalPath" + #define DEADLINE "/Deadline" + #define IMPORTANCE "/Importance" + #define ELEMENT ';' + #define PORT ',' + + Descriptor::Descriptor (Poller *poller) + : poller_ (poller) + { + } + + Descriptor::~Descriptor () + {} + + int + Descriptor::parse_deployment_plan + (const ::Deployment::DeploymentPlan & plan, + App_String & app_string) + { + /// First dump the plan. + // Deployment::DnC_Dump::dump (plan); + + /// Frst get the plan id and the label. + app_string.plan_id_ = CORBA::string_dup (plan.UUID); + app_string.label_ = CORBA::string_dup (plan.label); + /// Now get the InstanceDeploymentDescriptions which contains the + /// information about the components in this plan. + Deployment::InstanceDeploymentDescriptions idd = plan.instance; + + /// Now parse the InstanceDeploymentDescriptions to get the + /// component_id and the name of the node where the component is + /// depoyed. + + if (idd.length () > 0) + { + + for (CORBA::ULong i (0); i < idd.length (); ++i) + { + Component_Info comp_info; + comp_info.id_ = CORBA::string_dup (idd [i].name); + comp_info.node_ = CORBA::string_dup (idd [i].node); + app_string.components_.push_back (comp_info); + } + return 0; + + } + return -1; + + } + + void + Descriptor::unregister_string (const char * UUID) + throw (::CORBA::SystemException) + {} + + + void + Descriptor::register_string + (const ::Deployment::PackageConfiguration & pcd, + const ::Deployment::DeploymentPlan & plan + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((::CORBA::SystemException)) + { + RACE_DEBUG (RACE_VERBOSE, "Descriptor::push_descriptors.\n"); + + App_String app_string; + /// Register the string with the poller only if the input + /// descriptors contain the critical path information. + if ((this->parse_package_config (pcd, app_string) == 0) && + (this->parse_deployment_plan (plan, app_string) == 0)) + { + this->poller_->register_string (app_string); + this->poller_->start_poller (); + } + } + + int + Descriptor::parse_package_config + (const ::Deployment::PackageConfiguration &pcd, + App_String & app_string) + { + /// First get the ComponentPackageDescriptions from the + /// PackageConfiguration. + Deployment::ComponentPackageDescriptions base_package + = pcd.basePackage; + + /// Now iterate thro each element in the + /// ComponentPackageDescription sequence. + + for (CORBA::ULong i = 0; i < base_package.length (); ++i) + { + /// Obtaining the PackagedComponentImplementations from each + /// element in the sequence. + Deployment::PackagedComponentImplementations &impl = + base_package [i].implementation; + + /// Now iterate thro each element in the + /// PackagedComponentImplementation sequence. + for (CORBA::ULong j = 0; j < impl.length (); ++j) + { + /// Ontaining the ComponentImplementationDescription form + /// each element in the sequence. + Deployment::ComponentImplementationDescription &cid = + impl [j].referencedImplementation; + + /// After getting the CID, parse the CID to obtain the + /// critical path sequence. + + /// Since there is only one critical path now, if a + /// critical path is found, there is no need to parse the + /// remaining config properties. + if (this->parse_path (cid.configProperty, app_string) == 0) + { + return 0; + } + } + } + return -1; + + } + + char* + Descriptor::get_path_name (Deployment::Properties &properties) + { + const char * path_name; + + /// Get the name of the critical path by seaching for the string + /// edu.vanderbilt.dre.CIAO.RACE.criticalPath. + for (CORBA::ULong ctr (0); ctr < properties.length (); ++ctr) + { + Deployment::Property & property = properties [ctr]; + if (ACE_OS::strcmp (property.name.in (), + CRITICAL_PATH) == 0) + { + RACE_DEBUG (RACE_VERBOSE, "Found critical path\n"); + + CORBA::Any & value = property.value; + CORBA::TypeCode_var tc = value.type (); + if (tc->kind () == CORBA::tk_string) + { + value >>= path_name; + return CORBA::string_dup (path_name); + } + } + } + return 0; + } + + CORBA::Double + Descriptor::get_deadline (Deployment::Properties &properties, + const char *path_name) + { + /// Now search for path_name+"_Deadline" + std::stringstream path_deadline; + path_deadline << path_name; + path_deadline << DEADLINE; + CORBA::Double deadline; + + for (CORBA::ULong ctr = 0; ctr < properties.length (); ++ctr) + { + Deployment::Property & property = properties [ctr]; + if (ACE_OS::strcmp (property.name.in (), + path_deadline.str ().c_str ()) == 0) + { + CORBA::Any & value = property.value; + CORBA::TypeCode_var tc = value.type (); + if (tc->kind () == CORBA::tk_double) + { + value >>= deadline; + RACE_DEBUG (RACE_MIN, + "Critical path deadline is:%.2f\n", + deadline); + return deadline; + + } + } + } + return 0; + } + + CORBA::Long + Descriptor::get_importance (Deployment::Properties &properties, + const char *path_name) + { + /// Now search for path_name+"/Importance" + std::stringstream path_importance; + path_importance << path_name; + path_importance << IMPORTANCE; + CORBA::Long importance; + + for (CORBA::ULong ctr = 0; ctr < properties.length (); ++ctr) + { + Deployment::Property & property = properties [ctr]; + if (ACE_OS::strcmp (property.name.in (), + path_importance.str ().c_str ()) == 0) + { + CORBA::Any & value = property.value; + CORBA::TypeCode_var tc = value.type (); + if (tc->kind () == CORBA::tk_long) + { + value >>= importance; + RACE_DEBUG (RACE_MIN, + "App-string importance is: %d\n", + importance); + return importance; + } + } + } + return 0; + } + + char* + Descriptor::get_path (Deployment::Properties &properties, + const char *path_name) + { + const char *path; + /// Now search for path_name + for (CORBA::ULong ctr = 0; ctr < properties.length (); ++ctr) + { + Deployment::Property & property = properties [ctr]; + if (ACE_OS::strcmp (property.name.in (), + path_name) == 0) + { + CORBA::Any & value = property.value; + CORBA::TypeCode_var tc = value.type (); + if (tc->kind () == CORBA::tk_string) + { + value >>= path; + RACE_DEBUG (RACE_VERBOSE, "Critical path is:%s\n", + path); + return CORBA::string_dup (path); + } + } + } + + return 0; + } + + + int + Descriptor::parse_path (Deployment::Properties &properties, + App_String & app_string) + { + /// Dump all the properties. + // for (CORBA::ULong ctr (0); ctr < properties.length (); ++ctr) + // Deployment::DnC_Dump::dump (properties [ctr]); + + CORBA::String_var critical_path_name; + CORBA::String_var critical_path; + + critical_path_name = this->get_path_name (properties); + if (critical_path_name.in ()) + { + /// Populate the deadline filed of the app_string. + app_string.deadline_ = + this->get_deadline (properties, critical_path_name.in ()); + + app_string.importance_ = + this->get_importance (properties, critical_path_name.in ()); + + /// @TODO: Right now if the importance of the string is > 0, we + /// assume that the string is of guaranteed class. This may not + /// be true. + + if (app_string.importance_ > 0) + { + app_string.group_ = GUARANTEED; + } + else + { + app_string.group_ = BEST_EFFORT; + } + + + critical_path = + this->get_path (properties, critical_path_name.in ()); + + if (critical_path.in ()) + { + /// Populate the critical path filed of the app_string. + app_string.critical_path_ = + this->tokenize_path (critical_path.in ()); + return 0; + } + } + return -1; + } + + + Critical_Path + Descriptor::tokenize_path (const char* path) + { + CORBA::String_var critical_path (CORBA::string_dup (path)); + ACE_Tokenizer tok (critical_path); + Path_Element path_element; + Critical_Path path_seq; + CORBA::ULong ctr = 0; + tok.delimiter_replace (ELEMENT, 0); + for (char *p = tok.next (); p; p = tok.next (), ++ctr) + { + RACE_DEBUG (RACE_NORMAL, "%s\n", p); + ACE_Tokenizer temp_tok (p); + temp_tok.delimiter_replace (PORT, 0); + + path_element.node = CORBA::string_dup (temp_tok.next ()); + path_element.src = CORBA::string_dup (temp_tok.next ()); + path_element.dst = CORBA::string_dup (temp_tok.next ()); + + path_seq.length (ctr + 1); + path_seq [ctr] = path_element; + } + return path_seq; + } + } + } +} + +#endif /*DESCRIPTOR_CPP */ diff --git a/Controller/Component/Descriptor.h b/Controller/Component/Descriptor.h new file mode 100644 index 00000000000..fb7e5245e4e --- /dev/null +++ b/Controller/Component/Descriptor.h @@ -0,0 +1,197 @@ +// $Id$ +#ifndef DESCRIPTOR_H +#define DESCRIPTOR_H + +#include /**/ "ace/pre.h" + +#include "Controller_svnt.h" +#include "Poller.h" +#include "common.h" +#include "ace/Auto_Ptr.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Controller_Impl + { + /** + * @class Descriptor + * + * @brief Parses the IDL structures to retrieve necessary information. + * + * This class is the "entry point" for the RACE controller. The input + * to the controller includes the DeploymentPlan IDL structure and + * the PackageConfiguration IDL structure. These structures are + * parsed to retrieve necessary information such as UUID, name, + * importance, and the QoS requirement -- critical path and the e-2-e + * deadline associated with the critical path -- associated with the + * application string (actually the "plan" since currently an + * application string is mapped to an "plan"). + */ + class Descriptor: public virtual ::CIAO::RACE::CCM_Descriptors + { + public: + + /** + * Constructor. Take in a reference to the poller object as an + * input param. + * @param poller Reference to a poller object. + */ + Descriptor (Poller *poller); + + /** + * Default destructor. + */ + virtual ~Descriptor (); + + /** + * This is the "entry point" to the RACE Controller. This method is + * invoked by RACE Output Adapter upon successfull deployment of an + * application string. + * + * @param pcd The PackageConfiguration IDL structure. This IDL is + * used to retrieve (1) importance, and (2) critical path, and (3) + * e-2-e deadline associated with the critical path. + * + * @param plan The DeploymentPlan IDL structure. This IDL is used + * to retrieve the UUID and the name of the application string. + */ + virtual void + register_string (const ::Deployment::PackageConfiguration & pcd, + const ::Deployment::DeploymentPlan & plan) + throw (::CORBA::SystemException); + + virtual void + unregister_string (const char * UUID) + throw (::CORBA::SystemException); + + protected: + + /// Couple of "worker" methods. + + /** + * Parse the DeploymentPlan IDL structure and populate the UUID and + * the name fileds of the app-string structure. + * + * @param plan DeploymentPlan IDL structure. + * + * @param app_string An App_string structure that is populated by + * this method. + */ + virtual int + parse_deployment_plan (const ::Deployment::DeploymentPlan & plan, + App_String & app_string); + + /** + * Parse the PackageConfiguration IDL structure and populate the + * importance, critical-path, and e-2-e deadline fileds of the + * app-string structure. + * + * @param pcd PackageConfiguration IDL structure. + * + * @param app_string An App_string structure that is populated by + * this method. + */ + virtual int + parse_package_config (const ::Deployment::PackageConfiguration & pcd, + App_String & app_string); + + /** + * Parse all the config-properties associated with an application + * string to retrieve the critical path. + * + * @param properties Config-properties associated with an + * application string. + * + * @param app_string An App_string structure that is populated by + * this method. + */ + virtual int + parse_path (Deployment::Properties &properties, + App_String & app_string); + + /** + * This is one of the"worker methods" for the parse_path () + * method. Parses the config-properties to obtain the name of the + * critical path. + * + * @param properties Config-properties. + * + * @return Name of the critical path. + */ + virtual char* + get_path_name (Deployment::Properties &properties); + + /** + * This is one of the "worker methods" for the parse_path () + * method. Parses the config-properties to obtain the e-2-e + * deadline associated with the given critical. + * + * @param properties Config-properties. + * + * @param path_name Name of the critical path. + * + * @return e-2-e deadline associated with the critical path. + */ + virtual CORBA::Double + get_deadline (Deployment::Properties &properties, + const char *path_name); + + /** + * Parse all the config-properties associated with an application + * string to retrieve the importance of the given critical path. + * + * @param properties Config-properties associated with an + * application string. + * + * @param path_name Name of the critical path. + * + * @return importance associated with the critical path. + */ + virtual CORBA::Long + get_importance (Deployment::Properties &properties, + const char *path_name); + + /** + * This is one of the "worker methods" for the parse_path () + * method. Parses the config-properties to obtain the critical path + * in string format given the path name. + * + * @param properties Config-properties. + * + * @param path_name Name of the critical path. + * + * @return Critical path in string format. + */ + virtual char* + get_path (Deployment::Properties &properties, + const char *path_name); + + /** + * This is one of the "worker methods" for the parse_path () + * method. Convert the critical path from string format to + * Critical_Path format. + * + * @param path critical path in string format. + * + * @return Critical path in Critical_Sequence format. + */ + virtual Critical_Path + tokenize_path (const char* path); + + private: + + /// Object reference of the poller object. + Poller *poller_; + }; + + } /* namespace CIDL_Controller_Impl */ + } /* namespace RACE */ +} /* namespace CIAO */ + +#endif /* DESCRIPTOR_H */ diff --git a/Controller/Component/Interface.idl b/Controller/Component/Interface.idl new file mode 100644 index 00000000000..dbb6af505dd --- /dev/null +++ b/Controller/Component/Interface.idl @@ -0,0 +1,55 @@ +#ifndef RACE_CONTROLLER_INTERFACE_IDL +#define RACE_CONTROLLER_INTERFACE_IDL + +#include "ciao/Packaging_Data.idl" + +module CIAO +{ + module RACE + { + + struct Path_Element + { + /// UUID of the component. + string node; + + /// Name of the source port. + string src; + + /// Name of the destination port. + string dst; + }; + + /// Type definition for a path sequence. + typedef sequence <Path_Element> Critical_Path; + + + /** + * @interface Trigger + * @brief This interface is used to start and stop + * the feedback loop of the controller. + */ + interface Trigger + { + oneway void start_poller (); + + oneway void stop_poller (); + + oneway void start_controller (); + + oneway void stop_controller (); + }; + + interface Descriptors + { + void register_string (in Deployment::PackageConfiguration pcd, + in Deployment::DeploymentPlan plan); + + void unregister_string (in string UUID); + + + }; + }; +}; + +#endif diff --git a/Controller/Component/Path.idl b/Controller/Component/Path.idl new file mode 100644 index 00000000000..93228683465 --- /dev/null +++ b/Controller/Component/Path.idl @@ -0,0 +1,28 @@ +#ifndef RACE_PATH_IDL +#define RACE_PATH_IDL + + +module CIAO +{ + module RACE + { + + struct Path_Element + { + /// UUID of the component. + string node; + + /// Name of the source port. + string src; + + /// Name of the destination port. + string dst; + }; + + /// Type definition for a path sequence. + typedef sequence <Path_Element> Critical_Path; + }; + +}; + +#endif /*RACE_PATH_IDL*/ diff --git a/Controller/Component/Path_exec_export.h b/Controller/Component/Path_exec_export.h new file mode 100644 index 00000000000..59f06c9568c --- /dev/null +++ b/Controller/Component/Path_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PATH_EXEC +// ------------------------------ +#ifndef PATH_EXEC_EXPORT_H +#define PATH_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (PATH_EXEC_HAS_DLL) +# define PATH_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && PATH_EXEC_HAS_DLL */ + +#if !defined (PATH_EXEC_HAS_DLL) +# define PATH_EXEC_HAS_DLL 1 +#endif /* ! PATH_EXEC_HAS_DLL */ + +#if defined (PATH_EXEC_HAS_DLL) && (PATH_EXEC_HAS_DLL == 1) +# if defined (PATH_EXEC_BUILD_DLL) +# define PATH_EXEC_Export ACE_Proper_Export_Flag +# define PATH_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PATH_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PATH_EXEC_BUILD_DLL */ +# define PATH_EXEC_Export ACE_Proper_Import_Flag +# define PATH_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PATH_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PATH_EXEC_BUILD_DLL */ +#else /* PATH_EXEC_HAS_DLL == 1 */ +# define PATH_EXEC_Export +# define PATH_EXEC_SINGLETON_DECLARATION(T) +# define PATH_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PATH_EXEC_HAS_DLL == 1 */ + +// Set PATH_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PATH_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define PATH_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PATH_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PATH_EXEC_NTRACE */ + +#if (PATH_EXEC_NTRACE == 1) +# define PATH_EXEC_TRACE(X) +#else /* (PATH_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PATH_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PATH_EXEC_NTRACE == 1) */ + +#endif /* PATH_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Controller/Component/Path_stub_export.h b/Controller/Component/Path_stub_export.h new file mode 100644 index 00000000000..3f8b23a3904 --- /dev/null +++ b/Controller/Component/Path_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PATH_STUB +// ------------------------------ +#ifndef PATH_STUB_EXPORT_H +#define PATH_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (PATH_STUB_HAS_DLL) +# define PATH_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && PATH_STUB_HAS_DLL */ + +#if !defined (PATH_STUB_HAS_DLL) +# define PATH_STUB_HAS_DLL 1 +#endif /* ! PATH_STUB_HAS_DLL */ + +#if defined (PATH_STUB_HAS_DLL) && (PATH_STUB_HAS_DLL == 1) +# if defined (PATH_STUB_BUILD_DLL) +# define PATH_STUB_Export ACE_Proper_Export_Flag +# define PATH_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PATH_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PATH_STUB_BUILD_DLL */ +# define PATH_STUB_Export ACE_Proper_Import_Flag +# define PATH_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PATH_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PATH_STUB_BUILD_DLL */ +#else /* PATH_STUB_HAS_DLL == 1 */ +# define PATH_STUB_Export +# define PATH_STUB_SINGLETON_DECLARATION(T) +# define PATH_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PATH_STUB_HAS_DLL == 1 */ + +// Set PATH_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PATH_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PATH_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PATH_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PATH_STUB_NTRACE */ + +#if (PATH_STUB_NTRACE == 1) +# define PATH_STUB_TRACE(X) +#else /* (PATH_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PATH_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PATH_STUB_NTRACE == 1) */ + +#endif /* PATH_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Controller/Component/Path_svnt_export.h b/Controller/Component/Path_svnt_export.h new file mode 100644 index 00000000000..25ad1a1f1f2 --- /dev/null +++ b/Controller/Component/Path_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PATH_SVNT +// ------------------------------ +#ifndef PATH_SVNT_EXPORT_H +#define PATH_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (PATH_SVNT_HAS_DLL) +# define PATH_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && PATH_SVNT_HAS_DLL */ + +#if !defined (PATH_SVNT_HAS_DLL) +# define PATH_SVNT_HAS_DLL 1 +#endif /* ! PATH_SVNT_HAS_DLL */ + +#if defined (PATH_SVNT_HAS_DLL) && (PATH_SVNT_HAS_DLL == 1) +# if defined (PATH_SVNT_BUILD_DLL) +# define PATH_SVNT_Export ACE_Proper_Export_Flag +# define PATH_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PATH_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PATH_SVNT_BUILD_DLL */ +# define PATH_SVNT_Export ACE_Proper_Import_Flag +# define PATH_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PATH_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PATH_SVNT_BUILD_DLL */ +#else /* PATH_SVNT_HAS_DLL == 1 */ +# define PATH_SVNT_Export +# define PATH_SVNT_SINGLETON_DECLARATION(T) +# define PATH_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PATH_SVNT_HAS_DLL == 1 */ + +// Set PATH_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PATH_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PATH_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PATH_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PATH_SVNT_NTRACE */ + +#if (PATH_SVNT_NTRACE == 1) +# define PATH_SVNT_TRACE(X) +#else /* (PATH_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PATH_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PATH_SVNT_NTRACE == 1) */ + +#endif /* PATH_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Controller/Component/Poller.cpp b/Controller/Component/Poller.cpp new file mode 100644 index 00000000000..4bbdf9cc830 --- /dev/null +++ b/Controller/Component/Poller.cpp @@ -0,0 +1,402 @@ +#ifndef POLLER_CPP +#define POLLER_CPP + +#include "Poller.h" + +namespace CIAO +{ + namespace RACE + { + + Poller::Poller (CIAO::TargetManagerExt_ptr TM_ptr, + ::CIAO::RACE::Execution_Time_Monitor_ptr monitor, + ACE_Reactor *reactor, + size_t interval) + : TM_ (CIAO::TargetManagerExt::_duplicate (TM_ptr)), + monitor_ (::CIAO::RACE::Execution_Time_Monitor::_duplicate (monitor)), + orb_reactor_ (reactor), + // interval_ (interval), + interval_ (20), + start_time_ (110), + // start_time_ (20), + active_ (false), + initialized_ (false), + stack_ (20), + N (0) + { + } + + Poller::~Poller () + {} + + + + void + Poller::init () + { + if (!this->initialized_) + { + /// Get the object reference of the Node Managers from the + /// TargetManager. + try + { + ACE_DEBUG ((LM_DEBUG, "Trying to get the NMs " + "from the TM....")); + this->node_manager_seq_ = this->TM_->get_all_node_managers (); +// this->curr_host_infos_ = this->TM_->get_host_cpu (); + /// Now we create the log files for each logical node. +// for (CORBA::ULong ctr = 0; +// ctr < this->curr_host_infos_->length (); ++ctr) +// { +// this->create_log_file +// (this->curr_host_infos_.in () [ctr].hostname.in (), +// CPU); +// } + } + catch (CORBA::Exception & ex) + { + ACE_PRINT_EXCEPTION (ex, "Exception caught in Poller::init:"); + this->initialized_ = false; + } + ACE_DEBUG ((LM_DEBUG, "done\n")); + this->initialized_ = true; + } + } + + int + Poller::start_poller () + { + if (!this->active_) + { + this->orb_reactor_->owner (ACE_Thread::self ()); + this->timer_id_ = this->orb_reactor_->schedule_timer + (this, + this, + this->start_time_, + this->interval_); + if (this->timer_id_ < 0) + { + ACE_ERROR ((LM_ERROR, "[CIAO::RACE] Poller: Could not " + "register periodic task with the reactor!\n")); + return -1; + } + ACE_DEBUG ((LM_DEBUG, "[CIAO::RACE] Poller: Registered periodic " + "task with id %d.\n", this->timer_id_)); + this->active_ = true; + return 0; + } + return 1; + } + + int + Poller::stop_poller () + { + if (this->active_) + { + this->active_ = false; + return this->orb_reactor_->cancel_timer (this->timer_id_); + } + return -1; + } + + void + Poller::set_muf_initial_priority (App_String & app_string) + { + app_string.priority_ = + static_cast <int> ((10 * app_string.importance_) + + (60.0 - app_string.deadline_ / 25)); + +// ACE_DEBUG ((LM_DEBUG, "Setting the initial priority " +// "of string %s to: %d ...", +// app_string.label_.in (), +// app_string.priority_)); + + if (this->set_priority (app_string) != 0) + { + ACE_ERROR ((LM_ERROR, "Error while modifying the OS priority " + "for app-string %s\n", + app_string.label_.in ())); + } + else + { +// ACE_DEBUG ((LM_DEBUG, "done!\n")); + } + } + + + + void + Poller::set_dms_initial_priority (App_String & app_string) + { + app_string.priority_ = + static_cast <int> (80 - (app_string.deadline_ / 20)); + + ACE_DEBUG ((LM_DEBUG, "Setting the initial priority " + "of string %s to: %d ...", + app_string.label_.in (), + app_string.priority_)); + + if (this->set_priority (app_string) != 0) + { + ACE_ERROR ((LM_ERROR, "Error while modifying the OS priority " + "for app-string %s\n", + app_string.label_.in ())); + } + else + { + ACE_DEBUG ((LM_DEBUG, "done!\n")); + } + } + + int + Poller::set_priority (const App_String & app_string) + { + ::Deployment::Sched_Params params; + + params.policy_ = ACE_SCHED_FIFO; + params.priority_ = app_string.priority_; + params.scope_ = ACE_SCOPE_PROCESS; + try + { + for (size_t i = 0; i < app_string.components_.size (); ++i) + { + app_string.components_[i].node_mgr_->set_priority + (app_string.plan_id_.in (), + app_string.components_[i].id_.in (), + params); + + } + } + catch (CORBA::Exception & ex) + { + ACE_PRINT_EXCEPTION (ex, "Exception caught in " + "Poller::set_priority:"); + return -1; + } + return 0; + } + + int + Poller::register_string (App_String & string) + { + ACE_DEBUG ((LM_DEBUG, "[CIAO::RACE] Poller: entering reg string\n")); + string.id_ = + CORBA::string_dup (string.critical_path_[0].node.in ()); + this->populate_info (string); + this->set_dms_initial_priority (string); + //this->set_muf_initial_priority (string); + this->mutex_.acquire (); + { + this->strings_.push_back (string); + } + this->mutex_.release (); + + ACE_DEBUG ((LM_DEBUG, "[CIAO::RACE] Poller: leaving reg string\n")); + + return 0; + } + + void + Poller::populate_info (App_String & string) + { + ACE_DEBUG ((LM_DEBUG, "[CIAO::RACE] Poller: entering populate info\n")); + if (this->initialized_) + { + // @@ TODO: This is not the best way to implement this. Ideally, + // we may want to store the NodeManager references in a hashmap + // and look it up using its name. + for (size_t i = 0; i < string.components_.size (); ++i) + { + for (CORBA::ULong j = 0; + j < this->node_manager_seq_->length (); ++j) + { + if (ACE_OS::strcmp + (string.components_[i].node_.in (), + this->node_manager_seq_[j].host_.in ()) == 0) + { + string.components_[i].node_mgr_ = + CIAO::NodeManagerDaemon::_duplicate + (this->node_manager_seq_[j].node_mgr_); + break; + } + } + } + } + ACE_DEBUG ((LM_DEBUG, "[CIAO::RACE] Poller: leaving leaving populate info\n")); + } + + + size_t + Poller::deadline_miss_count (const Delays &delay, + CORBA::Double deadline) + { + size_t count = 0; + for (CORBA::ULong itr = 0; itr < delay.length (); ++itr) + { + if (delay [itr] > deadline) + { + count ++; + } + } + return count; + } + + void + Poller::dump_delays (const Delays &delay) + { + + for (CORBA::ULong itr = 0; itr < delay.length (); ++itr) + { + ACE_DEBUG ((LM_DEBUG, "%d\n", delay [itr])); + } + } + + int + Poller::select_task () + { + int index = -1; + double deadline = INT_MAX; + + for (size_t i = 0; i < this->strings_.size (); ++i) + { + if (this->strings_ [i].importance_ == 0) + { + if (this->strings_ [i].deadline_ < deadline) + { + deadline = this->strings_ [i].deadline_; + index = i; + } + } + } + return index; + } + + + void + Poller::perform_control (double g_miss_ratio, double be_miss_ratio) + { + size_t index = 0; + if (g_miss_ratio > 0) + { +// ACE_DEBUG ((LM_DEBUG, "DEADLINE MISS IN GUARANTEED CLASS!!!!\n")); + + /// Since we have deadline misses in the guaranteed class, + /// demote any best effort tasks that were promoted to the + /// guaranteed class. + if (!this->stack_.is_empty ()) + { + this->stack_.pop (index); + + /// Right now, if a task has an importance value of 5, then + /// it is scheduled in the guaranteed "priority band", and + /// scheduled in best effort "priority band" if it has an + /// importance value of 0. Therefore, demote any previously + /// promoted best effort tasks by modifying their importance + /// parameter. +// ACE_DEBUG ((LM_DEBUG, "MOVING BE TASK %s " +// "BACK TO BE CLASS\n", +// this->strings_ [index].label_.in () )); + this->strings_ [index].importance_ = 0; + this->set_muf_initial_priority (this->strings_ [index]); + } + } + else if (be_miss_ratio > 0) + { +// ACE_DEBUG ((LM_DEBUG, +// "DEADLINE MISS IN BEST EFFORT CLASS!!!!\n")); + this->N++; + + if (this->N > 5) + { + /// Since we have deadline misses in the best effort class + /// and no deadline misses in the guaranteed class for N + /// conscecutive sampling periods, promote a task from the + /// best effort class to the guaranteed class. + int ret = this->select_task (); + + if (ret != -1) + { + index = ret; + /// Right now, if a task has an importance value of + /// 5, then it is scheduled in the guaranteed + /// "priority band", and scheduled in best effort + /// priority band if it has an importance value of + /// 0. Therefore, promote a best effort task to the + /// guaranteed class by modifying its importance + /// parameter. + this->strings_ [index].importance_ = 5; + this->stack_.push (index); + this->set_muf_initial_priority (this->strings_ [index]); +// ACE_DEBUG ((LM_DEBUG, "MOVING BE TASK %s " +// "TO GUARANTEED CLASS\n", +// this->strings_ [index].label_.in () )); + /// Reset the value of N. + this->N = 0; + } + } + } + else + { + this->N = 0; + } + } + + + int + Poller::handle_timeout (const ACE_Time_Value &, + const void *) + { + try + { + size_t g_count, g_miss_count, be_count, be_miss_count; + g_count = g_miss_count = be_count = be_miss_count = 0; + /// Acquire the mutex. + this->mutex_.acquire (); + for (size_t i = 0; i < this->strings_.size (); ++i) + { + Delays_var delay = + this->monitor_->get_delays (this->strings_ [i].id_.in ()); + + + size_t miss_count = + this->deadline_miss_count (delay.in (), + this->strings_ [i].deadline_); + + if (this->strings_ [i].group_ == GUARANTEED) + { + g_count += delay->length (); + g_miss_count += miss_count; + } + else + { + be_count += delay->length (); + be_miss_count += miss_count; + } + + ACE_DEBUG ((LM_DEBUG, "%f ", + static_cast <double> (miss_count) / delay->length ())); + } + + double g_miss_ratio = g_miss_count / static_cast <double> (g_count); + double be_miss_ratio = be_miss_count / static_cast <double> (be_count); + + ACE_DEBUG ((LM_DEBUG, "%f %f\n", + g_miss_ratio, + be_miss_ratio)); + + // this->perform_control (g_miss_ratio, be_miss_ratio); + } + catch (CORBA::Exception & ex) + { + ACE_PRINT_EXCEPTION (ex, "Exception caught in Poller::handle_timeout:"); + this->mutex_.release (); + return 0; + } + this->mutex_.release (); + return 0; + + } + + } +} +#endif /* POLLER_CPP */ diff --git a/Controller/Component/Poller.h b/Controller/Component/Poller.h new file mode 100644 index 00000000000..355d80a9634 --- /dev/null +++ b/Controller/Component/Poller.h @@ -0,0 +1,98 @@ +#ifndef POLLER_H +#define POLLER_H + +#include "RACE/Monitor/Central_Monitor/MonitorC.h" +#include "TargetManager/TargetManagerExtC.h" +#include "ace/Reactor.h" +#include "ace/Event_Handler.h" +#include "ace/Time_Value.h" +#include "ace/Containers_T.h" +#include "ace/Mutex.h" +#include "common.h" + +namespace CIAO +{ + + namespace RACE + { + class Poller : public ACE_Event_Handler + { + public: + + Poller (::CIAO::TargetManagerExt_ptr TM_ptr, + ::CIAO::RACE::Execution_Time_Monitor_ptr monitor, + ACE_Reactor *reactor, + size_t interval); + + virtual ~Poller (); + + virtual void init (); + + virtual int start_poller (); + + virtual int stop_poller (); + + virtual int register_string (App_String & string); + + virtual int handle_timeout (const ACE_Time_Value &, const void *); + + protected: + virtual size_t deadline_miss_count (const Delays &delay, + CORBA::Double deadline); + + virtual void dump_delays (const Delays &delay); + + virtual void populate_info (App_String & string); + + virtual int set_priority (const App_String & app_string); + + virtual void set_dms_initial_priority (App_String & app_string); + + virtual void set_muf_initial_priority (App_String & app_string); + + virtual void perform_control (double g_miss_ratio, double be_miss_ratio); + + virtual int select_task (); + + private: + /// TM object reference. + ::CIAO::TargetManagerExt_var TM_; + + /// Reference of the central monitor. + ::CIAO::RACE::Execution_Time_Monitor_var monitor_; + + /// Pointer to the ORB's reactor. + ACE_Reactor *orb_reactor_; + + /// Sampling period. + ACE_Time_Value interval_; + + ACE_Time_Value start_time_; + + /// Is the poller active? + bool active_; + + bool initialized_; + + long timer_id_; + + /// Sequence of the object reference of all the node managers in the + /// domain (this is obtained from the TM). + CIAO::Host_NodeManager_seq_var node_manager_seq_; + + /// Vector of application strings registered with the controller. + ACE_Vector <App_String> strings_; + + /// Stack that contains the vector index of best effort task moved to + /// the guaranteed class. + ACE_Bounded_Stack <size_t> stack_; + + size_t N; + + + ACE_Mutex mutex_; + }; + } +} + +#endif /*POLLER_H */ diff --git a/Controller/Component/RACE_common.h b/Controller/Component/RACE_common.h new file mode 100644 index 00000000000..d5b9c80194d --- /dev/null +++ b/Controller/Component/RACE_common.h @@ -0,0 +1,21 @@ +#ifndef RACE_COMMON_H +#define RACE_COMMON_H + +#include "ace/Log_Msg.h" +#include "ciao/CIAO_common.h" + +#define RACE_NORMAL 4 + +#define RACE_VERBOSE 9 + +#define RACE_MIN 0 + +#define RACE_DEBUG(x,y...) \ + if (CIAO::debug_level () > x) \ + ACE_DEBUG ((LM_DEBUG, "RACE %N:%l: " y)); + +#define RACE_ERROR(x...) \ + ACE_ERROR ((LM_ERROR, "RACE %N:%l: ", x)); + + +#endif /* RACE_COMMON_H */ diff --git a/Controller/Component/common.h b/Controller/Component/common.h new file mode 100644 index 00000000000..448b961e24d --- /dev/null +++ b/Controller/Component/common.h @@ -0,0 +1,74 @@ +#ifndef COMMON_H +#define COMMON_H +#include "InterfaceC.h" +#include "ace/Vector_T.h" +#include "TargetManager/TargetManagerExtC.h" + +namespace CIAO +{ + namespace RACE + { + /** + * Application string classes. + */ + enum Group {GUARANTEED, BEST_EFFORT}; + + + struct Component_Info + { + /// Component ID. + CORBA::String_var id_; + + /// Name of the node where the component is deployed. + CORBA::String_var node_; + + /// Reference to the NodeManager where the component is running. + ::CIAO::NodeManagerDaemon_var node_mgr_; + + }; + + + struct App_String + { + /// Sstring "name". + + CORBA::String_var id_; + + /// Critical path. + Critical_Path critical_path_; + + /// Critical path deadline. + CORBA::Double deadline_; + + /// Current e-2-e execution time of the critical path. + CORBA::Double exec_time_; + + /// Plan ID obtained from the DeploymentPlan IDL. + CORBA::String_var plan_id_; + + /// Plan label obtained from the DeploymentPlan IDL. + CORBA::String_var label_; + + /// Relative importance. + CORBA::Long importance_; + + /// String class. + Group group_; + + /// OS priority at which the components of this app-string are + /// executing. + CORBA::Long priority_; + + /// ACE_Vector containing the Component_Info for all components of + /// this app_string. + ACE_Vector <Component_Info> components_; + + CORBA::Double miss_ratio_; + + CORBA::Long miss_count_; + }; + + } +} + +#endif /*COMMON_H */ diff --git a/Controller/Component/starter.cpp b/Controller/Component/starter.cpp new file mode 100644 index 00000000000..4fd4dd51d75 --- /dev/null +++ b/Controller/Component/starter.cpp @@ -0,0 +1,93 @@ +// $Id$ + +#include "ControllerC.h" +#include "ace/Get_Opt.h" + +//IOR file of the Controller +const char * ior = 0; +enum input {ERROR, START, STOP}; + +input +parse_args (int argc, char *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, "k:s"); + int c = 0; + input in = STOP; + while ((c = get_opts ()) != -1) + { + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case 's': + in = START; + break; + + case '?': // display help for use of the server. + default: + ACE_ERROR_RETURN ((LM_ERROR, "Usage: %s\n" + "-k <Controller IOR> " + "(defaults to file://Controller.ior)\n", + "-s Start the controller " + "(defaults to stop the controller)\n", + argv [0]), + ERROR); + break; + } + + } + + if (ior == 0) + { + ior = "file://Controller.ior"; + } + + return in; +} + +int +main (int argc, char *argv[]) +{ + try + { + + CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, ""); + input ret = parse_args (argc, argv); + if (ret == ERROR) + { + return -1; + } + + CORBA::Object_var obj = orb->string_to_object (ior); + + CIAO::RACE::Trigger_var trigger = + CIAO::RACE::Trigger::_narrow (obj.in ()); + + if (CORBA::is_nil (trigger.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, + "Unable to acquire Controller's objref\n"), + -1); + } + + if (ret == START) + { + trigger->start_controller (); + } + else + { + trigger->stop_controller (); + } + orb->destroy (); + } + + catch (CORBA::Exception & ex) + { + ACE_PRINT_EXCEPTION (ex, + "Unknown exception \n"); + return -1; + } + return 0; +} diff --git a/Input_Adapters/Base/Input_Adapter.idl b/Input_Adapters/Base/Input_Adapter.idl new file mode 100644 index 00000000000..7691b5fe892 --- /dev/null +++ b/Input_Adapters/Base/Input_Adapter.idl @@ -0,0 +1,21 @@ +//Input_Adapter.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +//Input_Adapter.idl + +#ifndef RACE_INPUT_ADAPTER_IDL +#define RACE_INPUT_ADAPTER_IDL + +#include <Components.idl> +#include "RACE/Plan_Analyzer/Interface/PlanIngress.idl" + +module CIAO +{ + module RACE + { + component Input_Adapter + { + uses PlanIngress ingress; + }; + }; +}; + +#endif /* RACE_INPUT_ADAPTER_IDL */ diff --git a/Input_Adapters/Base/Input_Adapter.mpc b/Input_Adapters/Base/Input_Adapter.mpc new file mode 100644 index 00000000000..abf47f7b1d9 --- /dev/null +++ b/Input_Adapters/Base/Input_Adapter.mpc @@ -0,0 +1,61 @@ +// Input_Adapter.mpc,v 1.2 2005/09/19 15:55:49 wotte Exp +// This file is generated with "generate_component_mpc.pl -n Input_Adapter" + +project(Input_Adapter_stub): ciao_deployment_stub, ciao_race_component { + + after += Plan_Analyzer_Interface_stub + sharedname = Input_Adapter_stub + idlflags += -Sc \ + -Wb,stub_export_macro=INPUT_ADAPTER_STUB_Export \ + -Wb,stub_export_include=Input_Adapter_stub_export.h \ + -Wb,skel_export_macro=INPUT_ADAPTER_SVNT_Export \ + -Wb,skel_export_include=Input_Adapter_svnt_export.h + dynamicflags = INPUT_ADAPTER_STUB_BUILD_DLL + libs += Plan_Analyzer_Interface_stub + + IDL_Files { + Input_Adapter.idl + } + + Source_Files { + Input_AdapterC.cpp + } + + Header_Files { + Input_AdapterC.h + } + + Inline_Files { + Input_AdapterC.inl + } +} + +project(Input_Adapter_svnt) : ciao_servant_dnc, ciao_race_component { + + after += Input_Adapter_stub + sharedname = Input_Adapter_svnt + libs += Input_Adapter_stub Plan_Analyzer_Interface_stub + + idlflags += -Sc \ + -Wb,stub_export_macro=INPUT_ADAPTER_STUB_Export \ + -Wb,stub_export_include=Input_Adapter_stub_export.h \ + -Wb,skel_export_macro=INPUT_ADAPTER_SVNT_Export \ + -Wb,skel_export_include=Input_Adapter_svnt_export.h + dynamicflags = INPUT_ADAPTER_SVNT_BUILD_DLL + + IDL_Files { + Input_Adapter.idl + } + + Source_Files { + Input_AdapterS.cpp + } + + Header_Files { + Input_AdapterS.h + } + + Inline_Files { + Input_AdapterS.inl + } +} diff --git a/Input_Adapters/Base/Input_Adapter_stub_export.h b/Input_Adapters/Base/Input_Adapter_stub_export.h new file mode 100644 index 00000000000..50c265fc981 --- /dev/null +++ b/Input_Adapters/Base/Input_Adapter_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Input_Adapter_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl INPUT_ADAPTER_STUB +// ------------------------------ +#ifndef INPUT_ADAPTER_STUB_EXPORT_H +#define INPUT_ADAPTER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (INPUT_ADAPTER_STUB_HAS_DLL) +# define INPUT_ADAPTER_STUB_HAS_DLL 1 +#endif /* ! INPUT_ADAPTER_STUB_HAS_DLL */ + +#if defined (INPUT_ADAPTER_STUB_HAS_DLL) && (INPUT_ADAPTER_STUB_HAS_DLL == 1) +# if defined (INPUT_ADAPTER_STUB_BUILD_DLL) +# define INPUT_ADAPTER_STUB_Export ACE_Proper_Export_Flag +# define INPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define INPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* INPUT_ADAPTER_STUB_BUILD_DLL */ +# define INPUT_ADAPTER_STUB_Export ACE_Proper_Import_Flag +# define INPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define INPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* INPUT_ADAPTER_STUB_BUILD_DLL */ +#else /* INPUT_ADAPTER_STUB_HAS_DLL == 1 */ +# define INPUT_ADAPTER_STUB_Export +# define INPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) +# define INPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* INPUT_ADAPTER_STUB_HAS_DLL == 1 */ + +// Set INPUT_ADAPTER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (INPUT_ADAPTER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define INPUT_ADAPTER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define INPUT_ADAPTER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !INPUT_ADAPTER_STUB_NTRACE */ + +#if (INPUT_ADAPTER_STUB_NTRACE == 1) +# define INPUT_ADAPTER_STUB_TRACE(X) +#else /* (INPUT_ADAPTER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define INPUT_ADAPTER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (INPUT_ADAPTER_STUB_NTRACE == 1) */ + +#endif /* INPUT_ADAPTER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Input_Adapters/Base/Input_Adapter_svnt_export.h b/Input_Adapters/Base/Input_Adapter_svnt_export.h new file mode 100644 index 00000000000..cc7accb200c --- /dev/null +++ b/Input_Adapters/Base/Input_Adapter_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Input_Adapter_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl INPUT_ADAPTER_SVNT +// ------------------------------ +#ifndef INPUT_ADAPTER_SVNT_EXPORT_H +#define INPUT_ADAPTER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (INPUT_ADAPTER_SVNT_HAS_DLL) +# define INPUT_ADAPTER_SVNT_HAS_DLL 1 +#endif /* ! INPUT_ADAPTER_SVNT_HAS_DLL */ + +#if defined (INPUT_ADAPTER_SVNT_HAS_DLL) && (INPUT_ADAPTER_SVNT_HAS_DLL == 1) +# if defined (INPUT_ADAPTER_SVNT_BUILD_DLL) +# define INPUT_ADAPTER_SVNT_Export ACE_Proper_Export_Flag +# define INPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define INPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* INPUT_ADAPTER_SVNT_BUILD_DLL */ +# define INPUT_ADAPTER_SVNT_Export ACE_Proper_Import_Flag +# define INPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define INPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* INPUT_ADAPTER_SVNT_BUILD_DLL */ +#else /* INPUT_ADAPTER_SVNT_HAS_DLL == 1 */ +# define INPUT_ADAPTER_SVNT_Export +# define INPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) +# define INPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* INPUT_ADAPTER_SVNT_HAS_DLL == 1 */ + +// Set INPUT_ADAPTER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (INPUT_ADAPTER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define INPUT_ADAPTER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define INPUT_ADAPTER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !INPUT_ADAPTER_SVNT_NTRACE */ + +#if (INPUT_ADAPTER_SVNT_NTRACE == 1) +# define INPUT_ADAPTER_SVNT_TRACE(X) +#else /* (INPUT_ADAPTER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define INPUT_ADAPTER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (INPUT_ADAPTER_SVNT_NTRACE == 1) */ + +#endif /* INPUT_ADAPTER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Input_Adapters/Interactive_Input_Adapter/Injector.cpp b/Input_Adapters/Interactive_Input_Adapter/Injector.cpp new file mode 100644 index 00000000000..a933b565008 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Injector.cpp @@ -0,0 +1,178 @@ +/** + * @file Injector.cpp + * @author Will Otte <wotte@dre.vanderbilt.edu> + */ + +#include "Input_Adapters/Interactive_Input_Adapter/Interactive_Input_AdapterC.h" +#include "ace/OS.h" +#include "ace/Get_Opt.h" +#include "ace/SString.h" +#include "orbsvcs/CosNamingC.h" +#include "ace/Auto_Ptr.h" + +namespace CIAO +{ + namespace RACE + { + namespace Injector + { + const char *package_uri = 0; + const char *plan_uri = 0; + const char *iia_ior_file = 0; + const char *iia_name = "RACE::InteractiveInput"; + + bool teardown = false; + + static void + usage (const ACE_TCHAR* program) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Usage %s\n") + ACE_TEXT ("-d <Flatten deployment plan URI>\n") + ACE_TEXT ("-p <Toplevel Package URI>\n") + ACE_TEXT ("-t <Teardown plan>\n") + ACE_TEXT ("-k <Interactive_Input_Adaptor IOR, " + "use naming service if not present\n"), + program)); + } + + static bool + parse_args (int argc, + ACE_TCHAR *argv[]) + { + ACE_Get_Opt get_opt (argc, + argv, + ACE_TEXT ("d:p:k:thn:")); + int c; + + while ((c = get_opt ()) != EOF) + { + switch (c) + { + case 'd': + plan_uri = get_opt.opt_arg (); + break; + + case 'p': + package_uri = get_opt.opt_arg (); + break; + + case 'k': + iia_ior_file = get_opt.opt_arg (); + break; + + case 't': + teardown = true; + break; + + case 'n': + iia_name = get_opt.opt_arg (); + + case 'h': + default: + usage (argv[0]); + return false; + } + } + + return true; + } + + CORBA::Object_ptr + fetch_reference_naming (CORBA::ORB_ptr orb, + const ACE_CString &name) + { + ACE_ERROR ((LM_ERROR, "Resolving via nameservice...\n")); + using namespace CosNaming; + // Resolve naming service + CORBA::Object_var tmp = + orb->resolve_initial_references ("NameService"); + + NamingContext_var pns = + NamingContext::_narrow (tmp.in ()); + + Name ns_name; + CORBA::ULong i = 0; + + ACE_Tokenizer tok ( name.rep ()); + tok.delimiter_replace (':', 0); + tok.delimiter_replace ('/', 0); + + char *name_element = 0; + while ((name_element = tok.next ()) != 0) + { + ns_name.length (ns_name.length () + 1); + ns_name[i].id = CORBA::string_dup (name_element); + ++i; + } + + + return pns->resolve (ns_name); + } + + static int + run_main_implementation (int argc, ACE_TCHAR *argv[]) + { + try + { + CORBA::ORB_var orb = + CORBA::ORB_init (argc, argv, ""); + + if (!parse_args (argc, argv)) + return -1; + + + // Resolve our input adapter... + CORBA::Object_var tmp; + + if (iia_ior_file != 0) + tmp = orb->string_to_object (iia_ior_file); + else // must be a name.... + tmp = fetch_reference_naming (orb.in (), iia_name); + + CIAO::RACE::Interactive_Input_Adapter_var iia + = CIAO::RACE::Interactive_Input_Adapter::_narrow (tmp.in ()); + + // Create deploy input event. + CIAO::RACE::Deploy_Input_var input = + new OBV_CIAO::RACE::Deploy_Input; + + input->plan_uri (plan_uri); + input->package_uri (package_uri); + + if (teardown) + { + input->command (::CIAO::RACE::TEARDOWN); + } + else + { + input->command (::CIAO::RACE::DEPLOY); + } + + + + // Get the consumer for the IIA + ::CIAO::RACE::Deploy_InputConsumer_var consumer = + iia->get_consumer_deployment (); + + // push the event + consumer->push_Deploy_Input (input.in ()); + + } + catch (...) + { + ACE_ERROR ((LM_ERROR, + "(%P|%t) Injector: Unknown exception\n")); + return -1; + } + + return 0; + } + } + } +} + +int main (int argc, ACE_TCHAR **argv) +{ + return CIAO::RACE::Injector::run_main_implementation (argc, argv); +} diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.cidl b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.cidl new file mode 100644 index 00000000000..45bb4107793 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.cidl @@ -0,0 +1,22 @@ +#ifndef RACE_INTERACTIVE_INPUT_ADAPTER_CIDL +#define RACE_INTERACTIVE_INPUT_ADAPTER_CIDL + +#include "Interactive_Input_Adapter.idl" + +module CIAO +{ + module RACE + { + composition session Interactive_Input_Adapter_Impl + { + home executor Interactive_Input_Adapter_Home_Exec + { + implements RACE::Interactive_Input_Adapter_Home; + manages Interactive_Input_Adapter_Exec; + }; + }; + }; +}; + + +#endif /* RACE_INTERACTIVE_INPUT_ADAPTER_CIDL */ diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.idl b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.idl new file mode 100644 index 00000000000..289a2cfab08 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.idl @@ -0,0 +1,31 @@ +//Interactive_Input_Adapter.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_INTERACTIVE_INPUT_ADAPTER_IDL +#define RACE_INTERACTIVE_INPUT_ADAPTER_IDL + +#include <Components.idl> +#include "RACE/Input_Adapters/Base/Input_Adapter.idl" +#include "RACE/common/RACE_common.idl" + +module CIAO +{ + module RACE + { + eventtype Deploy_Input + { + public string plan_uri; + public string package_uri; + public Action command; + }; + + component Interactive_Input_Adapter : Input_Adapter + { + consumes Deploy_Input deployment; + }; + + home Interactive_Input_Adapter_Home manages Interactive_Input_Adapter + { + }; + }; +}; + +#endif /* RACE_INTERACTIVE_INPUT_ADAPTER_IDL */ diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.mpc b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.mpc new file mode 100644 index 00000000000..0b502e74c76 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter.mpc @@ -0,0 +1,109 @@ +project(Interactive_Input_Adapter_stub): ciao_deployment_stub, ciao_race_component { + after += Input_Adapter_stub + sharedname = Interactive_Input_Adapter_stub + idlflags += -Sc \ + -Wb,stub_export_macro=INTERACTIVE_INPUT_ADAPTER_STUB_Export \ + -Wb,stub_export_include=Interactive_Input_Adapter_stub_export.h \ + -Wb,skel_export_macro=INTERACTIVE_INPUT_ADAPTER_SVNT_Export \ + -Wb,skel_export_include=Interactive_Input_Adapter_svnt_export.h + dynamicflags = INTERACTIVE_INPUT_ADAPTER_STUB_BUILD_DLL + libs += Input_Adapter_stub \ + Plan_Analyzer_Interface_stub + + IDL_Files { + Interactive_Input_Adapter.idl + } + + Source_Files { + Interactive_Input_AdapterC.cpp + } + + Header_Files { + Interactive_Input_AdapterC.h + } + + Inline_Files { + Interactive_Input_AdapterC.inl + } +} + +project(Interactive_Input_Adapter_svnt) : ciao_servant_dnc, ciao_race_component { + after += Interactive_Input_Adapter_stub \ + Input_Adapter_svnt + sharedname = Interactive_Input_Adapter_svnt + libs += Interactive_Input_Adapter_stub \ + Input_Adapter_stub \ + Input_Adapter_svnt \ + Plan_Analyzer_Interface_stub + + idlflags += -Sc \ + -Wb,export_macro=INTERACTIVE_INPUT_ADAPTER_SVNT_Export \ + -Wb,export_include=Interactive_Input_Adapter_svnt_export.h + + dynamicflags = INTERACTIVE_INPUT_ADAPTER_SVNT_BUILD_DLL + + CIDL_Files { + Interactive_Input_Adapter.cidl + } + + IDL_Files { + Interactive_Input_AdapterE.idl + } + + Source_Files { + Interactive_Input_AdapterEC.cpp + Interactive_Input_AdapterS.cpp + Interactive_Input_Adapter_svnt.cpp + } + + Header_Files { + Interactive_Input_AdapterEC.h + Interactive_Input_AdapterS.h + Interactive_Input_Adapter_svnt.h + } + + Inline_Files { + Interactive_Input_AdapterEC.inl + Interactive_Input_AdapterS.inl + Interactive_Input_Adapter_svnt.inl + } +} + + +project(Interactive_Input_Adapter_exec) : ciao_component_dnc, ciao_config_handlers, ciao_race_component { + after += Interactive_Input_Adapter_svnt XSC_Config_Handlers + sharedname = Interactive_Input_Adapter_exec + libs += Interactive_Input_Adapter_stub \ + Interactive_Input_Adapter_svnt \ + Input_Adapter_stub \ + Input_Adapter_svnt \ + Plan_Analyzer_Interface_stub \ + + idlflags += -Sc \ + -Wb,export_macro=INTERACTIVE_INPUT_ADAPTER_EXEC_Export \ + -Wb,export_include=Interactive_Input_Adapter_exec_export.h + dynamicflags = INTERACTIVE_INPUT_ADAPTER_EXEC_BUILD_DLL + + IDL_Files { + + } + + Source_Files { + Interactive_Input_Adapter_exec.cpp + } +} + +project(Injector) : ciao_component_dnc, ciao_race_component, taoexe { + after += Interactive_Input_Adapter_exec + exename = injector + libs += Interactive_Input_Adapter_stub \ + Input_Adapter_stub \ + Plan_Analyzer_Interface_stub + + + IDL_Files { + } + Source_Files { + Injector.cpp + } +} diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec.cpp b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec.cpp new file mode 100644 index 00000000000..faabbf88c12 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec.cpp @@ -0,0 +1,242 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "Interactive_Input_Adapter_exec.h" +#include "ciao/CIAO_common.h" +#include "Config_Handlers/XML_File_Intf.h" +#include "Config_Handlers/Package_Handlers/PCD_Handler.h" +#include "Config_Handlers/Common.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Interactive_Input_Adapter_Impl + { + //================================================================== + // Component Executor Implementation Class: + // Interactive_Input_Adapter_exec_i + //================================================================== + + Interactive_Input_Adapter_exec_i::Interactive_Input_Adapter_exec_i (void) + { + } + + Interactive_Input_Adapter_exec_i::~Interactive_Input_Adapter_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + void + Interactive_Input_Adapter_exec_i::push_deployment ( + ::CIAO::RACE::Deploy_Input * ev + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + try + { + ACE_Auto_Ptr < ::Deployment::DeploymentPlan > dp; + ACE_Auto_Ptr < ::Deployment::PackageConfiguration > pcd; + + if (ev->plan_uri () != 0) + { + ACE_DEBUG ((LM_DEBUG, "Opening the plan\n")); + + Config_Handlers::XML_File_Intf xfi (ev->plan_uri ()); + + dp.reset ( xfi.get_plan ()); + } + else + { + dp.reset ( new ::Deployment::DeploymentPlan ); + } + + + pcd.reset (new ::Deployment::PackageConfiguration); + + if ((ACE_OS::strcmp (ev->package_uri (), "") != 0)) + { + ACE_DEBUG ((LM_DEBUG, "Opening the package descriptor: :%s:\n", + ev->package_uri ())); + Config_Handlers::Packaging::PCD_Handler::package_config + (ev->package_uri (), *pcd); + } + + ::CIAO::RACE::Plan_Actions plan_action_seq; + + /// Create a Plan_Action_seq structure of length 1. + plan_action_seq.length (1); + + /// Now populate the Plan_Action_seq structure. + plan_action_seq [0].command = ev->command (); + plan_action_seq [0].plan = *dp; + plan_action_seq [0].package = *pcd; + + /// Now invoke the plan_analyzer. + this->context_->get_connection_ingress () + ->analyze_plan (plan_action_seq); + } + catch (CIAO::Config_Handlers::Config_Error &ex) + { + ACE_ERROR ((LM_ERROR, "Config_Error exception caught in " + "Interactive_Input_Adapter::push_deployment: %s, %s\n", + ex.error_.c_str (), + ex.name_.c_str ())); + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Exception caught in push_deployment\n")); + } + } + + // Operations from Components::SessionComponent + + void + Interactive_Input_Adapter_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + this->context_ = + Interactive_Input_Adapter_Context::_narrow ( + ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (this->context_ == 0) + { + ACE_THROW (CORBA::INTERNAL ()); + } + } + + void + Interactive_Input_Adapter_exec_i::ciao_preactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Interactive_Input_Adapter_exec_i::ciao_postactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Interactive_Input_Adapter_exec_i::ccm_activate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Interactive_Input_Adapter_exec_i::ccm_passivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Interactive_Input_Adapter_exec_i::ccm_remove ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: Interactive_Input_Adapter_Home_exec_i + //================================================================== + + Interactive_Input_Adapter_Home_exec_i::Interactive_Input_Adapter_Home_exec_i (void) + { + } + + Interactive_Input_Adapter_Home_exec_i::~Interactive_Input_Adapter_Home_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + Interactive_Input_Adapter_Home_exec_i::create ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + Interactive_Input_Adapter_exec_i, + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" INTERACTIVE_INPUT_ADAPTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Interactive_Input_Adapter_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + Interactive_Input_Adapter_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } + } + } +} diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec.h b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec.h new file mode 100644 index 00000000000..21e12cedad9 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec.h @@ -0,0 +1,145 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_INTERACTIVE_INPUT_ADAPTER_EXEC_H +#define CIAO_INTERACTIVE_INPUT_ADAPTER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "Interactive_Input_Adapter_svnt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "Interactive_Input_Adapter_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Interactive_Input_Adapter_Impl + { + class INTERACTIVE_INPUT_ADAPTER_EXEC_Export Interactive_Input_Adapter_exec_i + : public virtual Interactive_Input_Adapter_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Interactive_Input_Adapter_exec_i (void); + virtual ~Interactive_Input_Adapter_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + virtual void + push_deployment ( + ::CIAO::RACE::Deploy_Input *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 + ciao_postactivate ( + 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 + 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: + Interactive_Input_Adapter_Context *context_; + }; + + class INTERACTIVE_INPUT_ADAPTER_EXEC_Export Interactive_Input_Adapter_Home_exec_i + : public virtual Interactive_Input_Adapter_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Interactive_Input_Adapter_Home_exec_i (void); + virtual ~Interactive_Input_Adapter_Home_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)); + }; + + extern "C" INTERACTIVE_INPUT_ADAPTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Interactive_Input_Adapter_Home_Impl (void); + } + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_INTERACTIVE_INPUT_ADAPTER_EXEC_H */ + diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec_export.h b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec_export.h new file mode 100644 index 00000000000..75c8e0d1a19 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Interactive_Input_Adapter_exec_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl INTERACTIVE_INPUT_ADAPTER_EXEC +// ------------------------------ +#ifndef INTERACTIVE_INPUT_ADAPTER_EXEC_EXPORT_H +#define INTERACTIVE_INPUT_ADAPTER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (INTERACTIVE_INPUT_ADAPTER_EXEC_HAS_DLL) +# define INTERACTIVE_INPUT_ADAPTER_EXEC_HAS_DLL 1 +#endif /* ! INTERACTIVE_INPUT_ADAPTER_EXEC_HAS_DLL */ + +#if defined (INTERACTIVE_INPUT_ADAPTER_EXEC_HAS_DLL) && (INTERACTIVE_INPUT_ADAPTER_EXEC_HAS_DLL == 1) +# if defined (INTERACTIVE_INPUT_ADAPTER_EXEC_BUILD_DLL) +# define INTERACTIVE_INPUT_ADAPTER_EXEC_Export ACE_Proper_Export_Flag +# define INTERACTIVE_INPUT_ADAPTER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define INTERACTIVE_INPUT_ADAPTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* INTERACTIVE_INPUT_ADAPTER_EXEC_BUILD_DLL */ +# define INTERACTIVE_INPUT_ADAPTER_EXEC_Export ACE_Proper_Import_Flag +# define INTERACTIVE_INPUT_ADAPTER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define INTERACTIVE_INPUT_ADAPTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* INTERACTIVE_INPUT_ADAPTER_EXEC_BUILD_DLL */ +#else /* INTERACTIVE_INPUT_ADAPTER_EXEC_HAS_DLL == 1 */ +# define INTERACTIVE_INPUT_ADAPTER_EXEC_Export +# define INTERACTIVE_INPUT_ADAPTER_EXEC_SINGLETON_DECLARATION(T) +# define INTERACTIVE_INPUT_ADAPTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* INTERACTIVE_INPUT_ADAPTER_EXEC_HAS_DLL == 1 */ + +// Set INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE */ + +#if (INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE == 1) +# define INTERACTIVE_INPUT_ADAPTER_EXEC_TRACE(X) +#else /* (INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define INTERACTIVE_INPUT_ADAPTER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (INTERACTIVE_INPUT_ADAPTER_EXEC_NTRACE == 1) */ + +#endif /* INTERACTIVE_INPUT_ADAPTER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_stub_export.h b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_stub_export.h new file mode 100644 index 00000000000..ab7b2b11eb1 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Interactive_Input_Adapter_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl INTERACTIVE_INPUT_ADAPTER_STUB +// ------------------------------ +#ifndef INTERACTIVE_INPUT_ADAPTER_STUB_EXPORT_H +#define INTERACTIVE_INPUT_ADAPTER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (INTERACTIVE_INPUT_ADAPTER_STUB_HAS_DLL) +# define INTERACTIVE_INPUT_ADAPTER_STUB_HAS_DLL 1 +#endif /* ! INTERACTIVE_INPUT_ADAPTER_STUB_HAS_DLL */ + +#if defined (INTERACTIVE_INPUT_ADAPTER_STUB_HAS_DLL) && (INTERACTIVE_INPUT_ADAPTER_STUB_HAS_DLL == 1) +# if defined (INTERACTIVE_INPUT_ADAPTER_STUB_BUILD_DLL) +# define INTERACTIVE_INPUT_ADAPTER_STUB_Export ACE_Proper_Export_Flag +# define INTERACTIVE_INPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define INTERACTIVE_INPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* INTERACTIVE_INPUT_ADAPTER_STUB_BUILD_DLL */ +# define INTERACTIVE_INPUT_ADAPTER_STUB_Export ACE_Proper_Import_Flag +# define INTERACTIVE_INPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define INTERACTIVE_INPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* INTERACTIVE_INPUT_ADAPTER_STUB_BUILD_DLL */ +#else /* INTERACTIVE_INPUT_ADAPTER_STUB_HAS_DLL == 1 */ +# define INTERACTIVE_INPUT_ADAPTER_STUB_Export +# define INTERACTIVE_INPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) +# define INTERACTIVE_INPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* INTERACTIVE_INPUT_ADAPTER_STUB_HAS_DLL == 1 */ + +// Set INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE */ + +#if (INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE == 1) +# define INTERACTIVE_INPUT_ADAPTER_STUB_TRACE(X) +#else /* (INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define INTERACTIVE_INPUT_ADAPTER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (INTERACTIVE_INPUT_ADAPTER_STUB_NTRACE == 1) */ + +#endif /* INTERACTIVE_INPUT_ADAPTER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_svnt_export.h b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_svnt_export.h new file mode 100644 index 00000000000..7a910391807 --- /dev/null +++ b/Input_Adapters/Interactive_Input_Adapter/Interactive_Input_Adapter_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Interactive_Input_Adapter_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl INTERACTIVE_INPUT_ADAPTER_SVNT +// ------------------------------ +#ifndef INTERACTIVE_INPUT_ADAPTER_SVNT_EXPORT_H +#define INTERACTIVE_INPUT_ADAPTER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (INTERACTIVE_INPUT_ADAPTER_SVNT_HAS_DLL) +# define INTERACTIVE_INPUT_ADAPTER_SVNT_HAS_DLL 1 +#endif /* ! INTERACTIVE_INPUT_ADAPTER_SVNT_HAS_DLL */ + +#if defined (INTERACTIVE_INPUT_ADAPTER_SVNT_HAS_DLL) && (INTERACTIVE_INPUT_ADAPTER_SVNT_HAS_DLL == 1) +# if defined (INTERACTIVE_INPUT_ADAPTER_SVNT_BUILD_DLL) +# define INTERACTIVE_INPUT_ADAPTER_SVNT_Export ACE_Proper_Export_Flag +# define INTERACTIVE_INPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define INTERACTIVE_INPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* INTERACTIVE_INPUT_ADAPTER_SVNT_BUILD_DLL */ +# define INTERACTIVE_INPUT_ADAPTER_SVNT_Export ACE_Proper_Import_Flag +# define INTERACTIVE_INPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define INTERACTIVE_INPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* INTERACTIVE_INPUT_ADAPTER_SVNT_BUILD_DLL */ +#else /* INTERACTIVE_INPUT_ADAPTER_SVNT_HAS_DLL == 1 */ +# define INTERACTIVE_INPUT_ADAPTER_SVNT_Export +# define INTERACTIVE_INPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) +# define INTERACTIVE_INPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* INTERACTIVE_INPUT_ADAPTER_SVNT_HAS_DLL == 1 */ + +// Set INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE */ + +#if (INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE == 1) +# define INTERACTIVE_INPUT_ADAPTER_SVNT_TRACE(X) +#else /* (INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define INTERACTIVE_INPUT_ADAPTER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (INTERACTIVE_INPUT_ADAPTER_SVNT_NTRACE == 1) */ + +#endif /* INTERACTIVE_INPUT_ADAPTER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Monitor/Central_Monitor/Monitor.cidl b/Monitor/Central_Monitor/Monitor.cidl new file mode 100644 index 00000000000..c2378e25483 --- /dev/null +++ b/Monitor/Central_Monitor/Monitor.cidl @@ -0,0 +1,21 @@ +#ifndef RACE_MONITOR_CIDL +#define RACE_MONITOR_CIDL + +#include "Monitor.idl" + + +module CIAO +{ + module RACE + { + composition session Central_Monitor_Impl + { + home executor Central_Monitor_Home_Exec + { + implements Central_Monitor_Home; + manages Central_Monitor_Exec; + }; + }; + }; +}; +#endif /* RACE_MONITOR_CIDL */ diff --git a/Monitor/Central_Monitor/Monitor.cpp b/Monitor/Central_Monitor/Monitor.cpp new file mode 100644 index 00000000000..13de56c6f90 --- /dev/null +++ b/Monitor/Central_Monitor/Monitor.cpp @@ -0,0 +1,104 @@ +#include "Monitor.h" + +namespace CIAO +{ + namespace RACE + { + + + Monitor_i::Monitor_i () + { + } + + Monitor_i::~Monitor_i () + { + } + + void + Monitor_i::push_delays (const char * id, + const Delays & delay) + throw (CORBA::SystemException) + { + ACE_DEBUG ((LM_DEBUG, "Trying to register e-2-e execution times " + "for %s\n", id)); + + switch (this->delay_map_.bind (id, delay)) + { + /// Created new entry for id. + case 0: + { + + ACE_DEBUG ((LM_DEBUG, "New entry created in the table.\n")); + break; + } + + /// id has been already registered. Therefore, update the contents. + case 1: + { + ACE_DEBUG ((LM_DEBUG, "Existing entry found in the table." + "Updating the contents....")); + /// Retrieve the existing entry from the table. + Delays prev_entry; + this->delay_map_.find (id, prev_entry); + + /// "Merge" the existing entry and the new enty and store it + /// back intro the table. + CORBA::ULong prev_len = prev_entry.length (); + prev_entry.length (prev_len + delay.length ()); + for (CORBA::ULong itr = prev_len; + itr < prev_entry.length (); + ++itr) + { + prev_entry [itr] = delay [itr - prev_len]; + } + + if (this->delay_map_.rebind (id, prev_entry) == -1) + { + ACE_ERROR ((LM_ERROR, + "ERROR while updating the contents.\n")); + break; + } + + ACE_DEBUG ((LM_DEBUG, "done!\n")); + break; + } + + + /// This should never happen! -- Unknown error while accessing + /// the table. + default: + { + + ACE_ERROR ((LM_ERROR, "Unknown error while registering e-2-e " + "execution times for %s\n.", id)); + break; + } + + } + return; + } + + Delays * + Monitor_i::get_delays (const char * id) + throw (::CORBA::SystemException, ::CIAO::RACE::Monitor::IdNotFound) + { + Delays temp_delay; + ACE_DEBUG ((LM_DEBUG, "Searching the table for %s...", id)); + if (this->delay_map_.find (id, temp_delay) != 0) + { + ACE_DEBUG ((LM_DEBUG, "Oops! No entry found!\n")); + throw ::CIAO::RACE::Monitor::IdNotFound (); + } + ACE_DEBUG ((LM_DEBUG, "done! Entry found and returned!\n")); + + /// Remove the entry for id from the table. + this->delay_map_.unbind (id); + + /// Return the delays associated with id. + Delays_var ret (temp_delay); + return ret._retn (); + } + + + }; +}; diff --git a/Monitor/Central_Monitor/Monitor.h b/Monitor/Central_Monitor/Monitor.h new file mode 100644 index 00000000000..f9e9d8e3cfd --- /dev/null +++ b/Monitor/Central_Monitor/Monitor.h @@ -0,0 +1,35 @@ +#ifndef MONITOR_H +#define MONITOR_H + +#include "MonitorS.h" +#include "ace/Map_Manager.h" +#include "ace/SString.h" + +namespace CIAO +{ + namespace RACE + { + + /// Implement the CIAO::RACE::Monitor interface + class Monitor_i : public virtual POA_CIAO::RACE::Monitor + { + public: + /// Constructor + Monitor_i (); + + ~Monitor_i (); + // = The skel eton methods + virtual void push_delays (const char * id, + const Delays & delay) + throw (CORBA::SystemException); + + virtual Delays * get_delays (const char * id) + throw (::CORBA::SystemException, ::CIAO::RACE::Monitor::IdNotFound); + + private: + ACE_Map_Manager <ACE_TString, Delays, ACE_Thread_Mutex> delay_map_; + }; + } +} + +#endif /* MONITOR_H */ diff --git a/Monitor/Central_Monitor/Monitor.idl b/Monitor/Central_Monitor/Monitor.idl new file mode 100644 index 00000000000..983027a77f5 --- /dev/null +++ b/Monitor/Central_Monitor/Monitor.idl @@ -0,0 +1,37 @@ +#ifndef RACE_MONITOR_IDL +#define RACE_MONITOR_IDL + +#include <Components.idl> + +module CIAO +{ + module RACE + { + typedef sequence<long> Delays; + + interface Execution_Time_Monitor + { + exception IdNotFound + { + }; + + oneway void push_delays (in string id, in Delays delay); + + Delays get_delays (in string id) raises (IdNotFound); + }; + + component Central_Monitor + { + provides Execution_Time_Monitor Monitor; + }; + + + home Central_Monitor_Home manages Central_Monitor + { + }; + + }; + +}; + +#endif /*RACE_MONITOR_IDL*/ diff --git a/Monitor/Central_Monitor/Monitor.mpc b/Monitor/Central_Monitor/Monitor.mpc new file mode 100644 index 00000000000..3e3971cb271 --- /dev/null +++ b/Monitor/Central_Monitor/Monitor.mpc @@ -0,0 +1,65 @@ +project(Monitor_stub): ciao_client_dnc { + + sharedname = Monitor_stub + idlflags += -Wb,stub_export_macro=MONITOR_STUB_Export \ + -Wb,stub_export_include=Monitor_stub_export.h \ + -Wb,skel_export_macro=MONITOR_SVNT_Export \ + -Wb,skel_export_include=Monitor_svnt_export.h + dynamicflags = MONITOR_STUB_BUILD_DLL + + IDL_Files { + Monitor.idl + } + + Source_Files { + MonitorC.cpp + } +} + +project(Monitor_svnt) : ciao_servant_dnc { + after += Monitor_stub + sharedname = Monitor_svnt + libs += Monitor_stub + + idlflags += -Wb,export_macro=MONITOR_SVNT_Export \ + -Wb,export_include=Monitor_svnt_export.h + dynamicflags = MONITOR_SVNT_BUILD_DLL + +// cidlflags -= -- + +// cidlflags += -gen-exec-impl -- + + CIDL_Files { + Monitor.cidl + } + + IDL_Files { + MonitorE.idl + } + + Source_Files { + MonitorEC.cpp + MonitorS.cpp + Monitor_svnt.cpp + } +} + + +project(Monitor_exec) : ciao_component_dnc { + after += Monitor_svnt + sharedname = Monitor_exec + libs += Monitor_stub Monitor_svnt + + idlflags += -Wb,export_macro=MONITOR_EXEC_Export \ + -Wb,export_include=Monitor_exec_export.h + dynamicflags = MONITOR_EXEC_BUILD_DLL + + IDL_Files { + + } + + Source_Files { + + Monitor_exec.cpp + } +} diff --git a/Monitor/Central_Monitor/Monitor_exec.cpp b/Monitor/Central_Monitor/Monitor_exec.cpp new file mode 100644 index 00000000000..8e6f5b4403e --- /dev/null +++ b/Monitor/Central_Monitor/Monitor_exec.cpp @@ -0,0 +1,219 @@ +#include "Monitor_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Central_Monitor_Impl + { + Execution_Time_Monitor_exec_i::Execution_Time_Monitor_exec_i () + :MAX_BUFFER_SIZE (BUFSIZ) + { + } + + Execution_Time_Monitor_exec_i::~Execution_Time_Monitor_exec_i () + { + } + + + void + Execution_Time_Monitor_exec_i::push_delays (const char * id, + const Delays & delay) + throw (CORBA::SystemException) + { +// ACE_DEBUG ((LM_DEBUG, "Trying to register e-2-e execution times " +// "for %s\n", id)); + + switch (this->delay_map_.bind (id, delay)) + { + /// Created new entry for id. + case 0: + { +// ACE_DEBUG ((LM_DEBUG, "New entry created in the table.\n")); + break; + } + /// id has been already registered. Therefore, update the + /// contents. + case 1: + { +// ACE_DEBUG ((LM_DEBUG, "Existing entry found in the table." +// "Updating the contents....")); + /// Retrieve the existing entry from the table. + Delays prev_entry; + this->delay_map_.find (id, prev_entry); + + /// "Merge" the existing entry and the new enty and store it + /// back intro the table. + CORBA::ULong prev_len = prev_entry.length (); + + /// If the new length is greater than MAX_BUFFER_SIZE, then + /// reset the sequence. + if (prev_len + delay.length () > MAX_BUFFER_SIZE) + { + prev_entry.length (0); + } + else + { + prev_entry.length (prev_len + delay.length ()); + for (CORBA::ULong itr = prev_len; + itr < prev_entry.length (); + ++itr) + { + prev_entry [itr] = delay [itr - prev_len]; + } + } + if (this->delay_map_.rebind (id, prev_entry) == -1) + { + ACE_ERROR ((LM_ERROR, + "ERROR while updating the contents.\n")); + break; + } + +// ACE_DEBUG ((LM_DEBUG, "done!\n")); + break; + } + + + /// This should never happen! -- Unknown error while accessing + /// the table. + default: + { + + ACE_ERROR ((LM_ERROR, "Unknown error while registering e-2-e " + "execution times for %s\n.", id)); + break; + } + + } + return; + } + + + ::CIAO::RACE::Delays * + Execution_Time_Monitor_exec_i::get_delays (const char * id) + throw (::CORBA::SystemException, + ::CIAO::RACE::Execution_Time_Monitor::IdNotFound) + { + Delays temp_delay; + // ACE_DEBUG ((LM_DEBUG, "Searching the table for %s...", id)); + if (this->delay_map_.find (id, temp_delay) != 0) + { +// ACE_DEBUG ((LM_DEBUG, "Oops! No entry found!\n")); + throw ::CIAO::RACE::Execution_Time_Monitor::IdNotFound (); + } + // ACE_DEBUG ((LM_DEBUG, "done! Entry found and returned!\n")); + + /// Remove the entry for id from the table. + this->delay_map_.unbind (id); + + /// Return the delays associated with id. + Delays_var ret (temp_delay); + return ret._retn (); + } + + + Central_Monitor_exec_i::Central_Monitor_exec_i () + { + } + + Central_Monitor_exec_i::~Central_Monitor_exec_i () + { + } + + ::CIAO::RACE::CCM_Execution_Time_Monitor_ptr + Central_Monitor_exec_i::get_Monitor () + throw ( ::CORBA::SystemException) + { + return new Execution_Time_Monitor_exec_i (); + } + + // Operations from Components::SessionComponent + + void + Central_Monitor_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx) + throw (::CORBA::SystemException, + ::Components::CCMException) + { + this->context_ = + Central_Monitor_Context::_narrow (ctx); + + if (this->context_ == 0) + { + ACE_THROW (::CORBA::INTERNAL ()); + } + } + + void + Central_Monitor_exec_i::ciao_preactivate () + throw (::CORBA::SystemException, + ::Components::CCMException) + { + } + + void + Central_Monitor_exec_i::ciao_postactivate () + throw (::CORBA::SystemException, + ::Components::CCMException) + { + } + + void + Central_Monitor_exec_i::ccm_activate () + throw (::CORBA::SystemException, + ::Components::CCMException) + { + } + + void + Central_Monitor_exec_i::ccm_passivate () + throw (::CORBA::SystemException, + ::Components::CCMException) + { + } + + void + Central_Monitor_exec_i::ccm_remove () + throw (::CORBA::SystemException, + ::Components::CCMException) + { + } + + + Central_Monitor_Home_exec_i::Central_Monitor_Home_exec_i () + { + } + + Central_Monitor_Home_exec_i::~Central_Monitor_Home_exec_i () + { + } + + ::Components::EnterpriseComponent_ptr + Central_Monitor_Home_exec_i::create () + throw (::CORBA::SystemException, + ::Components::CCMException) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX (retval, + Central_Monitor_exec_i, + ::CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + return retval; + } + + extern "C" MONITOR_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Central_Monitor_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN (retval, Central_Monitor_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + return retval; + } + } + } +} diff --git a/Monitor/Central_Monitor/Monitor_exec.h b/Monitor/Central_Monitor/Monitor_exec.h new file mode 100644 index 00000000000..2a1db24229a --- /dev/null +++ b/Monitor/Central_Monitor/Monitor_exec.h @@ -0,0 +1,91 @@ +#ifndef CIAO_MONITOR_EXEC_H +#define CIAO_MONITOR_EXEC_H + +#include "Monitor_svnt.h" +#include "Monitor_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Central_Monitor_Impl + { + class MONITOR_EXEC_Export Execution_Time_Monitor_exec_i + : public virtual ::CIAO::RACE::CCM_Execution_Time_Monitor, + public virtual TAO_Local_RefCounted_Object + { + public: + Execution_Time_Monitor_exec_i (); + + virtual ~Execution_Time_Monitor_exec_i (); + + virtual void push_delays (const char * id, + const Delays & delay) + throw (CORBA::SystemException); + + virtual Delays * get_delays (const char * id) + throw (::CORBA::SystemException, + ::CIAO::RACE::Execution_Time_Monitor::IdNotFound); + + private: + ACE_Map_Manager <ACE_TString, Delays, ACE_Thread_Mutex> delay_map_; + + const size_t MAX_BUFFER_SIZE; + }; + + class MONITOR_EXEC_Export Central_Monitor_exec_i + : public virtual Central_Monitor_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Central_Monitor_exec_i (void); + + virtual ~Central_Monitor_exec_i (void); + + virtual ::CIAO::RACE::CCM_Execution_Time_Monitor_ptr get_Monitor () + throw ( ::CORBA::SystemException); + + + virtual void set_session_context (::Components::SessionContext_ptr ctx) + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void ciao_preactivate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void ciao_postactivate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void ccm_activate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void ccm_passivate () + throw (::CORBA::SystemException, ::Components::CCMException); + + virtual void ccm_remove () + throw (::CORBA::SystemException, ::Components::CCMException); + + protected: + Central_Monitor_Context *context_; + }; + + class MONITOR_EXEC_Export Central_Monitor_Home_exec_i + : public virtual Central_Monitor_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Central_Monitor_Home_exec_i (); + + virtual ~Central_Monitor_Home_exec_i (); + + virtual ::Components::EnterpriseComponent_ptr create () + throw (::CORBA::SystemException, ::Components::CCMException); + }; + + extern "C" MONITOR_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Central_Monitor_Home_Impl (); + } + } +} + +#endif /* CIAO_MONITOR_EXEC_H */ diff --git a/Monitor/Central_Monitor/Monitor_exec_export.h b/Monitor/Central_Monitor/Monitor_exec_export.h new file mode 100644 index 00000000000..68316404532 --- /dev/null +++ b/Monitor/Central_Monitor/Monitor_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl MONITOR_EXEC +// ------------------------------ +#ifndef MONITOR_EXEC_EXPORT_H +#define MONITOR_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (MONITOR_EXEC_HAS_DLL) +# define MONITOR_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && MONITOR_EXEC_HAS_DLL */ + +#if !defined (MONITOR_EXEC_HAS_DLL) +# define MONITOR_EXEC_HAS_DLL 1 +#endif /* ! MONITOR_EXEC_HAS_DLL */ + +#if defined (MONITOR_EXEC_HAS_DLL) && (MONITOR_EXEC_HAS_DLL == 1) +# if defined (MONITOR_EXEC_BUILD_DLL) +# define MONITOR_EXEC_Export ACE_Proper_Export_Flag +# define MONITOR_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define MONITOR_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* MONITOR_EXEC_BUILD_DLL */ +# define MONITOR_EXEC_Export ACE_Proper_Import_Flag +# define MONITOR_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define MONITOR_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* MONITOR_EXEC_BUILD_DLL */ +#else /* MONITOR_EXEC_HAS_DLL == 1 */ +# define MONITOR_EXEC_Export +# define MONITOR_EXEC_SINGLETON_DECLARATION(T) +# define MONITOR_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* MONITOR_EXEC_HAS_DLL == 1 */ + +// Set MONITOR_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (MONITOR_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define MONITOR_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define MONITOR_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !MONITOR_EXEC_NTRACE */ + +#if (MONITOR_EXEC_NTRACE == 1) +# define MONITOR_EXEC_TRACE(X) +#else /* (MONITOR_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define MONITOR_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (MONITOR_EXEC_NTRACE == 1) */ + +#endif /* MONITOR_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Monitor/Central_Monitor/Monitor_stub_export.h b/Monitor/Central_Monitor/Monitor_stub_export.h new file mode 100644 index 00000000000..ecbb89f2f31 --- /dev/null +++ b/Monitor/Central_Monitor/Monitor_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl MONITOR_STUB +// ------------------------------ +#ifndef MONITOR_STUB_EXPORT_H +#define MONITOR_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (MONITOR_STUB_HAS_DLL) +# define MONITOR_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && MONITOR_STUB_HAS_DLL */ + +#if !defined (MONITOR_STUB_HAS_DLL) +# define MONITOR_STUB_HAS_DLL 1 +#endif /* ! MONITOR_STUB_HAS_DLL */ + +#if defined (MONITOR_STUB_HAS_DLL) && (MONITOR_STUB_HAS_DLL == 1) +# if defined (MONITOR_STUB_BUILD_DLL) +# define MONITOR_STUB_Export ACE_Proper_Export_Flag +# define MONITOR_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define MONITOR_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* MONITOR_STUB_BUILD_DLL */ +# define MONITOR_STUB_Export ACE_Proper_Import_Flag +# define MONITOR_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define MONITOR_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* MONITOR_STUB_BUILD_DLL */ +#else /* MONITOR_STUB_HAS_DLL == 1 */ +# define MONITOR_STUB_Export +# define MONITOR_STUB_SINGLETON_DECLARATION(T) +# define MONITOR_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* MONITOR_STUB_HAS_DLL == 1 */ + +// Set MONITOR_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (MONITOR_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define MONITOR_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define MONITOR_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !MONITOR_STUB_NTRACE */ + +#if (MONITOR_STUB_NTRACE == 1) +# define MONITOR_STUB_TRACE(X) +#else /* (MONITOR_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define MONITOR_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (MONITOR_STUB_NTRACE == 1) */ + +#endif /* MONITOR_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Monitor/Central_Monitor/Monitor_svnt_export.h b/Monitor/Central_Monitor/Monitor_svnt_export.h new file mode 100644 index 00000000000..0291689bb8e --- /dev/null +++ b/Monitor/Central_Monitor/Monitor_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl MONITOR_SVNT +// ------------------------------ +#ifndef MONITOR_SVNT_EXPORT_H +#define MONITOR_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (MONITOR_SVNT_HAS_DLL) +# define MONITOR_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && MONITOR_SVNT_HAS_DLL */ + +#if !defined (MONITOR_SVNT_HAS_DLL) +# define MONITOR_SVNT_HAS_DLL 1 +#endif /* ! MONITOR_SVNT_HAS_DLL */ + +#if defined (MONITOR_SVNT_HAS_DLL) && (MONITOR_SVNT_HAS_DLL == 1) +# if defined (MONITOR_SVNT_BUILD_DLL) +# define MONITOR_SVNT_Export ACE_Proper_Export_Flag +# define MONITOR_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define MONITOR_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* MONITOR_SVNT_BUILD_DLL */ +# define MONITOR_SVNT_Export ACE_Proper_Import_Flag +# define MONITOR_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define MONITOR_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* MONITOR_SVNT_BUILD_DLL */ +#else /* MONITOR_SVNT_HAS_DLL == 1 */ +# define MONITOR_SVNT_Export +# define MONITOR_SVNT_SINGLETON_DECLARATION(T) +# define MONITOR_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* MONITOR_SVNT_HAS_DLL == 1 */ + +// Set MONITOR_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (MONITOR_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define MONITOR_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define MONITOR_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !MONITOR_SVNT_NTRACE */ + +#if (MONITOR_SVNT_NTRACE == 1) +# define MONITOR_SVNT_TRACE(X) +#else /* (MONITOR_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define MONITOR_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (MONITOR_SVNT_NTRACE == 1) */ + +#endif /* MONITOR_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Monitor/Local_Monitor/Local_Monitor.cpp b/Monitor/Local_Monitor/Local_Monitor.cpp new file mode 100644 index 00000000000..88a7dea29cf --- /dev/null +++ b/Monitor/Local_Monitor/Local_Monitor.cpp @@ -0,0 +1,223 @@ +#include "Local_Monitor.h" +#include "ace/Reactor.h" +#include "orbsvcs/CosNamingC.h" +#include "tao/ORB_Core.h" +namespace CIAO +{ + + namespace RACE + { + + Local_Monitor::Local_Monitor (const char *, + CORBA::ORB_ptr orb) + : handler_ (new Event_Handler ()), + reactor_ (orb->orb_core ()->reactor ()), + interval_ (10), + start_time_ (10), + initialized_ (false) + { + this->delays_.length (0); + if (this->resolve_central_monitor (orb) == 0 && + this->register_timer () == 0) + { + ACE_DEBUG ((LM_DEBUG, "[CIAO::RACE] Local_Monitor object has been " + "successfully initialized.\n")); + this->initialized_ = true; + } + else + { + ACE_ERROR ((LM_ERROR, "[CIAO::RACE] ERROR while initializing " + "Local_Monitor object\n")); + } + } + + int + Local_Monitor::resolve_central_monitor (CORBA::ORB_ptr orb) + { + /// First try to get the object reference of the central monitor. + try + { + /// Trying to get the object reference from the Naming Service. + CORBA::Object_var naming_obj = + orb->resolve_initial_references ("NameService"); + + if (CORBA::is_nil (naming_obj.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, "[CIAO::RACE] Local_Monitor: " + "Unable to resolve the Name Service.\n"), + -1); + } + + CosNaming::NamingContext_var namingContext = + CosNaming::NamingContext::_narrow (naming_obj.in ()); + + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup ("RACE_QoS_Monitor"); + + CORBA::Object_var component = namingContext->resolve (name); + + Central_Monitor_var central_monitor = + Central_Monitor::_narrow (component.in ()); + + if (CORBA::is_nil (central_monitor.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, "[CIAO::RACE] Local_Monitor: " + "Object reference of the central " + "monitor component is nil!\n") , -1); + } + + + CORBA::Object_var facet = central_monitor->provide_Monitor (); + + this->monitor_ = Execution_Time_Monitor::_narrow (facet.in ()); + + if (CORBA::is_nil (this->monitor_.in ())) + { + ACE_ERROR_RETURN ((LM_ERROR, "[CIAO::RACE] Local_Monitor: " + "Object reference of the Monitor facet of the " + "central monitor component is nil!\n") , -1); + } + } + + catch (::CosNaming::NamingContext::NotFound &ex) + { + ACE_PRINT_EXCEPTION (ex, "[CIAO::RACE]: Exception caught in " + "Local_Monitor::init()"); + return -1; + } + + catch (::CosNaming::NamingContext::InvalidName &ex) + { + ACE_PRINT_EXCEPTION (ex, "[CIAO::RACE}: Exception caught in " + "Local_Monitor::init()"); + return -1; + } + + catch (::CORBA::Exception &ex) + { + ACE_PRINT_EXCEPTION (ex, "[CIAO::RACE}: Exception caught in " + "Local_Monitor::init()"); + return -1; + } + return 0; + } + + int + Local_Monitor::register_timer () + { + /// Now set up the "periodic update task". + this->reactor_->owner (ACE_Thread::self ()); + this->timer_id_ = + this->reactor_->schedule_timer (this->handler_, + this, + this->start_time_, + this->interval_); + if (this->timer_id_ < 0) + { + ACE_ERROR ((LM_ERROR, "[CIAO::RACE] Local_Monitor: Could not " + "register periodic task with the reactor!\n")); + return -1; + } + ACE_DEBUG ((LM_DEBUG, "[CIAO::RACE] Local_Monitor: Registered periodic " + "task with id %d.\n", this->timer_id_)); + return 0; + } + + Local_Monitor::~Local_Monitor () + { + this->reactor_->cancel_timer (this->timer_id_); + delete this->handler_; + } + + void + Local_Monitor::start (const char *id) + { + if (!this->initialized_) + { + return; + } + if (!this->instance_id_.in ()) + { + this->instance_id_ = CORBA::string_dup (id); + } + this->start_time_ = ACE_OS::gettimeofday (); + } + + void + Local_Monitor::stop () + { + if (!this->initialized_) + { + return; + } + size_t temp = (ACE_OS::gettimeofday () - this->start_time_).msec (); + + this->mutex_.acquire (); + + this->delays_.length (this->delays_.length () + 1); + this->delays_ [this->delays_.length () - 1] = temp; + + this->mutex_.release (); + } + + void + Local_Monitor::dump () + { + if (!this->initialized_) + { + return; + } + ACE_DEBUG ((LM_DEBUG, "In Trigger::dump %s.\n", + this->instance_id_.in ())); + + this->mutex_.acquire (); + + for (CORBA::ULong itr = 0; itr < this->delays_.length (); ++itr) + { + ACE_DEBUG ((LM_DEBUG, "%d\n", this->delays_[itr])); + } + + this->mutex_.release (); + } + + int + Local_Monitor::push () + { + if (!this->initialized_) + { + return -1; + } + try + { + this->mutex_.acquire (); + this->monitor_->push_delays (this->instance_id_.in (), + this->delays_); + this->delays_.length (0); + this->mutex_.release (); + return 0; + } + + catch (CORBA::Exception &ex) + { + ACE_PRINT_EXCEPTION (ex, "[CIAO::RACE] Local_Monitor:: " + "Exception caught in push ().\n"); + this->mutex_.release (); + return -1; + } + } + + + int + Event_Handler::handle_timeout (const ACE_Time_Value &, + const void *ref) + { + const Local_Monitor *const_monitor = + reinterpret_cast <const Local_Monitor *> (ref); + Local_Monitor *monitor = const_cast <Local_Monitor *> (const_monitor); + + return monitor->push (); + } + + }; +}; diff --git a/Monitor/Local_Monitor/Local_Monitor.h b/Monitor/Local_Monitor/Local_Monitor.h new file mode 100644 index 00000000000..81259e13203 --- /dev/null +++ b/Monitor/Local_Monitor/Local_Monitor.h @@ -0,0 +1,76 @@ +#ifndef LOCAL_MONITOR_H +#define LOCAL_MONITOR_H + +#include "ace/Time_Value.h" +#include "ace/Log_Msg.h" +#include "ace/Thread.h" +#include "ace/Event_Handler.h" +#include "ace/Mutex.h" +#include "orbsvcs/Naming/Naming_Server.h" + +#include "RACE/Monitor/Central_Monitor/MonitorC.h" + +namespace CIAO +{ + + namespace RACE + { + + class Event_Handler: public ACE_Event_Handler + { + public: + + int handle_timeout (const ACE_Time_Value &, + const void *ref); + }; + + class Local_Monitor + { + public: + + Local_Monitor (const char *instance_id, + CORBA::ORB_ptr orb); + + virtual ~Local_Monitor (); + + virtual void start (const char *id); + + virtual void stop (); + + virtual void dump (); + + virtual int push (); + + protected: + + virtual int resolve_central_monitor (CORBA::ORB_ptr); + + virtual int register_timer (); + + private: + + CORBA::String_var instance_id_; + + Delays delays_; + + long timer_id_; + + Event_Handler *handler_; + + ACE_Reactor *reactor_; + + ACE_Time_Value interval_; + + ACE_Time_Value start_time_; + + Execution_Time_Monitor_var monitor_; + + bool initialized_; + + ACE_Mutex mutex_; + }; + + }; +}; + +#endif /* LOCAL_MONITOR_H */ diff --git a/Monitor/Local_Monitor/Local_Monitor.mpc b/Monitor/Local_Monitor/Local_Monitor.mpc new file mode 100644 index 00000000000..b98b17d42ce --- /dev/null +++ b/Monitor/Local_Monitor/Local_Monitor.mpc @@ -0,0 +1,16 @@ +project(Local_Monitor):ciao_client_dnc, naming, ciao_race_default{ + sharedname = Local_Monitor + after += Monitor_stub + libs += Monitor_stub + + IDL_Files { + } + + Header_Files { + Local_Monotor.h + } + + Source_Files { + Local_Monitor.cpp + } +} diff --git a/Output_Adapters/Base/Output_Adapter.idl b/Output_Adapters/Base/Output_Adapter.idl new file mode 100644 index 00000000000..870b14b3e26 --- /dev/null +++ b/Output_Adapters/Base/Output_Adapter.idl @@ -0,0 +1,19 @@ +//Output_Adapter.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_OUTPUT_ADAPTER_IDL +#define RACE_OUTPUT_ADAPTER_IDL + +#include <Components.idl> +#include "RACE/Output_Adapters/Interface/PlanEgress.idl" + +module CIAO +{ + module RACE + { + component Output_Adapter + { + provides PlanEgress plan_egress; + }; + }; +}; + +#endif /* RACE_OUTPUT_ADAPTER_IDL */ diff --git a/Output_Adapters/Base/Output_Adapter.mpc b/Output_Adapters/Base/Output_Adapter.mpc new file mode 100644 index 00000000000..51a0294f461 --- /dev/null +++ b/Output_Adapters/Base/Output_Adapter.mpc @@ -0,0 +1,62 @@ +// generate_component_mpc.pl,v 1.9 2003/12/22 21:56:27 boris Exp +//Output_Adapter.mpc,v 1.3 2005/09/27 18:20:01 wotte Exp +// This file is generated with "generate_component_mpc.pl -n Planner" + +project(Output_Adapter_stub): ciao_deployment_stub, ciao_race_component { + + after += Output_Adapter_Interface_stub + sharedname = Output_Adapter_stub + idlflags += -Sc \ + -Wb,stub_export_macro=OUTPUT_ADAPTER_STUB_Export \ + -Wb,stub_export_include=Output_Adapter_stub_export.h \ + -Wb,skel_export_macro=OUTPUT_ADAPTER_SVNT_Export \ + -Wb,skel_export_include=Output_Adapter_svnt_export.h + dynamicflags = OUTPUT_ADAPTER_STUB_BUILD_DLL + libs += Output_Adapter_Interface_stub + + IDL_Files { + Output_Adapter.idl + } + + Source_Files { + Output_AdapterC.cpp + } + + Header_Files { + Output_AdapterC.h + } + + Inline_Files { + Output_AdapterC.inl + } +} + +project(Output_Adapter_svnt) : ciao_servant_dnc, ciao_race_component { + + after += Output_Adapter_stub Output_Adapter_Interface_svnt + sharedname = Output_Adapter_svnt + libs += Output_Adapter_stub Output_Adapter_Interface_svnt Output_Adapter_Interface_stub + + idlflags += -Sc \ + -Wb,stub_export_macro=OUTPUT_ADAPTER_STUB_Export \ + -Wb,stub_export_include=Output_Adapter_stub_export.h \ + -Wb,skel_export_macro=OUTPUT_ADAPTER_SVNT_Export \ + -Wb,skel_export_include=Output_Adapter_svnt_export.h + dynamicflags = OUTPUT_ADAPTER_SVNT_BUILD_DLL + + IDL_Files { + Output_Adapter.idl + } + + Source_Files { + Output_AdapterS.cpp + } + + Header_Files { + Output_AdapterS.h + } + + Inline_Files { + Output_AdapterS.inl + } +} diff --git a/Output_Adapters/Base/Output_Adapter_stub_export.h b/Output_Adapters/Base/Output_Adapter_stub_export.h new file mode 100644 index 00000000000..b6fcf95e25a --- /dev/null +++ b/Output_Adapters/Base/Output_Adapter_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Output_Adapter_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl OUTPUT_ADAPTER_STUB +// ------------------------------ +#ifndef OUTPUT_ADAPTER_STUB_EXPORT_H +#define OUTPUT_ADAPTER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (OUTPUT_ADAPTER_STUB_HAS_DLL) +# define OUTPUT_ADAPTER_STUB_HAS_DLL 1 +#endif /* ! OUTPUT_ADAPTER_STUB_HAS_DLL */ + +#if defined (OUTPUT_ADAPTER_STUB_HAS_DLL) && (OUTPUT_ADAPTER_STUB_HAS_DLL == 1) +# if defined (OUTPUT_ADAPTER_STUB_BUILD_DLL) +# define OUTPUT_ADAPTER_STUB_Export ACE_Proper_Export_Flag +# define OUTPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* OUTPUT_ADAPTER_STUB_BUILD_DLL */ +# define OUTPUT_ADAPTER_STUB_Export ACE_Proper_Import_Flag +# define OUTPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* OUTPUT_ADAPTER_STUB_BUILD_DLL */ +#else /* OUTPUT_ADAPTER_STUB_HAS_DLL == 1 */ +# define OUTPUT_ADAPTER_STUB_Export +# define OUTPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) +# define OUTPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* OUTPUT_ADAPTER_STUB_HAS_DLL == 1 */ + +// Set OUTPUT_ADAPTER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (OUTPUT_ADAPTER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define OUTPUT_ADAPTER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define OUTPUT_ADAPTER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !OUTPUT_ADAPTER_STUB_NTRACE */ + +#if (OUTPUT_ADAPTER_STUB_NTRACE == 1) +# define OUTPUT_ADAPTER_STUB_TRACE(X) +#else /* (OUTPUT_ADAPTER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define OUTPUT_ADAPTER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (OUTPUT_ADAPTER_STUB_NTRACE == 1) */ + +#endif /* OUTPUT_ADAPTER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/Base/Output_Adapter_svnt_export.h b/Output_Adapters/Base/Output_Adapter_svnt_export.h new file mode 100644 index 00000000000..52e5f8e17e6 --- /dev/null +++ b/Output_Adapters/Base/Output_Adapter_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Output_Adapter_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl OUTPUT_ADAPTER_SVNT +// ------------------------------ +#ifndef OUTPUT_ADAPTER_SVNT_EXPORT_H +#define OUTPUT_ADAPTER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (OUTPUT_ADAPTER_SVNT_HAS_DLL) +# define OUTPUT_ADAPTER_SVNT_HAS_DLL 1 +#endif /* ! OUTPUT_ADAPTER_SVNT_HAS_DLL */ + +#if defined (OUTPUT_ADAPTER_SVNT_HAS_DLL) && (OUTPUT_ADAPTER_SVNT_HAS_DLL == 1) +# if defined (OUTPUT_ADAPTER_SVNT_BUILD_DLL) +# define OUTPUT_ADAPTER_SVNT_Export ACE_Proper_Export_Flag +# define OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* OUTPUT_ADAPTER_SVNT_BUILD_DLL */ +# define OUTPUT_ADAPTER_SVNT_Export ACE_Proper_Import_Flag +# define OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* OUTPUT_ADAPTER_SVNT_BUILD_DLL */ +#else /* OUTPUT_ADAPTER_SVNT_HAS_DLL == 1 */ +# define OUTPUT_ADAPTER_SVNT_Export +# define OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) +# define OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* OUTPUT_ADAPTER_SVNT_HAS_DLL == 1 */ + +// Set OUTPUT_ADAPTER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (OUTPUT_ADAPTER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define OUTPUT_ADAPTER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define OUTPUT_ADAPTER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !OUTPUT_ADAPTER_SVNT_NTRACE */ + +#if (OUTPUT_ADAPTER_SVNT_NTRACE == 1) +# define OUTPUT_ADAPTER_SVNT_TRACE(X) +#else /* (OUTPUT_ADAPTER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define OUTPUT_ADAPTER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (OUTPUT_ADAPTER_SVNT_NTRACE == 1) */ + +#endif /* OUTPUT_ADAPTER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/Component/Output_Manager.cidl b/Output_Adapters/Component/Output_Manager.cidl new file mode 100644 index 00000000000..e26dba88b3a --- /dev/null +++ b/Output_Adapters/Component/Output_Manager.cidl @@ -0,0 +1,27 @@ +#ifndef RACE_OUTPUT_MANAGER_CIDL +#define RACE_OUTPUT_MANAGER_CIDL + +/* + * @file Output_Managet.cidl + * @brief This file contains the Output_Manager component implementation defination. + */ + +#include "Output_Manager.idl" + +module CIAO +{ + module RACE + { + composition session Output_Manager_Impl + { + home executor Output_Manager_Home_Exec + { + implements Output_Manager_Home; + manages Output_Manager_Exec; + }; + }; + }; +}; + + +#endif /* RACE_OUTPUT_MANAGER_CIDL */ diff --git a/Output_Adapters/Component/Output_Manager.idl b/Output_Adapters/Component/Output_Manager.idl new file mode 100644 index 00000000000..7ab245b055a --- /dev/null +++ b/Output_Adapters/Component/Output_Manager.idl @@ -0,0 +1,25 @@ +//Output_Manager.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_OUTPUT_MANAGER_IDL +#define RACE_OUTPUT_MANAGER_IDL + +#include <Components.idl> +#include "RACE/Output_Adapters/Interface/PlanEgress.idl" + +module CIAO +{ + module RACE + { + component Output_Manager + { + provides PlanEgress output; + uses multiple PlanEgress adapters; + }; + + home Output_Manager_Home manages Output_Manager + { + }; + + }; +}; + +#endif diff --git a/Output_Adapters/Component/Output_Manager.mpc b/Output_Adapters/Component/Output_Manager.mpc new file mode 100644 index 00000000000..cb72faea8ed --- /dev/null +++ b/Output_Adapters/Component/Output_Manager.mpc @@ -0,0 +1,63 @@ +// generate_component_mpc.pl,v 1.10 2005/09/27 17:57:44 wotte Exp +// This file is generated with "generate_component_mpc.pl Output_Manager" + +project(Output_Manager_stub): ciao_client_dnc, ciao_race_component { + after += Output_Adapter_Interface_stub + libs += Output_Adapter_Interface_stub + sharedname = Output_Manager_stub + idlflags += -Wb,stub_export_macro=OUTPUT_MANAGER_STUB_Export -Wb,stub_export_include=Output_Manager_stub_export.h -Wb,skel_export_macro=OUTPUT_MANAGER_SVNT_Export -Wb,skel_export_include=Output_Manager_svnt_export.h + dynamicflags = OUTPUT_MANAGER_STUB_BUILD_DLL + + IDL_Files { + Output_Manager.idl + } + + Source_Files { + Output_ManagerC.cpp + } +} + +project(Output_Manager_svnt) : ciao_servant_dnc, ciao_race_component { + after += Output_Manager_stub + sharedname = Output_Manager_svnt + libs += Output_Manager_stub Output_Adapter_Interface_svnt Output_Adapter_Interface_stub + + idlflags += -Wb,export_macro=OUTPUT_MANAGER_SVNT_Export -Wb,export_include=Output_Manager_svnt_export.h + dynamicflags = OUTPUT_MANAGER_SVNT_BUILD_DLL + + CIDL_Files { + Output_Manager.cidl + } + + IDL_Files { + Output_ManagerE.idl + } + + Source_Files { + Output_ManagerEC.cpp + Output_ManagerS.cpp + Output_Manager_svnt.cpp + } +} + + +project(Output_Manager_exec) : ciao_component_dnc, ciao_race_component { + after += Output_Manager_svnt + sharedname = Output_Manager_exec + libs += Output_Manager_stub Output_Manager_svnt Output_Adapter_Interface_stub + + idlflags += -Wb,export_macro=OUTPUT_MANAGER_EXEC_Export -Wb,export_include=Output_Manager_exec_export.h + dynamicflags = OUTPUT_MANAGER_EXEC_BUILD_DLL + + IDL_Files { + + } + + Source_Files { + + Output_Manager_exec.cpp + } +} + + + diff --git a/Output_Adapters/Component/Output_Manager_exec.cpp b/Output_Adapters/Component/Output_Manager_exec.cpp new file mode 100644 index 00000000000..bb6cbce8552 --- /dev/null +++ b/Output_Adapters/Component/Output_Manager_exec.cpp @@ -0,0 +1,205 @@ +#include "Output_Manager_exec.h" +#include "ciao/CIAO_common.h" +#include <map> + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Output_Manager_Impl + { + //================================================================== + // Facet Executor Implementation Class: PlanEgress_exec_i + //================================================================== + + PlanEgress_exec_i::PlanEgress_exec_i (Output_Manager_exec_i &comp) : + comp_ (comp) + { + } + + PlanEgress_exec_i::~PlanEgress_exec_i (void) + { + } + + // Operations from ::CIAO::RACE::PlanEgress + + ::CORBA::Boolean + PlanEgress_exec_i::output_plan ( + const ::CIAO::RACE::Plan_Actions & plan_seq + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + ACE_DEBUG ((LM_ERROR, "RACE:Output_Manager::output_plan\n")); + CIAO::RACE::Output_Manager::adaptersConnections_var conn + (comp_.context_->get_connections_adapters ()); + + for (CORBA::ULong i = 0; i < conn->length (); ++i) + { + ACE_DEBUG ((LM_DEBUG, "In for loop\n")); + try + { + conn[i].objref->output_plan (plan_seq); + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Output_Manager: Caught unknown exception while pushing plan\n")); + } + } + + return true; + } + + //================================================================== + // Component Executor Implementation Class: Output_Manager_exec_i + //================================================================== + + Output_Manager_exec_i::Output_Manager_exec_i (void) + { + } + + Output_Manager_exec_i::~Output_Manager_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + ::CIAO::RACE::CCM_PlanEgress_ptr + Output_Manager_exec_i::get_output ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return new PlanEgress_exec_i (*this); + } + + // Operations from Components::SessionComponent + + void + Output_Manager_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + this->context_ = + Output_Manager_Context::_narrow ( + ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (this->context_ == 0) + { + ACE_THROW (CORBA::INTERNAL ()); + } + } + + void + Output_Manager_exec_i::ciao_preactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + } + + void + Output_Manager_exec_i::ciao_postactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Output_Manager_exec_i::ccm_activate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Output_Manager_exec_i::ccm_passivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Output_Manager_exec_i::ccm_remove ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: Output_Manager_Home_exec_i + //================================================================== + + Output_Manager_Home_exec_i::Output_Manager_Home_exec_i (void) + { + } + + Output_Manager_Home_exec_i::~Output_Manager_Home_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + Output_Manager_Home_exec_i::create ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + Output_Manager_exec_i, + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" OUTPUT_MANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Output_Manager_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + Output_Manager_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } + } + } +} diff --git a/Output_Adapters/Component/Output_Manager_exec.h b/Output_Adapters/Component/Output_Manager_exec.h new file mode 100644 index 00000000000..65fd299ae8d --- /dev/null +++ b/Output_Adapters/Component/Output_Manager_exec.h @@ -0,0 +1,149 @@ +#ifndef CIAO_OUTPUT_MANAGER_EXEC_H +#define CIAO_OUTPUT_MANAGER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "Output_Manager_svnt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "Output_Manager_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Output_Manager_Impl + { + class Output_Manager_exec_i; + + class OUTPUT_MANAGER_EXEC_Export PlanEgress_exec_i + : public virtual ::CIAO::RACE::CCM_PlanEgress, + public virtual TAO_Local_RefCounted_Object + { + public: + PlanEgress_exec_i (Output_Manager_exec_i &comp); + virtual ~PlanEgress_exec_i (void); + + // Operations from ::CIAO::RACE::PlanEgress + + virtual ::CORBA::Boolean + output_plan ( + const ::CIAO::RACE::Plan_Actions & plan_seq + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + private: + Output_Manager_exec_i &comp_; + + }; + + class OUTPUT_MANAGER_EXEC_Export Output_Manager_exec_i + : public virtual Output_Manager_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Output_Manager_exec_i (void); + virtual ~Output_Manager_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + virtual ::CIAO::RACE::CCM_PlanEgress_ptr + get_output ( + ACE_ENV_SINGLE_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 + ciao_postactivate ( + 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 + 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: + Output_Manager_Context *context_; + + friend class PlanEgress_exec_i; + + }; + + class OUTPUT_MANAGER_EXEC_Export Output_Manager_Home_exec_i + : public virtual Output_Manager_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Output_Manager_Home_exec_i (void); + virtual ~Output_Manager_Home_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)); + }; + + extern "C" OUTPUT_MANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Output_Manager_Home_Impl (void); + } + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_OUTPUT_MANAGER_EXEC_H */ diff --git a/Output_Adapters/Component/Output_Manager_exec_export.h b/Output_Adapters/Component/Output_Manager_exec_export.h new file mode 100644 index 00000000000..652b8c04934 --- /dev/null +++ b/Output_Adapters/Component/Output_Manager_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl OUTPUT_MANAGER_EXEC +// ------------------------------ +#ifndef OUTPUT_MANAGER_EXEC_EXPORT_H +#define OUTPUT_MANAGER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (OUTPUT_MANAGER_EXEC_HAS_DLL) +# define OUTPUT_MANAGER_EXEC_HAS_DLL 1 +#endif /* ! OUTPUT_MANAGER_EXEC_HAS_DLL */ + +#if defined (OUTPUT_MANAGER_EXEC_HAS_DLL) && (OUTPUT_MANAGER_EXEC_HAS_DLL == 1) +# if defined (OUTPUT_MANAGER_EXEC_BUILD_DLL) +# define OUTPUT_MANAGER_EXEC_Export ACE_Proper_Export_Flag +# define OUTPUT_MANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_MANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* OUTPUT_MANAGER_EXEC_BUILD_DLL */ +# define OUTPUT_MANAGER_EXEC_Export ACE_Proper_Import_Flag +# define OUTPUT_MANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_MANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* OUTPUT_MANAGER_EXEC_BUILD_DLL */ +#else /* OUTPUT_MANAGER_EXEC_HAS_DLL == 1 */ +# define OUTPUT_MANAGER_EXEC_Export +# define OUTPUT_MANAGER_EXEC_SINGLETON_DECLARATION(T) +# define OUTPUT_MANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* OUTPUT_MANAGER_EXEC_HAS_DLL == 1 */ + +// Set OUTPUT_MANAGER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (OUTPUT_MANAGER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define OUTPUT_MANAGER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define OUTPUT_MANAGER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !OUTPUT_MANAGER_EXEC_NTRACE */ + +#if (OUTPUT_MANAGER_EXEC_NTRACE == 1) +# define OUTPUT_MANAGER_EXEC_TRACE(X) +#else /* (OUTPUT_MANAGER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define OUTPUT_MANAGER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (OUTPUT_MANAGER_EXEC_NTRACE == 1) */ + +#endif /* OUTPUT_MANAGER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/Component/Output_Manager_stub_export.h b/Output_Adapters/Component/Output_Manager_stub_export.h new file mode 100644 index 00000000000..c7a0900bfe8 --- /dev/null +++ b/Output_Adapters/Component/Output_Manager_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl OUTPUT_MANAGER_STUB +// ------------------------------ +#ifndef OUTPUT_MANAGER_STUB_EXPORT_H +#define OUTPUT_MANAGER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (OUTPUT_MANAGER_STUB_HAS_DLL) +# define OUTPUT_MANAGER_STUB_HAS_DLL 1 +#endif /* ! OUTPUT_MANAGER_STUB_HAS_DLL */ + +#if defined (OUTPUT_MANAGER_STUB_HAS_DLL) && (OUTPUT_MANAGER_STUB_HAS_DLL == 1) +# if defined (OUTPUT_MANAGER_STUB_BUILD_DLL) +# define OUTPUT_MANAGER_STUB_Export ACE_Proper_Export_Flag +# define OUTPUT_MANAGER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_MANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* OUTPUT_MANAGER_STUB_BUILD_DLL */ +# define OUTPUT_MANAGER_STUB_Export ACE_Proper_Import_Flag +# define OUTPUT_MANAGER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_MANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* OUTPUT_MANAGER_STUB_BUILD_DLL */ +#else /* OUTPUT_MANAGER_STUB_HAS_DLL == 1 */ +# define OUTPUT_MANAGER_STUB_Export +# define OUTPUT_MANAGER_STUB_SINGLETON_DECLARATION(T) +# define OUTPUT_MANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* OUTPUT_MANAGER_STUB_HAS_DLL == 1 */ + +// Set OUTPUT_MANAGER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (OUTPUT_MANAGER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define OUTPUT_MANAGER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define OUTPUT_MANAGER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !OUTPUT_MANAGER_STUB_NTRACE */ + +#if (OUTPUT_MANAGER_STUB_NTRACE == 1) +# define OUTPUT_MANAGER_STUB_TRACE(X) +#else /* (OUTPUT_MANAGER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define OUTPUT_MANAGER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (OUTPUT_MANAGER_STUB_NTRACE == 1) */ + +#endif /* OUTPUT_MANAGER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/Component/Output_Manager_svnt_export.h b/Output_Adapters/Component/Output_Manager_svnt_export.h new file mode 100644 index 00000000000..33c4ac4b3ff --- /dev/null +++ b/Output_Adapters/Component/Output_Manager_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl OUTPUT_MANAGER_SVNT +// ------------------------------ +#ifndef OUTPUT_MANAGER_SVNT_EXPORT_H +#define OUTPUT_MANAGER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (OUTPUT_MANAGER_SVNT_HAS_DLL) +# define OUTPUT_MANAGER_SVNT_HAS_DLL 1 +#endif /* ! OUTPUT_MANAGER_SVNT_HAS_DLL */ + +#if defined (OUTPUT_MANAGER_SVNT_HAS_DLL) && (OUTPUT_MANAGER_SVNT_HAS_DLL == 1) +# if defined (OUTPUT_MANAGER_SVNT_BUILD_DLL) +# define OUTPUT_MANAGER_SVNT_Export ACE_Proper_Export_Flag +# define OUTPUT_MANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_MANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* OUTPUT_MANAGER_SVNT_BUILD_DLL */ +# define OUTPUT_MANAGER_SVNT_Export ACE_Proper_Import_Flag +# define OUTPUT_MANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_MANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* OUTPUT_MANAGER_SVNT_BUILD_DLL */ +#else /* OUTPUT_MANAGER_SVNT_HAS_DLL == 1 */ +# define OUTPUT_MANAGER_SVNT_Export +# define OUTPUT_MANAGER_SVNT_SINGLETON_DECLARATION(T) +# define OUTPUT_MANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* OUTPUT_MANAGER_SVNT_HAS_DLL == 1 */ + +// Set OUTPUT_MANAGER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (OUTPUT_MANAGER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define OUTPUT_MANAGER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define OUTPUT_MANAGER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !OUTPUT_MANAGER_SVNT_NTRACE */ + +#if (OUTPUT_MANAGER_SVNT_NTRACE == 1) +# define OUTPUT_MANAGER_SVNT_TRACE(X) +#else /* (OUTPUT_MANAGER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define OUTPUT_MANAGER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (OUTPUT_MANAGER_SVNT_NTRACE == 1) */ + +#endif /* OUTPUT_MANAGER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.cidl b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.cidl new file mode 100644 index 00000000000..d9d9c79b8c4 --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.cidl @@ -0,0 +1,21 @@ +#ifndef RACE_DANCE_OUTPUT_ADAPTER_CIDL +#define RACE_DANCE_OUTPUT_ADAPTER_CIDL + +#include "DAnCE_Output_Adapter.idl" + +module CIAO +{ + module RACE + { + composition session DAnCE_Output_Adapter_Impl + { + home executor DAnCE_Output_Adapter_Home_Exec + { + implements DAnCE_Output_Adapter_Home; + manages DAnCE_Output_Adapter_Exec; + }; + }; + }; +}; + +#endif /* RACE_DANCE_OUTPUT_ADAPTER_CIDL */ diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.idl b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.idl new file mode 100644 index 00000000000..cfd6199c86d --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.idl @@ -0,0 +1,31 @@ +// $Id$ + +#ifndef RACE_DANCE_OUTPUT_ADAPTER_IDL +#define RACE_DANCE_OUTPUT_ADAPTER_IDL + +#include <Components.idl> +#include "RACE/Output_Adapters/Base/Output_Adapter.idl" +#include "RACE/Controller/Component/Interface.idl" + +module CIAO +{ + module RACE + { + interface Plan_Status + { + boolean teardown (in string uuid); + }; + + component DAnCE_Output_Adapter : Output_Adapter + { + uses Descriptors control_output; + provides Plan_Status plan_status; + }; + + home DAnCE_Output_Adapter_Home manages DAnCE_Output_Adapter + { + }; + }; +}; + +#endif /* RACE_DANCE_OUTPUT_ADAPTER_IDL */ diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.mpc b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.mpc new file mode 100644 index 00000000000..d2c3baaf248 --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter.mpc @@ -0,0 +1,64 @@ +// generate_component_mpc.pl,v 1.10 2005/09/27 17:57:44 wotte Exp +// This file is generated with "generate_component_mpc.pl DAnCE_Output_Adapter" + +project(DAnCE_Output_Adapter_stub): ciao_client_dnc, ciao_race_component { + after += Output_Adapter_stub \ + Controller_stub + libs += Output_Adapter_stub Controller_stub + sharedname = DAnCE_Output_Adapter_stub + idlflags += -Wb,stub_export_macro=DANCE_OUTPUT_ADAPTER_STUB_Export -Wb,stub_export_include=DAnCE_Output_Adapter_stub_export.h -Wb,skel_export_macro=DANCE_OUTPUT_ADAPTER_SVNT_Export -Wb,skel_export_include=DAnCE_Output_Adapter_svnt_export.h + dynamicflags = DANCE_OUTPUT_ADAPTER_STUB_BUILD_DLL + + IDL_Files { + DAnCE_Output_Adapter.idl + } + + Source_Files { + DAnCE_Output_AdapterC.cpp + } +} + +project(DAnCE_Output_Adapter_svnt) : ciao_servant_dnc, ciao_race_component { + after += DAnCE_Output_Adapter_stub + sharedname = DAnCE_Output_Adapter_svnt + libs += Output_Adapter_svnt DAnCE_Output_Adapter_stub Controller_svnt Output_Adapter_Interface_stub Output_Adapter_Interface_svnt Controller_stub + + idlflags += -Wb,export_macro=DANCE_OUTPUT_ADAPTER_SVNT_Export -Wb,export_include=DAnCE_Output_Adapter_svnt_export.h + dynamicflags = DANCE_OUTPUT_ADAPTER_SVNT_BUILD_DLL + + CIDL_Files { + DAnCE_Output_Adapter.cidl + } + + IDL_Files { + DAnCE_Output_AdapterE.idl + } + + Source_Files { + DAnCE_Output_AdapterEC.cpp + DAnCE_Output_AdapterS.cpp + DAnCE_Output_Adapter_svnt.cpp + } +} + + +project(DAnCE_Output_Adapter_exec) : ciao_component_dnc, ciao_race_component { + after += DAnCE_Output_Adapter_svnt + sharedname = DAnCE_Output_Adapter_exec + libs += DAnCE_Output_Adapter_stub DAnCE_Output_Adapter_svnt Plan_Launcher_Impl Output_Adapter_Interface_stub + + idlflags += -Wb,export_macro=DANCE_OUTPUT_ADAPTER_EXEC_Export -Wb,export_include=DAnCE_Output_Adapter_exec_export.h + dynamicflags = DANCE_OUTPUT_ADAPTER_EXEC_BUILD_DLL + + IDL_Files { + + } + + Source_Files { + + DAnCE_Output_Adapter_exec.cpp + } +} + + + diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec.cpp b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec.cpp new file mode 100644 index 00000000000..0be5ad11698 --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec.cpp @@ -0,0 +1,463 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "DAnCE_Output_Adapter_exec.h" +#include "ciao/CIAO_common.h" +#include "common/RACE_Log_Msg.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_DAnCE_Output_Adapter_Impl + { + //================================================================== + // Facet Executor Implementation Class: PlanEgress_exec_i + //================================================================ + PlanEgress_exec_i::PlanEgress_exec_i (CORBA::ORB_ptr orb, + DAnCE_Output_Adapter_exec_i &comp) + : orb_ (CORBA::ORB::_duplicate (orb)), + comp_ (comp) + { + } + + PlanEgress_exec_i::~PlanEgress_exec_i (void) + { + } + + // Operations from ::CIAO::RACE::PlanEgress + + ::CORBA::Boolean + PlanEgress_exec_i::output_plan + (const ::CIAO::RACE::Plan_Actions & plan_seq + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + ACE_DEBUG ((LM_DEBUG, "RACE:DAnCE_Output_Adapter::output_plan\n")); + + for (size_t i = 0;i < plan_seq.length(); ++i) + { + if ((plan_seq[i].command == ::CIAO::RACE::DEPLOY) || + (plan_seq[i].command == ::CIAO::RACE::REPLAN_DEPLOY)) + { + if ( !this->launch_helper(plan_seq[i])) + { + return false; + } + + } + else + { + if ( !this->teardown_helper(plan_seq[i]) ) + { + return false; + } + } + } + + /// Return true if all the actions are executed successfully (even + /// if there are no actions to be executed). + return true; + } + + + ::CORBA::Boolean + PlanEgress_exec_i::launch_helper( + const ::CIAO::RACE::Plan_Action & plan_action ) + + { + const ::Deployment::DeploymentPlan& plan=plan_action.plan; + const ::Deployment::PackageConfiguration& package=plan_action.package; + + ACE_DEBUG(( LM_DEBUG, "RACE:DAnCE_OA: Trying to launch plan with uuid: %s\n", + plan.UUID.in() )); + + CORBA::Long importance = Log::find_importance (package); + + RACE_DEPLOYMENT_STATUS( + plan_action.command, Log::EventMark::BEGIN_EVENT, plan.UUID.in (), 0, + Log::Status::SUCCESS, importance, "Success" ); + + try + { + ACE_CString uuid (this->comp_.launcher_.launch_plan (plan)); + + if (uuid.c_str () == 0) + { + ACE_ERROR ((LM_ERROR, "Unable to launch plan with UUID %s\n", + plan.UUID.in ())); + + RACE_DEPLOYMENT_STATUS(plan_action.command, Log::EventMark::END_EVENT, + plan.UUID.in (), 0, + Log::Status::FAILURE, importance, + "Failed on Plan Launcher\n" ); + + return false; + } + + // Write out DApp IOR + try + { + CORBA::String_var ior = this->orb_->object_to_string + (this->comp_.launcher_.get_dam (uuid.c_str ())); + uuid += "_DAM.ior"; + + FILE* ior_output_file = ACE_OS::fopen (uuid.c_str (), "w"); + + if (ior_output_file) + { + ACE_OS::fprintf (ior_output_file, "%s", ior.in ()); + ACE_OS::fclose (ior_output_file); + + RACE_DEPLOYMENT_STATUS(plan_action.command, Log::EventMark::END_EVENT, + plan.UUID.in(), 0, + Log::Status::SUCCESS, importance, + "Success"); + + } + else + { + ACE_ERROR(( LM_ERROR, "Unable to write DAM ior for plan %s", + uuid.c_str() )); + + RACE_DEPLOYMENT_STATUS(plan_action.command, Log::EventMark::END_EVENT, + plan.UUID.in(), 0, + Log::Status::SUCCESS, importance, + "Deployment succeeded, but failed to output DAM IOR"); + } + } + catch (...) + { + ACE_ERROR(( LM_ERROR, "Unable to write DAM ior for plan %s", + uuid.c_str() )); + + RACE_DEPLOYMENT_STATUS(plan_action.command, Log::EventMark::END_EVENT, + plan.UUID.in(), 0, + Log::Status::SUCCESS, importance, + "Deployment succeeded, but failed to output DAM IOR"); + } + } + catch (Plan_Launcher::Plan_Launcher_i::Deployment_Failure &ex_) + { + ACE_CString error ("Plan deployment failed: "); + error += ex_.error_; + + RACE_DEPLOYMENT_STATUS(plan_action.command, Log::EventMark::END_EVENT, + plan.UUID.in(), 0, + Log::Status::FAILURE, importance, + error.c_str() ); + + return false; + } + + RACE_DEPLOYMENT_STATUS( + plan_action.command, Log::EventMark::END_EVENT, + plan.UUID.in(), 0, Log::Status::SUCCESS, importance, + "Successful" ); + + // Pass along descriptors... + this->comp_.context_->get_connection_control_output () + ->register_string (package, plan); + + return true; + } + + ::CORBA::Boolean + PlanEgress_exec_i::teardown_helper + (const ::CIAO::RACE::Plan_Action & plan_action ) + { + ACE_DEBUG ((LM_DEBUG, "RACE:DAnCE_OA: Trying to teardown plan with uuid: %s\n", + plan_action.plan.UUID.in ())); + + RACE_DEPLOYMENT_STATUS ( + plan_action.command, Log::EventMark::BEGIN_EVENT, + plan_action.plan.UUID.in(), 0, + Log::Status::SUCCESS, "Success"); + + bool result=false; + + try + { + result = this->comp_.launcher_.teardown_plan( plan_action.plan.UUID.in() ); + + if (result) + RACE_DEPLOYMENT_STATUS ( + plan_action.command, Log::EventMark::END_EVENT, + plan_action.plan.UUID.in(), 0, + Log::Status::SUCCESS, "Success"); + else + RACE_DEPLOYMENT_STATUS ( + plan_action.command, Log::EventMark::END_EVENT, + plan_action.plan.UUID.in(), 0, + Log::Status::FAILURE, "Teardown failed for unknown reason\n"); + } + catch (Plan_Launcher::Plan_Launcher_i::Deployment_Failure &ex_) + { + ACE_CString error ("Plan teardown failed: "); + error += ex_.error_; + + RACE_DEPLOYMENT_STATUS ( + plan_action.command, Log::EventMark::END_EVENT, + plan_action.plan.UUID.in(), 0, + Log::Status::FAILURE, + error.c_str() ); + } + + this->comp_.context_->get_connection_control_output () + ->unregister_string (plan_action.plan.UUID.in ()); + + /** @TODO Please check what to do after teardown. + + // Write out DApp IOR + CORBA::String_var ior = this->orb_->object_to_string + (this->comp_.launcher_.get_dam (uuid.c_str ())); + + uuid += "_DAM.ior"; + + FILE* ior_output_file = ACE_OS::fopen (uuid.c_str (), + "w"); + + if (ior_output_file) + { + ACE_OS::fprintf (ior_output_file, "%s", ior.in ()); + ACE_OS::fclose (ior_output_file); + } + else + { + ACE_ERROR ((LM_ERROR, "Unable to write DAM ior for plan %s", + uuid.c_str ())); + return false; + } + + // Pass along descriptors... + this->comp_.context_->get_connection_control_output () + ->push_descriptors (package, plan); + */ + return result; + } + + //================================================================== + // Facet Executor Implementation Class: Plan_Status_exec_i + //================================================================== + + Plan_Status_exec_i::Plan_Status_exec_i + (DAnCE_Output_Adapter_exec_i & comp) + : comp_ (comp) + { + } + + Plan_Status_exec_i::~Plan_Status_exec_i (void) + { + } + + // Operations from ::CIAO::RACE::Plan_Status + + ::CORBA::Boolean + Plan_Status_exec_i::teardown ( + const char * uuid + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + bool status (false); + + try + { + status = this->comp_.launcher_.teardown_plan (uuid); + } + catch (Plan_Launcher::Plan_Launcher_i::Deployment_Failure &ex_) + { + ACE_CString error ("!!! SHOULD NEVER HAVE CALLED THIS ROUTINE...Plan teardown failed: "); + error += ex_.error_; + + RACE_DEPLOYMENT_STATUS( + Log::EventType::MANUAL_PLAN, + Log::SubType::TEARDOWN_END, + uuid, 0, + Log::Status::FAILURE, + error.c_str() ); + } + + return status; + } + + //================================================================== + // Component Executor Implementation Class: DAnCE_Output_Adapter_exec_i + //================================================================== + + DAnCE_Output_Adapter_exec_i::DAnCE_Output_Adapter_exec_i (void) + { + } + + DAnCE_Output_Adapter_exec_i::~DAnCE_Output_Adapter_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + ::CIAO::RACE::CCM_PlanEgress_ptr + DAnCE_Output_Adapter_exec_i::get_plan_egress ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return new PlanEgress_exec_i + (this->context_->_ciao_the_Container ()->the_ORB (), *this); + } + + ::CIAO::RACE::CCM_Plan_Status_ptr + DAnCE_Output_Adapter_exec_i::get_plan_status () + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return new Plan_Status_exec_i (*this); + } + + // Operations from Components::SessionComponent + + void + DAnCE_Output_Adapter_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + this->context_ = + DAnCE_Output_Adapter_Context::_narrow ( + ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (this->context_ == 0) + { + ACE_THROW (CORBA::INTERNAL ()); + } + } + + void + DAnCE_Output_Adapter_exec_i::ciao_preactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + this->launcher_.init + (0, this->context_->_ciao_the_Container ()->the_ORB ()); + } + + void + DAnCE_Output_Adapter_exec_i::ciao_postactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + DAnCE_Output_Adapter_exec_i::ccm_activate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + DAnCE_Output_Adapter_exec_i::ccm_passivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + DAnCE_Output_Adapter_exec_i::ccm_remove ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: DAnCE_Output_Adapter_Home_exec_i + //================================================================== + + DAnCE_Output_Adapter_Home_exec_i::DAnCE_Output_Adapter_Home_exec_i (void) + { + } + + DAnCE_Output_Adapter_Home_exec_i::~DAnCE_Output_Adapter_Home_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + DAnCE_Output_Adapter_Home_exec_i::create ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + DAnCE_Output_Adapter_exec_i, + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" DANCE_OUTPUT_ADAPTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_DAnCE_Output_Adapter_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + DAnCE_Output_Adapter_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } + } + } +} diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec.h b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec.h new file mode 100644 index 00000000000..5706848e1d1 --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec.h @@ -0,0 +1,202 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_DANCE_OUTPUT_ADAPTER_EXEC_H +#define CIAO_DANCE_OUTPUT_ADAPTER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "DAnCE_Output_Adapter_svnt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "Plan_Launcher/Plan_Launcher_Impl.h" + +#include "DAnCE_Output_Adapter_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_DAnCE_Output_Adapter_Impl + { + class DAnCE_Output_Adapter_exec_i; + + class DANCE_OUTPUT_ADAPTER_EXEC_Export PlanEgress_exec_i + : public virtual ::CIAO::RACE::CCM_PlanEgress, + public virtual TAO_Local_RefCounted_Object + { + public: + PlanEgress_exec_i (CORBA::ORB_ptr orb, + DAnCE_Output_Adapter_exec_i &comp); + virtual ~PlanEgress_exec_i (void); + + // Operations from ::CIAO::RACE::PlanEgress + + virtual ::CORBA::Boolean + output_plan (const ::CIAO::RACE::Plan_Actions &plan_seq + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + private: + //::CORBA::Boolean launch_helper (const ::Deployment::DeploymentPlan &plan, + // const ::Deployment::PackageConfiguration &package); + ::CORBA::Boolean launch_helper (const ::CIAO::RACE::Plan_Action& plan_action ); + ::CORBA::Boolean teardown_helper (const ::CIAO::RACE::Plan_Action& plan_action ); + + private: + CORBA::ORB_var orb_; + DAnCE_Output_Adapter_exec_i &comp_; + }; + + class DANCE_OUTPUT_ADAPTER_EXEC_Export Plan_Status_exec_i + : public virtual ::CIAO::RACE::CCM_Plan_Status, + public virtual TAO_Local_RefCounted_Object + { + public: + Plan_Status_exec_i (DAnCE_Output_Adapter_exec_i &comp); + virtual ~Plan_Status_exec_i (void); + + // Operations from ::CIAO::RACE::Plan_Status + + virtual ::CORBA::Boolean + teardown (const char * uuid + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + DAnCE_Output_Adapter_exec_i &comp_; + }; + + class DANCE_OUTPUT_ADAPTER_EXEC_Export DAnCE_Output_Adapter_exec_i + : public virtual DAnCE_Output_Adapter_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + DAnCE_Output_Adapter_exec_i (void); + virtual ~DAnCE_Output_Adapter_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + // Port operations. + + virtual ::CIAO::RACE::CCM_PlanEgress_ptr + get_plan_egress (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual ::CIAO::RACE::CCM_Plan_Status_ptr + get_plan_status (ACE_ENV_SINGLE_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 + ciao_postactivate ( + 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 + 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: + DAnCE_Output_Adapter_Context *context_; + + Plan_Launcher::Plan_Launcher_i launcher_; + + friend class PlanEgress_exec_i; + + friend class Plan_Status_exec_i; + + }; + + class DANCE_OUTPUT_ADAPTER_EXEC_Export DAnCE_Output_Adapter_Home_exec_i + : public virtual DAnCE_Output_Adapter_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + DAnCE_Output_Adapter_Home_exec_i (void); + virtual ~DAnCE_Output_Adapter_Home_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)); + }; + + extern "C" DANCE_OUTPUT_ADAPTER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_DAnCE_Output_Adapter_Home_Impl (void); + } + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_DANCE_OUTPUT_ADAPTER_EXEC_H */ + diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec_export.h b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec_export.h new file mode 100644 index 00000000000..e710b44875a --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl DANCE_OUTPUT_ADAPTER_EXEC +// ------------------------------ +#ifndef DANCE_OUTPUT_ADAPTER_EXEC_EXPORT_H +#define DANCE_OUTPUT_ADAPTER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (DANCE_OUTPUT_ADAPTER_EXEC_HAS_DLL) +# define DANCE_OUTPUT_ADAPTER_EXEC_HAS_DLL 1 +#endif /* ! DANCE_OUTPUT_ADAPTER_EXEC_HAS_DLL */ + +#if defined (DANCE_OUTPUT_ADAPTER_EXEC_HAS_DLL) && (DANCE_OUTPUT_ADAPTER_EXEC_HAS_DLL == 1) +# if defined (DANCE_OUTPUT_ADAPTER_EXEC_BUILD_DLL) +# define DANCE_OUTPUT_ADAPTER_EXEC_Export ACE_Proper_Export_Flag +# define DANCE_OUTPUT_ADAPTER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define DANCE_OUTPUT_ADAPTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* DANCE_OUTPUT_ADAPTER_EXEC_BUILD_DLL */ +# define DANCE_OUTPUT_ADAPTER_EXEC_Export ACE_Proper_Import_Flag +# define DANCE_OUTPUT_ADAPTER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define DANCE_OUTPUT_ADAPTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* DANCE_OUTPUT_ADAPTER_EXEC_BUILD_DLL */ +#else /* DANCE_OUTPUT_ADAPTER_EXEC_HAS_DLL == 1 */ +# define DANCE_OUTPUT_ADAPTER_EXEC_Export +# define DANCE_OUTPUT_ADAPTER_EXEC_SINGLETON_DECLARATION(T) +# define DANCE_OUTPUT_ADAPTER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* DANCE_OUTPUT_ADAPTER_EXEC_HAS_DLL == 1 */ + +// Set DANCE_OUTPUT_ADAPTER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (DANCE_OUTPUT_ADAPTER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define DANCE_OUTPUT_ADAPTER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define DANCE_OUTPUT_ADAPTER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !DANCE_OUTPUT_ADAPTER_EXEC_NTRACE */ + +#if (DANCE_OUTPUT_ADAPTER_EXEC_NTRACE == 1) +# define DANCE_OUTPUT_ADAPTER_EXEC_TRACE(X) +#else /* (DANCE_OUTPUT_ADAPTER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define DANCE_OUTPUT_ADAPTER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (DANCE_OUTPUT_ADAPTER_EXEC_NTRACE == 1) */ + +#endif /* DANCE_OUTPUT_ADAPTER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_stub_export.h b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_stub_export.h new file mode 100644 index 00000000000..e770a642896 --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl DANCE_OUTPUT_ADAPTER_STUB +// ------------------------------ +#ifndef DANCE_OUTPUT_ADAPTER_STUB_EXPORT_H +#define DANCE_OUTPUT_ADAPTER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (DANCE_OUTPUT_ADAPTER_STUB_HAS_DLL) +# define DANCE_OUTPUT_ADAPTER_STUB_HAS_DLL 1 +#endif /* ! DANCE_OUTPUT_ADAPTER_STUB_HAS_DLL */ + +#if defined (DANCE_OUTPUT_ADAPTER_STUB_HAS_DLL) && (DANCE_OUTPUT_ADAPTER_STUB_HAS_DLL == 1) +# if defined (DANCE_OUTPUT_ADAPTER_STUB_BUILD_DLL) +# define DANCE_OUTPUT_ADAPTER_STUB_Export ACE_Proper_Export_Flag +# define DANCE_OUTPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define DANCE_OUTPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* DANCE_OUTPUT_ADAPTER_STUB_BUILD_DLL */ +# define DANCE_OUTPUT_ADAPTER_STUB_Export ACE_Proper_Import_Flag +# define DANCE_OUTPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define DANCE_OUTPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* DANCE_OUTPUT_ADAPTER_STUB_BUILD_DLL */ +#else /* DANCE_OUTPUT_ADAPTER_STUB_HAS_DLL == 1 */ +# define DANCE_OUTPUT_ADAPTER_STUB_Export +# define DANCE_OUTPUT_ADAPTER_STUB_SINGLETON_DECLARATION(T) +# define DANCE_OUTPUT_ADAPTER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* DANCE_OUTPUT_ADAPTER_STUB_HAS_DLL == 1 */ + +// Set DANCE_OUTPUT_ADAPTER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (DANCE_OUTPUT_ADAPTER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define DANCE_OUTPUT_ADAPTER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define DANCE_OUTPUT_ADAPTER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !DANCE_OUTPUT_ADAPTER_STUB_NTRACE */ + +#if (DANCE_OUTPUT_ADAPTER_STUB_NTRACE == 1) +# define DANCE_OUTPUT_ADAPTER_STUB_TRACE(X) +#else /* (DANCE_OUTPUT_ADAPTER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define DANCE_OUTPUT_ADAPTER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (DANCE_OUTPUT_ADAPTER_STUB_NTRACE == 1) */ + +#endif /* DANCE_OUTPUT_ADAPTER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_svnt_export.h b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_svnt_export.h new file mode 100644 index 00000000000..fe2bc233a0e --- /dev/null +++ b/Output_Adapters/DAnCE_Output_Adapter/DAnCE_Output_Adapter_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl DANCE_OUTPUT_ADAPTER_SVNT +// ------------------------------ +#ifndef DANCE_OUTPUT_ADAPTER_SVNT_EXPORT_H +#define DANCE_OUTPUT_ADAPTER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (DANCE_OUTPUT_ADAPTER_SVNT_HAS_DLL) +# define DANCE_OUTPUT_ADAPTER_SVNT_HAS_DLL 1 +#endif /* ! DANCE_OUTPUT_ADAPTER_SVNT_HAS_DLL */ + +#if defined (DANCE_OUTPUT_ADAPTER_SVNT_HAS_DLL) && (DANCE_OUTPUT_ADAPTER_SVNT_HAS_DLL == 1) +# if defined (DANCE_OUTPUT_ADAPTER_SVNT_BUILD_DLL) +# define DANCE_OUTPUT_ADAPTER_SVNT_Export ACE_Proper_Export_Flag +# define DANCE_OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define DANCE_OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* DANCE_OUTPUT_ADAPTER_SVNT_BUILD_DLL */ +# define DANCE_OUTPUT_ADAPTER_SVNT_Export ACE_Proper_Import_Flag +# define DANCE_OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define DANCE_OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* DANCE_OUTPUT_ADAPTER_SVNT_BUILD_DLL */ +#else /* DANCE_OUTPUT_ADAPTER_SVNT_HAS_DLL == 1 */ +# define DANCE_OUTPUT_ADAPTER_SVNT_Export +# define DANCE_OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARATION(T) +# define DANCE_OUTPUT_ADAPTER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* DANCE_OUTPUT_ADAPTER_SVNT_HAS_DLL == 1 */ + +// Set DANCE_OUTPUT_ADAPTER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (DANCE_OUTPUT_ADAPTER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define DANCE_OUTPUT_ADAPTER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define DANCE_OUTPUT_ADAPTER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !DANCE_OUTPUT_ADAPTER_SVNT_NTRACE */ + +#if (DANCE_OUTPUT_ADAPTER_SVNT_NTRACE == 1) +# define DANCE_OUTPUT_ADAPTER_SVNT_TRACE(X) +#else /* (DANCE_OUTPUT_ADAPTER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define DANCE_OUTPUT_ADAPTER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (DANCE_OUTPUT_ADAPTER_SVNT_NTRACE == 1) */ + +#endif /* DANCE_OUTPUT_ADAPTER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/Interface/Output_Adapter_Interface.mpc b/Output_Adapters/Interface/Output_Adapter_Interface.mpc new file mode 100644 index 00000000000..b8e7aa97b13 --- /dev/null +++ b/Output_Adapters/Interface/Output_Adapter_Interface.mpc @@ -0,0 +1,60 @@ +// generate_component_mpc.pl,v 1.9 2003/12/22 21:56:27 boris Exp +//Output_Adapter_Interface.mpc,v 1.2 2005/09/19 15:55:49 wotte Exp +// This file is generated with "generate_component_mpc.pl -n Output_Adapter_Interface" + +project(Output_Adapter_Interface_stub): ciao_deployment_stub, ciao_race_component { + + sharedname = Output_Adapter_Interface_stub + idlflags += -Sc \ + -Wb,stub_export_macro=OUTPUT_ADAPTER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Output_Adapter_Interface_stub_export.h \ + -Wb,skel_export_macro=OUTPUT_ADAPTER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Output_Adapter_Interface_svnt_export.h + dynamicflags = OUTPUT_ADAPTER_INTERFACE_STUB_BUILD_DLL + + IDL_Files { + PlanEgress.idl + } + + Source_Files { + PlanEgressC.cpp + } + + Header_Files { + PlanEgressC.h + } + + Inline_Files { + PlanEgressC.inl + } +} + +project(Output_Adapter_Interface_svnt) : ciao_servant_dnc, ciao_race_component { + + after += Output_Adapter_Interface_stub + sharedname = Output_Adapter_Interface_svnt + libs += Output_Adapter_Interface_stub + + idlflags += -Sc \ + -Wb,stub_export_macro=OUTPUT_ADAPTER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Output_Adapter_Interface_stub_export.h \ + -Wb,skel_export_macro=OUTPUT_ADAPTER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Output_Adapter_Interface_svnt_export.h + dynamicflags = OUTPUT_ADAPTER_INTERFACE_SVNT_BUILD_DLL + + IDL_Files { + PlanEgress.idl + } + + Source_Files { + PlanEgressS.cpp + } + + Header_Files { + PlanEgressS.h + } + + Inline_Files { + PlanEgressS.inl + } +} diff --git a/Output_Adapters/Interface/Output_Adapter_Interface_stub_export.h b/Output_Adapters/Interface/Output_Adapter_Interface_stub_export.h new file mode 100644 index 00000000000..6a27d5036bb --- /dev/null +++ b/Output_Adapters/Interface/Output_Adapter_Interface_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Output_Adapter_Interface_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl OUTPUT_ADAPTER_INTERFACE_STUB +// ------------------------------ +#ifndef OUTPUT_ADAPTER_INTERFACE_STUB_EXPORT_H +#define OUTPUT_ADAPTER_INTERFACE_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (OUTPUT_ADAPTER_INTERFACE_STUB_HAS_DLL) +# define OUTPUT_ADAPTER_INTERFACE_STUB_HAS_DLL 1 +#endif /* ! OUTPUT_ADAPTER_INTERFACE_STUB_HAS_DLL */ + +#if defined (OUTPUT_ADAPTER_INTERFACE_STUB_HAS_DLL) && (OUTPUT_ADAPTER_INTERFACE_STUB_HAS_DLL == 1) +# if defined (OUTPUT_ADAPTER_INTERFACE_STUB_BUILD_DLL) +# define OUTPUT_ADAPTER_INTERFACE_STUB_Export ACE_Proper_Export_Flag +# define OUTPUT_ADAPTER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* OUTPUT_ADAPTER_INTERFACE_STUB_BUILD_DLL */ +# define OUTPUT_ADAPTER_INTERFACE_STUB_Export ACE_Proper_Import_Flag +# define OUTPUT_ADAPTER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* OUTPUT_ADAPTER_INTERFACE_STUB_BUILD_DLL */ +#else /* OUTPUT_ADAPTER_INTERFACE_STUB_HAS_DLL == 1 */ +# define OUTPUT_ADAPTER_INTERFACE_STUB_Export +# define OUTPUT_ADAPTER_INTERFACE_STUB_SINGLETON_DECLARATION(T) +# define OUTPUT_ADAPTER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* OUTPUT_ADAPTER_INTERFACE_STUB_HAS_DLL == 1 */ + +// Set OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE */ + +#if (OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE == 1) +# define OUTPUT_ADAPTER_INTERFACE_STUB_TRACE(X) +#else /* (OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define OUTPUT_ADAPTER_INTERFACE_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (OUTPUT_ADAPTER_INTERFACE_STUB_NTRACE == 1) */ + +#endif /* OUTPUT_ADAPTER_INTERFACE_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/Interface/Output_Adapter_Interface_svnt_export.h b/Output_Adapters/Interface/Output_Adapter_Interface_svnt_export.h new file mode 100644 index 00000000000..f2bd23d6a54 --- /dev/null +++ b/Output_Adapters/Interface/Output_Adapter_Interface_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Output_Adapter_Interface_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl OUTPUT_ADAPTER_INTERFACE_SVNT +// ------------------------------ +#ifndef OUTPUT_ADAPTER_INTERFACE_SVNT_EXPORT_H +#define OUTPUT_ADAPTER_INTERFACE_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (OUTPUT_ADAPTER_INTERFACE_SVNT_HAS_DLL) +# define OUTPUT_ADAPTER_INTERFACE_SVNT_HAS_DLL 1 +#endif /* ! OUTPUT_ADAPTER_INTERFACE_SVNT_HAS_DLL */ + +#if defined (OUTPUT_ADAPTER_INTERFACE_SVNT_HAS_DLL) && (OUTPUT_ADAPTER_INTERFACE_SVNT_HAS_DLL == 1) +# if defined (OUTPUT_ADAPTER_INTERFACE_SVNT_BUILD_DLL) +# define OUTPUT_ADAPTER_INTERFACE_SVNT_Export ACE_Proper_Export_Flag +# define OUTPUT_ADAPTER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* OUTPUT_ADAPTER_INTERFACE_SVNT_BUILD_DLL */ +# define OUTPUT_ADAPTER_INTERFACE_SVNT_Export ACE_Proper_Import_Flag +# define OUTPUT_ADAPTER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define OUTPUT_ADAPTER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* OUTPUT_ADAPTER_INTERFACE_SVNT_BUILD_DLL */ +#else /* OUTPUT_ADAPTER_INTERFACE_SVNT_HAS_DLL == 1 */ +# define OUTPUT_ADAPTER_INTERFACE_SVNT_Export +# define OUTPUT_ADAPTER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) +# define OUTPUT_ADAPTER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* OUTPUT_ADAPTER_INTERFACE_SVNT_HAS_DLL == 1 */ + +// Set OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE */ + +#if (OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE == 1) +# define OUTPUT_ADAPTER_INTERFACE_SVNT_TRACE(X) +#else /* (OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define OUTPUT_ADAPTER_INTERFACE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (OUTPUT_ADAPTER_INTERFACE_SVNT_NTRACE == 1) */ + +#endif /* OUTPUT_ADAPTER_INTERFACE_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Output_Adapters/Interface/PlanEgress.idl b/Output_Adapters/Interface/PlanEgress.idl new file mode 100644 index 00000000000..98ce91a81f1 --- /dev/null +++ b/Output_Adapters/Interface/PlanEgress.idl @@ -0,0 +1,20 @@ +//PlanEgress.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_PLAN_EGRESS_IDL +#define RACE_PLAN_EGRESS_IDL + +#include "ciao/Packaging_Data.idl" +#include "RACE/common/RACE_common.idl" + +module CIAO +{ + + module RACE + { + interface PlanEgress + { + boolean output_plan (in Plan_Actions plans); + }; + }; +}; + +#endif /* RACE_PLAN_EGRESS_IDL */ diff --git a/Plan_Analyzer/Component/Plan_Analyzer.cidl b/Plan_Analyzer/Component/Plan_Analyzer.cidl new file mode 100644 index 00000000000..045a798ea9a --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer.cidl @@ -0,0 +1,22 @@ +#ifndef RACE_PLAN_ANALYZER_CIDL +#define RACE_PLAN_ANALYZER_CIDL + +#include "Plan_Analyzer.idl" + +module CIAO +{ + module RACE + { + composition session Plan_Analyzer_Impl + { + home executor Plan_Analyzer_Home_Exec + { + implements RACE::Plan_Analyzer_Home; + manages Plan_Analyzer_Exec; + }; + }; + }; +}; + + +#endif /* RACE_PLAN_ANALYZER_CIDL */ diff --git a/Plan_Analyzer/Component/Plan_Analyzer.idl b/Plan_Analyzer/Component/Plan_Analyzer.idl new file mode 100644 index 00000000000..c70f52131c1 --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer.idl @@ -0,0 +1,33 @@ +//Plan_Analyzer.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_PLAN_ANALYZER_IDL +#define RACE_PLAN_ANALYZER_IDL + +#include <Components.idl> +#include "RACE/Plan_Analyzer/Interface/Analyzer_I.idl" +#include "RACE/Plan_Analyzer/Interface/PlanIngress.idl" +#include "RACE/Planner_Manager/Interface/Planner_Manager_I.idl" + +module CIAO +{ + + module RACE + { + component Plan_Analyzer + { + provides PlanIngress plan_ingress; + uses Planner_Manager_I planner_manager_i; + + readonly attribute RACE_Classifications classes; + + // provides PlannerInfo pinfo; + uses multiple Analyzer_I plugins; + }; + + home Plan_Analyzer_Home manages Plan_Analyzer + { + }; + }; +}; + + +#endif /* RACE_PLAN_ANALYZER_IDL */ diff --git a/Plan_Analyzer/Component/Plan_Analyzer.mpc b/Plan_Analyzer/Component/Plan_Analyzer.mpc new file mode 100644 index 00000000000..1ac2b6bce11 --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer.mpc @@ -0,0 +1,108 @@ +// generate_component_mpc.pl,v 1.9 2003/12/22 21:56:27 boris Exp +//Plan_Analyzer.mpc,v 1.2 2005/09/19 15:55:49 wotte Exp +// This file is generated with "generate_component_mpc.pl Plan_Analyzer" + +project(Plan_Analyzer_stub): ciao_deployment_stub, ciao_race_component { + after += Plan_Analyzer_Interface_stub \ + Planner_Manager_Interface_stub \ + Analyzer_I_stub + + libs += Plan_Analyzer_Interface_stub \ + Planner_Manager_Interface_stub \ + Analyzer_I_stub + + sharedname = Plan_Analyzer_stub + idlflags += -Sc \ + -Wb,stub_export_macro=PLAN_ANALYZER_STUB_Export \ + -Wb,stub_export_include=Plan_Analyzer_stub_export.h \ + -Wb,skel_export_macro=PLAN_ANALYZER_SVNT_Export \ + -Wb,skel_export_include=Plan_Analyzer_svnt_export.h + dynamicflags = PLAN_ANALYZER_STUB_BUILD_DLL + libs += Plan_Analyzer_Interface_stub \ + RACE_common_stub \ + Planner_Manager_Interface_stub + + IDL_Files { + Plan_Analyzer.idl + } + + Source_Files { + Plan_AnalyzerC.cpp + } + + Header_Files { + Plan_AnalyzerC.h + } + + Inline_Files { + Plan_AnalyzerC.inl + } +} + +project(Plan_Analyzer_svnt) : ciao_servant_dnc, ciao_race_component { + after += Plan_Analyzer_stub \ + Plan_Analyzer_Interface_svnt + sharedname = Plan_Analyzer_svnt + libs += Plan_Analyzer_stub \ + RACE_common_stub \ + Plan_Analyzer_Interface_stub \ + Plan_Analyzer_Interface_svnt \ + Planner_Manager_Interface_stub Analyzer_I_stub + + idlflags += -Sc \ + -Wb,export_macro=PLAN_ANALYZER_SVNT_Export \ + -Wb,export_include=Plan_Analyzer_svnt_export.h + + dynamicflags = PLAN_ANALYZER_SVNT_BUILD_DLL + + CIDL_Files { + Plan_Analyzer.cidl + } + + IDL_Files { + Plan_AnalyzerE.idl + } + + Source_Files { + Plan_AnalyzerEC.cpp + Plan_AnalyzerS.cpp + Plan_Analyzer_svnt.cpp + } + + Header_Files { + Plan_AnalyzerEC.h + Plan_AnalyzerS.h + Plan_Analyzer_svnt.h + } + + Inline_Files { + Plan_AnalyzerEC.inl + Plan_AnalyzerS.inl + Plan_Analyzer_svnt.inl + } +} + + +project(Plan_Analyzer_exec) : ciao_component_dnc, ciao_race_component { + after += Plan_Analyzer_svnt + sharedname = Plan_Analyzer_exec + libs += Plan_Analyzer_stub \ + Plan_Analyzer_svnt \ + RACE_common_stub \ + Plan_Analyzer_Interface_stub \ + Plan_Analyzer_Interface_svnt \ + Planner_Manager_Interface_stub Analyzer_I_stub + + idlflags += -Sc \ + -Wb,export_macro=PLAN_ANALYZER_EXEC_Export \ + -Wb,export_include=Plan_Analyzer_exec_export.h + dynamicflags = PLAN_ANALYZER_EXEC_BUILD_DLL + + IDL_Files { + + } + + Source_Files { + Plan_Analyzer_exec.cpp + } +} diff --git a/Plan_Analyzer/Component/Plan_Analyzer_exec.cpp b/Plan_Analyzer/Component/Plan_Analyzer_exec.cpp new file mode 100644 index 00000000000..accc7a8967c --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer_exec.cpp @@ -0,0 +1,273 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "Plan_Analyzer_exec.h" +#include "ciao/CIAO_common.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Plan_Analyzer_Impl + { + //================================================================== + // Facet Executor Implementation Class: PlanIngress_exec_i + //================================================================== + + PlanIngress_exec_i::PlanIngress_exec_i (Plan_Analyzer_exec_i &comp) + : comp_ (comp) + { + } + + PlanIngress_exec_i::~PlanIngress_exec_i (void) + { + } + + // Operations from ::CIAO::RACE::PlanIngress + + void + PlanIngress_exec_i::analyze_plan (const ::CIAO::RACE::Plan_Actions & plan_action + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + PlannerFlow flow; + const ::Deployment::DeploymentPlan &plan = plan_action [0].plan; + + for (CORBA::ULong i = 0; + i < plan.infoProperty.length (); + ++i) + { + ACE_DEBUG ((LM_DEBUG, "RACE::infoprop: %s\n", + plan.infoProperty[i].name.in ())); + + if (ACE_OS::strcmp (plan.infoProperty[i].name.in (), + "RACEAllocation") == 0) + { + const char *value; + + plan.infoProperty[i].value >>= value; + + ACE_DEBUG ((LM_DEBUG, "RACEAllocation: %s\n", + value)); + + if (ACE_OS::strcmp (value, + "Static") != 0) + { + ACE_ERROR ((LM_ERROR, "RACE::Allocation::Analyzer:: " + "Found dynamic allocation request, queuing planner...\n")); + + FlowItem item; + item.planner = "ImportancePlanner"; + + flow.length (1); + flow[0] = item; + } + else + { + ACE_ERROR ((LM_ERROR, "RACE::Allocation::Analyzer::" + "Explicit static request, queueing planner....")); + FlowItem item; + item.planner = "StaticPlanner"; + flow.length (1); + flow[0] = item; + } + + } + } + + if (flow.length () == 0) + { + ACE_DEBUG ((LM_DEBUG, "RACE::Allocation::Analayzer::" + "Implicit static requrest, queueing planner....")); + FlowItem item; + item.planner = "StaticPlanner"; + flow.length (1); + flow[0] = item; + } + + this->comp_.context_->get_connection_planner_manager_i () + ->execute_planners (plan_action, flow); + } + + //================================================================== + // Component Executor Implementation Class: Plan_Analyzer_exec_i + //================================================================== + + Plan_Analyzer_exec_i::Plan_Analyzer_exec_i (void) + { + } + + Plan_Analyzer_exec_i::~Plan_Analyzer_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + ::CIAO::RACE::RACE_Classifications * + Plan_Analyzer_exec_i::classes ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + RACE_Classifications_var retval (new RACE_Classifications (0)); + retval->length (0); + return retval._retn (); + } + + // Port operations. + + ::CIAO::RACE::CCM_PlanIngress_ptr + Plan_Analyzer_exec_i::get_plan_ingress ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + return new PlanIngress_exec_i (*this); + } + + // Operations from Components::SessionComponent + + void + Plan_Analyzer_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + this->context_ = + Plan_Analyzer_Context::_narrow ( + ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (this->context_ == 0) + { + ACE_THROW (CORBA::INTERNAL ()); + } + } + + void + Plan_Analyzer_exec_i::ciao_preactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Plan_Analyzer_exec_i::ciao_postactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Plan_Analyzer_exec_i::ccm_activate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Plan_Analyzer_exec_i::ccm_passivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Plan_Analyzer_exec_i::ccm_remove ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: Plan_Analyzer_Home_exec_i + //================================================================== + + Plan_Analyzer_Home_exec_i::Plan_Analyzer_Home_exec_i (void) + { + } + + Plan_Analyzer_Home_exec_i::~Plan_Analyzer_Home_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + Plan_Analyzer_Home_exec_i::create ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + Plan_Analyzer_exec_i, + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" PLAN_ANALYZER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Plan_Analyzer_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + Plan_Analyzer_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } + } + } +} diff --git a/Plan_Analyzer/Component/Plan_Analyzer_exec.h b/Plan_Analyzer/Component/Plan_Analyzer_exec.h new file mode 100644 index 00000000000..fee03cf3eee --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer_exec.h @@ -0,0 +1,173 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_PLAN_ANALYZER_EXEC_H +#define CIAO_PLAN_ANALYZER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "Plan_Analyzer_svnt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "Plan_Analyzer_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Plan_Analyzer_Impl + { + class Plan_Analyzer_exec_i; + + class PLAN_ANALYZER_EXEC_Export PlanIngress_exec_i + : public virtual ::CIAO::RACE::CCM_PlanIngress, + public virtual TAO_Local_RefCounted_Object + { + public: + PlanIngress_exec_i (Plan_Analyzer_exec_i &comp); + virtual ~PlanIngress_exec_i (void); + + // Operations from ::CIAO::RACE::PlanIngress + + virtual void + analyze_plan ( + const ::CIAO::RACE::Plan_Actions & plan_seq + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + Plan_Analyzer_exec_i &comp_; + }; + + class PLAN_ANALYZER_EXEC_Export Plan_Analyzer_exec_i + : public virtual Plan_Analyzer_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Plan_Analyzer_exec_i (void); + virtual ~Plan_Analyzer_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + virtual ::CIAO::RACE::RACE_Classifications * + classes ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // Port operations. + + virtual ::CIAO::RACE::CCM_PlanIngress_ptr + get_plan_ingress ( + ACE_ENV_SINGLE_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 + ciao_postactivate ( + 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 + 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: + Plan_Analyzer_Context *context_; + + friend class PlanIngress_exec_i; + + }; + + class PLAN_ANALYZER_EXEC_Export Plan_Analyzer_Home_exec_i + : public virtual Plan_Analyzer_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Plan_Analyzer_Home_exec_i (void); + virtual ~Plan_Analyzer_Home_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)); + }; + + extern "C" PLAN_ANALYZER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Plan_Analyzer_Home_Impl (void); + } + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_PLAN_ANALYZER_EXEC_H */ + diff --git a/Plan_Analyzer/Component/Plan_Analyzer_exec_export.h b/Plan_Analyzer/Component/Plan_Analyzer_exec_export.h new file mode 100644 index 00000000000..b7e8050df19 --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Plan_Analyzer_exec_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLAN_ANALYZER_EXEC +// ------------------------------ +#ifndef PLAN_ANALYZER_EXEC_EXPORT_H +#define PLAN_ANALYZER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLAN_ANALYZER_EXEC_HAS_DLL) +# define PLAN_ANALYZER_EXEC_HAS_DLL 1 +#endif /* ! PLAN_ANALYZER_EXEC_HAS_DLL */ + +#if defined (PLAN_ANALYZER_EXEC_HAS_DLL) && (PLAN_ANALYZER_EXEC_HAS_DLL == 1) +# if defined (PLAN_ANALYZER_EXEC_BUILD_DLL) +# define PLAN_ANALYZER_EXEC_Export ACE_Proper_Export_Flag +# define PLAN_ANALYZER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLAN_ANALYZER_EXEC_BUILD_DLL */ +# define PLAN_ANALYZER_EXEC_Export ACE_Proper_Import_Flag +# define PLAN_ANALYZER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLAN_ANALYZER_EXEC_BUILD_DLL */ +#else /* PLAN_ANALYZER_EXEC_HAS_DLL == 1 */ +# define PLAN_ANALYZER_EXEC_Export +# define PLAN_ANALYZER_EXEC_SINGLETON_DECLARATION(T) +# define PLAN_ANALYZER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLAN_ANALYZER_EXEC_HAS_DLL == 1 */ + +// Set PLAN_ANALYZER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLAN_ANALYZER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define PLAN_ANALYZER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLAN_ANALYZER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLAN_ANALYZER_EXEC_NTRACE */ + +#if (PLAN_ANALYZER_EXEC_NTRACE == 1) +# define PLAN_ANALYZER_EXEC_TRACE(X) +#else /* (PLAN_ANALYZER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLAN_ANALYZER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLAN_ANALYZER_EXEC_NTRACE == 1) */ + +#endif /* PLAN_ANALYZER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Plan_Analyzer/Component/Plan_Analyzer_stub_export.h b/Plan_Analyzer/Component/Plan_Analyzer_stub_export.h new file mode 100644 index 00000000000..70467470929 --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Plan_Analyzer_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLAN_ANALYZER_STUB +// ------------------------------ +#ifndef PLAN_ANALYZER_STUB_EXPORT_H +#define PLAN_ANALYZER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLAN_ANALYZER_STUB_HAS_DLL) +# define PLAN_ANALYZER_STUB_HAS_DLL 1 +#endif /* ! PLAN_ANALYZER_STUB_HAS_DLL */ + +#if defined (PLAN_ANALYZER_STUB_HAS_DLL) && (PLAN_ANALYZER_STUB_HAS_DLL == 1) +# if defined (PLAN_ANALYZER_STUB_BUILD_DLL) +# define PLAN_ANALYZER_STUB_Export ACE_Proper_Export_Flag +# define PLAN_ANALYZER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLAN_ANALYZER_STUB_BUILD_DLL */ +# define PLAN_ANALYZER_STUB_Export ACE_Proper_Import_Flag +# define PLAN_ANALYZER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLAN_ANALYZER_STUB_BUILD_DLL */ +#else /* PLAN_ANALYZER_STUB_HAS_DLL == 1 */ +# define PLAN_ANALYZER_STUB_Export +# define PLAN_ANALYZER_STUB_SINGLETON_DECLARATION(T) +# define PLAN_ANALYZER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLAN_ANALYZER_STUB_HAS_DLL == 1 */ + +// Set PLAN_ANALYZER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLAN_ANALYZER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PLAN_ANALYZER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLAN_ANALYZER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLAN_ANALYZER_STUB_NTRACE */ + +#if (PLAN_ANALYZER_STUB_NTRACE == 1) +# define PLAN_ANALYZER_STUB_TRACE(X) +#else /* (PLAN_ANALYZER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLAN_ANALYZER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLAN_ANALYZER_STUB_NTRACE == 1) */ + +#endif /* PLAN_ANALYZER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Plan_Analyzer/Component/Plan_Analyzer_svnt_export.h b/Plan_Analyzer/Component/Plan_Analyzer_svnt_export.h new file mode 100644 index 00000000000..d6a952ec237 --- /dev/null +++ b/Plan_Analyzer/Component/Plan_Analyzer_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Plan_Analyzer_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLAN_ANALYZER_SVNT +// ------------------------------ +#ifndef PLAN_ANALYZER_SVNT_EXPORT_H +#define PLAN_ANALYZER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLAN_ANALYZER_SVNT_HAS_DLL) +# define PLAN_ANALYZER_SVNT_HAS_DLL 1 +#endif /* ! PLAN_ANALYZER_SVNT_HAS_DLL */ + +#if defined (PLAN_ANALYZER_SVNT_HAS_DLL) && (PLAN_ANALYZER_SVNT_HAS_DLL == 1) +# if defined (PLAN_ANALYZER_SVNT_BUILD_DLL) +# define PLAN_ANALYZER_SVNT_Export ACE_Proper_Export_Flag +# define PLAN_ANALYZER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLAN_ANALYZER_SVNT_BUILD_DLL */ +# define PLAN_ANALYZER_SVNT_Export ACE_Proper_Import_Flag +# define PLAN_ANALYZER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLAN_ANALYZER_SVNT_BUILD_DLL */ +#else /* PLAN_ANALYZER_SVNT_HAS_DLL == 1 */ +# define PLAN_ANALYZER_SVNT_Export +# define PLAN_ANALYZER_SVNT_SINGLETON_DECLARATION(T) +# define PLAN_ANALYZER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLAN_ANALYZER_SVNT_HAS_DLL == 1 */ + +// Set PLAN_ANALYZER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLAN_ANALYZER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PLAN_ANALYZER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLAN_ANALYZER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLAN_ANALYZER_SVNT_NTRACE */ + +#if (PLAN_ANALYZER_SVNT_NTRACE == 1) +# define PLAN_ANALYZER_SVNT_TRACE(X) +#else /* (PLAN_ANALYZER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLAN_ANALYZER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLAN_ANALYZER_SVNT_NTRACE == 1) */ + +#endif /* PLAN_ANALYZER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Plan_Analyzer/Interface/Analyzer_I.idl b/Plan_Analyzer/Interface/Analyzer_I.idl new file mode 100644 index 00000000000..c1c97e831d2 --- /dev/null +++ b/Plan_Analyzer/Interface/Analyzer_I.idl @@ -0,0 +1,23 @@ +// $Id$ + +#ifndef RACE_ANALYZER_I_IDL +#define RACE_ANALYZER_I_IDL + +#include "ciao/Packaging_Data.idl" +#include "RACE/common/RACE_common.idl" + +module CIAO +{ + module RACE + { + interface Analyzer_I + { + boolean analyze (in Deployment::DeploymentPlan plan, + in Deployment::PackageConfiguration package, + inout PlannerFlow flow); + }; + }; +}; + + +#endif diff --git a/Plan_Analyzer/Interface/Analyzer_I_exec_export.h b/Plan_Analyzer/Interface/Analyzer_I_exec_export.h new file mode 100644 index 00000000000..0cb5874dcb4 --- /dev/null +++ b/Plan_Analyzer/Interface/Analyzer_I_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ANALYZER_I_EXEC +// ------------------------------ +#ifndef ANALYZER_I_EXEC_EXPORT_H +#define ANALYZER_I_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (ANALYZER_I_EXEC_HAS_DLL) +# define ANALYZER_I_EXEC_HAS_DLL 1 +#endif /* ! ANALYZER_I_EXEC_HAS_DLL */ + +#if defined (ANALYZER_I_EXEC_HAS_DLL) && (ANALYZER_I_EXEC_HAS_DLL == 1) +# if defined (ANALYZER_I_EXEC_BUILD_DLL) +# define ANALYZER_I_EXEC_Export ACE_Proper_Export_Flag +# define ANALYZER_I_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ANALYZER_I_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ANALYZER_I_EXEC_BUILD_DLL */ +# define ANALYZER_I_EXEC_Export ACE_Proper_Import_Flag +# define ANALYZER_I_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ANALYZER_I_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ANALYZER_I_EXEC_BUILD_DLL */ +#else /* ANALYZER_I_EXEC_HAS_DLL == 1 */ +# define ANALYZER_I_EXEC_Export +# define ANALYZER_I_EXEC_SINGLETON_DECLARATION(T) +# define ANALYZER_I_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ANALYZER_I_EXEC_HAS_DLL == 1 */ + +// Set ANALYZER_I_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ANALYZER_I_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define ANALYZER_I_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ANALYZER_I_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ANALYZER_I_EXEC_NTRACE */ + +#if (ANALYZER_I_EXEC_NTRACE == 1) +# define ANALYZER_I_EXEC_TRACE(X) +#else /* (ANALYZER_I_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ANALYZER_I_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ANALYZER_I_EXEC_NTRACE == 1) */ + +#endif /* ANALYZER_I_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Plan_Analyzer/Interface/Analyzer_I_stub_export.h b/Plan_Analyzer/Interface/Analyzer_I_stub_export.h new file mode 100644 index 00000000000..d747edf6d7b --- /dev/null +++ b/Plan_Analyzer/Interface/Analyzer_I_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ANALYZER_I_STUB +// ------------------------------ +#ifndef ANALYZER_I_STUB_EXPORT_H +#define ANALYZER_I_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (ANALYZER_I_STUB_HAS_DLL) +# define ANALYZER_I_STUB_HAS_DLL 1 +#endif /* ! ANALYZER_I_STUB_HAS_DLL */ + +#if defined (ANALYZER_I_STUB_HAS_DLL) && (ANALYZER_I_STUB_HAS_DLL == 1) +# if defined (ANALYZER_I_STUB_BUILD_DLL) +# define ANALYZER_I_STUB_Export ACE_Proper_Export_Flag +# define ANALYZER_I_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ANALYZER_I_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ANALYZER_I_STUB_BUILD_DLL */ +# define ANALYZER_I_STUB_Export ACE_Proper_Import_Flag +# define ANALYZER_I_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ANALYZER_I_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ANALYZER_I_STUB_BUILD_DLL */ +#else /* ANALYZER_I_STUB_HAS_DLL == 1 */ +# define ANALYZER_I_STUB_Export +# define ANALYZER_I_STUB_SINGLETON_DECLARATION(T) +# define ANALYZER_I_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ANALYZER_I_STUB_HAS_DLL == 1 */ + +// Set ANALYZER_I_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ANALYZER_I_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define ANALYZER_I_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ANALYZER_I_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ANALYZER_I_STUB_NTRACE */ + +#if (ANALYZER_I_STUB_NTRACE == 1) +# define ANALYZER_I_STUB_TRACE(X) +#else /* (ANALYZER_I_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ANALYZER_I_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ANALYZER_I_STUB_NTRACE == 1) */ + +#endif /* ANALYZER_I_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Plan_Analyzer/Interface/Analyzer_I_svnt_export.h b/Plan_Analyzer/Interface/Analyzer_I_svnt_export.h new file mode 100644 index 00000000000..ea01d09b0f7 --- /dev/null +++ b/Plan_Analyzer/Interface/Analyzer_I_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl ANALYZER_I_SVNT +// ------------------------------ +#ifndef ANALYZER_I_SVNT_EXPORT_H +#define ANALYZER_I_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (ANALYZER_I_SVNT_HAS_DLL) +# define ANALYZER_I_SVNT_HAS_DLL 1 +#endif /* ! ANALYZER_I_SVNT_HAS_DLL */ + +#if defined (ANALYZER_I_SVNT_HAS_DLL) && (ANALYZER_I_SVNT_HAS_DLL == 1) +# if defined (ANALYZER_I_SVNT_BUILD_DLL) +# define ANALYZER_I_SVNT_Export ACE_Proper_Export_Flag +# define ANALYZER_I_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define ANALYZER_I_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* ANALYZER_I_SVNT_BUILD_DLL */ +# define ANALYZER_I_SVNT_Export ACE_Proper_Import_Flag +# define ANALYZER_I_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define ANALYZER_I_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* ANALYZER_I_SVNT_BUILD_DLL */ +#else /* ANALYZER_I_SVNT_HAS_DLL == 1 */ +# define ANALYZER_I_SVNT_Export +# define ANALYZER_I_SVNT_SINGLETON_DECLARATION(T) +# define ANALYZER_I_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* ANALYZER_I_SVNT_HAS_DLL == 1 */ + +// Set ANALYZER_I_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (ANALYZER_I_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define ANALYZER_I_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define ANALYZER_I_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !ANALYZER_I_SVNT_NTRACE */ + +#if (ANALYZER_I_SVNT_NTRACE == 1) +# define ANALYZER_I_SVNT_TRACE(X) +#else /* (ANALYZER_I_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define ANALYZER_I_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (ANALYZER_I_SVNT_NTRACE == 1) */ + +#endif /* ANALYZER_I_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Plan_Analyzer/Interface/PlanIngress.idl b/Plan_Analyzer/Interface/PlanIngress.idl new file mode 100644 index 00000000000..1197db6b515 --- /dev/null +++ b/Plan_Analyzer/Interface/PlanIngress.idl @@ -0,0 +1,20 @@ +//PlanIngress.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_PLAN_INGRESS_IDL +#define RACE_PLAN_INGRESS_IDL + +#include "ciao/Packaging_Data.idl" +#include "RACE/common/RACE_common.idl" +module CIAO +{ + module RACE + { + interface PlanIngress + { +// void analyze_plan (in Deployment::DeploymentPlan plan, +// in Deployment::PackageConfiguration package); + void analyze_plan (in Plan_Actions foo); + }; + }; +}; + +#endif /* RACE_PLAN_INGRESS_IDL */ diff --git a/Plan_Analyzer/Interface/Plan_Analyzer_Interface.mpc b/Plan_Analyzer/Interface/Plan_Analyzer_Interface.mpc new file mode 100644 index 00000000000..d4f82ec3669 --- /dev/null +++ b/Plan_Analyzer/Interface/Plan_Analyzer_Interface.mpc @@ -0,0 +1,98 @@ +project(Plan_Analyzer_Interface_stub): ciao_deployment_stub, ciao_race_component { + + sharedname = Plan_Analyzer_Interface_stub + idlflags += -Sc \ + -Wb,stub_export_macro=PLAN_ANALYZER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Plan_Analyzer_Interface_stub_export.h \ + -Wb,skel_export_macro=PLAN_ANALYZER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Plan_Analyzer_Interface_svnt_export.h + dynamicflags = PLAN_ANALYZER_INTERFACE_STUB_BUILD_DLL + + IDL_Files { + PlanIngress.idl + } + + Source_Files { + PlanIngressC.cpp + } + + Header_Files { + PlanIngressC.h + } + + Inline_Files { + PlanIngressC.inl + } +} + +project(Plan_Analyzer_Interface_svnt) : ciao_servant_dnc, ciao_race_component { + + after += Plan_Analyzer_Interface_stub + sharedname = Plan_Analyzer_Interface_svnt + libs += Plan_Analyzer_Interface_stub + + idlflags += -Sc \ + -Wb,stub_export_macro=PLAN_ANALYZER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Plan_Analyzer_Interface_stub_export.h \ + -Wb,skel_export_macro=PLAN_ANALYZER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Plan_Analyzer_Interface_svnt_export.h + dynamicflags = PLAN_ANALYZER_INTERFACE_SVNT_BUILD_DLL + + IDL_Files { + PlanIngress.idl + } + + Source_Files { + PlanIngressS.cpp + } + + Header_Files { + PlanIngressS.h + } + + Inline_Files { + PlanIngressS.inl + } +} + +project(Analyzer_I_stub): ciao_deployment_stub, ciao_race_component { + includes += $(CIAO_ROOT)/RACE + sharedname = Analyzer_I_stub + idlflags += -Wb,stub_export_macro=ANALYZER_I_STUB_Export \ + -Wb,stub_export_include=Analyzer_I_stub_export.h \ + -Wb,skel_export_macro=ANALYZER_I_SVNT_Export \ + -Wb,skel_export_include=Analyzer_I_svnt_export.h + + dynamicflags = ANALYZER_I_STUB_BUILD_DLL + + IDL_Files { + Analyzer_I.idl + } + + Header_Files { + Analyzer_IC.h + } + + Source_Files { + Analyzer_IC.cpp + } + + Inline_Files { + AnalyzerC.inl + } + +} + +project(Analyzer_I_svnt) : ciao_servant_dnc, ciao_race_component { + after += Analyzer_I_stub + sharedname = Analyzer_I_svnt + libs += Analyzer_I_stub + + idlflags += -Wb,export_macro=ANALYZER_I_SVNT_Export \ + -Wb,export_include=Analyzer_I_svnt_export.h + dynamicflags = ANALYZER_I_SVNT_BUILD_DLL + + Source_Files { + Analyzer_IS.cpp + } +} diff --git a/Plan_Analyzer/Interface/Plan_Analyzer_Interface_stub_export.h b/Plan_Analyzer/Interface/Plan_Analyzer_Interface_stub_export.h new file mode 100644 index 00000000000..f089309e128 --- /dev/null +++ b/Plan_Analyzer/Interface/Plan_Analyzer_Interface_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Plan_Analyzer_Interface_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLAN_ANALYZER_INTERFACE_STUB +// ------------------------------ +#ifndef PLAN_ANALYZER_INTERFACE_STUB_EXPORT_H +#define PLAN_ANALYZER_INTERFACE_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLAN_ANALYZER_INTERFACE_STUB_HAS_DLL) +# define PLAN_ANALYZER_INTERFACE_STUB_HAS_DLL 1 +#endif /* ! PLAN_ANALYZER_INTERFACE_STUB_HAS_DLL */ + +#if defined (PLAN_ANALYZER_INTERFACE_STUB_HAS_DLL) && (PLAN_ANALYZER_INTERFACE_STUB_HAS_DLL == 1) +# if defined (PLAN_ANALYZER_INTERFACE_STUB_BUILD_DLL) +# define PLAN_ANALYZER_INTERFACE_STUB_Export ACE_Proper_Export_Flag +# define PLAN_ANALYZER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLAN_ANALYZER_INTERFACE_STUB_BUILD_DLL */ +# define PLAN_ANALYZER_INTERFACE_STUB_Export ACE_Proper_Import_Flag +# define PLAN_ANALYZER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLAN_ANALYZER_INTERFACE_STUB_BUILD_DLL */ +#else /* PLAN_ANALYZER_INTERFACE_STUB_HAS_DLL == 1 */ +# define PLAN_ANALYZER_INTERFACE_STUB_Export +# define PLAN_ANALYZER_INTERFACE_STUB_SINGLETON_DECLARATION(T) +# define PLAN_ANALYZER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLAN_ANALYZER_INTERFACE_STUB_HAS_DLL == 1 */ + +// Set PLAN_ANALYZER_INTERFACE_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLAN_ANALYZER_INTERFACE_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PLAN_ANALYZER_INTERFACE_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLAN_ANALYZER_INTERFACE_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLAN_ANALYZER_INTERFACE_STUB_NTRACE */ + +#if (PLAN_ANALYZER_INTERFACE_STUB_NTRACE == 1) +# define PLAN_ANALYZER_INTERFACE_STUB_TRACE(X) +#else /* (PLAN_ANALYZER_INTERFACE_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLAN_ANALYZER_INTERFACE_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLAN_ANALYZER_INTERFACE_STUB_NTRACE == 1) */ + +#endif /* PLAN_ANALYZER_INTERFACE_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Plan_Analyzer/Interface/Plan_Analyzer_Interface_svnt_export.h b/Plan_Analyzer/Interface/Plan_Analyzer_Interface_svnt_export.h new file mode 100644 index 00000000000..7a39859aa24 --- /dev/null +++ b/Plan_Analyzer/Interface/Plan_Analyzer_Interface_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Plan_Analyzer_Interface_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLAN_ANALYZER_INTERFACE_SVNT +// ------------------------------ +#ifndef PLAN_ANALYZER_INTERFACE_SVNT_EXPORT_H +#define PLAN_ANALYZER_INTERFACE_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLAN_ANALYZER_INTERFACE_SVNT_HAS_DLL) +# define PLAN_ANALYZER_INTERFACE_SVNT_HAS_DLL 1 +#endif /* ! PLAN_ANALYZER_INTERFACE_SVNT_HAS_DLL */ + +#if defined (PLAN_ANALYZER_INTERFACE_SVNT_HAS_DLL) && (PLAN_ANALYZER_INTERFACE_SVNT_HAS_DLL == 1) +# if defined (PLAN_ANALYZER_INTERFACE_SVNT_BUILD_DLL) +# define PLAN_ANALYZER_INTERFACE_SVNT_Export ACE_Proper_Export_Flag +# define PLAN_ANALYZER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLAN_ANALYZER_INTERFACE_SVNT_BUILD_DLL */ +# define PLAN_ANALYZER_INTERFACE_SVNT_Export ACE_Proper_Import_Flag +# define PLAN_ANALYZER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLAN_ANALYZER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLAN_ANALYZER_INTERFACE_SVNT_BUILD_DLL */ +#else /* PLAN_ANALYZER_INTERFACE_SVNT_HAS_DLL == 1 */ +# define PLAN_ANALYZER_INTERFACE_SVNT_Export +# define PLAN_ANALYZER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) +# define PLAN_ANALYZER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLAN_ANALYZER_INTERFACE_SVNT_HAS_DLL == 1 */ + +// Set PLAN_ANALYZER_INTERFACE_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLAN_ANALYZER_INTERFACE_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PLAN_ANALYZER_INTERFACE_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLAN_ANALYZER_INTERFACE_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLAN_ANALYZER_INTERFACE_SVNT_NTRACE */ + +#if (PLAN_ANALYZER_INTERFACE_SVNT_NTRACE == 1) +# define PLAN_ANALYZER_INTERFACE_SVNT_TRACE(X) +#else /* (PLAN_ANALYZER_INTERFACE_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLAN_ANALYZER_INTERFACE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLAN_ANALYZER_INTERFACE_SVNT_NTRACE == 1) */ + +#endif /* PLAN_ANALYZER_INTERFACE_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Planner_Manager/Component/Planner_Manager.cidl b/Planner_Manager/Component/Planner_Manager.cidl new file mode 100644 index 00000000000..2fc86492d73 --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager.cidl @@ -0,0 +1,24 @@ +#ifndef RACE_PLANNER_MANAGER_CIDL +#define RACE_PLANNER_MANAGER_CIDL + +#include "Planner_Manager.idl" + +#include "RACE/Planners/Interface/Planner_I.idl" +#include "RACE/Output_Adapters/Interface/PlanEgress.idl" + +module CIAO +{ + module RACE + { + composition session Planner_Manager_Impl + { + home executor Planner_Manager_Home_Exec + { + implements RACE::Planner_Manager_Home; + manages Planner_Manager_Exec; + }; + }; + }; +}; + +#endif /* RACE_PLANNER_MANAGER_CIDL */ diff --git a/Planner_Manager/Component/Planner_Manager.idl b/Planner_Manager/Component/Planner_Manager.idl new file mode 100644 index 00000000000..0b20979ed15 --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager.idl @@ -0,0 +1,32 @@ +//Planner_Manager.idl,v 1.2 2006/02/01 04:33:11 wotte Exp +#ifndef RACE_PLANNER_MANAGER_IDL +#define RACE_PLANNER_MANAGER_IDL + +#include <Components.idl> +#include "RACE/Planner_Manager/Interface/Planner_Manager_I.idl" + +#include "RACE/Planners/Interface/Planner_I.idl" +#include "RACE/Output_Adapters/Interface/PlanEgress.idl" + +#include "DAnCE/TargetManager/DomainEvents.idl" + +module CIAO +{ + module RACE + { + component Planner_Manager + { + provides Planner_Manager_I planner_manager_i; + uses multiple Planner_I planners; + uses multiple PlanEgress outputs; + consumes Domain_Changed_Event domain_changed; + readonly attribute RACE_Classifications classes; + }; + + home Planner_Manager_Home manages Planner_Manager + { + }; + }; +}; + +#endif /* RACE_PLANNER_MANAGER_IDL */ diff --git a/Planner_Manager/Component/Planner_Manager.mpc b/Planner_Manager/Component/Planner_Manager.mpc new file mode 100644 index 00000000000..ef7bbe9b97e --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager.mpc @@ -0,0 +1,111 @@ +// generate_component_mpc.pl,v 1.9 2003/12/22 21:56:27 boris Exp +//Planner_Manager.mpc,v 1.3 2005/09/30 20:11:36 wotte Exp +// This file is generated with "generate_component_mpc.pl Planner_Manager" + +project(Planner_Manager_stub): ciao_deployment_stub, ciao_race_component { + after += Planner_Manager_Interface_stub \ + Planner_Interface_stub \ + Output_Adapter_Interface_stub + sharedname = Planner_Manager_stub + idlflags += -Sc \ + -Wb,stub_export_macro=PLANNER_MANAGER_STUB_Export \ + -Wb,stub_export_include=Planner_Manager_stub_export.h \ + -Wb,skel_export_macro=PLANNER_MANAGER_SVNT_Export \ + -Wb,skel_export_include=Planner_Manager_svnt_export.h + dynamicflags = PLANNER_MANAGER_STUB_BUILD_DLL + libs += RACE_common_stub \ + Planner_Manager_Interface_stub \ + Planner_Interface_stub \ + Output_Adapter_Interface_stub \ + TargetManager_stub \ + NodeManager_stub + + IDL_Files { + Planner_Manager.idl + } + + Source_Files { + Planner_ManagerC.cpp + } + + Header_Files { + Planner_ManagerC.h + } + + Inline_Files { + Planner_ManagerC.inl + } +} + +project(Planner_Manager_svnt) : ciao_servant_dnc, ciao_race_component { + after += Planner_Manager_stub \ + Planner_Manager_Interface_svnt + sharedname = Planner_Manager_svnt + libs += Planner_Manager_stub \ + RACE_common_stub \ + Planner_Manager_Interface_stub \ + Planner_Manager_Interface_svnt \ + Planner_Interface_stub \ + Output_Adapter_Interface_stub \ + TargetManager_svnt + idlflags += -Sc \ + -Wb,export_macro=PLANNER_MANAGER_SVNT_Export \ + -Wb,export_include=Planner_Manager_svnt_export.h + + dynamicflags = PLANNER_MANAGER_SVNT_BUILD_DLL + + CIDL_Files { + Planner_Manager.cidl + } + + IDL_Files { + Planner_ManagerE.idl + } + + Source_Files { + Planner_ManagerEC.cpp + Planner_ManagerS.cpp + Planner_Manager_svnt.cpp + } + + Header_Files { + Planner_ManagerEC.h + Planner_ManagerS.h + Planner_Manager_svnt.h + } + + Inline_Files { + Planner_ManagerEC.inl + Planner_ManagerS.inl + Planner_Manager_svnt.inl + } +} + + +project(Planner_Manager_exec) : ciao_component_dnc, ciao_race_component { + after += Planner_Manager_svnt Planner_stub + sharedname = Planner_Manager_exec + libs += Planner_Manager_stub \ + Planner_Manager_svnt \ + RACE_common_stub \ + Planner_Manager_Interface_stub \ + Planner_Manager_Interface_svnt \ + Planner_Interface_stub \ + Planner_stub \ + Output_Adapter_Interface_stub \ + TargetManager_stub \ + NodeManager_stub + + idlflags += -Sc \ + -Wb,export_macro=PLANNER_MANAGER_EXEC_Export \ + -Wb,export_include=Planner_Manager_exec_export.h + dynamicflags = PLANNER_MANAGER_EXEC_BUILD_DLL + + IDL_Files { + + } + + Source_Files { + Planner_Manager_exec.cpp + } +} diff --git a/Planner_Manager/Component/Planner_Manager_exec.cpp b/Planner_Manager/Component/Planner_Manager_exec.cpp new file mode 100644 index 00000000000..e4f18e77b39 --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager_exec.cpp @@ -0,0 +1,611 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#include "Planner_Manager_exec.h" +#include "ciao/CIAO_common.h" +#include "common/RACE_Log_Msg.h" + +#define cpu_resource_prop_name "LoadAverage" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Planner_Manager_Impl + { + //================================================================== + // Facet Executor Implementation Class: Planner_Manager_I_exec_i + //================================================================== + + Planner_Manager_I_exec_i::Planner_Manager_I_exec_i (Planner_Manager_exec_i &comp) + : comp_ (comp) + { + } + + Planner_Manager_I_exec_i::~Planner_Manager_I_exec_i (void) + { + } + + + // emit log messages for all components being deployed... + void + LogComponentDeploy( const ::CIAO::RACE::Plan_Actions& plan_seq ) + { + + for ( CORBA::ULong k=0; k<plan_seq.length(); k++ ) + { + const ::Deployment::DeploymentPlan& plan = plan_seq[k].plan; + + for ( CORBA::ULong i=0; i < plan.instance.length(); ++i ) + { + // Get the monolithic implementation that corresponds to + // this instance.... + CORBA::ULong pos = plan.instance[i].implementationRef; + const ::Deployment::MonolithicDeploymentDescription &mono = + plan.implementation[pos]; + + for ( CORBA::ULong j=0; j < mono.execParameter.length(); ++j ) + { + if (ACE_OS::strcmp (mono.execParameter[j].name.in (), + cpu_resource_prop_name) == 0) + { + CORBA::Long value; + mono.execParameter[j].value >>= value; + + RACE_DEPLOYMENT_STATUS( + plan_seq[k].command, Log::EventMark::COMPONENT_DEPLOY, + plan.UUID.in(), 0, + Log::Status::SUCCESS, + plan.instance[i].name.in(), + value, + plan.instance[i].node.in() + ); + + break; + } + } + } + } + return; + } + + // Operations from ::CIAO::RACE::Planner_Manager_I + + void + Planner_Manager_I_exec_i::execute_planners + (const ::CIAO::RACE::Plan_Actions & plan_seq, + const ::CIAO::RACE::PlannerFlow & flow + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + RACE_DEPLOYMENT_STATUS( + plan_seq[0].command, Log::EventMark::BEGIN_PLAN, + plan_seq[0].plan.UUID.in (), 0, + Log::Status::SUCCESS, + Log::find_importance( plan_seq[0].package ), + "Success" ); + + bool planner_found = false; + try + { + ACE_DEBUG ((LM_DEBUG, "Entering execute planners...\n")); + + ACE_DEBUG ((LM_DEBUG, "Copying plan_actions...\n")); + ::CIAO::RACE::Plan_Actions result (plan_seq); + + // ::Deployment::DeploymentPlan result (plan); + + ACE_DEBUG ((LM_DEBUG, "Getting planner connections.\n")); + ::CIAO::RACE::Planner_Manager::plannersConnections_var planners + = this->comp_.context_->get_connections_planners (); + + ACE_DEBUG ((LM_DEBUG, "%i planners found \n", + planners->length ())); + + // @@todo: I should cache this list in a hash map to speed lookups.... + for (CORBA::ULong i = 0; + i < flow.length (); + ++i) + { + ACE_DEBUG ((LM_DEBUG, "Searching for planner %s\n", + flow[i].planner.in ())); + + for (CORBA::ULong j = 0; + j < planners->length (); + ++j) + { + ACE_DEBUG ((LM_DEBUG, "Examining %s\n", + planners[j].objref->name ())); + + if (ACE_OS::strcmp (flow[i].planner.in (), + planners[j].objref->name ()) == 0) + { + ACE_DEBUG ((LM_DEBUG, "RACE::Allocation::Planner_Manager - Found match for %s, running planner\n", + flow[i].planner.in ())); + planner_found = true; + + bool ret_val = true; + ACE_CString error; + try + { + ret_val = planners[j].objref->process_plan (result); + + // error string , to be used in case plan fails ... + error = "PlannerFailure: Allocation Failed...Resource Exhaustion."; + } + catch (PlannerFailure &ex) + { + ret_val = false; + error = ex.name.in(); + error += ": "; + error += ex.reason.in (); + } + catch (...) + { + ret_val = false; + error = "Unknown exception"; + } + if (!ret_val) // must have been an error ... + { + ACE_DEBUG ((LM_DEBUG, + "Planner %s has reported failure, bailing out....\n%s\n\n", + flow[i].planner.in (), error.c_str() )); + + RACE_DEPLOYMENT_STATUS( + plan_seq[0].command, Log::EventMark::END_PLAN, + plan_seq[0].plan.UUID.in (), 0, + Log::Status::FAILURE, + Log::find_importance( plan_seq[0].package ), + error.c_str ()); + return; + } + } + } + if (!planner_found) // must have been an error ... + { + ACE_DEBUG ((LM_DEBUG, + "Requested planner %s was not foind, bailing out....\n\n", + flow[i].planner.in ())); + return; + + } + } + + /// Call the output adapters only if the plan_action sequence + /// returned by the planner contains one of more plan_actions. + + ACE_DEBUG ((LM_DEBUG, "Planner_Manager: current deployment has %i actions\n", + result.length ())); + + LogComponentDeploy( result ); + + RACE_DEPLOYMENT_STATUS( + plan_seq[0].command, Log::EventMark::END_PLAN, + plan_seq[0].plan.UUID.in (), 0, + Log::Status::SUCCESS, + Log::find_importance (plan_seq[0].package), + "" ); + + if (result.length () > 0) + { + + ::CIAO::RACE::Planner_Manager::outputsConnections_var conns + = this->comp_.context_->get_connections_outputs (); + + for (CORBA::ULong i = 0; i < conns->length (); ++i) + { + conns[i].objref->output_plan (result); + } + } + return; + } + catch (CORBA::Exception &ex) + { + ex._tao_print_exception (""); + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "Unknown exception caught\n")); + } + + + } + + void + Planner_Manager_I_exec_i::process_domain_change ( + ::CIAO::Domain_Changed_Event * ev + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((::CORBA::SystemException)) + { + ACE_DEBUG ((LM_DEBUG, "PlannerMgr::DomainChange - Entering.\n")); + + Plan_Actions_var plan_actions = new Plan_Actions; + + ::CIAO::RACE::Planner_Manager::plannersConnections_var planners; + + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_BEGIN, + "UNK-Multiple-Possible", 0, + Log::Status::SUCCESS, + -1, "Auto Plan for Domain Change" + ); + + try + { + planners = this->comp_.context_->get_connections_planners (); + } + catch (CORBA::Exception & ex) + { + ACE_DEBUG ((LM_DEBUG, + "PlannerMgr::DomainChange - CORBA Error in get_connections_planners\n")); + + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_END, + "UNK-Multiple-Possible", 0, + Log::Status::FAILURE, + -1, "Domain Change Failed with CORBA Exception on call to get_connections_planners" + ); + + return; + } + + CIAO::RACE::Planner_I::Domain_Changes changes; + + changes.length (ev->changes ().node.length ()); + + for (CORBA::ULong i = 0;i < ev->changes ().node.length ();i++) + { + changes[i].hostname = + CORBA::string_dup ( ev->changes ().node[i].name.in ()); + + if (ev->change_kind () == ::Deployment::Delete) + changes[i].change = CIAO::RACE::Planner_I::NODE_FAILED; + else if (ev->change_kind () == ::Deployment::Add) + changes[i].change = CIAO::RACE::Planner_I::NODE_JOINED; + else + { + changes[i].change = CIAO::RACE::Planner_I::NODE_FAILED; + ACE_DEBUG ((LM_DEBUG, + "PlannerMgr::DomainChange - Erro: Invalid change kind on Domain Change.\n")); + } + } + + for ( CORBA::ULong i=0; i<planners->length() ;i++ ) + { + //make a call to the planners to change domain + bool ret_val = 0; + Plan_Actions_var temp_plan_actions; + + try + { + ACE_DEBUG ((LM_DEBUG, "PlannerMgr::DomainChange - Making a call on the Planner = [%s]\n", + planners[i].objref->name ())); + + ret_val = planners[i].objref-> + process_domain_change (changes, + temp_plan_actions.out ()); + + // Add the plan actions ... + CORBA::ULong prev_size = plan_actions->length (); + + if (temp_plan_actions) + { + + plan_actions->length (prev_size + temp_plan_actions->length ()); + + // here append the plans .. + for (CORBA::ULong i = 0; + i < temp_plan_actions->length (); + i++) + { + plan_actions[prev_size + i] = + temp_plan_actions[i]; + } + } + } + catch (CORBA::Exception &ex) + { + ex._tao_print_exception (""); + + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_END, + "UNK-Multiple-Possible", 0, + Log::Status::FAILURE, + -1, "Domain Change Failed with CORBA Exception on call to Planner" + ); + + return; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, + "Planner_Manager::Unknown exception caught\n")); + + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_END, + "UNK-Multiple-Possible", 0, + Log::Status::FAILURE, + -1, "Domain Change Failed with Unknown Exception on call to Planner" + ); + + return; + } + + if (!ret_val) // must have been an error ... + { + ACE_DEBUG ((LM_DEBUG, + "PlannerMgr::DomainChange - Planner has reported failure \n")); + /* + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_END, + "UNK-Multiple-Possible", 0, + Log::Status::FAILURE, + -1, "Domain Change Failed with Planner Error" + ); + + return; + */ + } + + } + + ACE_DEBUG ((LM_DEBUG, "Planner_Manager::DomainChange: \ + [%d] plans to be redeployed\n", + plan_actions->length ())); + + if (plan_actions->length () > 0) + { + ::CIAO::RACE::Planner_Manager::outputsConnections_var conns + = this->comp_.context_->get_connections_outputs (); + + for (CORBA::ULong i = 0; i < conns->length (); ++i) + { + try + { + conns[i].objref->output_plan (plan_actions); + } + catch (CORBA::Exception &ex) + { + ex._tao_print_exception (""); + + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_END, + "UNK-Multiple-Possible", 0, + Log::Status::FAILURE, + -1, "Domain Change Failed with CORBA Exception on call to Output Adapter" + ); + return; + } + catch (...) + { + ACE_ERROR ((LM_ERROR, "PlannerMgr::DomainChange - Unknown exception caught\n")); + + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_END, + "UNK-Multiple-Possible", 0, + Log::Status::FAILURE, + -1, "Domain Change Failed with Unknown Exception on call to Output Adapter" + ); + return; + } + } + LogComponentDeploy( plan_actions ); + } + else + { + ACE_DEBUG ((LM_DEBUG, + "Planner_manager::DomainChange - No plans were affected\n")); + } + + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::PLANNING_END, + "UNK-Multiple-Possible", 0, + Log::Status::SUCCESS, + -1, "Successful Auto Plan for Domain Change" + ); + + return; + } + + + void + Planner_Manager_exec_i::push_domain_changed ( + ::CIAO::Domain_Changed_Event * ev + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + ACE_DEBUG ((LM_DEBUG, + "Planner_Manager_exec_i::push_domain_change - Enter.\n")); + + if (exec_ptr_) + this->exec_ptr_->process_domain_change (ev); + else + ACE_DEBUG ((LM_DEBUG, "Planner_Manager_exec_i::push_domain_change - Executor still not active\n")); + + } + + //================================================================== + // Component Executor Implementation Class: Planner_Manager_exec_i + //================================================================== + + Planner_Manager_exec_i::Planner_Manager_exec_i (void) + :exec_ptr_ (0) + { + } + + Planner_Manager_exec_i::~Planner_Manager_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + ::CIAO::RACE::RACE_Classifications * + Planner_Manager_exec_i::classes ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + // Your code here. + RACE_Classifications_var retval (new RACE_Classifications (0)); + retval->length (0); + return retval._retn (); + } + + // Port operations. + + ::CIAO::RACE::CCM_Planner_Manager_I_ptr + Planner_Manager_exec_i::get_planner_manager_i ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) + { + exec_ptr_ = new Planner_Manager_I_exec_i (*this); + return exec_ptr_; + } + + // Operations from Components::SessionComponent + + void + Planner_Manager_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + this->context_ = + Planner_Manager_Context::_narrow ( + ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (this->context_ == 0) + { + ACE_THROW (CORBA::INTERNAL ()); + } + } + + void + Planner_Manager_exec_i::ciao_preactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Planner_Manager_exec_i::ciao_postactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Planner_Manager_exec_i::ccm_activate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Planner_Manager_exec_i::ccm_passivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + Planner_Manager_exec_i::ccm_remove ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: Planner_Manager_Home_exec_i + //================================================================== + + Planner_Manager_Home_exec_i::Planner_Manager_Home_exec_i (void) + { + } + + Planner_Manager_Home_exec_i::~Planner_Manager_Home_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + Planner_Manager_Home_exec_i::create ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + Planner_Manager_exec_i, + CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" PLANNER_MANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Planner_Manager_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + Planner_Manager_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } + } + } +} diff --git a/Planner_Manager/Component/Planner_Manager_exec.h b/Planner_Manager/Component/Planner_Manager_exec.h new file mode 100644 index 00000000000..c136eacb844 --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager_exec.h @@ -0,0 +1,188 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_PLANNER_MANAGER_EXEC_H +#define CIAO_PLANNER_MANAGER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "Planner_Manager_svnt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "Planner_Manager_exec_export.h" +#include "tao/LocalObject.h" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_Planner_Manager_Impl + { + class Planner_Manager_exec_i; + + class PLANNER_MANAGER_EXEC_Export Planner_Manager_I_exec_i + : public virtual ::CIAO::RACE::CCM_Planner_Manager_I, + public virtual TAO_Local_RefCounted_Object + { + public: + Planner_Manager_I_exec_i (Planner_Manager_exec_i &comp); + virtual ~Planner_Manager_I_exec_i (void); + + // Operations from ::CIAO::RACE::Planner_Manager_I + + virtual void + execute_planners ( + const ::CIAO::RACE::Plan_Actions & plan_seq, + const ::CIAO::RACE::PlannerFlow & flow + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + void process_domain_change ( + ::CIAO::Domain_Changed_Event * /* ev */ + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((::CORBA::SystemException)); + + + private: + Planner_Manager_exec_i &comp_; + }; + + class PLANNER_MANAGER_EXEC_Export Planner_Manager_exec_i + : public virtual Planner_Manager_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Planner_Manager_exec_i (void); + virtual ~Planner_Manager_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + virtual ::CIAO::RACE::RACE_Classifications * + classes ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + // Port operations. + + virtual ::CIAO::RACE::CCM_Planner_Manager_I_ptr + get_planner_manager_i ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void + push_domain_changed ( + ::CIAO::Domain_Changed_Event *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 + ciao_postactivate ( + 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 + 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: + Planner_Manager_Context *context_; + + friend class Planner_Manager_I_exec_i; + + // The executor pointer + Planner_Manager_I_exec_i* exec_ptr_; + }; + + class PLANNER_MANAGER_EXEC_Export Planner_Manager_Home_exec_i + : public virtual Planner_Manager_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + Planner_Manager_Home_exec_i (void); + virtual ~Planner_Manager_Home_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)); + }; + + extern "C" PLANNER_MANAGER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_Planner_Manager_Home_Impl (void); + } + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_PLANNER_MANAGER_EXEC_H */ diff --git a/Planner_Manager/Component/Planner_Manager_exec_export.h b/Planner_Manager/Component/Planner_Manager_exec_export.h new file mode 100644 index 00000000000..9bae034207a --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager_exec_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_Manager_exec_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_MANAGER_EXEC +// ------------------------------ +#ifndef PLANNER_MANAGER_EXEC_EXPORT_H +#define PLANNER_MANAGER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_MANAGER_EXEC_HAS_DLL) +# define PLANNER_MANAGER_EXEC_HAS_DLL 1 +#endif /* ! PLANNER_MANAGER_EXEC_HAS_DLL */ + +#if defined (PLANNER_MANAGER_EXEC_HAS_DLL) && (PLANNER_MANAGER_EXEC_HAS_DLL == 1) +# if defined (PLANNER_MANAGER_EXEC_BUILD_DLL) +# define PLANNER_MANAGER_EXEC_Export ACE_Proper_Export_Flag +# define PLANNER_MANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_MANAGER_EXEC_BUILD_DLL */ +# define PLANNER_MANAGER_EXEC_Export ACE_Proper_Import_Flag +# define PLANNER_MANAGER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_MANAGER_EXEC_BUILD_DLL */ +#else /* PLANNER_MANAGER_EXEC_HAS_DLL == 1 */ +# define PLANNER_MANAGER_EXEC_Export +# define PLANNER_MANAGER_EXEC_SINGLETON_DECLARATION(T) +# define PLANNER_MANAGER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_MANAGER_EXEC_HAS_DLL == 1 */ + +// Set PLANNER_MANAGER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_MANAGER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_MANAGER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_MANAGER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_MANAGER_EXEC_NTRACE */ + +#if (PLANNER_MANAGER_EXEC_NTRACE == 1) +# define PLANNER_MANAGER_EXEC_TRACE(X) +#else /* (PLANNER_MANAGER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_MANAGER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_MANAGER_EXEC_NTRACE == 1) */ + +#endif /* PLANNER_MANAGER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Planner_Manager/Component/Planner_Manager_stub_export.h b/Planner_Manager/Component/Planner_Manager_stub_export.h new file mode 100644 index 00000000000..e465996c147 --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_Manager_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_MANAGER_STUB +// ------------------------------ +#ifndef PLANNER_MANAGER_STUB_EXPORT_H +#define PLANNER_MANAGER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_MANAGER_STUB_HAS_DLL) +# define PLANNER_MANAGER_STUB_HAS_DLL 1 +#endif /* ! PLANNER_MANAGER_STUB_HAS_DLL */ + +#if defined (PLANNER_MANAGER_STUB_HAS_DLL) && (PLANNER_MANAGER_STUB_HAS_DLL == 1) +# if defined (PLANNER_MANAGER_STUB_BUILD_DLL) +# define PLANNER_MANAGER_STUB_Export ACE_Proper_Export_Flag +# define PLANNER_MANAGER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_MANAGER_STUB_BUILD_DLL */ +# define PLANNER_MANAGER_STUB_Export ACE_Proper_Import_Flag +# define PLANNER_MANAGER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_MANAGER_STUB_BUILD_DLL */ +#else /* PLANNER_MANAGER_STUB_HAS_DLL == 1 */ +# define PLANNER_MANAGER_STUB_Export +# define PLANNER_MANAGER_STUB_SINGLETON_DECLARATION(T) +# define PLANNER_MANAGER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_MANAGER_STUB_HAS_DLL == 1 */ + +// Set PLANNER_MANAGER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_MANAGER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_MANAGER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_MANAGER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_MANAGER_STUB_NTRACE */ + +#if (PLANNER_MANAGER_STUB_NTRACE == 1) +# define PLANNER_MANAGER_STUB_TRACE(X) +#else /* (PLANNER_MANAGER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_MANAGER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_MANAGER_STUB_NTRACE == 1) */ + +#endif /* PLANNER_MANAGER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Planner_Manager/Component/Planner_Manager_svnt_export.h b/Planner_Manager/Component/Planner_Manager_svnt_export.h new file mode 100644 index 00000000000..4f6b6a69144 --- /dev/null +++ b/Planner_Manager/Component/Planner_Manager_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_Manager_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_MANAGER_SVNT +// ------------------------------ +#ifndef PLANNER_MANAGER_SVNT_EXPORT_H +#define PLANNER_MANAGER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_MANAGER_SVNT_HAS_DLL) +# define PLANNER_MANAGER_SVNT_HAS_DLL 1 +#endif /* ! PLANNER_MANAGER_SVNT_HAS_DLL */ + +#if defined (PLANNER_MANAGER_SVNT_HAS_DLL) && (PLANNER_MANAGER_SVNT_HAS_DLL == 1) +# if defined (PLANNER_MANAGER_SVNT_BUILD_DLL) +# define PLANNER_MANAGER_SVNT_Export ACE_Proper_Export_Flag +# define PLANNER_MANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_MANAGER_SVNT_BUILD_DLL */ +# define PLANNER_MANAGER_SVNT_Export ACE_Proper_Import_Flag +# define PLANNER_MANAGER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_MANAGER_SVNT_BUILD_DLL */ +#else /* PLANNER_MANAGER_SVNT_HAS_DLL == 1 */ +# define PLANNER_MANAGER_SVNT_Export +# define PLANNER_MANAGER_SVNT_SINGLETON_DECLARATION(T) +# define PLANNER_MANAGER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_MANAGER_SVNT_HAS_DLL == 1 */ + +// Set PLANNER_MANAGER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_MANAGER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_MANAGER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_MANAGER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_MANAGER_SVNT_NTRACE */ + +#if (PLANNER_MANAGER_SVNT_NTRACE == 1) +# define PLANNER_MANAGER_SVNT_TRACE(X) +#else /* (PLANNER_MANAGER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_MANAGER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_MANAGER_SVNT_NTRACE == 1) */ + +#endif /* PLANNER_MANAGER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Planner_Manager/Interface/Planner_Manager_I.idl b/Planner_Manager/Interface/Planner_Manager_I.idl new file mode 100644 index 00000000000..3fa18789734 --- /dev/null +++ b/Planner_Manager/Interface/Planner_Manager_I.idl @@ -0,0 +1,21 @@ +//Planner_Manager_I.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_PLANNER_MANAGER_I_IDL +#define RACE_PLANNER_MANAGER_I_IDL + +#include "ciao/Packaging_Data.idl" + +#include "RACE/common/RACE_common.idl" + +module CIAO +{ + module RACE + { + interface Planner_Manager_I + { + void execute_planners (in Plan_Actions plan, + in PlannerFlow flow); + }; + }; +}; + +#endif /* RACE_PLANNER_MANAGER_I_IDL */ diff --git a/Planner_Manager/Interface/Planner_Manager_Interface.mpc b/Planner_Manager/Interface/Planner_Manager_Interface.mpc new file mode 100644 index 00000000000..b44cbf71c1e --- /dev/null +++ b/Planner_Manager/Interface/Planner_Manager_Interface.mpc @@ -0,0 +1,62 @@ +// generate_component_mpc.pl,v 1.9 2003/12/22 21:56:27 boris Exp +//Planner_Manager_Interface.mpc,v 1.2 2005/09/19 15:55:49 wotte Exp +// This file is generated with "generate_component_mpc.pl -n Planner_Manager_Interface" + +project(Planner_Manager_Interface_stub): ciao_deployment_stub, anytypecode, ciao_race_component { + + sharedname = Planner_Manager_Interface_stub + after += RACE_common_stub + idlflags += -Sc \ + -Wb,stub_export_macro=PLANNER_MANAGER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Planner_Manager_Interface_stub_export.h \ + -Wb,skel_export_macro=PLANNER_MANAGER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Planner_Manager_Interface_svnt_export.h + dynamicflags = PLANNER_MANAGER_INTERFACE_STUB_BUILD_DLL + libs += RACE_common_stub + + IDL_Files { + Planner_Manager_I.idl + } + + Source_Files { + Planner_Manager_IC.cpp + } + + Header_Files { + Planner_Manager_IC.h + } + + Inline_Files { + Planner_Manager_IC.inl + } +} + +project(Planner_Manager_Interface_svnt) : ciao_servant_dnc, ciao_race_component { + + after += Planner_Manager_Interface_stub + sharedname = Planner_Manager_Interface_svnt + libs += Planner_Manager_Interface_stub RACE_common_stub + + idlflags += -Sc \ + -Wb,stub_export_macro=PLANNER_MANAGER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Planner_Manager_Interface_stub_export.h \ + -Wb,skel_export_macro=PLANNER_MANAGER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Planner_Manager_Interface_svnt_export.h + dynamicflags = PLANNER_MANAGER_INTERFACE_SVNT_BUILD_DLL + + IDL_Files { + Planner_Manager_I.idl + } + + Source_Files { + Planner_Manager_IS.cpp + } + + Header_Files { + Planner_Manager_IS.h + } + + Inline_Files { + Planner_Manager_IS.inl + } +} diff --git a/Planner_Manager/Interface/Planner_Manager_Interface_stub_export.h b/Planner_Manager/Interface/Planner_Manager_Interface_stub_export.h new file mode 100644 index 00000000000..86a5e5f199f --- /dev/null +++ b/Planner_Manager/Interface/Planner_Manager_Interface_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_Manager_Interface_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_MANAGER_INTERFACE_STUB +// ------------------------------ +#ifndef PLANNER_MANAGER_INTERFACE_STUB_EXPORT_H +#define PLANNER_MANAGER_INTERFACE_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_MANAGER_INTERFACE_STUB_HAS_DLL) +# define PLANNER_MANAGER_INTERFACE_STUB_HAS_DLL 1 +#endif /* ! PLANNER_MANAGER_INTERFACE_STUB_HAS_DLL */ + +#if defined (PLANNER_MANAGER_INTERFACE_STUB_HAS_DLL) && (PLANNER_MANAGER_INTERFACE_STUB_HAS_DLL == 1) +# if defined (PLANNER_MANAGER_INTERFACE_STUB_BUILD_DLL) +# define PLANNER_MANAGER_INTERFACE_STUB_Export ACE_Proper_Export_Flag +# define PLANNER_MANAGER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_MANAGER_INTERFACE_STUB_BUILD_DLL */ +# define PLANNER_MANAGER_INTERFACE_STUB_Export ACE_Proper_Import_Flag +# define PLANNER_MANAGER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_MANAGER_INTERFACE_STUB_BUILD_DLL */ +#else /* PLANNER_MANAGER_INTERFACE_STUB_HAS_DLL == 1 */ +# define PLANNER_MANAGER_INTERFACE_STUB_Export +# define PLANNER_MANAGER_INTERFACE_STUB_SINGLETON_DECLARATION(T) +# define PLANNER_MANAGER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_MANAGER_INTERFACE_STUB_HAS_DLL == 1 */ + +// Set PLANNER_MANAGER_INTERFACE_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_MANAGER_INTERFACE_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_MANAGER_INTERFACE_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_MANAGER_INTERFACE_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_MANAGER_INTERFACE_STUB_NTRACE */ + +#if (PLANNER_MANAGER_INTERFACE_STUB_NTRACE == 1) +# define PLANNER_MANAGER_INTERFACE_STUB_TRACE(X) +#else /* (PLANNER_MANAGER_INTERFACE_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_MANAGER_INTERFACE_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_MANAGER_INTERFACE_STUB_NTRACE == 1) */ + +#endif /* PLANNER_MANAGER_INTERFACE_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Planner_Manager/Interface/Planner_Manager_Interface_svnt_export.h b/Planner_Manager/Interface/Planner_Manager_Interface_svnt_export.h new file mode 100644 index 00000000000..9f06b9a2c0d --- /dev/null +++ b/Planner_Manager/Interface/Planner_Manager_Interface_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_Manager_Interface_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_MANAGER_INTERFACE_SVNT +// ------------------------------ +#ifndef PLANNER_MANAGER_INTERFACE_SVNT_EXPORT_H +#define PLANNER_MANAGER_INTERFACE_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_MANAGER_INTERFACE_SVNT_HAS_DLL) +# define PLANNER_MANAGER_INTERFACE_SVNT_HAS_DLL 1 +#endif /* ! PLANNER_MANAGER_INTERFACE_SVNT_HAS_DLL */ + +#if defined (PLANNER_MANAGER_INTERFACE_SVNT_HAS_DLL) && (PLANNER_MANAGER_INTERFACE_SVNT_HAS_DLL == 1) +# if defined (PLANNER_MANAGER_INTERFACE_SVNT_BUILD_DLL) +# define PLANNER_MANAGER_INTERFACE_SVNT_Export ACE_Proper_Export_Flag +# define PLANNER_MANAGER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_MANAGER_INTERFACE_SVNT_BUILD_DLL */ +# define PLANNER_MANAGER_INTERFACE_SVNT_Export ACE_Proper_Import_Flag +# define PLANNER_MANAGER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_MANAGER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_MANAGER_INTERFACE_SVNT_BUILD_DLL */ +#else /* PLANNER_MANAGER_INTERFACE_SVNT_HAS_DLL == 1 */ +# define PLANNER_MANAGER_INTERFACE_SVNT_Export +# define PLANNER_MANAGER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) +# define PLANNER_MANAGER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_MANAGER_INTERFACE_SVNT_HAS_DLL == 1 */ + +// Set PLANNER_MANAGER_INTERFACE_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_MANAGER_INTERFACE_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_MANAGER_INTERFACE_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_MANAGER_INTERFACE_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_MANAGER_INTERFACE_SVNT_NTRACE */ + +#if (PLANNER_MANAGER_INTERFACE_SVNT_NTRACE == 1) +# define PLANNER_MANAGER_INTERFACE_SVNT_TRACE(X) +#else /* (PLANNER_MANAGER_INTERFACE_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_MANAGER_INTERFACE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_MANAGER_INTERFACE_SVNT_NTRACE == 1) */ + +#endif /* PLANNER_MANAGER_INTERFACE_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Planners/Base/Planner.idl b/Planners/Base/Planner.idl new file mode 100644 index 00000000000..23d87eb1f03 --- /dev/null +++ b/Planners/Base/Planner.idl @@ -0,0 +1,24 @@ +// Planner.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_PLANNER_IDL +#define RACE_PLANNER_IDL + +#include <Components.idl> +#include "RACE/Planners/Interface/Planner_I.idl" +#include "RACE/common/RACE_common.idl" + +module CIAO +{ + + module RACE + { + component Planner + { + provides Planner_I planner_i; + attribute string name; + attribute RACE_Classification type; + }; + }; + +}; + +#endif /* RACE_PLANNER_IDL */ diff --git a/Planners/Base/Planner.mpc b/Planners/Base/Planner.mpc new file mode 100644 index 00000000000..326daa16e49 --- /dev/null +++ b/Planners/Base/Planner.mpc @@ -0,0 +1,62 @@ +// generate_component_mpc.pl,v 1.9 2003/12/22 21:56:27 boris Exp +//Planner.mpc,v 1.2 2005/09/19 15:55:49 wotte Exp +// This file is generated with "generate_component_mpc.pl -n Planner" + +project(Planner_stub): ciao_deployment_stub, ciao_race_component { + + after += Planner_Interface_stub RACE_common_stub + sharedname = Planner_stub + idlflags += -Sc \ + -Wb,stub_export_macro=PLANNER_STUB_Export \ + -Wb,stub_export_include=Planner_stub_export.h \ + -Wb,skel_export_macro=PLANNER_SVNT_Export \ + -Wb,skel_export_include=Planner_svnt_export.h + dynamicflags = PLANNER_STUB_BUILD_DLL + libs += Planner_Interface_stub RACE_common_stub + + IDL_Files { + Planner.idl + } + + Source_Files { + PlannerC.cpp + } + + Header_Files { + PlannerC.h + } + + Inline_Files { + PlannerC.inl + } +} + +project(Planner_svnt) : ciao_servant_dnc, ciao_race_component { + + after += Planner_Interface_svnt Planner_stub + sharedname = Planner_svnt + libs += Planner_Interface_stub Planner_Interface_svnt Planner_stub RACE_common_stub + + idlflags += -Sc \ + -Wb,stub_export_macro=PLANNER_STUB_Export \ + -Wb,stub_export_include=Planner_stub_export.h \ + -Wb,skel_export_macro=PLANNER_SVNT_Export \ + -Wb,skel_export_include=Planner_svnt_export.h + dynamicflags = PLANNER_SVNT_BUILD_DLL + + IDL_Files { + Planner.idl + } + + Source_Files { + PlannerS.cpp + } + + Header_Files { + PlannerS.h + } + + Inline_Files { + PlannerS.inl + } +} diff --git a/Planners/Base/Planner_stub_export.h b/Planners/Base/Planner_stub_export.h new file mode 100644 index 00000000000..283b693a3e6 --- /dev/null +++ b/Planners/Base/Planner_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_STUB +// ------------------------------ +#ifndef PLANNER_STUB_EXPORT_H +#define PLANNER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_STUB_HAS_DLL) +# define PLANNER_STUB_HAS_DLL 1 +#endif /* ! PLANNER_STUB_HAS_DLL */ + +#if defined (PLANNER_STUB_HAS_DLL) && (PLANNER_STUB_HAS_DLL == 1) +# if defined (PLANNER_STUB_BUILD_DLL) +# define PLANNER_STUB_Export ACE_Proper_Export_Flag +# define PLANNER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_STUB_BUILD_DLL */ +# define PLANNER_STUB_Export ACE_Proper_Import_Flag +# define PLANNER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_STUB_BUILD_DLL */ +#else /* PLANNER_STUB_HAS_DLL == 1 */ +# define PLANNER_STUB_Export +# define PLANNER_STUB_SINGLETON_DECLARATION(T) +# define PLANNER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_STUB_HAS_DLL == 1 */ + +// Set PLANNER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_STUB_NTRACE */ + +#if (PLANNER_STUB_NTRACE == 1) +# define PLANNER_STUB_TRACE(X) +#else /* (PLANNER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_STUB_NTRACE == 1) */ + +#endif /* PLANNER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Planners/Base/Planner_svnt_export.h b/Planners/Base/Planner_svnt_export.h new file mode 100644 index 00000000000..db02816f7ce --- /dev/null +++ b/Planners/Base/Planner_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_SVNT +// ------------------------------ +#ifndef PLANNER_SVNT_EXPORT_H +#define PLANNER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_SVNT_HAS_DLL) +# define PLANNER_SVNT_HAS_DLL 1 +#endif /* ! PLANNER_SVNT_HAS_DLL */ + +#if defined (PLANNER_SVNT_HAS_DLL) && (PLANNER_SVNT_HAS_DLL == 1) +# if defined (PLANNER_SVNT_BUILD_DLL) +# define PLANNER_SVNT_Export ACE_Proper_Export_Flag +# define PLANNER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_SVNT_BUILD_DLL */ +# define PLANNER_SVNT_Export ACE_Proper_Import_Flag +# define PLANNER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_SVNT_BUILD_DLL */ +#else /* PLANNER_SVNT_HAS_DLL == 1 */ +# define PLANNER_SVNT_Export +# define PLANNER_SVNT_SINGLETON_DECLARATION(T) +# define PLANNER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_SVNT_HAS_DLL == 1 */ + +// Set PLANNER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_SVNT_NTRACE */ + +#if (PLANNER_SVNT_NTRACE == 1) +# define PLANNER_SVNT_TRACE(X) +#else /* (PLANNER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_SVNT_NTRACE == 1) */ + +#endif /* PLANNER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Planners/Interface/Planner_I.idl b/Planners/Interface/Planner_I.idl new file mode 100644 index 00000000000..9c0fadacf9d --- /dev/null +++ b/Planners/Interface/Planner_I.idl @@ -0,0 +1,47 @@ +// Planner_I.idl,v 1.1 2005/09/06 19:57:22 wotte Exp +#ifndef RACE_PLANNER_I_IDL +#define RACE_PLANNER_I_IDL + +#include "Packaging_Data.idl" +#include "RACE/common/RACE_common.idl" + +module CIAO +{ + + module RACE + { + exception PlannerFailure + { + string name; + string reason; + }; + + interface Planner_I + { + enum Domain_Change_Type + { + NODE_JOINED, + NODE_DISJOINED, + NODE_FAILED + }; + + struct Domain_Change + { + string hostname; + Domain_Change_Type change; + }; + + typedef sequence <Domain_Change> Domain_Changes; + + boolean process_plan (inout Plan_Actions plan) + raises (PlannerFailure); + boolean process_domain_change (in Domain_Changes changes, + out Plan_Actions plans) + raises (PlannerFailure); + readonly attribute string name; + }; + }; +}; + + +#endif /* RACE_PLANNER_I_IDL */ diff --git a/Planners/Interface/Planner_Interface.mpc b/Planners/Interface/Planner_Interface.mpc new file mode 100644 index 00000000000..0f17a0bbb74 --- /dev/null +++ b/Planners/Interface/Planner_Interface.mpc @@ -0,0 +1,60 @@ +// generate_component_mpc.pl,v 1.9 2003/12/22 21:56:27 boris Exp +//Planner_Interface.mpc,v 1.2 2005/09/19 15:55:49 wotte Exp +// This file is generated with "generate_component_mpc.pl -n Planner_I" + +project(Planner_Interface_stub): ciao_deployment_stub, ciao_race_component { + + sharedname = Planner_Interface_stub + idlflags += -Sc \ + -Wb,stub_export_macro=PLANNER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Planner_Interface_stub_export.h \ + -Wb,skel_export_macro=PLANNER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Planner_Interface_svnt_export.h + dynamicflags = PLANNER_INTERFACE_STUB_BUILD_DLL + + IDL_Files { + Planner_I.idl + } + + Source_Files { + Planner_IC.cpp + } + + Header_Files { + Planner_IC.h + } + + Inline_Files { + Planner_IC.inl + } +} + +project(Planner_Interface_svnt) : ciao_servant_dnc, ciao_race_component { + + after += Planner_Interface_stub + sharedname = Planner_Interface_svnt + libs += Planner_Interface_stub + + idlflags += -Sc \ + -Wb,stub_export_macro=PLANNER_INTERFACE_STUB_Export \ + -Wb,stub_export_include=Planner_Interface_stub_export.h \ + -Wb,skel_export_macro=PLANNER_INTERFACE_SVNT_Export \ + -Wb,skel_export_include=Planner_Interface_svnt_export.h + dynamicflags = PLANNER_INTERFACE_SVNT_BUILD_DLL + + IDL_Files { + Planner_I.idl + } + + Source_Files { + Planner_IS.cpp + } + + Header_Files { + Planner_IS.h + } + + Inline_Files { + Planner_IS.inl + } +} diff --git a/Planners/Interface/Planner_Interface_stub_export.h b/Planners/Interface/Planner_Interface_stub_export.h new file mode 100644 index 00000000000..5d72d9b0c36 --- /dev/null +++ b/Planners/Interface/Planner_Interface_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_Interface_stub_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_INTERFACE_STUB +// ------------------------------ +#ifndef PLANNER_INTERFACE_STUB_EXPORT_H +#define PLANNER_INTERFACE_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_INTERFACE_STUB_HAS_DLL) +# define PLANNER_INTERFACE_STUB_HAS_DLL 1 +#endif /* ! PLANNER_INTERFACE_STUB_HAS_DLL */ + +#if defined (PLANNER_INTERFACE_STUB_HAS_DLL) && (PLANNER_INTERFACE_STUB_HAS_DLL == 1) +# if defined (PLANNER_INTERFACE_STUB_BUILD_DLL) +# define PLANNER_INTERFACE_STUB_Export ACE_Proper_Export_Flag +# define PLANNER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_INTERFACE_STUB_BUILD_DLL */ +# define PLANNER_INTERFACE_STUB_Export ACE_Proper_Import_Flag +# define PLANNER_INTERFACE_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_INTERFACE_STUB_BUILD_DLL */ +#else /* PLANNER_INTERFACE_STUB_HAS_DLL == 1 */ +# define PLANNER_INTERFACE_STUB_Export +# define PLANNER_INTERFACE_STUB_SINGLETON_DECLARATION(T) +# define PLANNER_INTERFACE_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_INTERFACE_STUB_HAS_DLL == 1 */ + +// Set PLANNER_INTERFACE_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_INTERFACE_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_INTERFACE_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_INTERFACE_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_INTERFACE_STUB_NTRACE */ + +#if (PLANNER_INTERFACE_STUB_NTRACE == 1) +# define PLANNER_INTERFACE_STUB_TRACE(X) +#else /* (PLANNER_INTERFACE_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_INTERFACE_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_INTERFACE_STUB_NTRACE == 1) */ + +#endif /* PLANNER_INTERFACE_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Planners/Interface/Planner_Interface_svnt_export.h b/Planners/Interface/Planner_Interface_svnt_export.h new file mode 100644 index 00000000000..e0f8775e2c4 --- /dev/null +++ b/Planners/Interface/Planner_Interface_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// Planner_Interface_svnt_export.h,v 1.1 2005/09/06 19:57:22 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl PLANNER_INTERFACE_SVNT +// ------------------------------ +#ifndef PLANNER_INTERFACE_SVNT_EXPORT_H +#define PLANNER_INTERFACE_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (PLANNER_INTERFACE_SVNT_HAS_DLL) +# define PLANNER_INTERFACE_SVNT_HAS_DLL 1 +#endif /* ! PLANNER_INTERFACE_SVNT_HAS_DLL */ + +#if defined (PLANNER_INTERFACE_SVNT_HAS_DLL) && (PLANNER_INTERFACE_SVNT_HAS_DLL == 1) +# if defined (PLANNER_INTERFACE_SVNT_BUILD_DLL) +# define PLANNER_INTERFACE_SVNT_Export ACE_Proper_Export_Flag +# define PLANNER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define PLANNER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* PLANNER_INTERFACE_SVNT_BUILD_DLL */ +# define PLANNER_INTERFACE_SVNT_Export ACE_Proper_Import_Flag +# define PLANNER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define PLANNER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* PLANNER_INTERFACE_SVNT_BUILD_DLL */ +#else /* PLANNER_INTERFACE_SVNT_HAS_DLL == 1 */ +# define PLANNER_INTERFACE_SVNT_Export +# define PLANNER_INTERFACE_SVNT_SINGLETON_DECLARATION(T) +# define PLANNER_INTERFACE_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* PLANNER_INTERFACE_SVNT_HAS_DLL == 1 */ + +// Set PLANNER_INTERFACE_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (PLANNER_INTERFACE_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define PLANNER_INTERFACE_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define PLANNER_INTERFACE_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !PLANNER_INTERFACE_SVNT_NTRACE */ + +#if (PLANNER_INTERFACE_SVNT_NTRACE == 1) +# define PLANNER_INTERFACE_SVNT_TRACE(X) +#else /* (PLANNER_INTERFACE_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define PLANNER_INTERFACE_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (PLANNER_INTERFACE_SVNT_NTRACE == 1) */ + +#endif /* PLANNER_INTERFACE_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/Planners/StaticPlanner/StaticPlanner.cidl b/Planners/StaticPlanner/StaticPlanner.cidl new file mode 100644 index 00000000000..d9a3fbd277d --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner.cidl @@ -0,0 +1,22 @@ +#ifndef RACE_STATIC_PLANNER_CIDL +#define RACE_STATIC_PLANNER_CIDL + +#include "StaticPlanner.idl" + +module CIAO +{ + module RACE + { + composition session StaticPlanner_Impl + { + home executor StaticPlanner_Home_Exec + { + implements RACE::StaticPlanner_Home; + manages StaticPlanner_Exec; + }; + }; + }; +}; + + +#endif /* RACE_STATIC_PLANNER_CIDL */ diff --git a/Planners/StaticPlanner/StaticPlanner.idl b/Planners/StaticPlanner/StaticPlanner.idl new file mode 100644 index 00000000000..45351b17605 --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner.idl @@ -0,0 +1,25 @@ +//SimpleBinPacker.idl,v 1.1 2005/09/06 19:57:22 wotte Exp + +#ifndef RACE_STATIC_PLANNER_IDL +#define RACE_STATIC_PLANNER_IDL + +#include <Components.idl> +#include "../Base/Planner.idl" +#include "ciao/Target_Data.idl" + +module CIAO +{ + module RACE + { + component StaticPlanner : Planner + { + uses ::Deployment::TargetManager target_mgr; + }; + + home StaticPlanner_Home manages StaticPlanner + { + }; + }; +}; + +#endif /* RACE_STATIC_PLANNER_IDL */ diff --git a/Planners/StaticPlanner/StaticPlanner.mpc b/Planners/StaticPlanner/StaticPlanner.mpc new file mode 100644 index 00000000000..b9c11204d29 --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner.mpc @@ -0,0 +1,69 @@ +// $Id$ +// This file is generated with "generate_component_mpc.pl -p Planner_Interface -p Planner StaticPlanner" + +project(Planner_StaticPlanner_stub): ciao_client_dnc, ciao_race_component { + after += Planner_stub Planner_Interface_stub + libs += Planner_stub Planner_Interface_stub + sharedname = StaticPlanner_stub + idlflags += -Wb,stub_export_macro=STATICPLANNER_STUB_Export -Wb,stub_export_include=StaticPlanner_stub_export.h -Wb,skel_export_macro=STATICPLANNER_SVNT_Export -Wb,skel_export_include=StaticPlanner_svnt_export.h + dynamicflags = STATICPLANNER_STUB_BUILD_DLL + + IDL_Files { + StaticPlanner.idl + } + + Source_Files { + StaticPlannerC.cpp + } +} + +project(Planner_StaticPlanner_svnt) : ciao_servant_dnc, ciao_race_component { + after += Planner_svnt Planner_StaticPlanner_stub Planner_Interface_svnt + sharedname = StaticPlanner_svnt + libs += StaticPlanner_stub Planner_stub Planner_svnt Planner_Interface_stub Planner_Interface_svnt + + idlflags += -Wb,export_macro=STATICPLANNER_SVNT_Export -Wb,export_include=StaticPlanner_svnt_export.h + dynamicflags = STATICPLANNER_SVNT_BUILD_DLL + + CIDL_Files { + StaticPlanner.cidl + } + + IDL_Files { + StaticPlannerE.idl + } + + Source_Files { + StaticPlannerEC.cpp + StaticPlannerS.cpp + StaticPlanner_svnt.cpp + } +} + + +project(Planner_StaticPlanner_exec) : ciao_component_dnc, ciao_race_component { + after += Planner_StaticPlanner_svnt + sharedname = StaticPlanner_exec + libs += StaticPlanner_stub\ + StaticPlanner_svnt \ + Planner_Interface_stub \ + Planner_Interface_svnt \ + Planner_stub \ + Planner_svnt \ + RACE_common_stub + + idlflags += -Wb,export_macro=STATICPLANNER_EXEC_Export -Wb,export_include=StaticPlanner_exec_export.h + dynamicflags = STATICPLANNER_EXEC_BUILD_DLL + + IDL_Files { + + } + + Source_Files { + + StaticPlanner_exec.cpp + } +} + + + diff --git a/Planners/StaticPlanner/StaticPlanner_exec.cpp b/Planners/StaticPlanner/StaticPlanner_exec.cpp new file mode 100644 index 00000000000..a5ea4f68633 --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner_exec.cpp @@ -0,0 +1,391 @@ +#include "StaticPlanner_exec.h" +#include "ciao/CIAO_common.h" +#include "ciao/Deployment_DataC.h" +#include "common/RACE_Log_Msg.h" + +#define cpu_resource_name "Processor" +#define cpu_resource_type "CPULoad" +#define cpu_resource_prop_name "LoadAverage" + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_StaticPlanner_Impl + { + //================================================================== + // Facet Executor Implementation Class: Planner_I_exec_i + //================================================================== + + Planner_I_exec_i::Planner_I_exec_i (StaticPlanner_exec_i &comp) + : comp_ (comp) + { + } + + Planner_I_exec_i::~Planner_I_exec_i (void) + { + } + + // Operations from ::CIAO::RACE::Planner_I + + ::CORBA::Boolean + Planner_I_exec_i::process_plan ( + ::CIAO::RACE::Plan_Actions &plan_seq + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CIAO::RACE::PlannerFailure)) + { + ACE_DEBUG ((LM_DEBUG, "Entering StaticPlanner\n")); + try + { + + // check here if the plan is for teardown and it has previously been deployed + if (plan_seq[0].command == CIAO::RACE::TEARDOWN) + if (deployed_plans_.find (std::string (plan_seq[0].plan.UUID)) + == deployed_plans_.end ()) + return false; // I dont have any other suitable exception to throw ... + + // there will only be one plan ... + ::Deployment::DeploymentPlan plan = plan_seq [0].plan; + + for (CORBA::ULong i = 0; i < plan.instance.length (); ++i) + { + // Get the monolithic implementation that corresponds to + // this instance.... + CORBA::ULong pos = plan.instance[i].implementationRef; + ::Deployment::MonolithicDeploymentDescription &mono = + plan.implementation[pos]; + + for (CORBA::ULong j = 0; j < mono.execParameter.length (); ++j) + { + if (ACE_OS::strcmp (mono.execParameter[j].name.in (), + cpu_resource_prop_name) == 0) + { + // Found an interesting property... + CORBA::Long value; + mono.execParameter[j].value >>= value; + + // Build an IRDD + Deployment::InstanceResourceDeploymentDescription irdd; + irdd.resourceUsage = Deployment::InstanceUsesResource; + irdd.requirementName = cpu_resource_name; + irdd.resourceName = cpu_resource_type; + irdd.property.length (1); + + irdd.property[0].name = cpu_resource_prop_name; + irdd.property[0].value <<= value; + + // Append onto the instance + pos = plan.instance[i].deployedResource.length (); + plan.instance[i].deployedResource.length (pos + 1); + plan.instance[i].deployedResource[pos] = irdd; + } + } + } + + // Reserve resource with the target manager, throwing a failure exception + // if they are not available. + ::Deployment::TargetManager_var tgt_mgr = comp_.context_->get_connection_target_mgr (); + + + // check if plan is for teardown or deploy + if (plan_seq[0].command == CIAO::RACE::DEPLOY) + tgt_mgr->commitResources (plan); + else // else , teardown , so release resources + tgt_mgr->releaseResources (plan); + + } + catch (::Deployment::ResourceNotAvailable &ex) + { + ACE_ERROR ((LM_ERROR, "ResourceNotAvailable exception caught:\n" + "\tName: %s\n" + "\tType: %s\n" + "\tProperty Name: %s\n" + "\tElementName: %s\n" + "\tResourceName: %s\n", + ex.name.in (), ex.resourceType.in (), + ex.propertyName.in (), ex.elementName.in (), + ex.resourceName.in ())); + + ACE_CString error ("Planner failed due to exhaustion of "); + error += ex.resourceName.in (); + error += " resource on "; + error += ex.elementName.in (); + + throw PlannerFailure ("StaticPlanner", error.c_str ()); + } + catch (...) + { + throw PlannerFailure ("StaticPlanner", "Planning failed for an unknown reason"); + } + + // if plan was for deploy .. add it to a list , else delete it + + if (plan_seq[0].command == CIAO::RACE::DEPLOY) + { + DeployedPlanRecord deprec; + deprec.importance = Log::find_importance( plan_seq[0].package ); + deprec.plan = plan_seq[0].plan; + + deployed_plans_[std::string (plan_seq[0].plan.UUID)] = deprec; + } + else + deployed_plans_.erase( std::string(plan_seq[0].plan.UUID) ); + + + return true; + } + + + ::CORBA::Boolean Planner_I_exec_i::process_domain_change ( + const ::CIAO::RACE::Planner_I::Domain_Changes & changes, + ::CIAO::RACE::Plan_Actions_out plans + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + + for ( CORBA::ULong i = 0; i < changes.length(); i++ ) + { + ACE_DEBUG(( LM_DEBUG, "StaticPlanner::DomainChange - Host [%s] %s.\n", + changes[i].hostname.in(), + (changes[i].change == ::CIAO::RACE::Planner_I::NODE_JOINED)?"recovered":"lost" + )); + + // if node lost, look for a plan involving that node and emit plan failed message... + // no other action at this time. + + if ( changes[i].change == ::CIAO::RACE::Planner_I::NODE_FAILED ) + { + DeployedPlansItr bitr,eitr; + + bitr=deployed_plans_.begin(); + eitr=deployed_plans_.end(); + + for (;bitr != eitr;bitr++) + { + ACE_DEBUG(( LM_DEBUG, "StaticPlanner::DomainChange - Examining plan [%s] for node [%s].\n", + bitr->first.c_str(), + changes[i].hostname.in() + )); + + ::Deployment::DeploymentPlan& plan = bitr->second.plan; + + for (CORBA::ULong j = 0; j < plan.instance.length(); ++j) + { + if (ACE_OS::strcmp( plan.instance[j].node.in(), changes[i].hostname.in() ) == 0) + { + RACE_DEPLOYMENT_STATUS( + Log::EventType::AUTO_PLAN, Log::SubType::DEPLOYED_PLAN_FAILED, + bitr->first.c_str(), 0, + Log::Status::SUCCESS, + bitr->second.importance, + changes[i].hostname.in() + ); + break; + } + } + } + } + } + + ::CIAO::RACE::Plan_Actions::_var_type plans_out( new ::CIAO::RACE::Plan_Actions(0) ); + plans_out->length(0); + + plans = plans_out._retn(); + + return true; + } + + + char * + Planner_I_exec_i::name ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return CORBA::string_dup ("StaticPlanner"); + } + + //================================================================== + // Component Executor Implementation Class: StaticPlanner_exec_i + //================================================================== + + StaticPlanner_exec_i::StaticPlanner_exec_i (void) + { + } + + StaticPlanner_exec_i::~StaticPlanner_exec_i (void) + { + } + + // Supported or inherited operations. + + // Attribute operations. + + char * + StaticPlanner_exec_i::name ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + return CORBA::string_dup ("StaticPlanner"); + } + + void + StaticPlanner_exec_i::name ( + const char * /* name */ + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + // Your code here. + } + + char * + StaticPlanner_exec_i::type ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + // Your code here. + return 0; + } + + void + StaticPlanner_exec_i::type ( + const char * /* type */ + ACE_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + // Your code here. + } + + // Port operations. + + ::CIAO::RACE::CCM_Planner_I_ptr + StaticPlanner_exec_i::get_planner_i ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException)) + { + // Your code here. + return new Planner_I_exec_i (*this); + } + + // Operations from Components::SessionComponent + + void + StaticPlanner_exec_i::set_session_context ( + ::Components::SessionContext_ptr ctx + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + this->context_ = + StaticPlanner_Context::_narrow ( + ctx + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + + if (this->context_ == 0) + { + ACE_THROW ( ::CORBA::INTERNAL ()); + } + } + + void + StaticPlanner_exec_i::ciao_preactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + StaticPlanner_exec_i::ciao_postactivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + StaticPlanner_exec_i::ccm_activate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + StaticPlanner_exec_i::ccm_passivate ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + void + StaticPlanner_exec_i::ccm_remove ( + ACE_ENV_SINGLE_ARG_DECL_NOT_USED) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + // Your code here. + } + + //================================================================== + // Home Executor Implementation Class: StaticPlanner_Home_exec_i + //================================================================== + + StaticPlanner_Home_exec_i::StaticPlanner_Home_exec_i (void) + { + } + + StaticPlanner_Home_exec_i::~StaticPlanner_Home_exec_i (void) + { + } + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + ::Components::EnterpriseComponent_ptr + StaticPlanner_Home_exec_i::create ( + ACE_ENV_SINGLE_ARG_DECL) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::Components::CCMException)) + { + ::Components::EnterpriseComponent_ptr retval = + ::Components::EnterpriseComponent::_nil (); + + ACE_NEW_THROW_EX ( + retval, + StaticPlanner_exec_i, + ::CORBA::NO_MEMORY ()); + ACE_CHECK_RETURN (::Components::EnterpriseComponent::_nil ()); + + return retval; + } + + extern "C" STATICPLANNER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_StaticPlanner_Home_Impl (void) + { + ::Components::HomeExecutorBase_ptr retval = + ::Components::HomeExecutorBase::_nil (); + + ACE_NEW_RETURN ( + retval, + StaticPlanner_Home_exec_i, + ::Components::HomeExecutorBase::_nil ()); + + return retval; + } + } + } +} diff --git a/Planners/StaticPlanner/StaticPlanner_exec.h b/Planners/StaticPlanner/StaticPlanner_exec.h new file mode 100644 index 00000000000..08b52e46aec --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner_exec.h @@ -0,0 +1,215 @@ +// $Id$ +// +// **** Code generated by the **** +// **** Component Integrated ACE ORB (CIAO) CIDL Compiler **** +// CIAO has been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// CIDL Compiler has been developed by: +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about CIAO is available at: +// http://www.dre.vanderbilt.edu/CIAO + +#ifndef CIAO_STATICPLANNER_EXEC_H +#define CIAO_STATICPLANNER_EXEC_H + +#include /**/ "ace/pre.h" + +#include "StaticPlanner_svnt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "StaticPlanner_exec_export.h" +#include "tao/LocalObject.h" + +#include "ciao/Deployment_DataC.h" +#include <map> +#include <string> + +namespace CIAO +{ + namespace RACE + { + namespace CIDL_StaticPlanner_Impl + { + class StaticPlanner_exec_i; + + class STATICPLANNER_EXEC_Export Planner_I_exec_i + : public virtual ::CIAO::RACE::CCM_Planner_I, + public virtual TAO_Local_RefCounted_Object + { + public: + Planner_I_exec_i (StaticPlanner_exec_i &comp); + virtual ~Planner_I_exec_i (void); + + // Operations from ::CIAO::RACE::Planner_I + + virtual ::CORBA::Boolean + process_plan ( + ::CIAO::RACE::Plan_Actions & plan + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException, + ::CIAO::RACE::PlannerFailure)); + + virtual ::CORBA::Boolean + process_domain_change ( + const ::CIAO::RACE::Planner_I::Domain_Changes & /*changes*/, + ::CIAO::RACE::Plan_Actions_out /*plans*/ + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual char * + name ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + private: + StaticPlanner_exec_i &comp_; + + /// The plans deployed so far + // ACE_Unbounded_Set <Deployment::DeploymentPlan> deployed_plans_; + + struct DeployedPlanRecord { ::CORBA::Long importance; Deployment::DeploymentPlan plan; }; + typedef std::map <std::string , DeployedPlanRecord> DeployedPlans; + typedef DeployedPlans::iterator DeployedPlansItr; + DeployedPlans deployed_plans_; + + }; + + class STATICPLANNER_EXEC_Export StaticPlanner_exec_i + : public virtual StaticPlanner_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + friend class Planner_I_exec_i; + + StaticPlanner_exec_i (void); + virtual ~StaticPlanner_exec_i (void); + + // Supported or inherited operations. + + // Attribute operations. + + virtual char * + name ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + name ( + const char * name + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + virtual char * + type ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + void + type ( + const char * type + ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( ::CORBA::SystemException)); + + // Port operations. + + virtual ::CIAO::RACE::CCM_Planner_I_ptr + get_planner_i ( + ACE_ENV_SINGLE_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 + ciao_postactivate ( + 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 + 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: + StaticPlanner_Context *context_; + }; + + class STATICPLANNER_EXEC_Export StaticPlanner_Home_exec_i + : public virtual StaticPlanner_Home_Exec, + public virtual TAO_Local_RefCounted_Object + { + public: + StaticPlanner_Home_exec_i (void); + virtual ~StaticPlanner_Home_exec_i (void); + + // Supported or inherited operations. + + // Home operations. + + // Factory and finder operations. + + // Attribute operations. + + // Implicit operations. + + virtual ::Components::EnterpriseComponent_ptr + create ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Components::CCMException)); + }; + + extern "C" STATICPLANNER_EXEC_Export ::Components::HomeExecutorBase_ptr + create_CIAO_RACE_StaticPlanner_Home_Impl (void); + } + } +} + +#include /**/ "ace/post.h" + +#endif /* CIAO_STATICPLANNER_EXEC_H */ diff --git a/Planners/StaticPlanner/StaticPlanner_exec_export.h b/Planners/StaticPlanner/StaticPlanner_exec_export.h new file mode 100644 index 00000000000..9b139cd8ef3 --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner_exec_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl STATICPLANNER_EXEC +// ------------------------------ +#ifndef STATICPLANNER_EXEC_EXPORT_H +#define STATICPLANNER_EXEC_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (STATICPLANNER_EXEC_HAS_DLL) +# define STATICPLANNER_EXEC_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && STATICPLANNER_EXEC_HAS_DLL */ + +#if !defined (STATICPLANNER_EXEC_HAS_DLL) +# define STATICPLANNER_EXEC_HAS_DLL 1 +#endif /* ! STATICPLANNER_EXEC_HAS_DLL */ + +#if defined (STATICPLANNER_EXEC_HAS_DLL) && (STATICPLANNER_EXEC_HAS_DLL == 1) +# if defined (STATICPLANNER_EXEC_BUILD_DLL) +# define STATICPLANNER_EXEC_Export ACE_Proper_Export_Flag +# define STATICPLANNER_EXEC_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define STATICPLANNER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* STATICPLANNER_EXEC_BUILD_DLL */ +# define STATICPLANNER_EXEC_Export ACE_Proper_Import_Flag +# define STATICPLANNER_EXEC_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define STATICPLANNER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* STATICPLANNER_EXEC_BUILD_DLL */ +#else /* STATICPLANNER_EXEC_HAS_DLL == 1 */ +# define STATICPLANNER_EXEC_Export +# define STATICPLANNER_EXEC_SINGLETON_DECLARATION(T) +# define STATICPLANNER_EXEC_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* STATICPLANNER_EXEC_HAS_DLL == 1 */ + +// Set STATICPLANNER_EXEC_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (STATICPLANNER_EXEC_NTRACE) +# if (ACE_NTRACE == 1) +# define STATICPLANNER_EXEC_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define STATICPLANNER_EXEC_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !STATICPLANNER_EXEC_NTRACE */ + +#if (STATICPLANNER_EXEC_NTRACE == 1) +# define STATICPLANNER_EXEC_TRACE(X) +#else /* (STATICPLANNER_EXEC_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define STATICPLANNER_EXEC_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (STATICPLANNER_EXEC_NTRACE == 1) */ + +#endif /* STATICPLANNER_EXEC_EXPORT_H */ + +// End of auto generated file. diff --git a/Planners/StaticPlanner/StaticPlanner_stub_export.h b/Planners/StaticPlanner/StaticPlanner_stub_export.h new file mode 100644 index 00000000000..5d55326cda1 --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner_stub_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl STATICPLANNER_STUB +// ------------------------------ +#ifndef STATICPLANNER_STUB_EXPORT_H +#define STATICPLANNER_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (STATICPLANNER_STUB_HAS_DLL) +# define STATICPLANNER_STUB_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && STATICPLANNER_STUB_HAS_DLL */ + +#if !defined (STATICPLANNER_STUB_HAS_DLL) +# define STATICPLANNER_STUB_HAS_DLL 1 +#endif /* ! STATICPLANNER_STUB_HAS_DLL */ + +#if defined (STATICPLANNER_STUB_HAS_DLL) && (STATICPLANNER_STUB_HAS_DLL == 1) +# if defined (STATICPLANNER_STUB_BUILD_DLL) +# define STATICPLANNER_STUB_Export ACE_Proper_Export_Flag +# define STATICPLANNER_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define STATICPLANNER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* STATICPLANNER_STUB_BUILD_DLL */ +# define STATICPLANNER_STUB_Export ACE_Proper_Import_Flag +# define STATICPLANNER_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define STATICPLANNER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* STATICPLANNER_STUB_BUILD_DLL */ +#else /* STATICPLANNER_STUB_HAS_DLL == 1 */ +# define STATICPLANNER_STUB_Export +# define STATICPLANNER_STUB_SINGLETON_DECLARATION(T) +# define STATICPLANNER_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* STATICPLANNER_STUB_HAS_DLL == 1 */ + +// Set STATICPLANNER_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (STATICPLANNER_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define STATICPLANNER_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define STATICPLANNER_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !STATICPLANNER_STUB_NTRACE */ + +#if (STATICPLANNER_STUB_NTRACE == 1) +# define STATICPLANNER_STUB_TRACE(X) +#else /* (STATICPLANNER_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define STATICPLANNER_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (STATICPLANNER_STUB_NTRACE == 1) */ + +#endif /* STATICPLANNER_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/Planners/StaticPlanner/StaticPlanner_svnt_export.h b/Planners/StaticPlanner/StaticPlanner_svnt_export.h new file mode 100644 index 00000000000..cca91acbb60 --- /dev/null +++ b/Planners/StaticPlanner/StaticPlanner_svnt_export.h @@ -0,0 +1,58 @@ + +// -*- C++ -*- +// $Id$ +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl STATICPLANNER_SVNT +// ------------------------------ +#ifndef STATICPLANNER_SVNT_EXPORT_H +#define STATICPLANNER_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if defined (ACE_AS_STATIC_LIBS) && !defined (STATICPLANNER_SVNT_HAS_DLL) +# define STATICPLANNER_SVNT_HAS_DLL 0 +#endif /* ACE_AS_STATIC_LIBS && STATICPLANNER_SVNT_HAS_DLL */ + +#if !defined (STATICPLANNER_SVNT_HAS_DLL) +# define STATICPLANNER_SVNT_HAS_DLL 1 +#endif /* ! STATICPLANNER_SVNT_HAS_DLL */ + +#if defined (STATICPLANNER_SVNT_HAS_DLL) && (STATICPLANNER_SVNT_HAS_DLL == 1) +# if defined (STATICPLANNER_SVNT_BUILD_DLL) +# define STATICPLANNER_SVNT_Export ACE_Proper_Export_Flag +# define STATICPLANNER_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define STATICPLANNER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* STATICPLANNER_SVNT_BUILD_DLL */ +# define STATICPLANNER_SVNT_Export ACE_Proper_Import_Flag +# define STATICPLANNER_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define STATICPLANNER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* STATICPLANNER_SVNT_BUILD_DLL */ +#else /* STATICPLANNER_SVNT_HAS_DLL == 1 */ +# define STATICPLANNER_SVNT_Export +# define STATICPLANNER_SVNT_SINGLETON_DECLARATION(T) +# define STATICPLANNER_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* STATICPLANNER_SVNT_HAS_DLL == 1 */ + +// Set STATICPLANNER_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (STATICPLANNER_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define STATICPLANNER_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define STATICPLANNER_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !STATICPLANNER_SVNT_NTRACE */ + +#if (STATICPLANNER_SVNT_NTRACE == 1) +# define STATICPLANNER_SVNT_TRACE(X) +#else /* (STATICPLANNER_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define STATICPLANNER_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (STATICPLANNER_SVNT_NTRACE == 1) */ + +#endif /* STATICPLANNER_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/common/RACE_Log_Msg.h b/common/RACE_Log_Msg.h new file mode 100644 index 00000000000..5583cab4f1b --- /dev/null +++ b/common/RACE_Log_Msg.h @@ -0,0 +1,293 @@ +/** + * @file RACE_Log_Msg.h + * @author William Otte <wotte@dre.vanderbilt.edu> + * + * Logging macros used in RACE. + */ + +#include "common/RACE_commonC.h" + +namespace CIAO +{ + namespace RACE + { + namespace Log + { + CORBA::Long find_importance (const ::Deployment::PackageConfiguration &package) + { + if (package.basePackage.length () == 0) + return 0; + + const Deployment::Properties &configProperties = + package.basePackage[0].implementation[0].referencedImplementation.configProperty; + + for (CORBA::ULong i = 0; i < configProperties.length (); ++i) + { + if (ACE_OS::strcmp ("Importance", configProperties[i].name.in ()) == 0) + { + CORBA::Long retval (0); + configProperties[i].value >>= retval; + return retval; + } + } + + return 0; + } + + struct EventType + { + enum EventTypeEnum + { + INVALID = 0, + MANUAL_PLAN = 1, + AUTO_PLAN = 2, + TYPE_MAX=99 + }; + }; + + struct SubType + { + enum SubTypeEnum + { + INVALID = 0, + DEPLOY_BEGIN = 1, + DEPLOY_END = 2, + TEARDOWN_BEGIN = 3, + TEARDOWN_END = 4, + PLANNING_BEGIN = 5, + PLANNING_END = 6, + SWAPOUT_BEGIN = 7, + SWAPOUT_END = 8, + COMPONENT_DEPLOY = 9, + COMPONENT_TEARDOWN = 10, + DEPLOYED_PLAN_FAILED = 11, + SUBTYPE_MAX = 99 + }; + }; + + struct Status + { + enum StatusEnum + { + SUCCESS = 0, + FAILURE = 1, + + STATUS_MAX = 99 + }; + }; + + struct EventMark { + enum EventMarkEnum { + BEGIN_EVENT, END_EVENT, // Used with actions from planners + BEGIN_PLAN, END_PLAN, // Used by planner mgr for planning + COMPONENT_DEPLOY // Used by planner mgr for details + }; + }; + + inline bool getEventType( + ::CIAO::RACE::Action action, + EventMark::EventMarkEnum mark, + Log::EventType::EventTypeEnum& evt, + Log::SubType::SubTypeEnum& svt ) + { + // update this switch when changes to action require mapping to EventType + switch (action) + { + case ::CIAO::RACE::TEARDOWN: + case ::CIAO::RACE::DEPLOY: + case ::CIAO::RACE::AUTO_TEARDOWN: + evt = Log::EventType::MANUAL_PLAN; + break; + case ::CIAO::RACE::REPLAN_DEPLOY: + case ::CIAO::RACE::REPLAN_TEARDOWN: + case ::CIAO::RACE::REPLAN_AUTO_TEARDOWN: + evt = Log::EventType::AUTO_PLAN; + break; + default: + ACE_DEBUG ((LM_DEBUG, "RACE Log: !!Unhandled Action Type!! ... Bailing out!\n")); + return false; + } + + // update these switches when changes to action require mapping to SubType + switch (mark) + { + case EventMark::BEGIN_PLAN: + svt = SubType::PLANNING_BEGIN; + break; + case EventMark::END_PLAN: + svt = SubType::PLANNING_END; + break; + case EventMark::COMPONENT_DEPLOY: + switch (action) + { + case ::CIAO::RACE::TEARDOWN: + case ::CIAO::RACE::AUTO_TEARDOWN: + case ::CIAO::RACE::REPLAN_TEARDOWN: + case ::CIAO::RACE::REPLAN_AUTO_TEARDOWN: + svt = SubType::COMPONENT_TEARDOWN; + break; + case ::CIAO::RACE::DEPLOY: + case ::CIAO::RACE::REPLAN_DEPLOY: + svt = SubType::COMPONENT_DEPLOY; + break; + default: + ACE_DEBUG ((LM_DEBUG, + "RACE Log: !!Unhandled Action Type!! ... Bailing out!\n")); + return false; + } + break; + case EventMark::BEGIN_EVENT: + case EventMark::END_EVENT: + switch (action) + { + case ::CIAO::RACE::TEARDOWN: + case ::CIAO::RACE::REPLAN_TEARDOWN: + svt = (mark==EventMark::BEGIN_EVENT)? + Log::SubType::TEARDOWN_BEGIN:Log::SubType::TEARDOWN_END; + break; + + case ::CIAO::RACE::DEPLOY: + case ::CIAO::RACE::REPLAN_DEPLOY: + svt = (mark==EventMark::BEGIN_EVENT)? + Log::SubType::DEPLOY_BEGIN:Log::SubType::DEPLOY_END; + break; + + case ::CIAO::RACE::AUTO_TEARDOWN: + case ::CIAO::RACE::REPLAN_AUTO_TEARDOWN: + svt = (mark==EventMark::BEGIN_EVENT)? + Log::SubType::SWAPOUT_BEGIN:Log::SubType::SWAPOUT_END; + break; + default: + ACE_DEBUG(( LM_DEBUG, "RACE Log: !!Unhandled Action!!... Bailing out!\n")); + return false; + } + break; + default: + ACE_DEBUG(( LM_DEBUG, "RACE Log: !!Unhandled EventMark!!... Bailing out!\n")); + return false; + + } + + return true; + } + + + inline void RACE_DEPLOYMENT_STATUS ( + EventType::EventTypeEnum etype, + SubType::SubTypeEnum subtype, + const char *UUID, + CORBA::ULong sequence, + Status::StatusEnum status, + const char *arg1, + CORBA::Long arg2, + const char *arg3) + { + ACE_DEBUG((LM_INFO, "B;%i;%i;RACE;%s;%i;%i;3;%s;%d;%s\n", + etype, + subtype, + UUID, + sequence, + status, + arg1, + arg2, + arg3 )); + } + + inline void RACE_DEPLOYMENT_STATUS ( + ::CIAO::RACE::Action action, + EventMark::EventMarkEnum mark, + const char *UUID, + CORBA::ULong sequence, + Status::StatusEnum status, + const char *arg1, + CORBA::Long arg2, + const char *arg3 ) + { + EventType::EventTypeEnum evt; + SubType::SubTypeEnum svt; + + if (getEventType( action, mark, evt, svt )) + RACE_DEPLOYMENT_STATUS( + evt, svt, UUID, sequence, status, arg1, arg2, arg3 ); + + return; + } + + + inline void RACE_DEPLOYMENT_STATUS ( + EventType::EventTypeEnum etype, + SubType::SubTypeEnum subtype, + const char *UUID, + CORBA::ULong sequence, + Status::StatusEnum status, + CORBA::Long arg1, + const char *arg2) + { + ACE_DEBUG((LM_INFO, "B;%i;%i;RACE;%s;%i;%i;2;%d;%s\n", + etype, + subtype, + UUID, + sequence, + status, + arg1, + arg2)); + } + + inline void RACE_DEPLOYMENT_STATUS ( + ::CIAO::RACE::Action action, + EventMark::EventMarkEnum mark, + const char *UUID, + CORBA::ULong sequence, + Status::StatusEnum status, + CORBA::Long arg1, + const char *arg2 ) + { + EventType::EventTypeEnum evt; + SubType::SubTypeEnum svt; + + if (getEventType( action, mark, evt, svt )) + RACE_DEPLOYMENT_STATUS( + evt, svt, UUID, sequence, status, arg1, arg2 ); + + return; + } + + inline void RACE_DEPLOYMENT_STATUS ( + EventType::EventTypeEnum etype, + SubType::SubTypeEnum subtype, + const char *UUID, + CORBA::ULong sequence, + Status::StatusEnum status, + const char *message) + { + ACE_DEBUG((LM_INFO, "B;%i;%i;RACE;%s;%i;%i;1;%s\n", + etype, + subtype, + UUID, + sequence, + status, + message)); + } + + inline void RACE_DEPLOYMENT_STATUS ( + ::CIAO::RACE::Action action, + EventMark::EventMarkEnum mark, + const char *UUID, + CORBA::ULong sequence, + Status::StatusEnum status, + const char *message) + { + EventType::EventTypeEnum evt; + SubType::SubTypeEnum svt; + + if (getEventType( action, mark, evt, svt )) + RACE_DEPLOYMENT_STATUS ( + evt, svt, UUID, sequence, status, message ); + + return; + } + } + } +} + +using CIAO::RACE::Log::RACE_DEPLOYMENT_STATUS; diff --git a/common/RACE_common.idl b/common/RACE_common.idl new file mode 100644 index 00000000000..716fe6831de --- /dev/null +++ b/common/RACE_common.idl @@ -0,0 +1,44 @@ +//RACE_common.idl,v 1.1 2005/09/06 19:57:23 wotte Exp +#ifndef RACE_COMMON_IDL +#define RACE_COMMON_IDL + +#include "ciao/Packaging_Data.idl" + +module CIAO +{ + module RACE + { + typedef string RACE_Classification; + typedef sequence <RACE_Classification> RACE_Classifications; + + struct FlowItem + { + string planner; + RACE_Classification classification; + }; + + typedef sequence <FlowItem> PlannerFlow; + + enum Action + { + TEARDOWN, + DEPLOY, + AUTO_TEARDOWN, + REPLAN_TEARDOWN, + REPLAN_DEPLOY, + REPLAN_AUTO_TEARDOWN + }; + + struct Plan_Action + { + Action command; + Deployment::DeploymentPlan plan; + Deployment::PackageConfiguration package; + }; + + typedef sequence<Plan_Action> Plan_Actions; + + }; +}; + +#endif /* RACE_COMMON_IDL */ diff --git a/common/RACE_common.mpc b/common/RACE_common.mpc new file mode 100644 index 00000000000..5ad2bc13d91 --- /dev/null +++ b/common/RACE_common.mpc @@ -0,0 +1,25 @@ +//project(RACE_common_stub): taolib_with_idl, anytypecode { +project(RACE_common_stub): ciao_deployment_stub { + + sharedname = RACE_common_stub + idlflags += -Wb,stub_export_macro=RACE_COMMON_STUB_Export \ + -Wb,stub_export_include=RACE_common_stub_export.h \ + -SS + dynamicflags = RACE_COMMON_STUB_BUILD_DLL + + IDL_Files { + RACE_common.idl + } + + Source_Files { + RACE_commonC.cpp + } + + Header_Files { + RACE_commonC.h + } + + Inline_Files { + RACE_commonC.inl + } +} diff --git a/common/RACE_common_stub_export.h b/common/RACE_common_stub_export.h new file mode 100644 index 00000000000..9e5283fbe6f --- /dev/null +++ b/common/RACE_common_stub_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// RACE_common_stub_export.h,v 1.1 2005/09/06 19:57:23 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl RACE_COMMON_STUB +// ------------------------------ +#ifndef RACE_COMMON_STUB_EXPORT_H +#define RACE_COMMON_STUB_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (RACE_COMMON_STUB_HAS_DLL) +# define RACE_COMMON_STUB_HAS_DLL 1 +#endif /* ! RACE_COMMON_STUB_HAS_DLL */ + +#if defined (RACE_COMMON_STUB_HAS_DLL) && (RACE_COMMON_STUB_HAS_DLL == 1) +# if defined (RACE_COMMON_STUB_BUILD_DLL) +# define RACE_COMMON_STUB_Export ACE_Proper_Export_Flag +# define RACE_COMMON_STUB_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define RACE_COMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* RACE_COMMON_STUB_BUILD_DLL */ +# define RACE_COMMON_STUB_Export ACE_Proper_Import_Flag +# define RACE_COMMON_STUB_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define RACE_COMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* RACE_COMMON_STUB_BUILD_DLL */ +#else /* RACE_COMMON_STUB_HAS_DLL == 1 */ +# define RACE_COMMON_STUB_Export +# define RACE_COMMON_STUB_SINGLETON_DECLARATION(T) +# define RACE_COMMON_STUB_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* RACE_COMMON_STUB_HAS_DLL == 1 */ + +// Set RACE_COMMON_STUB_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (RACE_COMMON_STUB_NTRACE) +# if (ACE_NTRACE == 1) +# define RACE_COMMON_STUB_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define RACE_COMMON_STUB_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !RACE_COMMON_STUB_NTRACE */ + +#if (RACE_COMMON_STUB_NTRACE == 1) +# define RACE_COMMON_STUB_TRACE(X) +#else /* (RACE_COMMON_STUB_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define RACE_COMMON_STUB_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (RACE_COMMON_STUB_NTRACE == 1) */ + +#endif /* RACE_COMMON_STUB_EXPORT_H */ + +// End of auto generated file. diff --git a/common/RACE_common_svnt_export.h b/common/RACE_common_svnt_export.h new file mode 100644 index 00000000000..fd12b524e69 --- /dev/null +++ b/common/RACE_common_svnt_export.h @@ -0,0 +1,54 @@ + +// -*- C++ -*- +// RACE_common_svnt_export.h,v 1.1 2005/09/06 19:57:23 wotte Exp +// Definition for Win32 Export directives. +// This file is generated automatically by generate_export_file.pl RACE_COMMON_SVNT +// ------------------------------ +#ifndef RACE_COMMON_SVNT_EXPORT_H +#define RACE_COMMON_SVNT_EXPORT_H + +#include "ace/config-all.h" + +#if !defined (RACE_COMMON_SVNT_HAS_DLL) +# define RACE_COMMON_SVNT_HAS_DLL 1 +#endif /* ! RACE_COMMON_SVNT_HAS_DLL */ + +#if defined (RACE_COMMON_SVNT_HAS_DLL) && (RACE_COMMON_SVNT_HAS_DLL == 1) +# if defined (RACE_COMMON_SVNT_BUILD_DLL) +# define RACE_COMMON_SVNT_Export ACE_Proper_Export_Flag +# define RACE_COMMON_SVNT_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) +# define RACE_COMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# else /* RACE_COMMON_SVNT_BUILD_DLL */ +# define RACE_COMMON_SVNT_Export ACE_Proper_Import_Flag +# define RACE_COMMON_SVNT_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) +# define RACE_COMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +# endif /* RACE_COMMON_SVNT_BUILD_DLL */ +#else /* RACE_COMMON_SVNT_HAS_DLL == 1 */ +# define RACE_COMMON_SVNT_Export +# define RACE_COMMON_SVNT_SINGLETON_DECLARATION(T) +# define RACE_COMMON_SVNT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) +#endif /* RACE_COMMON_SVNT_HAS_DLL == 1 */ + +// Set RACE_COMMON_SVNT_NTRACE = 0 to turn on library specific tracing even if +// tracing is turned off for ACE. +#if !defined (RACE_COMMON_SVNT_NTRACE) +# if (ACE_NTRACE == 1) +# define RACE_COMMON_SVNT_NTRACE 1 +# else /* (ACE_NTRACE == 1) */ +# define RACE_COMMON_SVNT_NTRACE 0 +# endif /* (ACE_NTRACE == 1) */ +#endif /* !RACE_COMMON_SVNT_NTRACE */ + +#if (RACE_COMMON_SVNT_NTRACE == 1) +# define RACE_COMMON_SVNT_TRACE(X) +#else /* (RACE_COMMON_SVNT_NTRACE == 1) */ +# if !defined (ACE_HAS_TRACE) +# define ACE_HAS_TRACE +# endif /* ACE_HAS_TRACE */ +# define RACE_COMMON_SVNT_TRACE(X) ACE_TRACE_IMPL(X) +# include "ace/Trace.h" +#endif /* (RACE_COMMON_SVNT_NTRACE == 1) */ + +#endif /* RACE_COMMON_SVNT_EXPORT_H */ + +// End of auto generated file. diff --git a/descriptors/Domain.cdd b/descriptors/Domain.cdd new file mode 100644 index 00000000000..179a5fbfcee --- /dev/null +++ b/descriptors/Domain.cdd @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no" ?> +<Deployment:domain xmlns:Deployment="http://www.omg.org/Deployment" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <UUID>BCB38121-9F67-4D0D-9363-65FF3AE0188A</UUID> + + <node> + <name>blade29</name> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + + <node> + <name>blade30</name> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + + <node> + <name>blade31</name> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + + <node> + <name>blade32</name> + <resource> + <name>CPU</name> + <resourceType>MaximumCPU</resourceType> + <property> + <name>AllowedCPU</name> + <kind>Maximum</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>90</long> + </value> + </value> + </property> + </resource> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + + <node> + <name>blade33</name> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + + <node> + <name>blade34</name> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + + <node> + <name>blade35</name> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + + <node> + <name>blade36</name> + <resource> + <name>Processor</name> + <resourceType>CPULoad</resourceType> + <property> + <name>LoadAverage</name> + <kind>Quantity</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>100</double> + </value> + </value> + </property> + </resource> + </node> + +</Deployment:domain> diff --git a/descriptors/NodeDetails.dat b/descriptors/NodeDetails.dat new file mode 100644 index 00000000000..7b8304bc6f6 --- /dev/null +++ b/descriptors/NodeDetails.dat @@ -0,0 +1,10 @@ +blade29 corbaloc:iiop:localhost:50000/NodeManager +blade30 corbaloc:iiop:localhost:50001/NodeManager +blade31 corbaloc:iiop:localhost:50002/NodeManager +blade32 corbaloc:iiop:localhost:50003/NodeManager +blade33 corbaloc:iiop:localhost:50004/NodeManager +blade34 corbaloc:iiop:localhost:50005/NodeManager +blade35 corbaloc:iiop:localhost:50006/NodeManager +blade36 corbaloc:iiop:localhost:50007/NodeManager +blade37 corbaloc:iiop:localhost:50008/NodeManager +blade38 corbaloc:iiop:localhost:50009/NodeManager diff --git a/descriptors/RACE.cdp b/descriptors/RACE.cdp new file mode 100644 index 00000000000..0100f677766 --- /dev/null +++ b/descriptors/RACE.cdp @@ -0,0 +1,1835 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no" ?> +<Deployment:deploymentPlan xmlns:Deployment="http://www.omg.org/Deployment" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <UUID>1D2C2C63-CE33-4088-9443-781D080D8857</UUID> + + <implementation id="_2D19FD96-440B-48D4-8D68-4E9B466B2BCC"> + <name>RT1H_Combined.ComponentImplementations.Config_Op_Impl.Config_Op</name> + <source/> + <artifact>_304555B7-9E3A-4DC5-9535-FA774FAA5070</artifact> + <artifact>_358C7270-F290-465E-B0E4-5FD390980B44</artifact> + <artifact>_C4A896EE-C035-45F1-8F14-2320383B1991</artifact> + <execParameter> + <name>LoadAverage</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>0</long> + </value> + </value> + </execParameter> + <execParameter> + <name>Memory</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>50</double> + </value> + </value> + </execParameter> + <execParameter> + <name>Bandwidth</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>25</double> + </value> + </value> + </execParameter> + </implementation> + + <implementation id="_DA5C3C13-030E-4971-A0BF-8631563EFDF3"> + <name>RT1H_Combined.ComponentImplementations.Planner_One_Impl.MonolithicImplementation</name> + <source/> + <artifact>_6C7AA3D5-7A09-4DEF-8D49-60A4E1DE173D</artifact> + <artifact>_1DAD54BC-F7B5-41E3-9FFC-3E0AE255D989</artifact> + <artifact>_66E9CA12-F886-4760-A9B3-DB1E3F27B920</artifact> + <execParameter> + <name>LoadAverage</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>0</long> + </value> + </value> + </execParameter> + <execParameter> + <name>Memory</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>50</double> + </value> + </value> + </execParameter> + <execParameter> + <name>Bandwidth</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>25</double> + </value> + </value> + </execParameter> + </implementation> + + <implementation id="_A7DAA16F-D455-4C63-92CE-05B98DD34B15"> + <name>RT1H_Combined.ComponentImplementations.Planner_Three_Impl.MonolithicImplementation</name> + <source/> + <artifact>_2748D2D1-AAE5-4934-A43F-1639241C4351</artifact> + <artifact>_556249CC-E874-4BC6-9411-1B33EB2B895B</artifact> + <artifact>_458C6E27-87CA-4F77-8036-C9F612511B6F</artifact> + <execParameter> + <name>LoadAverage</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>0</long> + </value> + </value> + </execParameter> + <execParameter> + <name>Bandwidth</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>25</double> + </value> + </value> + </execParameter> + <execParameter> + <name>Memory</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>50</double> + </value> + </value> + </execParameter> + </implementation> + + <implementation id="_A8181747-270E-43FF-B723-50825AA8EA74"> + <name>RT1H_Combined.ComponentImplementations.Env_Dectector_Impl.MonolithicImplementation</name> + <source/> + <artifact>_1A46D81D-989F-406B-9E87-A57D63ADDF43</artifact> + <artifact>_208D7378-B123-4F15-B376-CAA58B5CB1E0</artifact> + <artifact>_5D7CAC69-4E3B-45F9-BACD-B12D3A86AC7A</artifact> + <execParameter> + <name>LoadAverage</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>0</long> + </value> + </value> + </execParameter> + <execParameter> + <name>Memory</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>50</double> + </value> + </value> + </execParameter> + <execParameter> + <name>Bandwidth</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>25</double> + </value> + </value> + </execParameter> + </implementation> + + <implementation id="_05FAFE3F-76B3-4C6E-A86B-0225B9E76909"> + <name>RT1H_Combined.ComponentImplementations.Effector_Main_Impl.MonolithicImplementation</name> + <source/> + <artifact>_D40E03AB-CE43-49D6-A7FF-C1231FE98898</artifact> + <artifact>_840618C0-5513-4389-97A4-C53EB87B29A0</artifact> + <artifact>_E1AF706E-0B37-480B-8B26-E844FE2E9C3E</artifact> + <execParameter> + <name>LoadAverage</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>0</long> + </value> + </value> + </execParameter> + <execParameter> + <name>Memory</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>50</double> + </value> + </value> + </execParameter> + <execParameter> + <name>Bandwidth</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>25</double> + </value> + </value> + </execParameter> + </implementation> + + <implementation id="_8D45FC0E-C3DD-4671-926D-A08430B37D37"> + <name>RT1H_Combined.ComponentImplementations.Effector_Secondary_Impl.MonolithicImplementation</name> + <source/> + <artifact>__31B2C21F-86C7-4306-AA10-33687687B5D0</artifact> + <artifact>__C7A0B01C-6C13-4EAA-8527-155035BF1A00</artifact> + <artifact>__2F43BA6B-2749-4744-B9C4-18F4AEAC16C9</artifact> + <execParameter> + <name>LoadAverage</name> + <value> + <type> + <kind>tk_long</kind> + </type> + <value> + <long>0</long> + </value> + </value> + </execParameter> + <execParameter> + <name>Memory</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>50</double> + </value> + </value> + </execParameter> + <execParameter> + <name>Bandwidth</name> + <value> + <type> + <kind>tk_double</kind> + </type> + <value> + <double>25</double> + </value> + </value> + </execParameter> + </implementation> + + <implementation id="_D98AF36F-11FA-43A4-8FAD-C14A461437EE"> + <name>RACE.ComponentImplementations.Central_MonitorImplementation.Central_MonitorMonolithicImpl</name> + <source/> + <artifact>__032AE7B6-3ABD-478A-B0D7-56BC4AAEF0B9</artifact> + <artifact>__00B105AB-50F5-49B7-A822-9B267F2D8898</artifact> + <artifact>__BF4AE6A2-BE32-4B8E-9919-C812EC16BF00</artifact> + </implementation> + + <implementation id="_2DF6D3BE-F1A2-43E1-BEA0-54576784FF96"> + <name>RT1H_Combined.CUTS_ComponentImplementations.BDC_Implementation.BDC_Monolithic_Impl</name> + <source/> + <artifact>__55C2DCD4-30B1-46A3-86B2-229896D74D0D</artifact> + <artifact>__BF5CDECF-AF12-4876-9B6C-211B7BF0B22F</artifact> + <artifact>_0E615519-6CC8-4EA5-B67A-65FF73586F04</artifact> + </implementation> + + <implementation id="_BA0C4535-191E-4BE0-9BF4-A054EB2C4139"> + <name>RT1H_Combined.CUTS_ComponentImplementations.BDC_Ex_Implementation.BDC_Ex_Impl</name> + <source/> + <artifact>_2DBFA82B-1D1F-48C6-9BDC-014E789E6A77</artifact> + <artifact>_5CE1793F-38DD-427D-A21E-E6D870E769E4</artifact> + <artifact>_0B8A6C29-8962-4DA6-99F4-25FEECD77E97</artifact> + </implementation> + + <implementation id="_D98AF36F-11FA-43A4-8FAD-C14A461437FF"> + <name>RT1H_Combined.RACE_ComponentImplementations.ControllerImplementation.ControllerMonolithicImpl</name> + <source/> + <artifact>__032AE7B6-3ABD-478A-B0D7-56BC4AAEF0B7</artifact> + <artifact>__00B105AB-50F5-49B7-A822-9B267F2D8896</artifact> + <artifact>__BF4AE6A2-BE32-4B8E-9919-C812EC18BF00</artifact> + </implementation> + + <implementation id="_CA363CD1-4E23-4A4B-B25B-C38B939E2B25"> + <name>RT1H_Combined.RACE_ComponentImplementations.TargetManagerImplImplementation.TargetManagerImplMonolithicImpl</name> + <source/> + <artifact>__C22D0B06-6CDA-4652-B1CE-586E0C23251F</artifact> + <artifact>__9CB3A43B-397F-4FA9-97AA-EBFC3A22BFEC</artifact> + <artifact>__0F176DA2-9953-482A-9268-7DA5E69A88FE</artifact> + </implementation> + + <implementation id="_7A233158-69BB-4382-BDE0-72432BF3D48E"> + <name>RT1H_Combined.RA_ComponentImplementations.AnalyzerImplementation.AnalyzerMonolithicImpl</name> + <source/> + <artifact>__315FC65C-0582-4E0E-BB8B-C23A1238C67F</artifact> + <artifact>__7AD332BC-90DC-4E7D-B026-8D5053F2552E</artifact> + <artifact>__84974D39-AE18-4C0A-B81A-B1EC349E93BB</artifact> + </implementation> + + <implementation id="_14E77757-BC3A-49F4-8D45-FB447FA7F626"> + <name>RT1H_Combined.RA_ComponentImplementations.SimpleAllocationAnalyzerImplementation.SimpleAllocationAnalyzerMonolithicImpl</name> + <source/> + <artifact>__6BDE830C-FFA8-4F2D-9733-34F02F35020F</artifact> + <artifact>__138A0FE1-D8AA-4C1E-BB5E-4EC9714F4CA8</artifact> + <artifact>__621F3412-C507-4945-836B-CF9B81BDCC99</artifact> + </implementation> + + <implementation id="_E4DC8736-E532-44DC-9C9B-789EBA3D6B27"> + <name>RT1H_Combined.RA_ComponentImplementations.Input_AdapterImplementation.Input_AdapterMonolithicImpl</name> + <source/> + <artifact>__DC22BCBB-DB20-4072-AA64-161AFD7A9C10</artifact> + <artifact>__3E362049-0CF5-4F01-905F-67CAD769FFD5</artifact> + <artifact>__3B466B60-F8C2-4E48-A6E4-3D3D7EED9F03</artifact> + </implementation> + + <implementation id="_73898E70-9FB1-4881-9313-A2DE181EE48E"> + <name>RT1H_Combined.RA_ComponentImplementations.Interactive_Input_AdapterImplementation.Interactive_Input_AdapterMonolithicImpl</name> + <source/> + <artifact>__AD4B52E0-103C-49E2-BE47-29CAE978676F</artifact> + <artifact>__E4AF24BF-5A39-46B1-8217-6343D7D53298</artifact> + <artifact>__76A0CEFE-E2F7-4BF7-BB91-F309FB5AD33C</artifact> + </implementation> + + <implementation id="_796D9731-1CD9-4855-83F2-025AECB90C93"> + <name>RT1H_Combined.RA_ComponentImplementations.Output_AdapterImplementation.Output_AdapterMonolithicImpl</name> + <source/> + <artifact>__864DB99C-C60B-4FDD-A47D-AFD5C1599892</artifact> + <artifact>__D6EB8E01-F794-4C43-AB14-A3AFB9767D01</artifact> + <artifact>__4C78C4F9-FEF4-45AA-84A4-FFB10255A1EC</artifact> + </implementation> + + <implementation id="_A22015F9-9BC9-4767-A861-FAFF737E074B"> + <name>RT1H_Combined.RA_ComponentImplementations.Output_ManagerImplementation.Output_ManagerMonolithicImpl</name> + <source/> + <artifact>__AB498B7F-A0E8-4F59-BF24-BBB9D125EED3</artifact> + <artifact>__1BB4CD4A-38A8-4BBA-9303-4A10F5B8BC57</artifact> + <artifact>__280E6118-F4C7-4DE4-A0A4-A50637282EAE</artifact> + </implementation> + + <implementation id="_219DB379-DB2E-44D2-8308-D91FC5A42A9D"> + <name>RT1H_Combined.RA_ComponentImplementations.DAnCE_Output_AdapterImplementation.DAnCE_Output_AdapterMonolithicImpl</name> + <source/> + <artifact>__A47095F9-2E08-485E-96B4-CC0829051DF3</artifact> + <artifact>__E54AE941-14CA-48FC-BAAA-1B93269EF79B</artifact> + <artifact>__ACA6BD67-D92A-4DBF-827A-7C0B15EA3F6D</artifact> + </implementation> + + + <implementation id="_571F6ECC-579F-4F69-88AB-EA1603B422E8"> + <name>RT1H_Combined.RA_ComponentImplementations.PlannerImplementation.PlannerMonolithicImpl</name> + <source/> + <artifact>__B28C1F32-0231-4F7F-8FE2-164321942B87</artifact> + <artifact>__2021EE2F-3480-4BF9-9A3A-D146A99D251D</artifact> + <artifact>__D952F988-841F-43BA-9650-86846B08DF5F</artifact> + </implementation> + + <implementation id="_38C5B64C-72FD-48FF-B095-260669E2A488"> + <name>RT1H_Combined.RA_ComponentImplementations.SimpleBinPackerImplementation.SimpleBinPackerMonolithicImpl</name> + <source/> + <artifact>__2B5FE9E6-AF4C-4BC1-92A2-58101B2ECCA8</artifact> + <artifact>__4D375D8F-5470-4236-8614-EF07D08020E3</artifact> + <artifact>__D6176B6C-58E4-43D4-BFC9-3DCF98249044</artifact> + </implementation> + + <implementation id="_FD120510-765E-4B02-803D-7DADF3F5E4E6"> + <name>RT1H_Combined.RA_ComponentImplementations.Planner_ManagerImplementation.Planner_ManagerMonolithicImpl</name> + <source/> + <artifact>__5B614077-C99E-428C-B8BE-252ADD7905B7</artifact> + <artifact>__0BEB188E-3967-4D91-A6A1-CDF08EF81718</artifact> + <artifact>__A65A1FA0-8F4D-4807-9AE9-90D344154D2C</artifact> + </implementation> + + <implementation id="_5D6641D2-640C-4F80-B055-10DC69C7A636"> + <name>RT1H_Combined.RA_ComponentImplementations.Plan_AnalyzerImplementation.Plan_AnalyzerMonolithicImpl</name> + <source/> + <artifact>__1CC443DF-7EE3-4130-8ACE-EE4181AC96CD</artifact> + <artifact>__57123764-8624-4D79-9C5B-7ADF929536E6</artifact> + <artifact>__CDC7061A-483C-447B-8151-E68250566E86</artifact> + </implementation> + + <implementation id="_CF52A30B-EDE4-4BB4-9ADA-DB40D7C54923"> + <name>RT1H_Combined.RA_ComponentImplementations.StaticPlannerImplementation.StaticPlannerImplementation</name> + <source/> + <artifact>_44E8C357-C472-4298-80F3-C1D9164377A8</artifact> + <artifact>_EACF2C4E-2F6D-4E64-A29C-97BB0D6A05BD</artifact> + <artifact>_A6FD6288-CBA1-436E-BA2C-CBF2A493FDF0</artifact> + </implementation> + + <implementation id="_90C5B64C-72FD-48FF-B095-260669E2A489"> + <name>RT1H_Combined.RA_ComponentImplementations.ImportanceBinPackerImplementation.ImportanceBinPackerMonolithicImpl</name> + <source/> + <artifact>_44E8C357-C472-4298-80F3-C1D916437756</artifact> + <artifact>_EACF2C4E-2F6D-4E64-A29C-97BB0D6A034</artifact> + <artifact>_A6FD6288-CBA1-436E-BA2C-CBF2A493FD45</artifact> + </implementation> + + <implementation id="_ABADC452-28F5-4E4F-971C-E9CC3C1A100C"> + <name>RT1H_Combined.WEB_ComponentImplementations.Web_Input_AdapterImplementation.Web_Input_AdapterMonolithicImpl</name> + <source/> + <artifact>_C38FF808-7C95-4A3F-8168-31C73A3803FE</artifact> + <artifact>_7A1BC0E6-5D39-40BE-8CD1-0FE11C742A38</artifact> + <artifact>_7FB3B0F7-E4EA-4932-88E5-CA3241EF89D3</artifact> + </implementation> + + <implementation id="_309BCBB3-5BBE-4834-932F-B05A39593184"> + <name>RT1H_Combined.WEB_ComponentImplementations.Web_Output_AdapterImplementation.Web_Output_AdapterMonolithicImpl</name> + <source/> + <artifact>_3357D535-E63F-417C-B336-867BE454F9FB</artifact> + <artifact>_23BA2A7F-9B5E-47D3-A2E7-86CD9D296C9A</artifact> + <artifact>_3600FD54-B079-4520-971B-7D3E99F96539</artifact> + </implementation> + + <instance id="_1483426B-3C99-4159-9B4E-865E51C1DAE7"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.TargetManagerImpl</name> + <node>blade30</node> + <source/> + <implementation>_CA363CD1-4E23-4A4B-B25B-C38B939E2B25</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>TargetManagerImpl.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="_5A439FA3-2794-47AA-9CC1-6590B8EE8206"> + <name>RACE.ComponentImplementations.RACE.RACE.Central_Monitor</name> + <node>blade29</node> + <source/> + <implementation>_D98AF36F-11FA-43A4-8FAD-C14A461437EE</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Central_Monitor.ior</string> + </value> + </value> + </configProperty> + <configProperty> + <name>RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>RACE_QoS_Monitor</string> + </value> + </value> + </configProperty> + </instance> + + + <instance id="_37820B1C-B991-455D-85B8-A522E16573D0"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.Controller</name> + <node>blade30</node> + <source/> + <implementation>_D98AF36F-11FA-43A4-8FAD-C14A461437FF</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Controller.ior</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="_2BD4D476-2F5B-41CA-A8CF-311084273028"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.Interactive_Input_Adapter</name> + <node>blade29</node> + <source/> + <implementation>_73898E70-9FB1-4881-9313-A2DE181EE48E</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Interactive_Input_Adapter.ior</string> + </value> + </value> + </configProperty> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>InteractiveAdapter.ior</string> + </value> + </value> + </configProperty> + <configProperty> + <name>RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>RACE::InteractiveInput</string> + </value> + </value> + </configProperty> + </instance> + + <instance id="_68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.AssemblyPlannerManager.Planner_ManagerImplementation</name> + <node>blade29</node> + <source/> + <implementation>_FD120510-765E-4B02-803D-7DADF3F5E4E6</implementation> + </instance> + + <instance id="_14BC2E72-898F-4139-8B42-E73C324D1A9A"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.AssemblyPlannerManager.StaticPlanner</name> + <node>blade29</node> + <source/> + <implementation>_CF52A30B-EDE4-4BB4-9ADA-DB40D7C54923</implementation> + </instance> + + + <instance id="_EF59D329-0AB1-491E-8616-30CE4AE056C2"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.PlanAnalyzerAssembly.Plan_Analyzer</name> + <node>blade29</node> + <source/> + <implementation>_5D6641D2-640C-4F80-B055-10DC69C7A636</implementation> + </instance> + + + <instance id="_31DA1033-1440-467B-991E-F6089B8E32FE"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.OutputManager.Output_Manager</name> + <node>blade29</node> + <source/> + <implementation>_A22015F9-9BC9-4767-A861-FAFF737E074B</implementation> + </instance> + + <instance id="_F82D2B59-5769-4366-B5C1-610813250E37"> + <name>RT1H_Combined.ComponentImplementations.RACE.RACE.OutputManager.DAnCE_Output_Adapter</name> + <node>blade29</node> + <source/> + <implementation>_219DB379-DB2E-44D2-8308-D91FC5A42A9D</implementation> + </instance> + + + <connection> + <name>monitor_Monitor__8613F2A5-95FE-4E6D-A9BD-EC252EE8D1B1__5A439FA3-2794-47AA-9CC1-6590B8EE8206</name> + <internalEndpoint> + <portName>monitor</portName> + <kind>SimplexReceptacle</kind> + <instance>_37820B1C-B991-455D-85B8-A522E16573D0</instance> + </internalEndpoint> + <internalEndpoint> + <portName>Monitor</portName> + <kind>Facet</kind> + <instance>_5A439FA3-2794-47AA-9CC1-6590B8EE8206</instance> + </internalEndpoint> + </connection> + + <connection> + <name>target_mgr_targetMgr__37820B1C-B991-455D-85B8-A522E16573D0__1483426B-3C99-4159-9B4E-865E51C1DAE7</name> + <internalEndpoint> + <portName>target_mgr</portName> + <kind>SimplexReceptacle</kind> + <instance>_37820B1C-B991-455D-85B8-A522E16573D0</instance> + </internalEndpoint> + <internalEndpoint> + <portName>targetMgr</portName> + <kind>Facet</kind> + <instance>_1483426B-3C99-4159-9B4E-865E51C1DAE7</instance> + </internalEndpoint> + </connection> + + <connection> + <name>target_mgr_ext_target_manager_ext__37820B1C-B991-455D-85B8-A522E16573D0__1483426B-3C99-4159-9B4E-865E51C1DAE7</name> + <internalEndpoint> + <portName>target_mgr_ext</portName> + <kind>SimplexReceptacle</kind> + <instance>_37820B1C-B991-455D-85B8-A522E16573D0</instance> + </internalEndpoint> + <internalEndpoint> + <portName>target_manager_ext</portName> + <kind>Facet</kind> + <instance>_1483426B-3C99-4159-9B4E-865E51C1DAE7</instance> + </internalEndpoint> + </connection> + + <connection> + <name>outputs_output__68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB__31DA1033-1440-467B-991E-F6089B8E32FE</name> + <internalEndpoint> + <portName>outputs</portName> + <kind>SimplexReceptacle</kind> + <instance>_68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB</instance> + </internalEndpoint> + <internalEndpoint> + <portName>output</portName> + <kind>Facet</kind> + <instance>_31DA1033-1440-467B-991E-F6089B8E32FE</instance> + </internalEndpoint> + </connection> + + <connection> + <name>planner_manager_i_planner_manager_i__EF59D329-0AB1-491E-8616-30CE4AE056C2__68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB</name> + <internalEndpoint> + <portName>planner_manager_i</portName> + <kind>SimplexReceptacle</kind> + <instance>_EF59D329-0AB1-491E-8616-30CE4AE056C2</instance> + </internalEndpoint> + <internalEndpoint> + <portName>planner_manager_i</portName> + <kind>Facet</kind> + <instance>_68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB</instance> + </internalEndpoint> + </connection> + + <connection> + <name>ingress_plan_ingress__2BD4D476-2F5B-41CA-A8CF-311084273028__EF59D329-0AB1-491E-8616-30CE4AE056C2</name> + <internalEndpoint> + <portName>ingress</portName> + <kind>SimplexReceptacle</kind> + <instance>_2BD4D476-2F5B-41CA-A8CF-311084273028</instance> + </internalEndpoint> + <internalEndpoint> + <portName>plan_ingress</portName> + <kind>Facet</kind> + <instance>_EF59D329-0AB1-491E-8616-30CE4AE056C2</instance> + </internalEndpoint> + </connection> + + <connection> + <name>control_output_descriptors__F82D2B59-5769-4366-B5C1-610813250E37__37820B1C-B991-455D-85B8-A522E16573D0</name> + <internalEndpoint> + <portName>control_output</portName> + <kind>SimplexReceptacle</kind> + <instance>_F82D2B59-5769-4366-B5C1-610813250E37</instance> + </internalEndpoint> + <internalEndpoint> + <portName>descriptors</portName> + <kind>Facet</kind> + <instance>_37820B1C-B991-455D-85B8-A522E16573D0</instance> + </internalEndpoint> + </connection> + + + <connection> + <name>target_mgr_targetMgr__14BC2E72-898F-4139-8B42-E73C324D1A9A__1483426B-3C99-4159-9B4E-865E51C1DAE7</name> + <internalEndpoint> + <portName>target_mgr</portName> + <kind>SimplexReceptacle</kind> + <instance>_14BC2E72-898F-4139-8B42-E73C324D1A9A</instance> + </internalEndpoint> + <internalEndpoint> + <portName>targetMgr</portName> + <kind>Facet</kind> + <instance>_1483426B-3C99-4159-9B4E-865E51C1DAE7</instance> + </internalEndpoint> + </connection> + + + + <connection> + <name>change_domain_change___1483426B-3C99-4159-9B4E-865E51C1DAE7__68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB</name> + <internalEndpoint> + <portName>changes</portName> + <kind>EventPublisher</kind> + <instance>_1483426B-3C99-4159-9B4E-865E51C1DAE7</instance> + </internalEndpoint> + <internalEndpoint> + <portName>domain_changed</portName> + <kind>EventConsumer</kind> + <instance>_68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB</instance> + </internalEndpoint> + </connection> + + + <connection> + <name>planners_planner_i__68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB__14BC2E72-898F-4139-8B42-E73C324D1A9A</name> + <internalEndpoint> + <portName>planners</portName> + <kind>SimplexReceptacle</kind> + <instance>_68DCA0BC-39A1-4DE7-BFEF-E85CDDA156BB</instance> + </internalEndpoint> + <internalEndpoint> + <portName>planner_i</portName> + <kind>Facet</kind> + <instance>_14BC2E72-898F-4139-8B42-E73C324D1A9A</instance> + </internalEndpoint> + </connection> + + + <connection> + <name>adapters_plan_egress__31DA1033-1440-467B-991E-F6089B8E32FE__F82D2B59-5769-4366-B5C1-610813250E37</name> + <internalEndpoint> + <portName>adapters</portName> + <kind>SimplexReceptacle</kind> + <instance>_31DA1033-1440-467B-991E-F6089B8E32FE</instance> + </internalEndpoint> + <internalEndpoint> + <portName>plan_egress</portName> + <kind>Facet</kind> + <instance>_F82D2B59-5769-4366-B5C1-610813250E37</instance> + </internalEndpoint> + </connection> + + <artifact id="_358C7270-F290-465E-B0E4-5FD390980B44"> + <name>RT1H_Combined.ImplementationArtifacts.Config_Op_Artifacts.Config_Op_stub</name> + <source/> + <node/> + <location>Config_Op_CoWorkEr_stub</location> + </artifact> + + <artifact id="_304555B7-9E3A-4DC5-9535-FA774FAA5070"> + <name>RT1H_Combined.ImplementationArtifacts.Config_Op_Artifacts.Config_Op_svnt</name> + <source/> + <node/> + <location>Config_Op_CoWorkEr_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Config_Op_Factory_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_C4A896EE-C035-45F1-8F14-2320383B1991"> + <name>RT1H_Combined.ImplementationArtifacts.Config_Op_Artifacts.Config_Op_exec</name> + <source/> + <node/> + <location>Config_Op_CoWorkEr_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Config_Op_Factory_CoWorkEr_Factory_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_208D7378-B123-4F15-B376-CAA58B5CB1E0"> + <name>RT1H_Combined.ImplementationArtifacts.Env_Dectector_Artifacts.Env_Detector_exec</name> + <source/> + <node/> + <location>Env_Detector_CoWorkEr_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Env_Detector_Factory_CoWorkEr_Factory_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_5D7CAC69-4E3B-45F9-BACD-B12D3A86AC7A"> + <name>RT1H_Combined.ImplementationArtifacts.Env_Dectector_Artifacts.Env_Dectector_stub</name> + <source/> + <node/> + <location>Env_Detector_CoWorkEr_stub</location> + </artifact> + + <artifact id="_1A46D81D-989F-406B-9E87-A57D63ADDF43"> + <name>RT1H_Combined.ImplementationArtifacts.Env_Dectector_Artifacts.Env_Detector_svnt</name> + <source/> + <node/> + <location>Env_Detector_CoWorkEr_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Env_Detector_Factory_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_1DAD54BC-F7B5-41E3-9FFC-3E0AE255D989"> + <name>RT1H_Combined.ImplementationArtifacts.Planner_One_Artifacts.Planner_One_stub</name> + <source/> + <node/> + <location>Planner_One_CoWorkEr_stub</location> + </artifact> + + <artifact id="_6C7AA3D5-7A09-4DEF-8D49-60A4E1DE173D"> + <name>RT1H_Combined.ImplementationArtifacts.Planner_One_Artifacts.Planner_One_svnt</name> + <source/> + <node/> + <location>Planner_One_CoWorkEr_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Planner_One_Factory_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_66E9CA12-F886-4760-A9B3-DB1E3F27B920"> + <name>RT1H_Combined.ImplementationArtifacts.Planner_One_Artifacts.Planner_One_exec</name> + <source/> + <node/> + <location>Planner_One_CoWorkEr_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Planner_One_Factory_CoWorkEr_Factory_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__C7A0B01C-6C13-4EAA-8527-155035BF1A00"> + <name>RT1H_Combined.ImplementationArtifacts.Effector_Secondary_Artifacts.Effector_Secondary_svnt</name> + <source/> + <node/> + <location>Effector_Secondary_CoWorkEr_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Effector_Secondary_Factory_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__31B2C21F-86C7-4306-AA10-33687687B5D0"> + <name>RT1H_Combined.ImplementationArtifacts.Effector_Secondary_Artifacts.Effector_Secondary_stub</name> + <source/> + <node/> + <location>Effector_Secondary_CoWorkEr_stub</location> + </artifact> + + <artifact id="__2F43BA6B-2749-4744-B9C4-18F4AEAC16C9"> + <name>RT1H_Combined.ImplementationArtifacts.Effector_Secondary_Artifacts.Effector_Secondary_exec</name> + <source/> + <node/> + <location>Effector_Secondary_CoWorkEr_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Effector_Secondary_Factory_CoWorkEr_Factory_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_840618C0-5513-4389-97A4-C53EB87B29A0"> + <name>RT1H_Combined.ImplementationArtifacts.Effector_Main_Artifacts.Effector_Main_svnt</name> + <source/> + <node/> + <location>Effector_Main_CoWorkEr_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Effector_Main_Factory_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_E1AF706E-0B37-480B-8B26-E844FE2E9C3E"> + <name>RT1H_Combined.ImplementationArtifacts.Effector_Main_Artifacts.Effector_Main_exec</name> + <source/> + <node/> + <location>Effector_Main_CoWorkEr_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Effector_Main_Factory_CoWorkEr_Factory_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_D40E03AB-CE43-49D6-A7FF-C1231FE98898"> + <name>RT1H_Combined.ImplementationArtifacts.Effector_Main_Artifacts.Effector_Main_stub</name> + <source/> + <node/> + <location>Effector_Main_CoWorkEr_stub</location> + </artifact> + + <artifact id="_556249CC-E874-4BC6-9411-1B33EB2B895B"> + <name>RT1H_Combined.ImplementationArtifacts.Planner_Three_Artifacts.Planner_Three_svnt</name> + <source/> + <node/> + <location>Planner_Three_CoWorkEr_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Planner_Three_Factory_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_458C6E27-87CA-4F77-8036-C9F612511B6F"> + <name>RT1H_Combined.ImplementationArtifacts.Planner_Three_Artifacts.Planner_Three_exec</name> + <source/> + <node/> + <location>Planner_Three_CoWorkEr_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_TSCE_Planner_Three_Factory_CoWorkEr_Factory_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_2748D2D1-AAE5-4934-A43F-1639241C4351"> + <name>RT1H_Combined.ImplementationArtifacts.Planner_Three_Artifacts.Planner_Three_stub</name> + <source/> + <node/> + <location>Planner_Three_CoWorkEr_stub</location> + </artifact> + + <artifact id="__55C2DCD4-30B1-46A3-86B2-229896D74D0D"> + <name>RT1H_Combined.CUTS_ImplementationArtifacts.BDC_Artifacts.BDC_stub</name> + <source/> + <node/> + <location>Benchmark_Data_Collector_stub</location> + </artifact> + + <artifact id="__BF5CDECF-AF12-4876-9B6C-211B7BF0B22F"> + <name>RT1H_Combined.CUTS_ImplementationArtifacts.BDC_Artifacts.BDC_svnt</name> + <source/> + <node/> + <location>Benchmark_Data_Collector_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CUTS_Benchmark_Data_Collector_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_0E615519-6CC8-4EA5-B67A-65FF73586F04"> + <name>RT1H_Combined.CUTS_ImplementationArtifacts.BDC_Artifacts.BDC_exec</name> + <source/> + <node/> + <location>Benchmark_Data_Collector_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CUTS_Benchmark_Data_Collector_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_0B8A6C29-8962-4DA6-99F4-25FEECD77E97"> + <name>RT1H_Combined.CUTS_ImplementationArtifacts.BDC_Ex_Artifacts.BDC_Ex_exec</name> + <source/> + <node/> + <location>Benchmark_Data_Collector_Ex_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CUTS_Benchmark_Data_Collector_Ex_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_5CE1793F-38DD-427D-A21E-E6D870E769E4"> + <name>RT1H_Combined.CUTS_ImplementationArtifacts.BDC_Ex_Artifacts.BDC_Ex_stub</name> + <source/> + <node/> + <location>Benchmark_Data_Collector_Ex_stub</location> + </artifact> + + <artifact id="_2DBFA82B-1D1F-48C6-9BDC-014E789E6A77"> + <name>RT1H_Combined.CUTS_ImplementationArtifacts.BDC_Ex_Artifacts.BDC_Ex_svnt</name> + <source/> + <node/> + <location>Benchmark_Data_Collector_Ex_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CUTS_Benchmark_Data_Collector_Ex_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__032AE7B6-3ABD-478A-B0D7-56BC4AAEF0B7"> + <name>RT1H_Combined.RACE_ImplementationArtifacts.ControllerArtifacts.Controller_stub</name> + <source/> + <node/> + <location>Controller_stub</location> + </artifact> + + <artifact id="__00B105AB-50F5-49B7-A822-9B267F2D8896"> + <name>RT1H_Combined.RACE_ImplementationArtifacts.ControllerArtifacts.Controller_svnt</name> + <source/> + <node/> + <location>Controller_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Controller_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__BF4AE6A2-BE32-4B8E-9919-C812EC18BF00"> + <name>RT1H_Combined.RACE_ImplementationArtifacts.ControllerArtifacts.Controller_exec</name> + <source/> + <node/> + <location>Controller_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Controller_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__C22D0B06-6CDA-4652-B1CE-586E0C23251F"> + <name>RT1H_Combined.RACE_ImplementationArtifacts.TargetManagerImplArtifacts.TargetManager_stub</name> + <source/> + <node/> + <location>TargetManager_stub</location> + </artifact> + + <artifact id="__9CB3A43B-397F-4FA9-97AA-EBFC3A22BFEC"> + <name>RT1H_Combined.RACE_ImplementationArtifacts.TargetManagerImplArtifacts.TargetManager_svnt</name> + <source/> + <node/> + <location>TargetManager_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_TargetManagerHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__0F176DA2-9953-482A-9268-7DA5E69A88FE"> + <name>RT1H_Combined.RACE_ImplementationArtifacts.TargetManagerImplArtifacts.TargetManager_exec</name> + <source/> + <node/> + <location>TargetManager_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_TargetManagerHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__315FC65C-0582-4E0E-BB8B-C23A1238C67F"> + <name>RT1H_Combined.RA_ImplementationArtifacts.AnalyzerArtifacts.Analyzer_stub</name> + <source/> + <node/> + <location>Analyzer_stub</location> + </artifact> + + <artifact id="__7AD332BC-90DC-4E7D-B026-8D5053F2552E"> + <name>RT1H_Combined.RA_ImplementationArtifacts.AnalyzerArtifacts.Analyzer_svnt</name> + <source/> + <node/> + <location>Analyzer_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Analyzer_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__84974D39-AE18-4C0A-B81A-B1EC349E93BB"> + <name>RT1H_Combined.RA_ImplementationArtifacts.AnalyzerArtifacts.Analyzer_exec</name> + <source/> + <node/> + <location>Analyzer_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Analyzer_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__6BDE830C-FFA8-4F2D-9733-34F02F35020F"> + <name>RT1H_Combined.RA_ImplementationArtifacts.SimpleAllocationAnalyzerArtifacts.SimpleAllocationAnalyzer_stub</name> + <source/> + <node/> + <location>SimpleAllocationAnalyzer_stub</location> + </artifact> + + <artifact id="__138A0FE1-D8AA-4C1E-BB5E-4EC9714F4CA8"> + <name>RT1H_Combined.RA_ImplementationArtifacts.SimpleAllocationAnalyzerArtifacts.SimpleAllocationAnalyzer_svnt</name> + <source/> + <node/> + <location>SimpleAllocationAnalyzer_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_SimpleAllocationAnalyzer_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__621F3412-C507-4945-836B-CF9B81BDCC99"> + <name>RT1H_Combined.RA_ImplementationArtifacts.SimpleAllocationAnalyzerArtifacts.SimpleAllocationAnalyzer_exec</name> + <source/> + <node/> + <location>SimpleAllocationAnalyzer_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_SimpleAllocationAnalyzer_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__DC22BCBB-DB20-4072-AA64-161AFD7A9C10"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Input_AdapterArtifacts.Input_Adapter_stub</name> + <source/> + <node/> + <location>Input_Adapter_stub</location> + </artifact> + + <artifact id="__3E362049-0CF5-4F01-905F-67CAD769FFD5"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Input_AdapterArtifacts.Input_Adapter_svnt</name> + <source/> + <node/> + <location>Input_Adapter_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Input_Adapter_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__3B466B60-F8C2-4E48-A6E4-3D3D7EED9F03"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Input_AdapterArtifacts.Input_Adapter_exec</name> + <source/> + <node/> + <location>Input_Adapter_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Input_Adapter_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__AD4B52E0-103C-49E2-BE47-29CAE978676F"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Interactive_Input_AdapterArtifacts.Interactive_Input_Adapter_stub</name> + <source/> + <node/> + <location>Interactive_Input_Adapter_stub</location> + </artifact> + + <artifact id="__E4AF24BF-5A39-46B1-8217-6343D7D53298"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Interactive_Input_AdapterArtifacts.Interactive_Input_Adapter_svnt</name> + <source/> + <node/> + <location>Interactive_Input_Adapter_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Interactive_Input_Adapter_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__76A0CEFE-E2F7-4BF7-BB91-F309FB5AD33C"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Interactive_Input_AdapterArtifacts.Interactive_Input_Adapter_exec</name> + <source/> + <node/> + <location>Interactive_Input_Adapter_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Interactive_Input_Adapter_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__864DB99C-C60B-4FDD-A47D-AFD5C1599892"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Output_AdapterArtifacts.Output_Adapter_stub</name> + <source/> + <node/> + <location>Output_Adapter_stub</location> + </artifact> + + <artifact id="__D6EB8E01-F794-4C43-AB14-A3AFB9767D01"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Output_AdapterArtifacts.Output_Adapter_svnt</name> + <source/> + <node/> + <location>Output_Adapter_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Output_Adapter_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__4C78C4F9-FEF4-45AA-84A4-FFB10255A1EC"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Output_AdapterArtifacts.Output_Adapter_exec</name> + <source/> + <node/> + <location>Output_Adapter_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Output_Adapter_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__AB498B7F-A0E8-4F59-BF24-BBB9D125EED3"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Output_ManagerArtifacts.Output_Manager_stub</name> + <source/> + <node/> + <location>Output_Manager_stub</location> + </artifact> + + <artifact id="__1BB4CD4A-38A8-4BBA-9303-4A10F5B8BC57"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Output_ManagerArtifacts.Output_Manager_svnt</name> + <source/> + <node/> + <location>Output_Manager_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Output_Manager_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__280E6118-F4C7-4DE4-A0A4-A50637282EAE"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Output_ManagerArtifacts.Output_Manager_exec</name> + <source/> + <node/> + <location>Output_Manager_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Output_Manager_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__A47095F9-2E08-485E-96B4-CC0829051DF3"> + <name>RT1H_Combined.RA_ImplementationArtifacts.DAnCE_Output_AdapterArtifacts.DAnCE_Output_Adapter_stub</name> + <source/> + <node/> + <location>DAnCE_Output_Adapter_stub</location> + </artifact> + + <artifact id="__E54AE941-14CA-48FC-BAAA-1B93269EF79B"> + <name>RT1H_Combined.RA_ImplementationArtifacts.DAnCE_Output_AdapterArtifacts.DAnCE_Output_Adapter_svnt</name> + <source/> + <node/> + <location>DAnCE_Output_Adapter_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_DAnCE_Output_Adapter_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__ACA6BD67-D92A-4DBF-827A-7C0B15EA3F6D"> + <name>RT1H_Combined.RA_ImplementationArtifacts.DAnCE_Output_AdapterArtifacts.DAnCE_Output_Adapter_exec</name> + <source/> + <node/> + <location>DAnCE_Output_Adapter_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_DAnCE_Output_Adapter_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__B28C1F32-0231-4F7F-8FE2-164321942B87"> + <name>RT1H_Combined.RA_ImplementationArtifacts.PlannerArtifacts.Planner_stub</name> + <source/> + <node/> + <location>Planner_stub</location> + </artifact> + + <artifact id="__2021EE2F-3480-4BF9-9A3A-D146A99D251D"> + <name>RT1H_Combined.RA_ImplementationArtifacts.PlannerArtifacts.Planner_svnt</name> + <source/> + <node/> + <location>Planner_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Planner_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__D952F988-841F-43BA-9650-86846B08DF5F"> + <name>RT1H_Combined.RA_ImplementationArtifacts.PlannerArtifacts.Planner_exec</name> + <source/> + <node/> + <location>Planner_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Planner_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__2B5FE9E6-AF4C-4BC1-92A2-58101B2ECCA8"> + <name>RT1H_Combined.RA_ImplementationArtifacts.SimpleBinPackerArtifacts.SimpleBinPacker_stub</name> + <source/> + <node/> + <location>SimpleBinPacker_stub</location> + </artifact> + + <artifact id="__4D375D8F-5470-4236-8614-EF07D08020E3"> + <name>RT1H_Combined.RA_ImplementationArtifacts.SimpleBinPackerArtifacts.SimpleBinPacker_svnt</name> + <source/> + <node/> + <location>SimpleBinPacker_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_SimpleBinPacker_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__D6176B6C-58E4-43D4-BFC9-3DCF98249044"> + <name>RT1H_Combined.RA_ImplementationArtifacts.SimpleBinPackerArtifacts.SimpleBinPacker_exec</name> + <source/> + <node/> + <location>SimpleBinPacker_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_SimpleBinPacker_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__5B614077-C99E-428C-B8BE-252ADD7905B7"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Planner_ManagerArtifacts.Planner_Manager_stub</name> + <source/> + <node/> + <location>Planner_Manager_stub</location> + </artifact> + + <artifact id="__0BEB188E-3967-4D91-A6A1-CDF08EF81718"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Planner_ManagerArtifacts.Planner_Manager_svnt</name> + <source/> + <node/> + <location>Planner_Manager_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Planner_Manager_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__A65A1FA0-8F4D-4807-9AE9-90D344154D2C"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Planner_ManagerArtifacts.Planner_Manager_exec</name> + <source/> + <node/> + <location>Planner_Manager_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Planner_Manager_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__1CC443DF-7EE3-4130-8ACE-EE4181AC96CD"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Plan_AnalyzerArtifacts.Plan_Analyzer_stub</name> + <source/> + <node/> + <location>Plan_Analyzer_stub</location> + </artifact> + + <artifact id="__57123764-8624-4D79-9C5B-7ADF929536E6"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Plan_AnalyzerArtifacts.Plan_Analyzer_svnt</name> + <source/> + <node/> + <location>Plan_Analyzer_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Plan_Analyzer_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__CDC7061A-483C-447B-8151-E68250566E86"> + <name>RT1H_Combined.RA_ImplementationArtifacts.Plan_AnalyzerArtifacts.Plan_Analyzer_exec</name> + <source/> + <node/> + <location>Plan_Analyzer_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Plan_Analyzer_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_EACF2C4E-2F6D-4E64-A29C-97BB0D6A05BD"> + <name>RT1H_Combined.RA_ImplementationArtifacts.StaticPlannerArtifacts.StaticPlanner_exec</name> + <source/> + <node/> + <location>StaticPlanner_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_StaticPlanner_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_44E8C357-C472-4298-80F3-C1D9164377A8"> + <name>RT1H_Combined.RA_ImplementationArtifacts.StaticPlannerArtifacts.StaticPlanner_stub</name> + <source/> + <node/> + <location>SimpleBinPacker_stub</location> + </artifact> + + <artifact id="_A6FD6288-CBA1-436E-BA2C-CBF2A493FDF0"> + <name>RT1H_Combined.RA_ImplementationArtifacts.StaticPlannerArtifacts.StaticPlanner_svnt</name> + <source/> + <node/> + <location>StaticPlanner_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_StaticPlanner_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_EACF2C4E-2F6D-4E64-A29C-97BB0D6A034"> + <name>RT1H_Combined.RA_ImplementationArtifacts.ImportanceBinPackerArtifacts.ImportanceBinPacker_exec</name> + <source/> + <node/> + <location>ImportanceBinPacker_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_ImportanceBinPacker_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_44E8C357-C472-4298-80F3-C1D916437756"> + <name>RT1H_Combined.RA_ImplementationArtifacts.ImportanceBinPackerArtifacts.ImportanceBinPacker_stub</name> + <source/> + <node/> + <location>ImportanceBinPacker_stub</location> + </artifact> + + <artifact id="_A6FD6288-CBA1-436E-BA2C-CBF2A493FD45"> + <name>RT1H_Combined.RA_ImplementationArtifacts.ImportanceBinPackerArtifacts.ImportanceBinPacker_svnt</name> + <source/> + <node/> + <location>ImportanceBinPacker_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_ImportanceBinPacker_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_C38FF808-7C95-4A3F-8168-31C73A3803FE"> + <name>RT1H_Combined.WEB_ImplementationArtifacts.Web_Input_AdapterArtifacts.Web_Input_Adapter_stub</name> + <source/> + <node/> + <location>Web_Input_Adapter_stub</location> + </artifact> + + <artifact id="_7A1BC0E6-5D39-40BE-8CD1-0FE11C742A38"> + <name>RT1H_Combined.WEB_ImplementationArtifacts.Web_Input_AdapterArtifacts.Web_Input_Adapter_svnt</name> + <source/> + <node/> + <location>Web_Input_Adapter_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Web_Input_Adapter_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_7FB3B0F7-E4EA-4932-88E5-CA3241EF89D3"> + <name>RT1H_Combined.WEB_ImplementationArtifacts.Web_Input_AdapterArtifacts.Web_Input_Adapter_exec</name> + <source/> + <node/> + <location>Web_Input_Adapter_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Web_Input_Adapter_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_3357D535-E63F-417C-B336-867BE454F9FB"> + <name>RT1H_Combined.WEB_ImplementationArtifacts.Web_Output_AdapterArtifacts.Web_Output_Adapter_stub</name> + <source/> + <node/> + <location>Web_Output_Adapter_stub</location> + </artifact> + + <artifact id="_23BA2A7F-9B5E-47D3-A2E7-86CD9D296C9A"> + <name>RT1H_Combined.WEB_ImplementationArtifacts.Web_Output_AdapterArtifacts.Web_Output_Adapter_svnt</name> + <source/> + <node/> + <location>Web_Output_Adapter_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Web_Output_Adapter_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="_3600FD54-B079-4520-971B-7D3E99F96539"> + <name>RT1H_Combined.WEB_ImplementationArtifacts.Web_Output_AdapterArtifacts.Web_Output_Adapter_exec</name> + <source/> + <node/> + <location>Web_Output_Adapter_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Web_Output_Adapter_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__BF4AE6A2-BE32-4B8E-9919-C812EC16BF00"> + <name>RACE.ImplementationArtifacts.Central_MonitorArtifacts.Central_Monitor_exec</name> + <source/> + <node/> + <location>Monitor_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Central_Monitor_Home_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="__032AE7B6-3ABD-478A-B0D7-56BC4AAEF0B9"> + <name>RACE.ImplementationArtifacts.Central_MonitorArtifacts.Central_Monitor_stub</name> + <source/> + <node/> + <location>Monitor_stub</location> + </artifact> + + <artifact id="__00B105AB-50F5-49B7-A822-9B267F2D8898"> + <name>RACE.ImplementationArtifacts.Central_MonitorArtifacts.Central_Monitor_svnt</name> + <source/> + <node/> + <location>Monitor_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_CIAO_RACE_Central_Monitor_Home_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + +</Deployment:deploymentPlan> diff --git a/descriptors/flattened_deploymentplan.cdp b/descriptors/flattened_deploymentplan.cdp new file mode 100644 index 00000000000..943ef12338b --- /dev/null +++ b/descriptors/flattened_deploymentplan.cdp @@ -0,0 +1,240 @@ +<!-- This flattened deployment plan allows component instance to + register to naming service, if you don't want to use naming + service at all, you can use the flattened_deployment_without_ns.cdp + as your deployment descriptor. --> + +<Deployment:deploymentPlan + xmlns:Deployment="http://www.omg.org/Deployment" + xmlns:xmi="http://www.omg.org/XMI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.omg.org/Deployment Deployment.xsd"> + + <label>Hello-DeploymentPlan</label> + <UUID>Hello_Plan_UUID_0001</UUID> + <!-- Could be ZERO --> + <realizes> + <label>BasicSP-realizes-cid</label> + <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID> + <specificType><!-- @@ What does here? --></specificType> + <supportedType>IDL:BasicSP/EC:1.0</supportedType> + <port> + <name>read_message</name> + <specificType>IDL:Hello/ReadMessage:1.0</specificType> + <supportedType>IDL:Hello/ReadMessage:1.0</supportedType> + <provider>false</provider> + <exclusiveProvider>false</exclusiveProvider> + <exclusiveUser>true</exclusiveUser> + <optional>false</optional> + <kind>SimplexReceptacle</kind> + </port> + </realizes> + + <implementation id="Hello-Sender-mdd"> + <name>Hello-Sender-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Sender_exec</artifact> + <artifact>Hello-Sender_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <implementation id="Hello-Receiver-mdd"> + <name>Hello-Receiver-mdd</name> + <source><!-- @@ Don't know what goes here --></source> + <artifact>Hello-Receiver_exec</artifact> + <artifact>Hello-Receiver_svnt</artifact> + <!-- + <execParameter></execParameter> + <deployRequirement></deployRequirement> + --> + </implementation> + + <instance id="Hello-Sender-idd"> + <name>Hello-Sender-idd</name> + <node>blade31</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Sender-mdd</implementation> + + <!-- Add this property if you want to write component reference to IOR --> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender.ior</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to register with naming service --> + <!-- The string is the naming context to bind to naming service --> + <configProperty> + <name>RegisterNaming</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Sender_001</string> + </value> + </value> + </configProperty> + + <!-- Add this property if you want to initialize component attribute --> + <configProperty> + <name>local_message</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>This is a test message passed in through XML.</string> + </value> + </value> + </configProperty> + <!-- This attribute initializes an enumerated value --> + <configProperty> + <name>color</name> + <value> + <type> + <kind>tk_enum</kind> + <enum> + <name>COLOR_SELECTION</name> + <typeId>IDL:Hello/COLOR_SELECTION:1.0</typeId> + <member>empty</member> + <member>white</member> + <member>red</member> + <member>yellow</member> + </enum> + </type> + <value> + <enum>yellow</enum> + </value> + </value> + </configProperty> + </instance> + + <instance id="Hello-Receiver-idd"> + <name>Hello-Receiver-idd</name> + <node>blade31</node> + <source><!-- @@ What goes here --></source> + <implementation>Hello-Receiver-mdd</implementation> + <configProperty> + <name>ComponentIOR</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Receiver.ior</string> + </value> + </value> + </configProperty> + </instance> + + + <connection> + <name>hell_event_connection</name> + <internalEndpoint> + <portName>click_out</portName> + <kind>EventPublisher</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>click_in</portName> + <kind>EventConsumer</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <connection> + <name>hello_facet_connection</name> + <internalEndpoint> + <portName>push_message</portName> + <kind>Facet</kind> + <instance>Hello-Sender-idd</instance> + </internalEndpoint> + <internalEndpoint> + <portName>read_message</portName> + <kind>SimplexReceptacle</kind> + <instance>Hello-Receiver-idd</instance> + </internalEndpoint> + </connection> + + <!-- @@ Runtime library name must match exactly in "location" tag --> + <artifact id="Hello-Sender_exec"> + <name>Sender_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Sender_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createSenderHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Sender_svnt"> + <name>Sender_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Sender_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_SenderHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_exec"> + <name>Receiver_exec</name> + <source><!-- @@ Not sure about this--></source> + <node><!-- blank --></node> + <location>Receiver_DnC_exec</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>createReceiverHome_Impl</string> + </value> + </value> + </execParameter> + </artifact> + + <artifact id="Hello-Receiver_svnt"> + <name>Receiver_svnt</name> + <source><!-- @@ Not sure --></source> + <node><!-- blank --></node> + <location>Receiver_DnC_svnt</location> + <execParameter> + <name>entryPoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_Hello_ReceiverHome_Servant</string> + </value> + </value> + </execParameter> + </artifact> +</Deployment:deploymentPlan> diff --git a/descriptors/run_RACE.pl b/descriptors/run_RACE.pl new file mode 100755 index 00000000000..3f32766a13b --- /dev/null +++ b/descriptors/run_RACE.pl @@ -0,0 +1,188 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# run_test.pl,v 1.5 2006/01/31 21:54:08 wotte Exp +# -*- perl -*- + +use lib "$ENV{'ACE_ROOT'}/bin"; +use PerlACE::Run_Test; + +$DAnCE = "$ENV{'CIAO_ROOT'}/DAnCE"; +$CIAO_ROOT = "$ENV{'CIAO_ROOT'}"; +$TAO_ROOT = "$ENV{'TAO_ROOT'}"; +$daemons_running = 0; +$em_running = 0; +$ns_running = 0; +$daemons = 10; +@ports = ( 50000, 50001, 50002, 50003, 50004,50005,50006,50007, 50008, 50009, 50010 ); +@iorfiles = ( "NodeApp1.ior", "NodeApp2.ior", "NodeApp3.ior", "NodeApp4.ior", "NodeApp5.ior","NodeApp6.ior","NodeApp7.ior", "NodeApp8.ior", "NodeApp9.ior", "NodeApp10.ior", "NodeApp11.ior" ); +$status = 0; +$dat_file = "NodeDetails.dat"; +$cdp_file = "RACE.cdp"; + +$nsior = PerlACE::LocalFile ("ns.ior"); + +unlink $nsior; + +$E = 0; +$EM = 0; + +# Delete if there are any .ior files. +sub delete_ior_files { + for ($i = 0; $i < $daemons; ++$i) { + unlink $iorfiles[$i]; + } + unlink PerlACE::LocalFile ("EM.ior"); + unlink PerlACE::LocalFile ("Receiver.ior"); + unlink PerlACE::LocalFile ("Sender.ior"); + unlink PerlACE::LocalFile ("DAM.ior"); + unlink PerlACE::LocalFile ("ns.ior"); +} + +sub kill_node_daemons { + for ($i = 0; $i < $daemons; ++$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } +} + +sub kill_open_processes { + if ($daemons_running == 1) { + kill_node_daemons (); + } + + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } + +} + +sub run_node_daemons { + for ($i = 0; $i < $daemons; ++$i) + { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + + $iiop = "iiop://localhost:$port"; + $node_app = "$DAnCE/NodeApplication/NodeApplication"; + + $d_cmd = "$DAnCE/NodeManager/NodeManager"; + $d_param = "-n -ORBEndpoint $iiop -s $node_app -o $iorfile -d 30"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + $PerlACE::wait_interval_for_process_creation) == -1) { + print STDERR + "ERROR: The ior file of node daemon $i could not be found\n"; + for (; $i > 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + $daemons_running = 1; + return 0; +} + +delete_ior_files (); + +# Invoke naming service + +$NS = new PerlACE::Process ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 0 -ORBEndpoint iiop://localhost:40003 -o ns.ior"); + +$NS->Spawn (); + + print STDERR "Starting Naming Service\n"; + + if (PerlACE::waitforfile_timed ($nsior, 10) == -1) + { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); + exit 1; + } + +# Set up NamingService environment +$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:40003/NameService"; + +# Invoke node daemons. +print "Invoking node daemons\n"; +$status = run_node_daemons (); + +if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + exit 1; +} + +$ns_running = 1; + +# Invoke execution manager. +# print "Invoking execution manager\n"; + $EM = new PerlACE::Process ("$DAnCE/ExecutionManager/Execution_Manager", + "-n -o EM.ior -i $dat_file"); + $EM->Spawn (); + +# if (PerlACE::waitforfile_timed ("EM.ior", +# $PerlACE::wait_interval_for_process_creation) == -1) { +# print STDERR +# "ERROR: The ior file of execution manager could not be found\n"; +# kill_open_processes (); +# exit 1; +# } + +$em_running = 1; + +# print " Invoke executor - start the application -." +print "Invoking executor - start the application -\n"; +$E = + new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher", + "-p $cdp_file -n"); + +$E->SpawnWaitKill (5000); + +#if (PerlACE::waitforfile_timed ( +# "Receiver.ior", +# $PerlACE::wait_interval_for_process_creation) == -1) { +# print STDERR "ERROR: The ior file of receiver could not be found\n"; +# kill_open_processes (); +# exit 1; +#} + +#if (PerlACE::waitforfile_timed ("Sender.ior", +# $PerlACE::wait_interval_for_process_creation) == -1) { +# print STDERR "ERROR: The ior file of sender could not be found\n"; +# kill_open_processes (); +# exit 1; +#} + +#print "Invoking the controller\n"; +#$controller = new PerlACE::Process ("$controller_exec", "-k file://Sender.ior"); +#$result = $controller->SpawnWaitKill (3000); + +#if ($result != 0) { +# print STDERR "ERROR: The controller returned $result\n"; +# $status = 1; +#} + +# Invoke executor - stop the application -. +#print "Invoking executor - stop the application -\n"; +#$E = +# new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher", +# "-k file://EM.ior -i file://DAM.ior"); +#$E->SpawnWaitKill (3000); + +print "Executor returned.\n"; +print "Shutting down rest of the processes.\n"; + +delete_ior_files (); +kill_open_processes (); + +exit $status; |