diff options
| author | Manuel Traut <manut@mecka.net> | 2014-03-31 16:53:55 +0200 |
|---|---|---|
| committer | Manuel Traut <manut@mecka.net> | 2014-03-31 16:53:55 +0200 |
| commit | 1adba473e6917b227e1b0a1118148101dca202e7 (patch) | |
| tree | 13180ede9564ba50c528b274ee5719b4e030ef06 | |
| parent | eacbf5bb4d57af21c731f41251015d3b991ad490 (diff) | |
Signed-off-by: Manuel Traut <manut@mecka.net>
215 files changed, 39255 insertions, 0 deletions
diff --git a/quellcode/demo1/Controller/AssemblyInfo.cs b/quellcode/demo1/Controller/AssemblyInfo.cs new file mode 100755 index 0000000..af4e275 --- /dev/null +++ b/quellcode/demo1/Controller/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes specify the key for the sign of your assembly. See the +// .NET Framework documentation for more information about signing. +// This is not required, if you don't want signing let these attributes like they're. +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] diff --git a/quellcode/demo1/Controller/Controller.idl b/quellcode/demo1/Controller/Controller.idl new file mode 100755 index 0000000..7c969ac --- /dev/null +++ b/quellcode/demo1/Controller/Controller.idl @@ -0,0 +1,6 @@ +#pragma prefix "manut" +module Controller { + interface Display { + void show(in string txt); + }; +}; diff --git a/quellcode/demo1/Controller/Controller.mdp b/quellcode/demo1/Controller/Controller.mdp new file mode 100755 index 0000000..f20af86 --- /dev/null +++ b/quellcode/demo1/Controller/Controller.mdp @@ -0,0 +1,42 @@ +<Project name="Controller" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject"> + <Configurations active="Debug"> + <Configuration name="Debug" ctype="DotNetProjectConfiguration"> + <Output directory="./bin/Debug" assembly="Controller" /> + <Build debugmode="True" target="Exe" /> + <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> + <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> + </Configuration> + <Configuration name="Release" ctype="DotNetProjectConfiguration"> + <Output directory="./bin/Release" assembly="Controller" /> + <Build debugmode="False" target="Exe" /> + <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> + <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> + </Configuration> + </Configurations> + <DeploymentInformation strategy="File"> + <excludeFiles /> + </DeploymentInformation> + <Contents> + <File name="./gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" /> + <File name="./gtk-gui/generated.cs" subtype="Code" buildaction="Compile" /> + <File name="./MainWindow.cs" subtype="Code" buildaction="Compile" /> + <File name="./Main.cs" subtype="Code" buildaction="Compile" /> + <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" /> + <File name="./CorbaHandler.cs" subtype="Code" buildaction="Compile" /> + <File name="./Display.cs" subtype="Code" buildaction="Compile" /> + </Contents> + <References> + <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> + <ProjectReference type="Assembly" localcopy="True" refto="../../../../../IIOPNet.src.1.9.0.rc0/IIOPChannel/bin/IIOPChannel.dll" /> + <ProjectReference type="Assembly" localcopy="True" refto="./Display.dll" /> + <ProjectReference type="Assembly" localcopy="True" refto="./Executor.dll" /> + <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + </References> + <GtkDesignInfo> + <ExportedWidgets /> + </GtkDesignInfo> +</Project>
\ No newline at end of file diff --git a/quellcode/demo1/Controller/Controller.mds b/quellcode/demo1/Controller/Controller.mds new file mode 100755 index 0000000..13122ec --- /dev/null +++ b/quellcode/demo1/Controller/Controller.mds @@ -0,0 +1,16 @@ +<Combine name="Controller" fileversion="2.0" outputpath="./build/bin/"> + <Configurations active="Debug"> + <Configuration name="Debug" ctype="CombineConfiguration"> + <Entry build="True" name="Controller" configuration="Debug" /> + </Configuration> + <Configuration name="Release" ctype="CombineConfiguration"> + <Entry build="True" name="Controller" configuration="Debug" /> + </Configuration> + </Configurations> + <StartMode startupentry="Controller" single="True"> + <Execute type="None" entry="Controller" /> + </StartMode> + <Entries> + <Entry filename="./Controller.mdp" /> + </Entries> +</Combine>
\ No newline at end of file diff --git a/quellcode/demo1/Controller/Controller.pidb b/quellcode/demo1/Controller/Controller.pidb Binary files differnew file mode 100755 index 0000000..5beb119 --- /dev/null +++ b/quellcode/demo1/Controller/Controller.pidb diff --git a/quellcode/demo1/Controller/Controller.userprefs b/quellcode/demo1/Controller/Controller.userprefs new file mode 100755 index 0000000..eaf27b2 --- /dev/null +++ b/quellcode/demo1/Controller/Controller.userprefs @@ -0,0 +1,43 @@ +<?xml version="1.0"?> +<UserCombinePreferences filename="/home/manu/DA/trunk/Thesis/cdrom/quellcode/demo1/Controller/Controller.mds"> + <Files> + <File filename="Welcome" /> + <File filename="./Main.cs" /> + <File filename="./MainWindow.cs" /> + <File filename="./CorbaHandler.cs" /> + <File filename="../../../../../IIOPNet.src.1.9.0.rc0/IIOPChannel/IIOPChannel.cs" /> + </Files> + <Views> + <ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ProjectPad"> + <TreeView> + <Node expanded="True"> + <Node name="Controller" expanded="True"> + <Node name="References" expanded="True" /> + <Node name="MainWindow.cs" expanded="False" selected="True" /> + </Node> + </Node> + </TreeView> + </ViewMemento> + <ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ClassPad"> + <TreeView> + <Node expanded="True" /> + </TreeView> + </ViewMemento> + <ViewMemento Id="MonoQuery.DatabasePad"> + <TreeView> + <Node expanded="False" /> + </TreeView> + </ViewMemento> + <ViewMemento Id="MonoDevelop.NUnit.TestPad"> + <TreeView> + <Node expanded="False" /> + </TreeView> + </ViewMemento> + </Views> + <Properties> + <Properties> + <Property key="ActiveConfiguration" value="Debug" /> + <Property key="ActiveWindow" value="/home/manu/DA/trunk/IIOPNet.src.1.9.0.rc0/IIOPChannel/IIOPChannel.cs" /> + </Properties> + </Properties> +</UserCombinePreferences>
\ No newline at end of file diff --git a/quellcode/demo1/Controller/ControllerC.cpp b/quellcode/demo1/Controller/ControllerC.cpp new file mode 100755 index 0000000..9a7130f --- /dev/null +++ b/quellcode/demo1/Controller/ControllerC.cpp @@ -0,0 +1,447 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:283 + + +#include "ControllerC.h" +#include "tao/AnyTypeCode/Null_RefCount_Policy.h" +#include "tao/AnyTypeCode/TypeCode_Constants.h" +#include "tao/AnyTypeCode/Alias_TypeCode_Static.h" +#include "tao/AnyTypeCode/Objref_TypeCode_Static.h" +#include "tao/AnyTypeCode/String_TypeCode_Static.h" +#include "tao/CDR.h" +#include "tao/Exception_Data.h" +#include "tao/Invocation_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/Any.h" +#include "tao/AnyTypeCode/Any_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "ace/OS_NS_string.h" + +#if !defined (__ACE_INLINE__) +#include "ControllerC.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for Controller::Display. + +Controller::Display_ptr +TAO::Objref_Traits<Controller::Display>::duplicate ( + Controller::Display_ptr p + ) +{ + return Controller::Display::_duplicate (p); +} + +void +TAO::Objref_Traits<Controller::Display>::release ( + Controller::Display_ptr p + ) +{ + CORBA::release (p); +} + +Controller::Display_ptr +TAO::Objref_Traits<Controller::Display>::nil (void) +{ + return Controller::Display::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<Controller::Display>::marshal ( + const Controller::Display_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*Controller__TAO_Display_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Controller::Display::show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Display_Proxy_Broker_ == 0) + { + Controller_Display_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Char *>::in_arg_val _tao_txt (txt); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_txt + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 2, + "show", + 4, + this->the_TAO_Display_Proxy_Broker_ + ); + + _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +Controller::Display::Display (void) + : the_TAO_Display_Proxy_Broker_ (0) +{ + this->Controller_Display_setup_collocation (); +} + +void +Controller::Display::Controller_Display_setup_collocation () +{ + if (::Controller__TAO_Display_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_Display_Proxy_Broker_ = + ::Controller__TAO_Display_Proxy_Broker_Factory_function_pointer (this); + } +} + +Controller::Display::~Display (void) +{} + +void +Controller::Display::_tao_any_destructor (void *_tao_void_pointer) +{ + Display *_tao_tmp_pointer = + static_cast<Display *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +Controller::Display_ptr +Controller::Display::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Display>::narrow ( + _tao_objref, + "IDL:manut/Controller/Display:1.0", + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Controller::Display_ptr +Controller::Display::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Display>::unchecked_narrow ( + _tao_objref, + "IDL:manut/Controller/Display:1.0", + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Controller::Display_ptr +Controller::Display::_duplicate (Display_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +Controller::Display::_tao_release (Display_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +Controller::Display::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:manut/Controller/Display:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* Controller::Display::_interface_repository_id (void) const +{ + return "IDL:manut/Controller/Display:1.0"; +} + +::CORBA::Boolean +Controller::Display::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_Controller_Display ( + ::CORBA::tk_objref, + "IDL:manut/Controller/Display:1.0", + "Display"); + +namespace Controller +{ + ::CORBA::TypeCode_ptr const _tc_Display = + &_tao_tc_Controller_Display; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<Controller::Display>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace Controller +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Display_ptr _tao_elem + ) + { + Display_ptr _tao_objptr = + Display::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Display_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<Display>::insert ( + _tao_any, + Display::_tao_any_destructor, + _tc_Display, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + Display_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<Display>::extract ( + _tao_any, + Display::_tao_any_destructor, + _tc_Display, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + Controller::Display_ptr _tao_elem + ) +{ + Controller::Display_ptr _tao_objptr = + Controller::Display::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + Controller::Display_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<Controller::Display>::insert ( + _tao_any, + Controller::Display::_tao_any_destructor, + Controller::_tc_Display, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + Controller::Display_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<Controller::Display>::extract ( + _tao_any, + Controller::Display::_tao_any_destructor, + Controller::_tc_Display, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const Controller::Display_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + Controller::Display_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::Controller::Display RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + diff --git a/quellcode/demo1/Controller/ControllerC.h b/quellcode/demo1/Controller/ControllerC.h new file mode 100755 index 0000000..cc6b69b --- /dev/null +++ b/quellcode/demo1/Controller/ControllerC.h @@ -0,0 +1,294 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:155 + +#ifndef _TAO_IDL_CONTROLLERC_H_ +#define _TAO_IDL_CONTROLLERC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/AnyTypeCode/AnyTypeCode_methods.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" +#include "tao/Versioned_Namespace.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + class Collocation_Proxy_Broker; + template<typename T> class Narrow_Utils; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:49 + +namespace Controller +{ + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_CONTROLLER_DISPLAY__VAR_OUT_CH_) +#define _CONTROLLER_DISPLAY__VAR_OUT_CH_ + + class Display; + typedef Display *Display_ptr; + + typedef + TAO_Objref_Var_T< + Display + > + Display_var; + + typedef + TAO_Objref_Out_T< + Display + > + Display_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_CONTROLLER_DISPLAY_CH_) +#define _CONTROLLER_DISPLAY_CH_ + + class Display + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<Display>; + typedef Display_ptr _ptr_type; + typedef Display_var _var_type; + + // The static operations. + static Display_ptr _duplicate (Display_ptr obj); + + static void _tao_release (Display_ptr obj); + + static Display_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Display_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Display_ptr _nil (void) + { + return static_cast<Display_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_Display_Proxy_Broker_; + + protected: + // Concrete interface only. + Display (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void Controller_Display_setup_collocation (void); + + // Concrete non-local interface only. + Display ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + Display ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~Display (void); + + private: + // Private and unimplemented for concrete interfaces. + Display (const Display &); + + void operator= (const Display &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_Display; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:78 + +} // module Controller + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:139 + +extern +TAO::Collocation_Proxy_Broker * +(*Controller__TAO_Display_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Traits specializations. +namespace TAO +{ + +#if !defined (_CONTROLLER_DISPLAY__TRAITS_) +#define _CONTROLLER_DISPLAY__TRAITS_ + + template<> + struct Objref_Traits< ::Controller::Display> + { + static ::Controller::Display_ptr duplicate ( + ::Controller::Display_ptr + ); + static void release ( + ::Controller::Display_ptr + ); + static ::Controller::Display_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::Controller::Display_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace Controller +{ + void operator<<= ( ::CORBA::Any &, Display_ptr); // copying + void operator<<= ( ::CORBA::Any &, Display_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Display_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, Controller::Display_ptr); // copying + void operator<<= (::CORBA::Any &, Controller::Display_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Controller::Display_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const Controller::Display_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, Controller::Display_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1093 +#if defined (__ACE_INLINE__) +#include "ControllerC.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + + diff --git a/quellcode/demo1/Controller/ControllerC.inl b/quellcode/demo1/Controller/ControllerC.inl new file mode 100755 index 0000000..4cd6cfa --- /dev/null +++ b/quellcode/demo1/Controller/ControllerC.inl @@ -0,0 +1,64 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_CONTROLLER_DISPLAY___CI_) +#define _CONTROLLER_DISPLAY___CI_ + +ACE_INLINE +Controller::Display::Display ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_Display_Proxy_Broker_ (0) +{ + this->Controller_Display_setup_collocation (); +} + +ACE_INLINE +Controller::Display::Display ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_Display_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + diff --git a/quellcode/demo1/Controller/ControllerS.cpp b/quellcode/demo1/Controller/ControllerS.cpp new file mode 100755 index 0000000..0438c9e --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS.cpp @@ -0,0 +1,803 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:577 + +#ifndef _TAO_IDL_CONTROLLERS_CPP_ +#define _TAO_IDL_CONTROLLERS_CPP_ + + +#include "ControllerS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/TypeCode.h" +#include "tao/AnyTypeCode/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if !defined (__ACE_INLINE__) +#include "ControllerS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_Controller_Display_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /opt/ACE_wrappers/1.5/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_Controller_Display_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_Controller_Display_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 0, 5, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 16, + 0, 5, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 0, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_Controller_Display_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 6, + MIN_WORD_LENGTH = 4, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 4, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 12, + DUPLICATES = 0, + WORDLIST_SIZE = 10 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"show", &POA_Controller::Display::show_skel, 0}, + {"_is_a", &POA_Controller::Display::_is_a_skel, 0}, + {"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_component", &POA_Controller::Display::_component_skel, 0}, + {"",0,0},{"",0,0}, + {"_non_existent", &POA_Controller::Display::_non_existent_skel, 0}, + {"_repository_id", &POA_Controller::Display::_repository_id_skel, 0}, + {"_interface", &POA_Controller::Display::_interface_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_Controller_Display_Perfect_Hash_OpTable tao_Controller_Display_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +Controller__TAO_Display_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +Controller__TAO_Display_Proxy_Broker_Factory_Initializer (size_t) +{ + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer = + Controller__TAO_Display_Proxy_Broker_Factory_function; + + return 0; +} + +static int +Controller__TAO_Display_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + Controller__TAO_Display_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (Controller__TAO_Display_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_Controller::Display::Display (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_Controller_Display_optable; +} + +POA_Controller::Display::Display (const Display& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_Controller::Display::~Display (void) +{ +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class show_Display + : public TAO::Upcall_Command + { + public: + inline show_Display ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + this->servant_->show ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_Controller::Display::show_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_txt; + + TAO::Argument * const args[] = + { + &retval, + &_tao_txt + }; + + static size_t const nargs = 2; + + POA_Controller::Display * const impl = + static_cast<POA_Controller::Display *> (servant); + + show_Display command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_Controller::Display * const impl = + static_cast<POA_Controller::Display *> (servant); + + _is_a_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Controller::Display * const impl = + static_cast<POA_Controller::Display *> (servant); + + _non_existent_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Controller::Display * const impl = + static_cast<POA_Controller::Display *> (servant); + + _repository_id_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_Controller::Display::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_Controller::Display * const impl = + static_cast<POA_Controller::Display *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_Display_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_Display_Upcall_Command ( + POA_Controller::Display * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Controller::Display * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Controller::Display::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Controller::Display * const impl = + static_cast<POA_Controller::Display *> (servant); + + _get_component_Display_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_Controller::Display::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:manut/Controller/Display:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_Controller::Display::_interface_repository_id (void) const +{ + return "IDL:manut/Controller/Display:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_Controller::Display::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +Controller::Display * +POA_Controller::Display::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::Controller::Display STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + Controller__TAO_Display_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Controller/ControllerS.h b/quellcode/demo1/Controller/ControllerS.h new file mode 100755 index 0000000..ae39d58 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS.h @@ -0,0 +1,159 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:387 + +#ifndef _TAO_IDL_CONTROLLERS_H_ +#define _TAO_IDL_CONTROLLERS_H_ + + +#include "ControllerC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_Controller +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class Display; + typedef Display *Display_ptr; + + class Display + : public virtual PortableServer::ServantBase + { + protected: + Display (void); + + public: + // Useful for template programming. + typedef ::Controller::Display _stub_type; + typedef ::Controller::Display_ptr _stub_ptr_type; + typedef ::Controller::Display_var _stub_var_type; + + Display (const Display& rhs); + virtual ~Display (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::Controller::Display *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) = 0; + + static void show_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module Controller + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1148 + +#include "ControllerS_T.h" + +#if defined (__ACE_INLINE__) +#include "ControllerS.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Controller/ControllerS.inl b/quellcode/demo1/Controller/ControllerS.inl new file mode 100755 index 0000000..38aa325 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS.inl @@ -0,0 +1,28 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + diff --git a/quellcode/demo1/Controller/ControllerS_T.cpp b/quellcode/demo1/Controller/ControllerS_T.cpp new file mode 100755 index 0000000..2a258cf --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS_T.cpp @@ -0,0 +1,41 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:656 + +#ifndef _TAO_IDL_CONTROLLERS_T_CPP_ +#define _TAO_IDL_CONTROLLERS_T_CPP_ + +#include "ControllerS_T.h" + +#if !defined (__ACE_INLINE__) +#include "ControllerS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/demo1/Controller/ControllerS_T.h b/quellcode/demo1/Controller/ControllerS_T.h new file mode 100755 index 0000000..d9bc663 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS_T.h @@ -0,0 +1,118 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:520 + +#ifndef _TAO_IDL_CONTROLLERS_T_H_ +#define _TAO_IDL_CONTROLLERS_T_H_ + + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_Controller +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class Display_tie : public Display + { + public: + Display_tie (T &t); + // the T& ctor + Display_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + Display_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + Display_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~Display_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + Display_tie (const Display_tie &); + void operator= (const Display_tie &); + }; +} // module Controller + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1251 +#if defined (__ACE_INLINE__) +#include "ControllerS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ControllerS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("ControllerS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Controller/ControllerS_T.inl b/quellcode/demo1/Controller/ControllerS_T.inl new file mode 100755 index 0000000..1c962a4 --- /dev/null +++ b/quellcode/demo1/Controller/ControllerS_T.inl @@ -0,0 +1,136 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_Controller::Display_tie<T>::Display_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_Controller::Display_tie<T>::Display_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_Controller::Display_tie<T>::Display_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_Controller::Display_tie<T>::Display_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_Controller::Display_tie<T>::~Display_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_Controller::Display_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_Controller::Display_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_Controller::Display_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_Controller::Display_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_Controller::Display_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_Controller::Display_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->Display::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_Controller::Display_tie<T>::show ( + const char * txt + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + this->ptr_->show ( + txt + ); +} diff --git a/quellcode/demo1/Controller/CorbaHandler.cs b/quellcode/demo1/Controller/CorbaHandler.cs new file mode 100755 index 0000000..e705b7f --- /dev/null +++ b/quellcode/demo1/Controller/CorbaHandler.cs @@ -0,0 +1,84 @@ +using System; +using System.IO; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Channels; +// from IIOPChannel.dll +using Ch.Elca.Iiop; +using Ch.Elca.Iiop.Services; +using omg.org.CosNaming; +// from ExecutorI.dll +using manut.Executor; +namespace manut.Executor { + public class CorbaHandler { + // remote object + private manut.Executor.ExecCmd servant; + private IiopChannel chan2; + private CorbaInit init2; + private MainWindow window; + private string host; + private int port; + public CorbaHandler() { + host = "192.168.0.253"; + port = 2809; + connect(); + } + public CorbaHandler(string _host, int _port, MainWindow _window) { + host = _host; + port = _port; + window = _window; + } + public void serve(){ + try { + // Host Servant + chan2 = new IiopChannel(0); + ChannelServices.RegisterChannel(chan2); + init2 = CorbaInit.GetInit(); + NamingContext nameService2 = init2.GetNameService(host, port); + NameComponent[] moduleName2 = new NameComponent[] {new NameComponent("manut.Controller", "")}; + NamingContext nameSpace2 = (NamingContext)nameService2.bind_new_context(moduleName2); + NameComponent[] interfaceName2 = new NameComponent[] {new NameComponent("Disp", "")}; + manut.Controller.Disp interfaceImpl = new manut.Controller.Disp(window); + Console.WriteLine("4"); + nameSpace2.bind(interfaceName2, interfaceImpl); + Console.WriteLine("DisplayServer ready"); + } catch (Exception e) { + Console.WriteLine(e); + } + } + public void connect() { + try{ + // Connect to Executer + // Access the COS naming service (NameService)... + NamingContext nameService = init2.GetNameService(host, port); + // Access the IDL-defined module + // (which maps to a .Net namespace)... + NameComponent[] moduleName = new NameComponent[] {new NameComponent("Executor", "")}; + NamingContext nameSpace = (NamingContext)nameService.resolve(moduleName); + Console.Write("Executor ok, "); + // Access the IDL-defined interface + // (which maps to a .NET interface class) + NameComponent[] interfaceName = new NameComponent[] {new NameComponent("ExecCmd", "")}; + this.servant = (manut.Executor.ExecCmd)nameSpace.resolve(interfaceName); + Console.Write("ExecCmd ok\n\nTesting... "); + this.servant.changeMode(2); + Console.Write("ok\n\n"); + } catch (Exception e) { + Console.WriteLine(e); + } + } + public bool setPorts(short one, short two, short three) { + return this.servant.setPorts(one, two, three); + } + public bool setMode(short mode) { + try { + return this.servant.changeMode(mode); + } catch(Exception e) { + Console.WriteLine("setMode Exception: "+e); + return false; + } + } + public void display(string txt) { + window.display(txt); + } + } +} diff --git a/quellcode/demo1/Controller/Display.cs b/quellcode/demo1/Controller/Display.cs new file mode 100755 index 0000000..723caaf --- /dev/null +++ b/quellcode/demo1/Controller/Display.cs @@ -0,0 +1,15 @@ +using System; +namespace manut.Controller { + public class Disp: MarshalByRefObject, manut.Controller.Display { + private MainWindow window; + public Disp(MainWindow _window) { + window = _window; + } + public override object InitializeLifetimeService() { + return null; + } + public void show(string txt) { + window.display(txt); + } + } +} diff --git a/quellcode/demo1/Controller/Display.dll b/quellcode/demo1/Controller/Display.dll Binary files differnew file mode 100755 index 0000000..cd4fc7f --- /dev/null +++ b/quellcode/demo1/Controller/Display.dll diff --git a/quellcode/demo1/Controller/Executor.dll b/quellcode/demo1/Controller/Executor.dll Binary files differnew file mode 100755 index 0000000..23c2865 --- /dev/null +++ b/quellcode/demo1/Controller/Executor.dll diff --git a/quellcode/demo1/Controller/Main.cs b/quellcode/demo1/Controller/Main.cs new file mode 100755 index 0000000..b07e1ed --- /dev/null +++ b/quellcode/demo1/Controller/Main.cs @@ -0,0 +1,17 @@ +// project created on 12/15/2006 at 11:25 AM +using System; +using Gtk; + +namespace Controller +{ + class MainClass + { + public static void Main (string[] args) + { + Application.Init (); + MainWindow win = new MainWindow (); + win.Show (); + Application.Run (); + } + } +}
\ No newline at end of file diff --git a/quellcode/demo1/Controller/MainWindow.cs b/quellcode/demo1/Controller/MainWindow.cs new file mode 100755 index 0000000..3aae87b --- /dev/null +++ b/quellcode/demo1/Controller/MainWindow.cs @@ -0,0 +1,56 @@ +using System; +using Gtk; +public class MainWindow: Gtk.Window { + // NameService (falls nichts in Feld eingetragen wird) + private string currentHost = "192.168.0.253"; + // selected Mode + private string selected = "uninitialized"; + // CORBAHandle <module>.<Interface>.CorbaHandler + private manut.Executor.CorbaHandler corba; + private int counter = 0; //0 =IP NS, sonst IP CORBA Server + public MainWindow (): base ("") { + Stetic.Gui.Build (this, typeof(MainWindow)); + } + // set info text + public void display(string txt) { + labelCurrent.Text = txt; + } + // window closed + protected void OnDeleteEvent (object sender, DeleteEventArgs a) { + Application.Quit (); + a.RetVal = true; + } + // submit new mode to executor + protected virtual void OnButtonSubmitClicked(object sender, System.EventArgs e){ + if(selected =="Move") corba.setMode(1); + else if (selected == "Blink") corba.setMode(2); + else if (selected == "Flash") corba.setMode(3); + else Console.WriteLine("unallowed selection"); + Console.WriteLine("Sent: "+selected); + } + + protected virtual void OnButtonConnectClicked(object sender, System.EventArgs e){ + if(counter == 0){ // Register Display Object at NS + Console.Write("connecting to: "+currentHost); + corba = new manut.Executor.CorbaHandler(currentHost, 2809, this); + // host display object + corba.serve(); + counter++; + } else { // Connect to ExecCmd Interface + Console.WriteLine("connecting to: "+currentHost); + corba.connect(); + } + } + // new mode selected + protected virtual void OnComboboxModeChanged(object sender, System.EventArgs e) { + selected = ((ComboBox)sender).ActiveText; + Console.WriteLine("Selected: "+ selected); + labelCurrent.Text = selected; + } + // new host entered + protected virtual void OnEntryHostChanged(object sender, System.EventArgs e) { + currentHost = ((Entry)sender).Text; + } + [Glade.Widget] + private Label labelCurrent; +} diff --git a/quellcode/demo1/Controller/bin/Debug/Controller.exe b/quellcode/demo1/Controller/bin/Debug/Controller.exe Binary files differnew file mode 100755 index 0000000..5aad293 --- /dev/null +++ b/quellcode/demo1/Controller/bin/Debug/Controller.exe diff --git a/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb b/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb Binary files differnew file mode 100755 index 0000000..07beef0 --- /dev/null +++ b/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb diff --git a/quellcode/demo1/Controller/bin/Debug/Display.dll b/quellcode/demo1/Controller/bin/Debug/Display.dll Binary files differnew file mode 100755 index 0000000..cd4fc7f --- /dev/null +++ b/quellcode/demo1/Controller/bin/Debug/Display.dll diff --git a/quellcode/demo1/Controller/bin/Debug/Executor.dll b/quellcode/demo1/Controller/bin/Debug/Executor.dll Binary files differnew file mode 100755 index 0000000..23c2865 --- /dev/null +++ b/quellcode/demo1/Controller/bin/Debug/Executor.dll diff --git a/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll b/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll Binary files differnew file mode 100755 index 0000000..0420e23 --- /dev/null +++ b/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll diff --git a/quellcode/demo1/Controller/bin/Release/Controller.exe b/quellcode/demo1/Controller/bin/Release/Controller.exe Binary files differnew file mode 100755 index 0000000..aaf65ff --- /dev/null +++ b/quellcode/demo1/Controller/bin/Release/Controller.exe diff --git a/quellcode/demo1/Controller/bin/Release/Display.dll b/quellcode/demo1/Controller/bin/Release/Display.dll Binary files differnew file mode 100755 index 0000000..efdfd74 --- /dev/null +++ b/quellcode/demo1/Controller/bin/Release/Display.dll diff --git a/quellcode/demo1/Controller/bin/Release/Executor.dll b/quellcode/demo1/Controller/bin/Release/Executor.dll Binary files differnew file mode 100755 index 0000000..c380706 --- /dev/null +++ b/quellcode/demo1/Controller/bin/Release/Executor.dll diff --git a/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll b/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll Binary files differnew file mode 100755 index 0000000..0420e23 --- /dev/null +++ b/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll diff --git a/quellcode/demo1/Controller/gtk-gui/generated.cs b/quellcode/demo1/Controller/gtk-gui/generated.cs new file mode 100755 index 0000000..3117c51 --- /dev/null +++ b/quellcode/demo1/Controller/gtk-gui/generated.cs @@ -0,0 +1,257 @@ +// ------------------------------------------------------------------------------ +// <autogenerated> +// This code was generated by a tool. +// Mono Runtime Version: 1.1.4322.2032 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </autogenerated> +// ------------------------------------------------------------------------------ + +namespace Stetic { + + class Gui { + + public static void Build(object obj, System.Type type) { + Stetic.Gui.Build(obj, type.FullName); + } + + public static void Build(object obj, string id) { + System.Collections.Hashtable widgets = new System.Collections.Hashtable(); + if ((id == "MainWindow")) { + Gtk.Window cobj = ((Gtk.Window)(obj)); + // Widget MainWindow + cobj.Title = "Controller"; + cobj.WindowPosition = ((Gtk.WindowPosition)(4)); + cobj.Events = ((Gdk.EventMask)(0)); + cobj.Name = "MainWindow"; + // Container child MainWindow.Gtk.Container+ContainerChild + Gtk.VBox w1 = new Gtk.VBox(); + w1.Events = ((Gdk.EventMask)(0)); + w1.Name = "vbox1"; + // Container child vbox1.Gtk.Box+BoxChild + Gtk.Frame w2 = new Gtk.Frame(); + w2.ShadowType = ((Gtk.ShadowType)(0)); + w2.LabelXalign = 0F; + w2.Events = ((Gdk.EventMask)(0)); + w2.Name = "frameHost"; + // Container child frameHost.Gtk.Container+ContainerChild + Gtk.Alignment w3 = new Gtk.Alignment(0F, 0F, 1F, 1F); + w3.LeftPadding = ((System.UInt32)(12)); + w3.Events = ((Gdk.EventMask)(0)); + w3.Name = "GtkAlignment"; + // Container child GtkAlignment.Gtk.Container+ContainerChild + Gtk.HBox w4 = new Gtk.HBox(); + w4.Events = ((Gdk.EventMask)(0)); + w4.Name = "hbox1"; + // Container child hbox1.Gtk.Box+BoxChild + Gtk.Label w5 = new Gtk.Label(); + w5.LabelProp = "Host: "; + w5.Xalign = 0F; + w5.Events = ((Gdk.EventMask)(0)); + w5.Name = "labelHost"; + widgets["labelHost"] = w5; + w4.Add(w5); + Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w4[w5])); + w6.Position = 0; + w6.Expand = false; + w6.Fill = false; + w6.Padding = ((System.UInt32)(5)); + // Container child hbox1.Gtk.Box+BoxChild + Gtk.Entry w7 = new Gtk.Entry(); + w7.Editable = true; + w7.InvisibleChar = '•'; + w7.CanFocus = true; + w7.Events = ((Gdk.EventMask)(0)); + w7.Name = "entryHost"; + widgets["entryHost"] = w7; + w4.Add(w7); + Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w4[w7])); + w8.Position = 1; + // Container child hbox1.Gtk.Box+BoxChild + Gtk.Button w9 = new Gtk.Button(); + w9.CanFocus = true; + w9.Events = ((Gdk.EventMask)(0)); + w9.Name = "buttonConnect"; + w9.Label = "Connect"; + widgets["buttonConnect"] = w9; + w4.Add(w9); + Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w4[w9])); + w10.Position = 2; + w10.Expand = false; + w10.Fill = false; + w10.Padding = ((System.UInt32)(3)); + widgets["hbox1"] = w4; + w3.Add(w4); + widgets["GtkAlignment"] = w3; + w2.Add(w3); + Gtk.Label w13 = new Gtk.Label(); + w13.LabelProp = "<b>Connection</b>"; + w13.UseMarkup = true; + w13.Events = ((Gdk.EventMask)(256)); + w13.Name = "GtkLabel1"; + widgets["GtkLabel1"] = w13; + w2.LabelWidget = w13; + widgets["frameHost"] = w2; + w1.Add(w2); + Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(w1[w2])); + w14.Position = 0; + w14.Expand = false; + w14.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + Gtk.Frame w15 = new Gtk.Frame(); + w15.ShadowType = ((Gtk.ShadowType)(0)); + w15.LabelXalign = 0F; + w15.Events = ((Gdk.EventMask)(0)); + w15.Name = "frameSelect"; + // Container child frameSelect.Gtk.Container+ContainerChild + Gtk.Alignment w16 = new Gtk.Alignment(0F, 0F, 1F, 1F); + w16.LeftPadding = ((System.UInt32)(12)); + w16.Events = ((Gdk.EventMask)(0)); + w16.Name = "GtkAlignment1"; + // Container child GtkAlignment1.Gtk.Container+ContainerChild + Gtk.HBox w17 = new Gtk.HBox(); + w17.Events = ((Gdk.EventMask)(0)); + w17.Name = "hbox2"; + // Container child hbox2.Gtk.Box+BoxChild + Gtk.Label w18 = new Gtk.Label(); + w18.LabelProp = "Mode:"; + w18.Xalign = 0F; + w18.Events = ((Gdk.EventMask)(0)); + w18.Name = "labelMode"; + widgets["labelMode"] = w18; + w17.Add(w18); + Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(w17[w18])); + w19.Position = 0; + w19.Expand = false; + w19.Fill = false; + w19.Padding = ((System.UInt32)(5)); + // Container child hbox2.Gtk.Box+BoxChild + Gtk.ComboBox w20 = Gtk.ComboBox.NewText(); + w20.AppendText("Move"); + w20.AppendText("Blink"); + w20.AppendText("Flash"); + w20.Events = ((Gdk.EventMask)(0)); + w20.Name = "comboboxMode"; + widgets["comboboxMode"] = w20; + w17.Add(w20); + Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(w17[w20])); + w21.Position = 1; + w21.Padding = ((System.UInt32)(2)); + // Container child hbox2.Gtk.Box+BoxChild + Gtk.Button w22 = new Gtk.Button(); + w22.CanFocus = true; + w22.Events = ((Gdk.EventMask)(0)); + w22.Name = "buttonSubmit"; + w22.Label = "Submit "; + widgets["buttonSubmit"] = w22; + w17.Add(w22); + Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(w17[w22])); + w23.Position = 2; + w23.Expand = false; + w23.Fill = false; + w23.Padding = ((System.UInt32)(3)); + widgets["hbox2"] = w17; + w16.Add(w17); + widgets["GtkAlignment1"] = w16; + w15.Add(w16); + Gtk.Label w26 = new Gtk.Label(); + w26.LabelProp = "<b>Select</b>"; + w26.UseMarkup = true; + w26.Events = ((Gdk.EventMask)(256)); + w26.Name = "GtkLabelSelect"; + widgets["GtkLabelSelect"] = w26; + w15.LabelWidget = w26; + widgets["frameSelect"] = w15; + w1.Add(w15); + Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(w1[w15])); + w27.Position = 1; + w27.Expand = false; + w27.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + Gtk.Frame w28 = new Gtk.Frame(); + w28.ShadowType = ((Gtk.ShadowType)(0)); + w28.LabelXalign = 0F; + w28.Events = ((Gdk.EventMask)(0)); + w28.Name = "frameCurrent"; + // Container child frameCurrent.Gtk.Container+ContainerChild + Gtk.Alignment w29 = new Gtk.Alignment(0F, 0F, 1F, 1F); + w29.LeftPadding = ((System.UInt32)(12)); + w29.Events = ((Gdk.EventMask)(0)); + w29.Name = "GtkAlignment2"; + // Container child GtkAlignment2.Gtk.Container+ContainerChild + Gtk.HBox w30 = new Gtk.HBox(); + w30.Events = ((Gdk.EventMask)(0)); + w30.Name = "hbox3"; + // Container child hbox3.Gtk.Box+BoxChild + Gtk.Label w31 = new Gtk.Label(); + w31.LabelProp = "disconnected"; + w31.Events = ((Gdk.EventMask)(0)); + w31.Name = "labelCurrent"; + widgets["labelCurrent"] = w31; + w30.Add(w31); + Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(w30[w31])); + w32.Position = 0; + w32.Expand = false; + w32.Fill = false; + widgets["hbox3"] = w30; + w29.Add(w30); + widgets["GtkAlignment2"] = w29; + w28.Add(w29); + Gtk.Label w35 = new Gtk.Label(); + w35.LabelProp = "<b>Status</b>"; + w35.UseMarkup = true; + w35.Events = ((Gdk.EventMask)(256)); + w35.Name = "GtkLabelStatus"; + widgets["GtkLabelStatus"] = w35; + w28.LabelWidget = w35; + widgets["frameCurrent"] = w28; + w1.Add(w28); + Gtk.Box.BoxChild w36 = ((Gtk.Box.BoxChild)(w1[w28])); + w36.Position = 2; + w36.Expand = false; + w36.Fill = false; + widgets["vbox1"] = w1; + cobj.Add(w1); + cobj.DefaultWidth = 409; + cobj.DefaultHeight = 169; + widgets["MainWindow"] = cobj; + w5.Show(); + w7.Show(); + w9.Show(); + w4.Show(); + w3.Show(); + w13.Show(); + w2.Show(); + w18.Show(); + w20.Show(); + w22.Show(); + w17.Show(); + w16.Show(); + w26.Show(); + w15.Show(); + w31.Show(); + w30.Show(); + w29.Show(); + w35.Show(); + w28.Show(); + w1.Show(); + cobj.Show(); + cobj.DeleteEvent += ((Gtk.DeleteEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.DeleteEventHandler), cobj, "OnDeleteEvent"))); + w7.Changed += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnEntryHostChanged"))); + w9.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnButtonConnectClicked"))); + w20.Changed += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnComboboxModeChanged"))); + w22.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnButtonSubmitClicked"))); + } + System.Reflection.FieldInfo[] fields = obj.GetType().GetFields(((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) | System.Reflection.BindingFlags.Instance)); + for (int n = 0; (n < fields.Length); n = (n + 1)) { + System.Reflection.FieldInfo field = fields[n]; + object widget = widgets[field.Name]; + if (((widget != null) && field.FieldType.IsInstanceOfType(widget))) { + field.SetValue(obj, widget); + } + } + } + } + +} diff --git a/quellcode/demo1/Controller/gtk-gui/gui.stetic b/quellcode/demo1/Controller/gtk-gui/gui.stetic new file mode 100755 index 0000000..d816f05 --- /dev/null +++ b/quellcode/demo1/Controller/gtk-gui/gui.stetic @@ -0,0 +1,244 @@ +<?xml version="1.0" encoding="utf-8"?> +<stetic-interface> + <widget class="Gtk.Window" id="MainWindow" design-size="409 169"> + <property name="Title" translatable="yes">Controller</property> + <property name="WindowPosition">CenterOnParent</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <signal name="DeleteEvent" handler="OnDeleteEvent" /> + <child> + <widget class="Gtk.VBox" id="vbox1"> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.Frame" id="frameHost"> + <property name="ShadowType">None</property> + <property name="LabelXalign">0</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.Alignment" id="GtkAlignment"> + <property name="Xalign">0</property> + <property name="Yalign">0</property> + <property name="LeftPadding">12</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.HBox" id="hbox1"> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.Label" id="labelHost"> + <property name="LabelProp" translatable="yes">Host: </property> + <property name="Xalign">0</property> + <property name="Visible">True</property> + <property name="Events">0</property> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">False</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + <property name="Padding">5</property> + </packing> + </child> + <child> + <widget class="Gtk.Entry" id="entryHost"> + <property name="Editable">True</property> + <property name="InvisibleChar">•</property> + <property name="Visible">True</property> + <property name="CanFocus">True</property> + <property name="Events">0</property> + <signal name="Changed" handler="OnEntryHostChanged" /> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Button" id="buttonConnect"> + <property name="Type">TextOnly</property> + <property name="Label" translatable="yes">Connect</property> + <property name="IsDialogButton">False</property> + <property name="Visible">True</property> + <property name="CanFocus">True</property> + <property name="Events">0</property> + <signal name="Clicked" handler="OnButtonConnectClicked" /> + </widget> + <packing> + <property name="Position">2</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + <property name="Padding">3</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="Gtk.Label" id="GtkLabel1"> + <property name="LabelProp" translatable="yes"><b>Connection</b></property> + <property name="UseMarkup">True</property> + <property name="Visible">True</property> + <property name="Events">ButtonPressMask</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Frame" id="frameSelect"> + <property name="ShadowType">None</property> + <property name="LabelXalign">0</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.Alignment" id="GtkAlignment1"> + <property name="Xalign">0</property> + <property name="Yalign">0</property> + <property name="LeftPadding">12</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.HBox" id="hbox2"> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.Label" id="labelMode"> + <property name="LabelProp" translatable="yes">Mode:</property> + <property name="Xalign">0</property> + <property name="Visible">True</property> + <property name="Events">0</property> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">False</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + <property name="Padding">5</property> + </packing> + </child> + <child> + <widget class="Gtk.ComboBox" id="comboboxMode"> + <property name="Items">Move +Blink +Flash</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <signal name="Changed" handler="OnComboboxModeChanged" /> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">False</property> + <property name="Padding">2</property> + </packing> + </child> + <child> + <widget class="Gtk.Button" id="buttonSubmit"> + <property name="Type">TextOnly</property> + <property name="Label" translatable="yes">Submit </property> + <property name="IsDialogButton">False</property> + <property name="Visible">True</property> + <property name="CanFocus">True</property> + <property name="Events">0</property> + <signal name="Clicked" handler="OnButtonSubmitClicked" /> + </widget> + <packing> + <property name="Position">2</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + <property name="Padding">3</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="Gtk.Label" id="GtkLabelSelect"> + <property name="LabelProp" translatable="yes"><b>Select</b></property> + <property name="UseMarkup">True</property> + <property name="Visible">True</property> + <property name="Events">ButtonPressMask</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Frame" id="frameCurrent"> + <property name="ShadowType">None</property> + <property name="LabelXalign">0</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.Alignment" id="GtkAlignment2"> + <property name="Xalign">0</property> + <property name="Yalign">0</property> + <property name="LeftPadding">12</property> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.HBox" id="hbox3"> + <property name="Visible">True</property> + <property name="Events">0</property> + <child> + <widget class="Gtk.Label" id="labelCurrent"> + <property name="LabelProp" translatable="yes" context="yes" comments="">|disconnected</property> + <property name="Visible">True</property> + <property name="Events">0</property> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="Gtk.Label" id="GtkLabelStatus"> + <property name="LabelProp" translatable="yes"><b>Status</b></property> + <property name="UseMarkup">True</property> + <property name="Visible">True</property> + <property name="Events">ButtonPressMask</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="Position">2</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> +</stetic-interface>
\ No newline at end of file diff --git a/quellcode/demo1/Executor/.depend.Executor b/quellcode/demo1/Executor/.depend.Executor new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/quellcode/demo1/Executor/.depend.Executor diff --git a/quellcode/demo1/Executor/.depend.Executor_Executor b/quellcode/demo1/Executor/.depend.Executor_Executor new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/quellcode/demo1/Executor/.depend.Executor_Executor diff --git a/quellcode/demo1/Executor/.depend.Executor_Receiver b/quellcode/demo1/Executor/.depend.Executor_Receiver new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/quellcode/demo1/Executor/.depend.Executor_Receiver diff --git a/quellcode/demo1/Executor/Executor b/quellcode/demo1/Executor/Executor Binary files differnew file mode 100755 index 0000000..692bc9b --- /dev/null +++ b/quellcode/demo1/Executor/Executor diff --git a/quellcode/demo1/Executor/Executor.cpp b/quellcode/demo1/Executor/Executor.cpp new file mode 100755 index 0000000..2e43341 --- /dev/null +++ b/quellcode/demo1/Executor/Executor.cpp @@ -0,0 +1,53 @@ +#include <iostream> +#include "Executor_i.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ExecutorORB"); + std::cout<<"ORB ok"<<std::endl; + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + // create Policy + CORBA::PolicyList benchPolicy(1); + benchPolicy.length(1); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::minPriority); + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("executorPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Executor"); + namingContext->bind_new_context(name); + std::cout<<"Bound Executor to NameService"<<std::endl; + name.length(2); + name[1].id = CORBA::string_dup("ExecCmd"); + Executor_ExecCmd_i servant(argc, argv, orb); + PortableServer::ObjectId_var oid = benchPOA->activate_object(&servant); + CORBA::Object_var servantObj = benchPOA->id_to_reference(oid.in()); + namingContext->rebind(name, servantObj.in()); + std::cout<<"servant activated\n"; + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + //destroy + rootPOA->destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/demo1/Executor/Executor.idl b/quellcode/demo1/Executor/Executor.idl new file mode 100755 index 0000000..9ee176c --- /dev/null +++ b/quellcode/demo1/Executor/Executor.idl @@ -0,0 +1,7 @@ +#pragma prefix "manut" +module Executor { + interface ExecCmd { + boolean changeMode(in short mode); + boolean setPorts(in short one, in short two, in short three); + }; +}; diff --git a/quellcode/demo1/Executor/Executor.mpc b/quellcode/demo1/Executor/Executor.mpc new file mode 100755 index 0000000..6f00c42 --- /dev/null +++ b/quellcode/demo1/Executor/Executor.mpc @@ -0,0 +1,9 @@ +project(Executor): rt_server, naming { + requires += exceptions + Source_Files { + ../Controller/ControllerC.cpp + ../Receiver/ReceiverC.cpp + Executor_i.cpp + Executor.cpp + } +} diff --git a/quellcode/demo1/Executor/ExecutorC.cpp b/quellcode/demo1/Executor/ExecutorC.cpp new file mode 100755 index 0000000..1145cbb --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorC.cpp @@ -0,0 +1,500 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:283 + + +#include "ExecutorC.h" +#include "tao/AnyTypeCode/Null_RefCount_Policy.h" +#include "tao/AnyTypeCode/TypeCode_Constants.h" +#include "tao/AnyTypeCode/Alias_TypeCode_Static.h" +#include "tao/AnyTypeCode/Objref_TypeCode_Static.h" +#include "tao/CDR.h" +#include "tao/Exception_Data.h" +#include "tao/Invocation_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/Any.h" +#include "tao/AnyTypeCode/Any_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "tao/Special_Basic_Arguments.h" +#include "ace/OS_NS_string.h" + +#if !defined (__ACE_INLINE__) +#include "ExecutorC.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for Executor::ExecCmd. + +Executor::ExecCmd_ptr +TAO::Objref_Traits<Executor::ExecCmd>::duplicate ( + Executor::ExecCmd_ptr p + ) +{ + return Executor::ExecCmd::_duplicate (p); +} + +void +TAO::Objref_Traits<Executor::ExecCmd>::release ( + Executor::ExecCmd_ptr p + ) +{ + CORBA::release (p); +} + +Executor::ExecCmd_ptr +TAO::Objref_Traits<Executor::ExecCmd>::nil (void) +{ + return Executor::ExecCmd::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<Executor::ExecCmd>::marshal ( + const Executor::ExecCmd_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +::CORBA::Boolean Executor::ExecCmd::changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_ExecCmd_Proxy_Broker_ == 0) + { + Executor_ExecCmd_setup_collocation (); + } + + TAO::Arg_Traits< ::ACE_InputCDR::to_boolean>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_mode (mode); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_mode + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 2, + "changeMode", + 10, + this->the_TAO_ExecCmd_Proxy_Broker_ + ); + + _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (_tao_retval.excp ()); + + return _tao_retval.retn (); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +::CORBA::Boolean Executor::ExecCmd::setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_ExecCmd_Proxy_Broker_ == 0) + { + Executor_ExecCmd_setup_collocation (); + } + + TAO::Arg_Traits< ::ACE_InputCDR::to_boolean>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_one (one); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_two (two); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_three (three); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_one, + &_tao_two, + &_tao_three + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "setPorts", + 8, + this->the_TAO_ExecCmd_Proxy_Broker_ + ); + + _tao_call.invoke (0, 0 ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (_tao_retval.excp ()); + + return _tao_retval.retn (); +} + +Executor::ExecCmd::ExecCmd (void) + : the_TAO_ExecCmd_Proxy_Broker_ (0) +{ + this->Executor_ExecCmd_setup_collocation (); +} + +void +Executor::ExecCmd::Executor_ExecCmd_setup_collocation () +{ + if (::Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_ExecCmd_Proxy_Broker_ = + ::Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer (this); + } +} + +Executor::ExecCmd::~ExecCmd (void) +{} + +void +Executor::ExecCmd::_tao_any_destructor (void *_tao_void_pointer) +{ + ExecCmd *_tao_tmp_pointer = + static_cast<ExecCmd *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +Executor::ExecCmd_ptr +Executor::ExecCmd::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<ExecCmd>::narrow ( + _tao_objref, + "IDL:manut/Executor/ExecCmd:1.0", + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Executor::ExecCmd_ptr +Executor::ExecCmd::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<ExecCmd>::unchecked_narrow ( + _tao_objref, + "IDL:manut/Executor/ExecCmd:1.0", + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Executor::ExecCmd_ptr +Executor::ExecCmd::_duplicate (ExecCmd_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +Executor::ExecCmd::_tao_release (ExecCmd_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +Executor::ExecCmd::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:manut/Executor/ExecCmd:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* Executor::ExecCmd::_interface_repository_id (void) const +{ + return "IDL:manut/Executor/ExecCmd:1.0"; +} + +::CORBA::Boolean +Executor::ExecCmd::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_Executor_ExecCmd ( + ::CORBA::tk_objref, + "IDL:manut/Executor/ExecCmd:1.0", + "ExecCmd"); + +namespace Executor +{ + ::CORBA::TypeCode_ptr const _tc_ExecCmd = + &_tao_tc_Executor_ExecCmd; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<Executor::ExecCmd>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace Executor +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + ExecCmd_ptr _tao_elem + ) + { + ExecCmd_ptr _tao_objptr = + ExecCmd::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + ExecCmd_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<ExecCmd>::insert ( + _tao_any, + ExecCmd::_tao_any_destructor, + _tc_ExecCmd, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + ExecCmd_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<ExecCmd>::extract ( + _tao_any, + ExecCmd::_tao_any_destructor, + _tc_ExecCmd, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + Executor::ExecCmd_ptr _tao_elem + ) +{ + Executor::ExecCmd_ptr _tao_objptr = + Executor::ExecCmd::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + Executor::ExecCmd_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<Executor::ExecCmd>::insert ( + _tao_any, + Executor::ExecCmd::_tao_any_destructor, + Executor::_tc_ExecCmd, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + Executor::ExecCmd_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<Executor::ExecCmd>::extract ( + _tao_any, + Executor::ExecCmd::_tao_any_destructor, + Executor::_tc_ExecCmd, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const Executor::ExecCmd_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + Executor::ExecCmd_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::Executor::ExecCmd RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + diff --git a/quellcode/demo1/Executor/ExecutorC.h b/quellcode/demo1/Executor/ExecutorC.h new file mode 100755 index 0000000..3b979d5 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorC.h @@ -0,0 +1,312 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:155 + +#ifndef _TAO_IDL_EXECUTORC_H_ +#define _TAO_IDL_EXECUTORC_H_ + +#include /**/ "ace/pre.h" + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/AnyTypeCode/AnyTypeCode_methods.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" +#include "tao/Versioned_Namespace.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + class Collocation_Proxy_Broker; + template<typename T> class Narrow_Utils; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:49 + +namespace Executor +{ + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_EXECUTOR_EXECCMD__VAR_OUT_CH_) +#define _EXECUTOR_EXECCMD__VAR_OUT_CH_ + + class ExecCmd; + typedef ExecCmd *ExecCmd_ptr; + + typedef + TAO_Objref_Var_T< + ExecCmd + > + ExecCmd_var; + + typedef + TAO_Objref_Out_T< + ExecCmd + > + ExecCmd_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_EXECUTOR_EXECCMD_CH_) +#define _EXECUTOR_EXECCMD_CH_ + + class ExecCmd + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<ExecCmd>; + typedef ExecCmd_ptr _ptr_type; + typedef ExecCmd_var _var_type; + + // The static operations. + static ExecCmd_ptr _duplicate (ExecCmd_ptr obj); + + static void _tao_release (ExecCmd_ptr obj); + + static ExecCmd_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static ExecCmd_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static ExecCmd_ptr _nil (void) + { + return static_cast<ExecCmd_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_ExecCmd_Proxy_Broker_; + + protected: + // Concrete interface only. + ExecCmd (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void Executor_ExecCmd_setup_collocation (void); + + // Concrete non-local interface only. + ExecCmd ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + ExecCmd ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~ExecCmd (void); + + private: + // Private and unimplemented for concrete interfaces. + ExecCmd (const ExecCmd &); + + void operator= (const ExecCmd &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_ExecCmd; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:78 + +} // module Executor + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:139 + +extern +TAO::Collocation_Proxy_Broker * +(*Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Traits specializations. +namespace TAO +{ + +#if !defined (_EXECUTOR_EXECCMD__TRAITS_) +#define _EXECUTOR_EXECCMD__TRAITS_ + + template<> + struct Objref_Traits< ::Executor::ExecCmd> + { + static ::Executor::ExecCmd_ptr duplicate ( + ::Executor::ExecCmd_ptr + ); + static void release ( + ::Executor::ExecCmd_ptr + ); + static ::Executor::ExecCmd_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::Executor::ExecCmd_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace Executor +{ + void operator<<= ( ::CORBA::Any &, ExecCmd_ptr); // copying + void operator<<= ( ::CORBA::Any &, ExecCmd_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, ExecCmd_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, Executor::ExecCmd_ptr); // copying + void operator<<= (::CORBA::Any &, Executor::ExecCmd_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Executor::ExecCmd_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const Executor::ExecCmd_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, Executor::ExecCmd_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1093 +#if defined (__ACE_INLINE__) +#include "ExecutorC.inl" +#endif /* defined INLINE */ + +#include /**/ "ace/post.h" + +#endif /* ifndef */ + + diff --git a/quellcode/demo1/Executor/ExecutorC.inl b/quellcode/demo1/Executor/ExecutorC.inl new file mode 100755 index 0000000..ef59fa6 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorC.inl @@ -0,0 +1,64 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_EXECUTOR_EXECCMD___CI_) +#define _EXECUTOR_EXECCMD___CI_ + +ACE_INLINE +Executor::ExecCmd::ExecCmd ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_ExecCmd_Proxy_Broker_ (0) +{ + this->Executor_ExecCmd_setup_collocation (); +} + +ACE_INLINE +Executor::ExecCmd::ExecCmd ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_ExecCmd_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + diff --git a/quellcode/demo1/Executor/ExecutorS.cpp b/quellcode/demo1/Executor/ExecutorS.cpp new file mode 100755 index 0000000..cb26310 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS.cpp @@ -0,0 +1,925 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:577 + +#ifndef _TAO_IDL_EXECUTORS_CPP_ +#define _TAO_IDL_EXECUTORS_CPP_ + + +#include "ExecutorS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/TypeCode.h" +#include "tao/AnyTypeCode/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "tao/Special_Basic_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if !defined (__ACE_INLINE__) +#include "ExecutorS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_Executor_ExecCmd_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /opt/ACE_wrappers/1.5/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_Executor_ExecCmd_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_Executor_ExecCmd_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 5, 0, 5, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 0, 0, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, +#else + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 0, 21, 0, 21, 5, + 0, 5, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 0, 0, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_Executor_ExecCmd_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 7, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 20, + HASH_VALUE_RANGE = 16, + DUPLICATES = 0, + WORDLIST_SIZE = 12 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_Executor::ExecCmd::_is_a_skel, 0}, + {"",0,0},{"",0,0}, + {"setPorts", &POA_Executor::ExecCmd::setPorts_skel, 0}, + {"",0,0}, + {"_component", &POA_Executor::ExecCmd::_component_skel, 0}, + {"",0,0},{"",0,0}, + {"_non_existent", &POA_Executor::ExecCmd::_non_existent_skel, 0}, + {"_repository_id", &POA_Executor::ExecCmd::_repository_id_skel, 0}, + {"_interface", &POA_Executor::ExecCmd::_interface_skel, 0}, + {"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"changeMode", &POA_Executor::ExecCmd::changeMode_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_Executor_ExecCmd_Perfect_Hash_OpTable tao_Executor_ExecCmd_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +Executor__TAO_ExecCmd_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +Executor__TAO_ExecCmd_Proxy_Broker_Factory_Initializer (size_t) +{ + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer = + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function; + + return 0; +} + +static int +Executor__TAO_ExecCmd_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + Executor__TAO_ExecCmd_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (Executor__TAO_ExecCmd_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_Executor::ExecCmd::ExecCmd (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_Executor_ExecCmd_optable; +} + +POA_Executor::ExecCmd::ExecCmd (const ExecCmd& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_Executor::ExecCmd::~ExecCmd (void) +{ +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class changeMode_ExecCmd + : public TAO::Upcall_Command + { + public: + inline changeMode_ExecCmd ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_->changeMode ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_Executor::ExecCmd::changeMode_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_mode; + + TAO::Argument * const args[] = + { + &retval, + &_tao_mode + }; + + static size_t const nargs = 2; + + POA_Executor::ExecCmd * const impl = + static_cast<POA_Executor::ExecCmd *> (servant); + + changeMode_ExecCmd command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class setPorts_ExecCmd + : public TAO::Upcall_Command + { + public: + inline setPorts_ExecCmd ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + retval = + this->servant_->setPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_Executor::ExecCmd::setPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_one; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_two; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_three; + + TAO::Argument * const args[] = + { + &retval, + &_tao_one, + &_tao_two, + &_tao_three + }; + + static size_t const nargs = 4; + + POA_Executor::ExecCmd * const impl = + static_cast<POA_Executor::ExecCmd *> (servant); + + setPorts_ExecCmd command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_Executor::ExecCmd * const impl = + static_cast<POA_Executor::ExecCmd *> (servant); + + _is_a_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Executor::ExecCmd * const impl = + static_cast<POA_Executor::ExecCmd *> (servant); + + _non_existent_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Executor::ExecCmd * const impl = + static_cast<POA_Executor::ExecCmd *> (servant); + + _repository_id_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_Executor::ExecCmd::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_Executor::ExecCmd * const impl = + static_cast<POA_Executor::ExecCmd *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_ExecCmd_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_ExecCmd_Upcall_Command ( + POA_Executor::ExecCmd * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_Executor::ExecCmd * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_Executor::ExecCmd::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Executor::ExecCmd * const impl = + static_cast<POA_Executor::ExecCmd *> (servant); + + _get_component_ExecCmd_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_Executor::ExecCmd::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:manut/Executor/ExecCmd:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_Executor::ExecCmd::_interface_repository_id (void) const +{ + return "IDL:manut/Executor/ExecCmd:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_Executor::ExecCmd::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +Executor::ExecCmd * +POA_Executor::ExecCmd::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::Executor::ExecCmd STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + Executor__TAO_ExecCmd_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Executor/ExecutorS.h b/quellcode/demo1/Executor/ExecutorS.h new file mode 100755 index 0000000..ef1bb90 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS.h @@ -0,0 +1,182 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:387 + +#ifndef _TAO_IDL_EXECUTORS_H_ +#define _TAO_IDL_EXECUTORS_H_ + +#include /**/ "ace/pre.h" + +#include "ExecutorC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_Executor +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class ExecCmd; + typedef ExecCmd *ExecCmd_ptr; + + class ExecCmd + : public virtual PortableServer::ServantBase + { + protected: + ExecCmd (void); + + public: + // Useful for template programming. + typedef ::Executor::ExecCmd _stub_type; + typedef ::Executor::ExecCmd_ptr _stub_ptr_type; + typedef ::Executor::ExecCmd_var _stub_var_type; + + ExecCmd (const ExecCmd& rhs); + virtual ~ExecCmd (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::Executor::ExecCmd *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) = 0; + + static void changeMode_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) = 0; + + static void setPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module Executor + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1148 + +#include "ExecutorS_T.h" + +#if defined (__ACE_INLINE__) +#include "ExecutorS.inl" +#endif /* defined INLINE */ + +#include /**/ "ace/post.h" +#endif /* ifndef */ + diff --git a/quellcode/demo1/Executor/ExecutorS.inl b/quellcode/demo1/Executor/ExecutorS.inl new file mode 100755 index 0000000..38aa325 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS.inl @@ -0,0 +1,28 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + diff --git a/quellcode/demo1/Executor/ExecutorS_T.cpp b/quellcode/demo1/Executor/ExecutorS_T.cpp new file mode 100755 index 0000000..8552402 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS_T.cpp @@ -0,0 +1,41 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:656 + +#ifndef _TAO_IDL_EXECUTORS_T_CPP_ +#define _TAO_IDL_EXECUTORS_T_CPP_ + +#include "ExecutorS_T.h" + +#if !defined (__ACE_INLINE__) +#include "ExecutorS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/demo1/Executor/ExecutorS_T.h b/quellcode/demo1/Executor/ExecutorS_T.h new file mode 100755 index 0000000..8228e80 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS_T.h @@ -0,0 +1,133 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:520 + +#ifndef _TAO_IDL_EXECUTORS_T_H_ +#define _TAO_IDL_EXECUTORS_T_H_ + +#include /**/ "ace/pre.h" + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_Executor +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class ExecCmd_tie : public ExecCmd + { + public: + ExecCmd_tie (T &t); + // the T& ctor + ExecCmd_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + ExecCmd_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + ExecCmd_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~ExecCmd_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + ExecCmd_tie (const ExecCmd_tie &); + void operator= (const ExecCmd_tie &); + }; +} // module Executor + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1251 +#if defined (__ACE_INLINE__) +#include "ExecutorS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ExecutorS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("ExecutorS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#include /**/ "ace/post.h" +#endif /* ifndef */ + diff --git a/quellcode/demo1/Executor/ExecutorS_T.inl b/quellcode/demo1/Executor/ExecutorS_T.inl new file mode 100755 index 0000000..fa0e726 --- /dev/null +++ b/quellcode/demo1/Executor/ExecutorS_T.inl @@ -0,0 +1,160 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_Executor::ExecCmd_tie<T>::ExecCmd_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_Executor::ExecCmd_tie<T>::ExecCmd_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_Executor::ExecCmd_tie<T>::ExecCmd_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_Executor::ExecCmd_tie<T>::ExecCmd_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_Executor::ExecCmd_tie<T>::~ExecCmd_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_Executor::ExecCmd_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_Executor::ExecCmd_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_Executor::ExecCmd_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_Executor::ExecCmd_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_Executor::ExecCmd_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_Executor::ExecCmd_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->ExecCmd::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +::CORBA::Boolean POA_Executor::ExecCmd_tie<T>::changeMode ( + ::CORBA::Short mode + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + return this->ptr_->changeMode ( + mode + ACE_ENV_ARG_PARAMETER + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +::CORBA::Boolean POA_Executor::ExecCmd_tie<T>::setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ACE_ENV_ARG_DECL + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + return this->ptr_->setPorts ( + one, + two, + three + ACE_ENV_ARG_PARAMETER + ); +} diff --git a/quellcode/demo1/Executor/Executor_i.cpp b/quellcode/demo1/Executor/Executor_i.cpp new file mode 100755 index 0000000..0961b3b --- /dev/null +++ b/quellcode/demo1/Executor/Executor_i.cpp @@ -0,0 +1,146 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "Executor_i.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +#include <iostream> + +// Implementation skeleton constructor +Executor_ExecCmd_i::Executor_ExecCmd_i () +{ +} + +Executor_ExecCmd_i::Executor_ExecCmd_i (int argc, char* argv[], CORBA::ORB_var orb) +{ + + try{ + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + + // Connect to Receiver + name[0].id = CORBA::string_dup("Receiver"); + + // receive Object + CORBA::Object_var benchObj = namingContext->resolve(name); + put = Receiver::Put::_narrow(benchObj.in()); + std::cout<<"TransferObjekt ok"<<std::endl; + + name.length(2); + name[0].id = CORBA::string_dup("manut.Controller"); + name[1].id = CORBA::string_dup("Disp"); + + benchObj = namingContext->resolve(name); + display = Controller::Display::_narrow(benchObj.in()); + std::cout<<"DisplayObjekt ok"<<std::endl; + + // auf Interface schreiben + // ... + put->connect(); + put->allPorts(0, 0, 0); + sleep(1); + put->allPorts(255, 255, 255); + sleep(1); + put->allPorts(0, 0, 0); + + display->show("ready!!!"); + + }catch(CORBA::Exception &e){ + std::cout<<e<<std::endl; + } + +} +// Implementation skeleton destructor +Executor_ExecCmd_i::~Executor_ExecCmd_i (void) +{ +} + +::CORBA::Boolean Executor_ExecCmd_i::changeMode ( + ::CORBA::Short mode + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + // Add your implementation here + std::cout<<"changeMode called\n"; + switch(mode){ + case 1: + display->show("moving..."); + for(int i = 0; i<255; i++){ + put->allPorts(i,i,i); + } + break; + + case 2: + display->show("blinking..."); + std::cout<<"blink"<<std::endl; + for(int i = 0; i<255; i++){ + if(i%2) put->allPorts(255,255,255); + else put->allPorts(0,0,0); + } + break; + + case 3: + display->show("flashing..."); + std::cout<<"flash"<<std::endl; + for(int i = 0; i<255; i++){ + if(i%3)put->allPorts(255,255,255); + else put->allPorts(0,0,0); + } + break; + default: + std::cout<<"Mode not implemented"<<std::endl; + } + return true; +} + +::CORBA::Boolean Executor_ExecCmd_i::setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )) +{ + // Add your implementation here + put->allPorts(one, two, three); + return true; +} diff --git a/quellcode/demo1/Executor/Executor_i.h b/quellcode/demo1/Executor/Executor_i.h new file mode 100755 index 0000000..6ab7b6c --- /dev/null +++ b/quellcode/demo1/Executor/Executor_i.h @@ -0,0 +1,77 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef EXECUTORI_H_ +#define EXECUTORI_H_ + +#include "ExecutorS.h" + +#include "../Receiver/ReceiverC.h" +#include "../Controller/ControllerC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class Executor_ExecCmd_i + : public virtual POA_Executor::ExecCmd +{ +private: + Receiver::Put_var put; + Controller::Display_var display; +public: + // Constructor + Executor_ExecCmd_i (int argc, char* argv[], CORBA::ORB_var orb); + Executor_ExecCmd_i (void); + // Destructor + virtual ~Executor_ExecCmd_i (void); + + virtual + ::CORBA::Boolean changeMode ( + ::CORBA::Short mode + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + + virtual + ::CORBA::Boolean setPorts ( + ::CORBA::Short one, + ::CORBA::Short two, + ::CORBA::Short three + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException + )); + +}; + + +#endif /* EXECUTORI_H_ */ diff --git a/quellcode/demo1/Executor/GNUmakefile.Executor b/quellcode/demo1/Executor/GNUmakefile.Executor new file mode 100755 index 0000000..b08bca8 --- /dev/null +++ b/quellcode/demo1/Executor/GNUmakefile.Executor @@ -0,0 +1,227 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Executor +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Executor +DEPENDENCY_FILE = .depend.Executor +BIN_UNCHECKED = Executor + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + ExecutorC.cpp \ + ExecutorS.cpp \ + ../Controller/ControllerC.cpp \ + ../Receiver/ReceiverC.cpp \ + Executor_i.cpp \ + Executor.cpp + +VPATH = .:../Receiver:../Controller + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Executor +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += ExecutorS_T.inl ExecutorS.inl ExecutorC.inl ExecutorC.h ExecutorS.h ExecutorS_T.h ExecutorC.cpp ExecutorS.cpp ExecutorS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) Executor.idl -nt ExecutorS_T.inl 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS.inl 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorC.inl 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorC.h 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS.h 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS_T.h 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorC.cpp 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS.cpp 2> /dev/null && $(TEST_EXE) Executor.idl -nt ExecutorS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ExecutorS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +ExecutorS_T.inl ExecutorS.inl ExecutorC.inl ExecutorC.h ExecutorS.h ExecutorS_T.h ExecutorC.cpp ExecutorS.cpp ExecutorS_T.cpp: Executor.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs Executor.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += Executor$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = ExecutorC.cpp ExecutorS.cpp ../Controller/ControllerC.cpp ../Receiver/ReceiverC.cpp Executor_i.cpp Executor.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ExecutorC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ExecutorS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/demo1/Receiver/.depend.Receiver_Receiver b/quellcode/demo1/Receiver/.depend.Receiver_Receiver new file mode 100755 index 0000000..e69de29 --- /dev/null +++ b/quellcode/demo1/Receiver/.depend.Receiver_Receiver diff --git a/quellcode/demo1/Receiver/GNUmakefile.Receiver b/quellcode/demo1/Receiver/GNUmakefile.Receiver new file mode 100755 index 0000000..551e5d8 --- /dev/null +++ b/quellcode/demo1/Receiver/GNUmakefile.Receiver @@ -0,0 +1,226 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Receiver +# +# $Id: gnu.mpd,v 1.1.1.2.2.23 2006/03/15 18:51:41 elliottc Exp $ +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Receiver +DEPENDENCY_FILE = .depend.Receiver +BIN_UNCHECKED = Receiver + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + ReceiverC.cpp \ + ReceiverS.cpp \ + cpx.cpp \ + Receiver_i.cpp \ + Receiver.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Sc -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +ifeq ($(versioned_so),1) +SOVERSION = .1.4a.10 +endif + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Receiver +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += ReceiverC.inl ReceiverS.inl ReceiverC.h ReceiverS.h ReceiverC.cpp ReceiverS.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) Receiver.idl -nt ReceiverC.inl 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverS.inl 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverC.h 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverS.h 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverC.cpp 2> /dev/null && $(TEST_EXE) Receiver.idl -nt ReceiverS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt ReceiverS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +ReceiverC.inl ReceiverS.inl ReceiverC.h ReceiverS.h ReceiverC.cpp ReceiverS.cpp: Receiver.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs Receiver.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += Receiver$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = ReceiverC.cpp ReceiverS.cpp cpx.cpp Receiver_i.cpp Receiver.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ReceiverC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:ReceiverS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/demo1/Receiver/Receiver b/quellcode/demo1/Receiver/Receiver Binary files differnew file mode 100755 index 0000000..0edce79 --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver diff --git a/quellcode/demo1/Receiver/Receiver.cpp b/quellcode/demo1/Receiver/Receiver.cpp new file mode 100755 index 0000000..0dafa79 --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver.cpp @@ -0,0 +1,67 @@ +#include <iostream> + +#include "Receiver_i.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create Policy + CORBA::PolicyList benchPolicy(1); + benchPolicy.length(1); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::maxPriority); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create the servant + Receiver_Put_i bench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + namingContext->rebind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy + rootPOA->destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + } + return 0; +} + diff --git a/quellcode/demo1/Receiver/Receiver.idl b/quellcode/demo1/Receiver/Receiver.idl new file mode 100755 index 0000000..fa26475 --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver.idl @@ -0,0 +1,10 @@ +module Receiver{ + exception invalidRequest{}; + interface Put{ + void connect() raises(invalidRequest); + void onePort(in short portNo, in short value) raises(invalidRequest); + void allPorts( in short valPort1, + in short valPort2, + in short valPort3) raises(invalidRequest); + }; +}; diff --git a/quellcode/demo1/Receiver/Receiver.mpc b/quellcode/demo1/Receiver/Receiver.mpc new file mode 100755 index 0000000..5e7185c --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver.mpc @@ -0,0 +1,8 @@ +project(Receiver): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + Receiver_i.cpp + Receiver.cpp + } +} diff --git a/quellcode/demo1/Receiver/ReceiverC.cpp b/quellcode/demo1/Receiver/ReceiverC.cpp new file mode 100755 index 0000000..b1056ac --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverC.cpp @@ -0,0 +1,767 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:292 + + +#include "ReceiverC.h" +#include "tao/CDR.h" +#include "tao/Exception_Data.h" +#include "tao/Invocation_Adapter.h" +#include "tao/Object_T.h" +#include "tao/Typecode.h" +#include "tao/Any_Impl_T.h" +#include "tao/Any_Dual_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "ace/OS_NS_string.h" + +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig +#endif /* __BORLANDC__ */ + +#if !defined (__ACE_INLINE__) +#include "ReceiverC.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +// TAO_IDL - Generated from +// be/be_visitor_exception/exception_cs.cpp:63 + +Receiver::invalidRequest::invalidRequest (void) + : CORBA::UserException ( + "IDL:Receiver/invalidRequest:1.0", + "invalidRequest" + ) +{ +} + +Receiver::invalidRequest::~invalidRequest (void) +{ +} + +Receiver::invalidRequest::invalidRequest (const ::Receiver::invalidRequest &_tao_excp) + : CORBA::UserException ( + _tao_excp._rep_id (), + _tao_excp._name () + ) +{ +} + +Receiver::invalidRequest& +Receiver::invalidRequest::operator= (const ::Receiver::invalidRequest &_tao_excp) +{ + this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void Receiver::invalidRequest::_tao_any_destructor (void *_tao_void_pointer) +{ + invalidRequest *_tao_tmp_pointer = + static_cast<invalidRequest *> (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +Receiver::invalidRequest * +Receiver::invalidRequest::_downcast (CORBA::Exception *_tao_excp) +{ + return dynamic_cast<invalidRequest *> (_tao_excp); +} + +const Receiver::invalidRequest * +Receiver::invalidRequest::_downcast (CORBA::Exception const *_tao_excp) +{ + return dynamic_cast<const invalidRequest *> (_tao_excp); +} + +CORBA::Exception *Receiver::invalidRequest::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::Receiver::invalidRequest, 0); + return retval; +} + +CORBA::Exception * +Receiver::invalidRequest::_tao_duplicate (void) const +{ + CORBA::Exception *result = 0; + ACE_NEW_RETURN ( + result, + ::Receiver::invalidRequest (*this), + 0 + ); + return result; +} + +void Receiver::invalidRequest::_raise (void) const +{ + TAO_RAISE (*this); +} + +void Receiver::invalidRequest::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +void Receiver::invalidRequest::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +CORBA::TypeCode_ptr Receiver::invalidRequest::_type (void) const +{ + return ::Receiver::_tc_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/typecode_defn.cpp:295 + +static const CORBA::Long _oc_Receiver_invalidRequest[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 32, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x52656365), + ACE_NTOHL (0x69766572), + ACE_NTOHL (0x2f696e76), + ACE_NTOHL (0x616c6964), + ACE_NTOHL (0x52657175), + ACE_NTOHL (0x6573743a), + ACE_NTOHL (0x312e3000), // repository ID = IDL:Receiver/invalidRequest:1.0 + 15, + ACE_NTOHL (0x696e7661), + ACE_NTOHL (0x6c696452), + ACE_NTOHL (0x65717565), + ACE_NTOHL (0x73740000), // name = invalidRequest + 0, // member count + }; + +static CORBA::TypeCode _tc_TAO_tc_Receiver_invalidRequest ( + CORBA::tk_except, + sizeof (_oc_Receiver_invalidRequest), + (char *) &_oc_Receiver_invalidRequest, + 0, + 0 + ); + +namespace Receiver +{ + ::CORBA::TypeCode_ptr const _tc_invalidRequest = + &_tc_TAO_tc_Receiver_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for Receiver::Put. + +Receiver::Put_ptr +TAO::Objref_Traits<Receiver::Put>::duplicate ( + Receiver::Put_ptr p + ) +{ + return Receiver::Put::_duplicate (p); +} + +void +TAO::Objref_Traits<Receiver::Put>::release ( + Receiver::Put_ptr p + ) +{ + CORBA::release (p); +} + +Receiver::Put_ptr +TAO::Objref_Traits<Receiver::Put>::nil (void) +{ + return Receiver::Put::_nil (); +} + +CORBA::Boolean +TAO::Objref_Traits<Receiver::Put>::marshal ( + Receiver::Put_ptr p, + TAO_OutputCDR & cdr + ) +{ + return CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Receiver::Put::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + Receiver_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_Receiver_Put_connect_exceptiondata [] = + { + { + "IDL:Receiver/invalidRequest:1.0", + Receiver::invalidRequest::_alloc, + Receiver::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_Receiver_Put_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Receiver::Put::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + Receiver_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo (portNo); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_value (value); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_portNo, + &_tao_value + }; + + static TAO::Exception_Data + _tao_Receiver_Put_onePort_exceptiondata [] = + { + { + "IDL:Receiver/invalidRequest:1.0", + Receiver::invalidRequest::_alloc, + Receiver::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 3, + "onePort", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_Receiver_Put_onePort_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void Receiver::Put::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + Receiver_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static TAO::Exception_Data + _tao_Receiver_Put_allPorts_exceptiondata [] = + { + { + "IDL:Receiver/invalidRequest:1.0", + Receiver::invalidRequest::_alloc, + Receiver::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "allPorts", + 8, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_Receiver_Put_allPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +Receiver::Put::Put (void) + : the_TAO_Put_Proxy_Broker_ (0) +{ + this->Receiver_Put_setup_collocation (); +} + +void +Receiver::Put::Receiver_Put_setup_collocation () +{ + if (::Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_Put_Proxy_Broker_ = + ::Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer (this); + } +} + +Receiver::Put::~Put (void) +{} + +void +Receiver::Put::_tao_any_destructor (void *_tao_void_pointer) +{ + Put *_tao_tmp_pointer = + static_cast<Put *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +Receiver::Put_ptr +Receiver::Put::_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::narrow ( + _tao_objref, + "IDL:Receiver/Put:1.0", + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Receiver::Put_ptr +Receiver::Put::_unchecked_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::unchecked_narrow ( + _tao_objref, + "IDL:Receiver/Put:1.0", + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +Receiver::Put_ptr +Receiver::Put::_duplicate (Put_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +Receiver::Put::_tao_release (Put_ptr obj) +{ + CORBA::release (obj); +} + +CORBA::Boolean +Receiver::Put::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:Receiver/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* Receiver::Put::_interface_repository_id (void) const +{ + return "IDL:Receiver/Put:1.0"; +} + +CORBA::Boolean +Receiver::Put::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/typecode_defn.cpp:295 + +static const CORBA::Long _oc_Receiver_Put[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 21, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x52656365), + ACE_NTOHL (0x69766572), + ACE_NTOHL (0x2f507574), + ACE_NTOHL (0x3a312e30), + ACE_NTOHL (0x0), // repository ID = IDL:Receiver/Put:1.0 + 4, + ACE_NTOHL (0x50757400), // name = Put + }; + +static CORBA::TypeCode _tc_TAO_tc_Receiver_Put ( + CORBA::tk_objref, + sizeof (_oc_Receiver_Put), + (char *) &_oc_Receiver_Put, + 0, + 0 + ); + +namespace Receiver +{ + ::CORBA::TypeCode_ptr const _tc_Put = + &_tc_TAO_tc_Receiver_Put; +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_cs.cpp:50 + +namespace TAO { +template<> +CORBA::Boolean +Any_Dual_Impl_T<Receiver::invalidRequest>::demarshal_value ( + TAO_InputCDR & cdr + ) +{ + CORBA::String_var id; + + if (!(cdr >> id.out ())) + { + return false; + } + + ACE_TRY_NEW_ENV + { + this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return false; + } + ACE_ENDTRY; + + return true; +} +} + +// Copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + const Receiver::invalidRequest &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<Receiver::invalidRequest>::insert_copy ( + _tao_any, + Receiver::invalidRequest::_tao_any_destructor, + Receiver::_tc_invalidRequest, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + Receiver::invalidRequest *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<Receiver::invalidRequest>::insert ( + _tao_any, + Receiver::invalidRequest::_tao_any_destructor, + Receiver::_tc_invalidRequest, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + Receiver::invalidRequest *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const Receiver::invalidRequest *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const Receiver::invalidRequest *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<Receiver::invalidRequest>::extract ( + _tao_any, + Receiver::invalidRequest::_tao_any_destructor, + Receiver::_tc_invalidRequest, + _tao_elem + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:50 + +namespace TAO { +template<> +CORBA::Boolean +Any_Impl_T<Receiver::Put>::to_object ( + CORBA::Object_ptr &_tao_elem + ) const +{ + _tao_elem = CORBA::Object::_duplicate (this->value_); + return true; +} +} + +// Copying insertion. +void +operator<<= ( + CORBA::Any &_tao_any, + Receiver::Put_ptr _tao_elem + ) +{ + Receiver::Put_ptr _tao_objptr = + Receiver::Put::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + CORBA::Any &_tao_any, + Receiver::Put_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<Receiver::Put>::insert ( + _tao_any, + Receiver::Put::_tao_any_destructor, + Receiver::_tc_Put, + *_tao_elem + ); +} + +CORBA::Boolean +operator>>= ( + const CORBA::Any &_tao_any, + Receiver::Put_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<Receiver::Put>::extract ( + _tao_any, + Receiver::Put::_tao_any_destructor, + Receiver::_tc_Put, + _tao_elem + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_cs.cpp:60 + +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const Receiver::invalidRequest &_tao_aggregate + ) +{ + // Marshal the repository ID. + return (strm << _tao_aggregate._rep_id ()); +} + +CORBA::Boolean operator>> ( + TAO_InputCDR &, + Receiver::invalidRequest& + ) +{ + return true; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const Receiver::Put_ptr _tao_objref + ) +{ + CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + Receiver::Put_ptr &_tao_objref + ) +{ + CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::Receiver::Put RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} diff --git a/quellcode/demo1/Receiver/ReceiverC.h b/quellcode/demo1/Receiver/ReceiverC.h new file mode 100755 index 0000000..5bf7b62 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverC.h @@ -0,0 +1,363 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:154 + +#ifndef _TAO_IDL_RECEIVERC_H_ +#define _TAO_IDL_RECEIVERC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 + +namespace TAO +{ + class Collocation_Proxy_Broker; + + template<typename T> class Narrow_Utils; + template<typename T> class AbstractBase_Narrow_Utils; +} + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:48 + +namespace Receiver +{ + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:51 + +#if !defined (_RECEIVER_INVALIDREQUEST_CH_) +#define _RECEIVER_INVALIDREQUEST_CH_ + + class invalidRequest : public CORBA::UserException + { + public: + + invalidRequest (void); + invalidRequest (const invalidRequest &); + ~invalidRequest (void); + + invalidRequest &operator= (const invalidRequest &); + + static void _tao_any_destructor (void *); + + static invalidRequest *_downcast (CORBA::Exception *); + static const invalidRequest *_downcast (CORBA::Exception const *); + + static CORBA::Exception *_alloc (void); + + virtual CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void) const; + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:127 + + virtual CORBA::TypeCode_ptr _type (void) const; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:44 + + TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr const _tc_invalidRequest; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_interface.cpp:599 + +#if !defined (_RECEIVER_PUT__VAR_OUT_CH_) +#define _RECEIVER_PUT__VAR_OUT_CH_ + + class Put; + typedef Put *Put_ptr; + + typedef + TAO_Objref_Var_T< + Put + > + Put_var; + + typedef + TAO_Objref_Out_T< + Put + > + Put_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_RECEIVER_PUT_CH_) +#define _RECEIVER_PUT_CH_ + + class Put + : public virtual CORBA::Object + { + public: + friend class TAO::Narrow_Utils<Put>; + typedef Put_ptr _ptr_type; + typedef Put_var _var_type; + + // The static operations. + static Put_ptr _duplicate (Put_ptr obj); + + static void _tao_release (Put_ptr obj); + + static Put_ptr _narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _unchecked_narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _nil (void) + { + return static_cast<Put_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_Put_Proxy_Broker_; + + protected: + // Concrete interface only. + Put (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void Receiver_Put_setup_collocation (void); + + // Concrete non-local interface only. + Put ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + Put ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~Put (void); + + private: + // Private and unimplemented for concrete interfaces. + Put (const Put &); + + void operator= (const Put &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:44 + + TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr const _tc_Put; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:66 + +} // module Receiver + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:132 + +extern +TAO::Collocation_Proxy_Broker * +(*Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 + +// Traits specializations. +namespace TAO +{ + +#if !defined (_RECEIVER_PUT__TRAITS_) +#define _RECEIVER_PUT__TRAITS_ + + template<> + struct Objref_Traits< ::Receiver::Put> + { + static ::Receiver::Put_ptr duplicate ( + ::Receiver::Put_ptr + ); + static void release ( + ::Receiver::Put_ptr + ); + static ::Receiver::Put_ptr nil (void); + static CORBA::Boolean marshal ( + ::Receiver::Put_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, const Receiver::invalidRequest &); // copying version + void operator<<= (CORBA::Any &, Receiver::invalidRequest*); // noncopying version + CORBA::Boolean operator>>= (const CORBA::Any &, Receiver::invalidRequest *&); // deprecated + CORBA::Boolean operator>>= (const CORBA::Any &, const Receiver::invalidRequest *&); + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, Receiver::Put_ptr); // copying + void operator<<= (CORBA::Any &, Receiver::Put_ptr *); // non-copying + CORBA::Boolean operator>>= (const CORBA::Any &, Receiver::Put_ptr &); + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_ch.cpp:52 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const Receiver::invalidRequest &); + CORBA::Boolean operator>> (TAO_InputCDR &, Receiver::invalidRequest &); + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const Receiver::Put_ptr ); + CORBA::Boolean operator>> (TAO_InputCDR &, Receiver::Put_ptr &); + +// TAO_IDL - Generated from +// be/be_codegen.cpp:940 + +#if defined (__ACE_INLINE__) +#include "ReceiverC.inl" +#endif /* defined INLINE */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#endif /* ifndef */ + + diff --git a/quellcode/demo1/Receiver/ReceiverC.inl b/quellcode/demo1/Receiver/ReceiverC.inl new file mode 100755 index 0000000..15453ef --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverC.inl @@ -0,0 +1,63 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_RECEIVER_PUT___CI_) +#define _RECEIVER_PUT___CI_ + +ACE_INLINE +Receiver::Put::Put ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_Put_Proxy_Broker_ (0) +{ + this->Receiver_Put_setup_collocation (); +} + +ACE_INLINE +Receiver::Put::Put ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) (ior, oc), + the_TAO_Put_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ diff --git a/quellcode/demo1/Receiver/ReceiverS.cpp b/quellcode/demo1/Receiver/ReceiverS.cpp new file mode 100755 index 0000000..2a0f06a --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS.cpp @@ -0,0 +1,852 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:588 + +#ifndef _TAO_IDL_RECEIVERS_CPP_ +#define _TAO_IDL_RECEIVERS_CPP_ + + +#include "ReceiverS.h" +#include "tao/PortableServer/Operation_Table_Dynamic_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/Typecode.h" +#include "tao/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus +#endif /* __BORLANDC__ */ + +#if !defined (__ACE_INLINE__) +#include "ReceiverS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +static const TAO_operation_db_entry Receiver_Put_operations [] = { + {"connect", &POA_Receiver::Put::connect_skel, 0}, + {"onePort", &POA_Receiver::Put::onePort_skel, 0}, + {"allPorts", &POA_Receiver::Put::allPorts_skel, 0}, + {"_is_a", &POA_Receiver::Put::_is_a_skel, 0}, + {"_non_existent", &POA_Receiver::Put::_non_existent_skel, 0}, + {"_component", &POA_Receiver::Put::_component_skel, 0}, + {"_interface", &POA_Receiver::Put::_interface_skel, 0} +}; + +static const CORBA::Long _tao_Receiver_Put_optable_size = sizeof (ACE_Hash_Map_Entry<const char *, TAO::Operation_Skeletons>) * (21); +static char _tao_Receiver_Put_optable_pool [_tao_Receiver_Put_optable_size]; +static ACE_Static_Allocator_Base _tao_Receiver_Put_allocator (_tao_Receiver_Put_optable_pool, _tao_Receiver_Put_optable_size); +static TAO_Dynamic_Hash_OpTable tao_Receiver_Put_optable ( + Receiver_Put_operations, + 7, + 14, + &_tao_Receiver_Put_allocator + ); + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:853 + +TAO::Collocation_Proxy_Broker * +Receiver__TAO_Put_Proxy_Broker_Factory_function (CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +Receiver__TAO_Put_Proxy_Broker_Factory_Initializer (size_t) +{ + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer = + Receiver__TAO_Put_Proxy_Broker_Factory_function; + + return 0; +} + +static int +Receiver__TAO_Put_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + Receiver__TAO_Put_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (Receiver__TAO_Put_Proxy_Broker_Factory_Initializer) + ); + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_Receiver::Put::Put (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_Receiver_Put_optable; +} + +POA_Receiver::Put::Put (const Put& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_Receiver::Put::~Put (void) +{ +} +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_Put + : public TAO::Upcall_Command + { + public: + inline connect_Put ( + POA_Receiver::Put * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_Receiver::Put::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + Receiver::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Receiver::Put * const impl = + static_cast<POA_Receiver::Put *> (servant); + + connect_Put command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class onePort_Put + : public TAO::Upcall_Command + { + public: + inline onePort_Put ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + this->servant_->onePort ( + arg_1 + , arg_2 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_Receiver::Put::onePort_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + Receiver::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_value; + + TAO::Argument * const args[] = + { + &retval, + &_tao_portNo, + &_tao_value + }; + + static size_t const nargs = 3; + + POA_Receiver::Put * const impl = + static_cast<POA_Receiver::Put *> (servant); + + onePort_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class allPorts_Put + : public TAO::Upcall_Command + { + public: + inline allPorts_Put ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + this->servant_->allPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_Receiver::Put::allPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + Receiver::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static size_t const nargs = 4; + + POA_Receiver::Put * const impl = + static_cast<POA_Receiver::Put *> (servant); + + allPorts_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_Put_Upcall_Command ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< CORBA::Char *, TAO::SArg_Traits< CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_Receiver::Put::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_Receiver::Put * const impl = + static_cast<POA_Receiver::Put *> (servant); + + _is_a_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_Put_Upcall_Command ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_Receiver::Put::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Receiver::Put * const impl = + static_cast<POA_Receiver::Put *> (servant); + + _non_existent_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:393 + + + +void POA_Receiver::Put::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW (CORBA::INTF_REPOS (CORBA::OMGVMCID | 1, + CORBA::COMPLETED_NO)); + } + + POA_Receiver::Put * const impl = + static_cast<POA_Receiver::Put *> (servant); + CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW (CORBA::MARSHAL ()); + } +} + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_Put_Upcall_Command ( + POA_Receiver::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_Receiver::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_Receiver::Put::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_Receiver::Put * const impl = + static_cast<POA_Receiver::Put *> (servant); + + _get_component_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +CORBA::Boolean POA_Receiver::Put::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:Receiver/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_Receiver::Put::_interface_repository_id (void) const +{ + return "IDL:Receiver/Put:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:794 + +void POA_Receiver::Put::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:745 + +Receiver::Put * +POA_Receiver::Put::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::Receiver::Put STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + Receiver__TAO_Put_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Receiver/ReceiverS.h b/quellcode/demo1/Receiver/ReceiverS.h new file mode 100755 index 0000000..d893c66 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS.h @@ -0,0 +1,209 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:380 + +#ifndef _TAO_IDL_RECEIVERS_H_ +#define _TAO_IDL_RECEIVERS_H_ + + +#include "ReceiverC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_Receiver +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class Put; + typedef Put *Put_ptr; + + + class Put + : public virtual PortableServer::ServantBase + { + protected: + Put (void); + + public: + // Useful for template programming. + typedef ::Receiver::Put _stub_type; + typedef ::Receiver::Put_ptr _stub_ptr_type; + typedef ::Receiver::Put_var _stub_var_type; + + Put (const Put& rhs); + virtual ~Put (void); + + virtual CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest &req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::Receiver::Put *_this ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) = 0; + + static void onePort_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) = 0; + + static void allPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module Receiver + +// TAO_IDL - Generated from +// be/be_codegen.cpp:976 + +#include "ReceiverS_T.h" + +#if defined (__ACE_INLINE__) +#include "ReceiverS.inl" +#endif /* defined INLINE */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Receiver/ReceiverS.inl b/quellcode/demo1/Receiver/ReceiverS.inl new file mode 100755 index 0000000..c944d80 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS.inl @@ -0,0 +1,27 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + diff --git a/quellcode/demo1/Receiver/ReceiverS_T.cpp b/quellcode/demo1/Receiver/ReceiverS_T.cpp new file mode 100755 index 0000000..40269df --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS_T.cpp @@ -0,0 +1,41 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:662 + +#ifndef _TAO_IDL_RECEIVERS_T_CPP_ +#define _TAO_IDL_RECEIVERS_T_CPP_ + +#include "ReceiverS_T.h" + +#if !defined (__ACE_INLINE__) +#include "ReceiverS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/demo1/Receiver/ReceiverS_T.h b/quellcode/demo1/Receiver/ReceiverS_T.h new file mode 100755 index 0000000..4b8fe5a --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS_T.h @@ -0,0 +1,155 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:525 + +#ifndef _TAO_IDL_RECEIVERS_T_H_ +#define _TAO_IDL_RECEIVERS_T_H_ + + + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_Receiver +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class Put_tie : public Put + { + public: + Put_tie (T &t); + // the T& ctor + Put_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + Put_tie (T *tp, CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + Put_tie ( + T *tp, + PortableServer::POA_ptr poa, + CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~Put_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner (CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + CORBA::Boolean rel_; + + // copy and assignment are not allowed + Put_tie (const Put_tie &); + void operator= (const Put_tie &); + }; +} // module Receiver + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1073 + +#if defined (__ACE_INLINE__) +#include "ReceiverS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ReceiverS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("ReceiverS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#endif /* ifndef */ + diff --git a/quellcode/demo1/Receiver/ReceiverS_T.inl b/quellcode/demo1/Receiver/ReceiverS_T.inl new file mode 100755 index 0000000..3ce8735 --- /dev/null +++ b/quellcode/demo1/Receiver/ReceiverS_T.inl @@ -0,0 +1,177 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_Receiver::Put_tie<T>::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_Receiver::Put_tie<T>::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_Receiver::Put_tie<T>::Put_tie (T *tp, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_Receiver::Put_tie<T>::Put_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_Receiver::Put_tie<T>::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_Receiver::Put_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_Receiver::Put_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_Receiver::Put_tie<T>::_tied_object (T *obj, CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE CORBA::Boolean +POA_Receiver::Put_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_Receiver::Put_tie<T>::_is_owner (CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_Receiver::Put_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (!CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->Put::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template <class T> ACE_INLINE +void POA_Receiver::Put_tie<T>::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template <class T> ACE_INLINE +void POA_Receiver::Put_tie<T>::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + this->ptr_->onePort ( + portNo, + value + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template <class T> ACE_INLINE +void POA_Receiver::Put_tie<T>::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + this->ptr_->allPorts ( + valPort1, + valPort2, + valPort3 + ); +} + diff --git a/quellcode/demo1/Receiver/Receiver_i.cpp b/quellcode/demo1/Receiver/Receiver_i.cpp new file mode 100755 index 0000000..3cd094c --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver_i.cpp @@ -0,0 +1,92 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "Receiver_i.h" + +// Implementation skeleton constructor +Receiver_Put_i::Receiver_Put_i (void) +{ + +} + +// Implementation skeleton destructor +Receiver_Put_i::~Receiver_Put_i (void) +{ +} + +void Receiver_Put_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + // Add your implementation here + std::cout<<"connecting... "; + cpx = new CPX(); + std::cout<<"ok"<<std::endl; +} + +void Receiver_Put_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + // Add your implementation here + std::cout<<"set: "<<portNo<<" - "<<value<<std::endl; + cpx->set(portNo, value); +} + +void Receiver_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + // Add your implementation here + + std::cout<<"set: "<<valPort1<<" - "<<valPort2<<" - "<<valPort3<<std::endl; + + cpx->set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); + +} + + diff --git a/quellcode/demo1/Receiver/Receiver_i.h b/quellcode/demo1/Receiver/Receiver_i.h new file mode 100755 index 0000000..a9f6230 --- /dev/null +++ b/quellcode/demo1/Receiver/Receiver_i.h @@ -0,0 +1,89 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "ReceiverS.h" + +#include "cpx.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class Receiver_Put_i + : public virtual POA_Receiver::Put +{ +private: + + CPX* cpx; + +public: + // Constructor + Receiver_Put_i (void); + + // Destructor + virtual ~Receiver_Put_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::Receiver::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/demo1/Receiver/cpx.cpp b/quellcode/demo1/Receiver/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/demo1/Receiver/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + /* setup signal on interrupt */ + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cout<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cout<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } + + return (short) value; +} + +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/demo1/Receiver/cpx.h b/quellcode/demo1/Receiver/cpx.h new file mode 100755 index 0000000..7b4545a --- /dev/null +++ b/quellcode/demo1/Receiver/cpx.h @@ -0,0 +1,73 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00
+#define PORT2_IN 0x6c00
+#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch1/GNUmakefile.Bench_Receiver b/quellcode/versuch1/GNUmakefile.Bench_Receiver new file mode 100755 index 0000000..ffc0e54 --- /dev/null +++ b/quellcode/versuch1/GNUmakefile.Bench_Receiver @@ -0,0 +1,224 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Receiver +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Receiver +DEPENDENCY_FILE = .depend.Bench_Receiver +BIN_UNCHECKED = Receiver + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + cpx.cpp \ + benchI.cpp \ + Receiver.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Receiver +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp cpx.cpp benchI.cpp Receiver.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch1/GNUmakefile.Bench_Supplier b/quellcode/versuch1/GNUmakefile.Bench_Supplier new file mode 100755 index 0000000..f24931b --- /dev/null +++ b/quellcode/versuch1/GNUmakefile.Bench_Supplier @@ -0,0 +1,221 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Supplier +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Supplier +DEPENDENCY_FILE = .depend.Bench_Supplier +BIN_UNCHECKED = Supplier + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + cpx.cpp \ + benchC.cpp \ + Supplier.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTCORBA -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Supplier +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = cpx.cpp benchC.cpp Supplier.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch1/Receiver b/quellcode/versuch1/Receiver Binary files differnew file mode 100755 index 0000000..0162cbd --- /dev/null +++ b/quellcode/versuch1/Receiver diff --git a/quellcode/versuch1/Receiver.cpp b/quellcode/versuch1/Receiver.cpp new file mode 100755 index 0000000..83b0dbf --- /dev/null +++ b/quellcode/versuch1/Receiver.cpp @@ -0,0 +1,76 @@ +/** + * + * \file Receiver.cpp + * \brief RTCORBA Server, holding one Object for setting digital Output + * + * \author Manuel Traut + * \version 2006-10-15 + * + */ + +#include <iostream> + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create Policy + CORBA::PolicyList benchPolicy(1); + benchPolicy.length(1); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::maxPriority); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create the servant + benchmark_Put_i bench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + namingContext->bind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy + rootPOA->destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch1/Supplier b/quellcode/versuch1/Supplier Binary files differnew file mode 100755 index 0000000..940f0d4 --- /dev/null +++ b/quellcode/versuch1/Supplier diff --git a/quellcode/versuch1/Supplier.cpp b/quellcode/versuch1/Supplier.cpp new file mode 100755 index 0000000..6d94a11 --- /dev/null +++ b/quellcode/versuch1/Supplier.cpp @@ -0,0 +1,81 @@ +/** + * + * \file Supplier.cpp + * \brief RTCORBA Client, catches Signal on DIO changes and reports this changes via RTCORBA to the Receiver + * + * \author Manuel Traut + * \version 2006-10-15 + * + */ + +#include <iostream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "cpx.h" + +benchmark::Put_var put; +CPX cpx; + +// Signal-Handler +void sigproc(int signo) +{ signal(SIGRTMIN+29, sigproc); + put->allPorts(cpx.get(1), cpx.get(2), cpx.get(3)); +} + + +int main(int argc, char* argv[]){ + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + + // receive Object + CORBA::Object_var benchObj = namingContext->resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<<std::endl; + + // Private Connection Policy + CORBA::PolicyList pcPolicy(1); + pcPolicy.length(1); + pcPolicy[0] = rtORB->create_private_connection_policy(); + CORBA::Object_var newTran = put->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + put = benchmark::Put::_narrow(newTran.in()); + std::cout<<"PrivateConnection ok"<<std::endl; + + // Input auf Interface schreiben + put->connect(); + put->allPorts(0, 0, 0); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true){ + pause(); + } + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch1/bench.idl b/quellcode/versuch1/bench.idl new file mode 100755 index 0000000..a2e0249 --- /dev/null +++ b/quellcode/versuch1/bench.idl @@ -0,0 +1,20 @@ +/** + * + * \file bench.idl + * \brief Interfacedefinition for writing values to digital Output + * + * \author Manuel Traut + * \version 2006-10-15 + * + */ + +module benchmark{ + exception invalidRequest{}; + interface Put{ + void connect() raises(invalidRequest); + void onePort(in short portNo, in short value) raises(invalidRequest); + void allPorts( in short valPort1, + in short valPort2, + in short valPort3) raises(invalidRequest); + }; +}; diff --git a/quellcode/versuch1/bench.mpc b/quellcode/versuch1/bench.mpc new file mode 100755 index 0000000..5cfe5ac --- /dev/null +++ b/quellcode/versuch1/bench.mpc @@ -0,0 +1,23 @@ +project(*Receiver): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchI.cpp + Receiver.cpp + } + Header_Files { + cpx.h + } +} + +project(*Supplier): rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchC.cpp + Supplier.cpp + } + Header_Files { + cpx.h + } +} diff --git a/quellcode/versuch1/benchC.cpp b/quellcode/versuch1/benchC.cpp new file mode 100755 index 0000000..6cab3a0 --- /dev/null +++ b/quellcode/versuch1/benchC.cpp @@ -0,0 +1,838 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:283 + + +#include "benchC.h" +#include "tao/AnyTypeCode/Null_RefCount_Policy.h" +#include "tao/AnyTypeCode/TypeCode_Constants.h" +#include "tao/AnyTypeCode/Alias_TypeCode_Static.h" +#include "tao/AnyTypeCode/Objref_TypeCode_Static.h" +#include "tao/AnyTypeCode/Struct_TypeCode_Static.h" +#include "tao/AnyTypeCode/TypeCode_Struct_Field.h" +#include "tao/CDR.h" +#include "tao/Exception_Data.h" +#include "tao/Invocation_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/Any.h" +#include "tao/AnyTypeCode/Any_Impl_T.h" +#include "tao/AnyTypeCode/Any_Dual_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "ace/OS_NS_string.h" + +#if !defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/exception_cs.cpp:63 + +benchmark::invalidRequest::invalidRequest (void) + : ::CORBA::UserException ( + "IDL:benchmark/invalidRequest:1.0", + "invalidRequest" + ) +{ +} + +benchmark::invalidRequest::~invalidRequest (void) +{ +} + +benchmark::invalidRequest::invalidRequest (const ::benchmark::invalidRequest &_tao_excp) + : ::CORBA::UserException ( + _tao_excp._rep_id (), + _tao_excp._name () + ) +{ +} + +benchmark::invalidRequest& +benchmark::invalidRequest::operator= (const ::benchmark::invalidRequest &_tao_excp) +{ + this->ACE_NESTED_CLASS ( ::CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void benchmark::invalidRequest::_tao_any_destructor (void *_tao_void_pointer) +{ + invalidRequest *_tao_tmp_pointer = + static_cast<invalidRequest *> (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception *_tao_excp) +{ + return dynamic_cast<invalidRequest *> (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception const *_tao_excp) +{ + return dynamic_cast<const invalidRequest *> (_tao_excp); +} + +::CORBA::Exception *benchmark::invalidRequest::_alloc (void) +{ + ::CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::benchmark::invalidRequest, 0); + return retval; +} + +::CORBA::Exception * +benchmark::invalidRequest::_tao_duplicate (void) const +{ + ::CORBA::Exception *result = 0; + ACE_NEW_RETURN ( + result, + ::benchmark::invalidRequest (*this), + 0 + ); + return result; +} + +void benchmark::invalidRequest::_raise (void) const +{ + TAO_RAISE (*this); +} + +void benchmark::invalidRequest::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW ( ::CORBA::MARSHAL ()); +} + +void benchmark::invalidRequest::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW ( ::CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +::CORBA::TypeCode_ptr benchmark::invalidRequest::_tao_type (void) const +{ + return ::benchmark::_tc_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/struct_typecode.cpp:89 + +static TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const * const _tao_fields_benchmark_invalidRequest = 0; +static TAO::TypeCode::Struct<char const *, + ::CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_invalidRequest ( + ::CORBA::tk_except, + "IDL:benchmark/invalidRequest:1.0", + "invalidRequest", + _tao_fields_benchmark_invalidRequest, + 0); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_invalidRequest = + &_tao_tc_benchmark_invalidRequest; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for benchmark::Put. + +benchmark::Put_ptr +TAO::Objref_Traits<benchmark::Put>::duplicate ( + benchmark::Put_ptr p + ) +{ + return benchmark::Put::_duplicate (p); +} + +void +TAO::Objref_Traits<benchmark::Put>::release ( + benchmark::Put_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::Put_ptr +TAO::Objref_Traits<benchmark::Put>::nil (void) +{ + return benchmark::Put::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<benchmark::Put>::marshal ( + const benchmark::Put_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_benchmark_Put_connect_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo (portNo); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_value (value); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_portNo, + &_tao_value + }; + + static TAO::Exception_Data + _tao_benchmark_Put_onePort_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 3, + "onePort", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_onePort_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static TAO::Exception_Data + _tao_benchmark_Put_allPorts_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "allPorts", + 8, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_allPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +benchmark::Put::Put (void) + : the_TAO_Put_Proxy_Broker_ (0) +{ + this->benchmark_Put_setup_collocation (); +} + +void +benchmark::Put::benchmark_Put_setup_collocation () +{ + if (::benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_Put_Proxy_Broker_ = + ::benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer (this); + } +} + +benchmark::Put::~Put (void) +{} + +void +benchmark::Put::_tao_any_destructor (void *_tao_void_pointer) +{ + Put *_tao_tmp_pointer = + static_cast<Put *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +benchmark::Put_ptr +benchmark::Put::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::narrow ( + _tao_objref, + "IDL:benchmark/Put:1.0", + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::Put_ptr +benchmark::Put::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::unchecked_narrow ( + _tao_objref, + "IDL:benchmark/Put:1.0", + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::Put_ptr +benchmark::Put::_duplicate (Put_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +benchmark::Put::_tao_release (Put_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +benchmark::Put::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* benchmark::Put::_interface_repository_id (void) const +{ + return "IDL:benchmark/Put:1.0"; +} + +::CORBA::Boolean +benchmark::Put::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_Put ( + ::CORBA::tk_objref, + "IDL:benchmark/Put:1.0", + "Put"); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_Put = + &_tao_tc_benchmark_Put; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_cs.cpp:50 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Dual_Impl_T<benchmark::invalidRequest>::demarshal_value ( + TAO_InputCDR & cdr + ) + { + ::CORBA::String_var id; + + if (!(cdr >> id.out ())) + { + return false; + } + + ACE_TRY_NEW_ENV + { + this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return false; + } + ACE_ENDTRY; + + return true; + } +} + +// Copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + const benchmark::invalidRequest &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert_copy ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::invalidRequest *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::invalidRequest *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const benchmark::invalidRequest *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + const benchmark::invalidRequest *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::extract ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<benchmark::Put>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Put_ptr _tao_elem + ) + { + Put_ptr _tao_objptr = + Put::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Put_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<Put>::insert ( + _tao_any, + Put::_tao_any_destructor, + _tc_Put, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + Put_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<Put>::extract ( + _tao_any, + Put::_tao_any_destructor, + _tc_Put, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::Put_ptr _tao_elem + ) +{ + benchmark::Put_ptr _tao_objptr = + benchmark::Put::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::Put_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<benchmark::Put>::insert ( + _tao_any, + benchmark::Put::_tao_any_destructor, + benchmark::_tc_Put, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::Put_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<benchmark::Put>::extract ( + _tao_any, + benchmark::Put::_tao_any_destructor, + benchmark::_tc_Put, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_cs.cpp:60 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::invalidRequest &_tao_aggregate + ) +{ + // Marshal the repository ID. + return (strm << _tao_aggregate._rep_id ()); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &, + benchmark::invalidRequest& + ) +{ + return true; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::Put_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::Put_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::benchmark::Put RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + diff --git a/quellcode/versuch1/benchC.h b/quellcode/versuch1/benchC.h new file mode 100755 index 0000000..aff0d03 --- /dev/null +++ b/quellcode/versuch1/benchC.h @@ -0,0 +1,393 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:155 + +#ifndef _TAO_IDL_BENCHC_H_ +#define _TAO_IDL_BENCHC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/AnyTypeCode/AnyTypeCode_methods.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" +#include "tao/Versioned_Namespace.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + class Collocation_Proxy_Broker; + template<typename T> class Narrow_Utils; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:49 + +namespace benchmark +{ + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:53 + +#if !defined (_BENCHMARK_INVALIDREQUEST_CH_) +#define _BENCHMARK_INVALIDREQUEST_CH_ + + class invalidRequest : public ::CORBA::UserException + { + public: + + invalidRequest (void); + invalidRequest (const invalidRequest &); + ~invalidRequest (void); + + invalidRequest &operator= (const invalidRequest &); + + static void _tao_any_destructor (void *); + + static invalidRequest *_downcast ( ::CORBA::Exception *); + static const invalidRequest *_downcast ( ::CORBA::Exception const *); + + static ::CORBA::Exception *_alloc (void); + + virtual ::CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void) const; + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL + ); + + virtual ::CORBA::TypeCode_ptr _tao_type (void) const; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_invalidRequest; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_BENCHMARK_PUT__VAR_OUT_CH_) +#define _BENCHMARK_PUT__VAR_OUT_CH_ + + class Put; + typedef Put *Put_ptr; + + typedef + TAO_Objref_Var_T< + Put + > + Put_var; + + typedef + TAO_Objref_Out_T< + Put + > + Put_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_BENCHMARK_PUT_CH_) +#define _BENCHMARK_PUT_CH_ + + class Put + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<Put>; + typedef Put_ptr _ptr_type; + typedef Put_var _var_type; + + // The static operations. + static Put_ptr _duplicate (Put_ptr obj); + + static void _tao_release (Put_ptr obj); + + static Put_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _nil (void) + { + return static_cast<Put_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_Put_Proxy_Broker_; + + protected: + // Concrete interface only. + Put (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void benchmark_Put_setup_collocation (void); + + // Concrete non-local interface only. + Put ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + Put ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~Put (void); + + private: + // Private and unimplemented for concrete interfaces. + Put (const Put &); + + void operator= (const Put &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_Put; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:78 + +} // module benchmark + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:139 + +extern +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Traits specializations. +namespace TAO +{ + +#if !defined (_BENCHMARK_PUT__TRAITS_) +#define _BENCHMARK_PUT__TRAITS_ + + template<> + struct Objref_Traits< ::benchmark::Put> + { + static ::benchmark::Put_ptr duplicate ( + ::benchmark::Put_ptr + ); + static void release ( + ::benchmark::Put_ptr + ); + static ::benchmark::Put_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::benchmark::Put_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_ch.cpp:53 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + + void operator<<= (::CORBA::Any &, const benchmark::invalidRequest &); // copying version + void operator<<= (::CORBA::Any &, benchmark::invalidRequest*); // noncopying version + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::invalidRequest *&); // deprecated + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const benchmark::invalidRequest *&); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + void operator<<= ( ::CORBA::Any &, Put_ptr); // copying + void operator<<= ( ::CORBA::Any &, Put_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Put_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, benchmark::Put_ptr); // copying + void operator<<= (::CORBA::Any &, benchmark::Put_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::Put_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_ch.cpp:52 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::invalidRequest &); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::invalidRequest &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::Put_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::Put_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1093 +#if defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + + diff --git a/quellcode/versuch1/benchC.inl b/quellcode/versuch1/benchC.inl new file mode 100755 index 0000000..ff39241 --- /dev/null +++ b/quellcode/versuch1/benchC.inl @@ -0,0 +1,64 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_BENCHMARK_PUT___CI_) +#define _BENCHMARK_PUT___CI_ + +ACE_INLINE +benchmark::Put::Put ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_Put_Proxy_Broker_ (0) +{ + this->benchmark_Put_setup_collocation (); +} + +ACE_INLINE +benchmark::Put::Put ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_Put_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + diff --git a/quellcode/versuch1/benchI.cpp b/quellcode/versuch1/benchI.cpp new file mode 100755 index 0000000..550615c --- /dev/null +++ b/quellcode/versuch1/benchI.cpp @@ -0,0 +1,84 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "benchI.h" + +// Implementation skeleton constructor +benchmark_Put_i::benchmark_Put_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_Put_i::~benchmark_Put_i (void) +{ +} + +void benchmark_Put_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_Put_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(portNo, value); +} + +void benchmark_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); +} + + diff --git a/quellcode/versuch1/benchI.h b/quellcode/versuch1/benchI.h new file mode 100755 index 0000000..e89c864 --- /dev/null +++ b/quellcode/versuch1/benchI.h @@ -0,0 +1,86 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" +#include "cpx.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_Put_i + : public virtual POA_benchmark::Put +{ +public: + // Constructor + benchmark_Put_i (void); + + // Destructor + virtual ~benchmark_Put_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +private: + CPX* cpx; +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch1/benchS.cpp b/quellcode/versuch1/benchS.cpp new file mode 100755 index 0000000..d6e5129 --- /dev/null +++ b/quellcode/versuch1/benchS.cpp @@ -0,0 +1,1002 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:577 + +#ifndef _TAO_IDL_BENCHS_CPP_ +#define _TAO_IDL_BENCHS_CPP_ + + +#include "benchS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/TypeCode.h" +#include "tao/AnyTypeCode/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if !defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_benchmark_Put_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_benchmark_Put_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_benchmark_Put_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 5, 0, 5, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 5, + 0, 5, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 0, 16, 16, 16, 0, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_benchmark_Put_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 8, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 11, + DUPLICATES = 0, + WORDLIST_SIZE = 13 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_benchmark::Put::_is_a_skel, 0}, + {"",0,0}, + {"onePort", &POA_benchmark::Put::onePort_skel, 0}, + {"allPorts", &POA_benchmark::Put::allPorts_skel, 0}, + {"",0,0}, + {"_component", &POA_benchmark::Put::_component_skel, 0}, + {"",0,0}, + {"connect", &POA_benchmark::Put::connect_skel, 0}, + {"_non_existent", &POA_benchmark::Put::_non_existent_skel, 0}, + {"_repository_id", &POA_benchmark::Put::_repository_id_skel, 0}, + {"_interface", &POA_benchmark::Put::_interface_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_benchmark_Put_Perfect_Hash_OpTable tao_benchmark_Put_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +benchmark__TAO_Put_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +benchmark__TAO_Put_Proxy_Broker_Factory_Initializer (size_t) +{ + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer = + benchmark__TAO_Put_Proxy_Broker_Factory_function; + + return 0; +} + +static int +benchmark__TAO_Put_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + benchmark__TAO_Put_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (benchmark__TAO_Put_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_benchmark::Put::Put (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_benchmark_Put_optable; +} + +POA_benchmark::Put::Put (const Put& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_benchmark::Put::~Put (void) +{ +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_Put + : public TAO::Upcall_Command + { + public: + inline connect_Put ( + POA_benchmark::Put * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::Put::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + connect_Put command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class onePort_Put + : public TAO::Upcall_Command + { + public: + inline onePort_Put ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + this->servant_->onePort ( + arg_1 + , arg_2 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::Put::onePort_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_value; + + TAO::Argument * const args[] = + { + &retval, + &_tao_portNo, + &_tao_value + }; + + static size_t const nargs = 3; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + onePort_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class allPorts_Put + : public TAO::Upcall_Command + { + public: + inline allPorts_Put ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + this->servant_->allPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::Put::allPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static size_t const nargs = 4; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + allPorts_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _is_a_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _non_existent_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _repository_id_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_benchmark::Put::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _get_component_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_benchmark::Put::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_benchmark::Put::_interface_repository_id (void) const +{ + return "IDL:benchmark/Put:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_benchmark::Put::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +benchmark::Put * +POA_benchmark::Put::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::benchmark::Put STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/versuch1/benchS.h b/quellcode/versuch1/benchS.h new file mode 100755 index 0000000..4d7d959 --- /dev/null +++ b/quellcode/versuch1/benchS.h @@ -0,0 +1,199 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:387 + +#ifndef _TAO_IDL_BENCHS_H_ +#define _TAO_IDL_BENCHS_H_ + + +#include "benchC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class Put; + typedef Put *Put_ptr; + + class Put + : public virtual PortableServer::ServantBase + { + protected: + Put (void); + + public: + // Useful for template programming. + typedef ::benchmark::Put _stub_type; + typedef ::benchmark::Put_ptr _stub_ptr_type; + typedef ::benchmark::Put_var _stub_var_type; + + Put (const Put& rhs); + virtual ~Put (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::benchmark::Put *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void onePort_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void allPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1148 + +#include "benchS_T.h" + +#if defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch1/benchS.inl b/quellcode/versuch1/benchS.inl new file mode 100755 index 0000000..38aa325 --- /dev/null +++ b/quellcode/versuch1/benchS.inl @@ -0,0 +1,28 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + diff --git a/quellcode/versuch1/benchS_T.cpp b/quellcode/versuch1/benchS_T.cpp new file mode 100755 index 0000000..e100665 --- /dev/null +++ b/quellcode/versuch1/benchS_T.cpp @@ -0,0 +1,41 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:656 + +#ifndef _TAO_IDL_BENCHS_T_CPP_ +#define _TAO_IDL_BENCHS_T_CPP_ + +#include "benchS_T.h" + +#if !defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/versuch1/benchS_T.h b/quellcode/versuch1/benchS_T.h new file mode 100755 index 0000000..bbb0689 --- /dev/null +++ b/quellcode/versuch1/benchS_T.h @@ -0,0 +1,144 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:520 + +#ifndef _TAO_IDL_BENCHS_T_H_ +#define _TAO_IDL_BENCHS_T_H_ + + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_benchmark +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class Put_tie : public Put + { + public: + Put_tie (T &t); + // the T& ctor + Put_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + Put_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + Put_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~Put_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + Put_tie (const Put_tie &); + void operator= (const Put_tie &); + }; +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1251 +#if defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "benchS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("benchS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch1/benchS_T.inl b/quellcode/versuch1/benchS_T.inl new file mode 100755 index 0000000..5970014 --- /dev/null +++ b/quellcode/versuch1/benchS_T.inl @@ -0,0 +1,176 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_benchmark::Put_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_benchmark::Put_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_benchmark::Put_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->Put::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->onePort ( + portNo, + value + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->allPorts ( + valPort1, + valPort2, + valPort3 + ); +} diff --git a/quellcode/versuch1/bench_I.cpp b/quellcode/versuch1/bench_I.cpp new file mode 100755 index 0000000..40753d4 --- /dev/null +++ b/quellcode/versuch1/bench_I.cpp @@ -0,0 +1,73 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "benchI.h" +#include "cpx.h" + +// Implementation skeleton constructor +benchmark_Put_i::benchmark_Put_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_Put_i::~benchmark_Put_i (void) +{ +} + +void benchmark_Put_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + CPX::set(portNo, value); +} + +void benchmark_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + CPX::set(1, valPort1); + CPX::set(2, valPort2); + CPX::set(3, valPort3); +} + + diff --git a/quellcode/versuch1/cpx.cpp b/quellcode/versuch1/cpx.cpp new file mode 100755 index 0000000..3424d72 --- /dev/null +++ b/quellcode/versuch1/cpx.cpp @@ -0,0 +1,92 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +// Constructor: calls init + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +// init: Memory Mapping, Setup Signal + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cerr<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + // setup signal on interrupt + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cerr<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cerr<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +// returns value of specified port +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cerr<<"portNo: "<<port<<" incorrect\n"; + value = 0; + } + + return (short) value; +} + +// write value to specified port +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cerr<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/versuch1/cpx.h b/quellcode/versuch1/cpx.h new file mode 100755 index 0000000..bcdbe17 --- /dev/null +++ b/quellcode/versuch1/cpx.h @@ -0,0 +1,67 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +// Device Nodes +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +// Memory Addresses +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00 +#define PORT2_IN 0x6c00 +#define PORT3_IN 0x7c00 + +#define PROT_READ 0x01 +#define PROT_WRITE 0x02 +#define MAP_SHARED 0x01 +#define MAP_PRIVATE 0x02 + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; // signal to be sent + int pid; // process id, signal should be sent to +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch1/dot.dot b/quellcode/versuch1/dot.dot new file mode 100755 index 0000000..793fcbb --- /dev/null +++ b/quellcode/versuch1/dot.dot @@ -0,0 +1,15 @@ +graph G { + TAO -- _get_component_Put_Upcall_Command; + TAO -- _is_a_Put_Upcall_Command; + TAO -- _non_existent_Put_Upcall_Command; + TAO -- _repository_id_Put_Upcall_Command; + TAO -- allPorts_Put; + POA_benchmark -- benchmark_Put_i; + TAO -- connect_Put; + TAO -- onePort_Put; + PortableServer -- Put; + Put -- Put_tie; + TAO_Perfect_Hash_OpTable -- TAO_benchmark_Put_Perfect_Hash_OpTable; + CPX -- benchmark_Put_i [style=dotted]; +} + diff --git a/quellcode/versuch1/dotout.dot b/quellcode/versuch1/dotout.dot new file mode 100755 index 0000000..2d6f2e4 --- /dev/null +++ b/quellcode/versuch1/dotout.dot @@ -0,0 +1,32 @@ +graph G { + node [label="\N"]; + graph [bb="0,0,610,440"]; + TAO [pos="195,101", width="0.75", height="0.50"]; + _get_component_Put_Upcall_Command [pos="278,101", width="3.53", height="0.50"]; + _is_a_Put_Upcall_Command [pos="177,19", width="2.64", height="0.50"]; + _non_existent_Put_Upcall_Command [pos="120,138", width="3.31", height="0.50"]; + _repository_id_Put_Upcall_Command [pos="247,166", width="3.39", height="0.50"]; + allPorts_Put [pos="177,182", width="1.31", height="0.50"]; + POA_benchmark [pos="177,375", width="1.69", height="0.50"]; + benchmark_Put_i [pos="221,318", width="1.75", height="0.50"]; + connect_Put [pos="119,65", width="1.33", height="0.50"]; + onePort_Put [pos="247,36", width="1.33", height="0.50"]; + PortableServer [pos="424,421", width="1.53", height="0.50"]; + Put [pos="468,364", width="0.75", height="0.50"]; + Put_tie [pos="492,295", width="0.92", height="0.50"]; + TAO_Perfect_Hash_OpTable [pos="395,236", width="2.64", height="0.50"]; + TAO_benchmark_Put_Perfect_Hash_OpTable [pos="467,226", width="3.94", height="0.50"]; + CPX [pos="245,249", width="0.75", height="0.50"]; + TAO -- _get_component_Put_Upcall_Command [pos="222,101 222,101 222,101 222,101"]; + TAO -- _is_a_Put_Upcall_Command [pos="191,83 188,69 184,51 181,37"]; + TAO -- _non_existent_Put_Upcall_Command [pos="173,112 168,115 161,118 155,121"]; + TAO -- _repository_id_Put_Upcall_Command [pos="208,117 215,126 225,138 232,148"]; + TAO -- allPorts_Put [pos="191,119 188,132 184,150 181,164"]; + POA_benchmark -- benchmark_Put_i [pos="191,357 196,350 202,343 208,336"]; + TAO -- connect_Put [pos="173,90 165,87 157,83 149,79"]; + TAO -- onePort_Put [pos="208,85 216,76 225,63 233,53"]; + PortableServer -- Put [pos="438,403 444,396 450,387 456,380"]; + Put -- Put_tie [pos="474,346 478,336 482,323 486,313"]; + TAO_Perfect_Hash_OpTable -- TAO_benchmark_Put_Perfect_Hash_OpTable [pos="467,226 467,226 467,226 467,226"]; + CPX -- benchmark_Put_i [style=dotted, pos="239,267 236,277 231,290 227,300"]; +} diff --git a/quellcode/versuch1/output.dia b/quellcode/versuch1/output.dia new file mode 100755 index 0000000..65fb95b --- /dev/null +++ b/quellcode/versuch1/output.dia @@ -0,0 +1,2201 @@ +<?xml version="1.0" encoding="UTF-8"?> +<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"> + <dia:diagramdata> + <dia:attribute name="background"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="pagebreak"> + <dia:color val="#000099"/> + </dia:attribute> + <dia:attribute name="paper"> + <dia:composite type="paper"> + <dia:attribute name="name"> + <dia:string>#A4#</dia:string> + </dia:attribute> + <dia:attribute name="tmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="bmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="lmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="rmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="is_portrait"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="scaling"> + <dia:real val="0.17000000178813934"/> + </dia:attribute> + <dia:attribute name="fitto"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="grid"> + <dia:composite type="grid"> + <dia:attribute name="width_x"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="width_y"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="visible_x"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="visible_y"> + <dia:int val="1"/> + </dia:attribute> + <dia:composite type="color"/> + </dia:composite> + </dia:attribute> + <dia:attribute name="color"> + <dia:color val="#d8e5e5"/> + </dia:attribute> + <dia:attribute name="guides"> + <dia:composite type="guides"> + <dia:attribute name="hguides"/> + <dia:attribute name="vguides"/> + </dia:composite> + </dia:attribute> + </dia:diagramdata> + <dia:layer name="Background" visible="true"> + <dia:object type="UML - Class" version="0" id="O0"> + <dia:attribute name="obj_pos"> + <dia:point val="140,148.3"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="139.95,148.25;154.6,150.55"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="140,148.3"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="14.550000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_get_component_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O1"> + <dia:attribute name="obj_pos"> + <dia:point val="136.5,113.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="136.45,113.45;147.05,115.75"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="136.5,113.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="10.5"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_is_a_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O2"> + <dia:attribute name="obj_pos"> + <dia:point val="153.6,114.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="153.55,114.75;167.25,117.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="153.6,114.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="13.6"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_non_existent_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O3"> + <dia:attribute name="obj_pos"> + <dia:point val="151.9,126.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="151.85,126.75;165.7,129.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="151.9,126.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="13.75"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_repository_id_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O4"> + <dia:attribute name="obj_pos"> + <dia:point val="141.7,126.2"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="141.65,126.15;146.55,128.45"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="141.7,126.2"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="4.7999999999999998"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#allPorts_Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O5"> + <dia:attribute name="obj_pos"> + <dia:point val="142,136.3"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="141.95,136.25;166.7,142.95"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="142,136.3"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="24.649999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#benchmark_Put_i#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#cpx#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#CPX*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#ACE_THROW_SPEC#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::CORBA::SystemException#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::benchmark::invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#ACE_THROW_SPEC#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::CORBA::SystemException#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::benchmark::invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#ACE_THROW_SPEC#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::CORBA::SystemException#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::benchmark::invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#benchmark_Put_i#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#~benchmark_Put_i#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O6"> + <dia:attribute name="obj_pos"> + <dia:point val="151.9,106.3"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="151.85,106.25;156.85,108.55"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="151.9,106.3"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="4.9000000000000004"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#connect_Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O7"> + <dia:attribute name="obj_pos"> + <dia:point val="122.5,124.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="122.45,124.45;134.25,133.55"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="122.5,124.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="11.699999999999999"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="9"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#CPX#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#DIN#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#volatile u_char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#DOUT#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#volatile u_char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#mapped_in#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#unsigned char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#mapped_out#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#unsigned char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#param#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#cpx_dio_set_signal_param#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#init#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#int#</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#CPX#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#get#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#port#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#set#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#port#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O8"> + <dia:attribute name="obj_pos"> + <dia:point val="150.785,98.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="150.735,98.75;156.535,101.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="150.785,98.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="5.7000000000000002"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O9"> + <dia:attribute name="obj_pos"> + <dia:point val="124.5,115.8"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="124.45,115.75;129.45,118.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="124.5,115.8"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="4.9000000000000004"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#onePort_Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O10"> + <dia:attribute name="obj_pos"> + <dia:point val="146.7,153.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="146.65,153.45;148.45,155.75"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="146.7,153.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="1.7"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O11"> + <dia:attribute name="obj_pos"> + <dia:point val="170.85,129.1"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="170.8,128.35;174.4,131.35"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="170.85,129.1"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="2.9500000000000002"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.1999999999999997"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#Put_tie#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="templates"> + <dia:composite type="umlformalparameter"> + <dia:attribute name="name"> + <dia:string>#T#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#class#</dia:string> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:object> + <dia:object type="UML - Class" version="0" id="O12"> + <dia:attribute name="obj_pos"> + <dia:point val="162.1,99.4"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="162.05,99.35;178.5,103.05"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="162.1,99.4"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="16.350000000000001"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="3.5999999999999996"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#TAO_benchmark_Put_Perfect_Hash_OpTable#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_comments"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="wrap_after_char"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_line_length"> + <dia:int val="40"/> + </dia:attribute> + <dia:attribute name="comment_tagging"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="line_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="fill_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="text_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="normal_font"> + <dia:font family="monospace" style="0" name="Courier"/> + </dia:attribute> + <dia:attribute name="abstract_font"> + <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> + </dia:attribute> + <dia:attribute name="polymorphic_font"> + <dia:font family="monospace" style="8" name="Courier-Oblique"/> + </dia:attribute> + <dia:attribute name="classname_font"> + <dia:font family="sans" style="80" name="Helvetica-Bold"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font"> + <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> + </dia:attribute> + <dia:attribute name="comment_font"> + <dia:font family="sans" style="8" name="Helvetica-Oblique"/> + </dia:attribute> + <dia:attribute name="normal_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="polymorphic_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="abstract_font_height"> + <dia:real val="0.80000000000000004"/> + </dia:attribute> + <dia:attribute name="classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="abstract_classname_font_height"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="comment_font_height"> + <dia:real val="0.69999999999999996"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#hash#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#lookup#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="comment"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="inheritance_type"> + <dia:enum val="2"/> + </dia:attribute> + <dia:attribute name="query"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Generalization" version="1" id="O13"> + <dia:attribute name="obj_pos"> + <dia:point val="147.55,155.7"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="146.7,133.55;172.475,168.5"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="147.55,155.7"/> + <dia:point val="147.55,167.65"/> + <dia:point val="172.425,167.65"/> + <dia:point val="172.425,133.6"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="orth_autoroute"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="text_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="line_colour"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O10" connection="6"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Association" version="1" id="O14"> + <dia:attribute name="obj_pos"> + <dia:point val="130.439,133.837"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="130.389,133.787;142.7,141.2"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="130.439,133.837"/> + <dia:point val="130.439,139.6"/> + <dia:point val="141.95,139.6"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="autorouting"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="direction"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="ends"> + <dia:composite> + <dia:attribute name="role"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="multiplicity"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="arrow"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="aggregate"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite> + <dia:attribute name="role"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="multiplicity"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="arrow"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="aggregate"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O7" connection="6"/> + <dia:connection handle="1" to="O5" connection="20"/> + </dia:connections> + </dia:object> + </dia:layer> +</dia:diagram> diff --git a/quellcode/versuch1/output.dia~ b/quellcode/versuch1/output.dia~ new file mode 100755 index 0000000..de87788 --- /dev/null +++ b/quellcode/versuch1/output.dia~ @@ -0,0 +1,1260 @@ +<?xml version="1.0"?> +<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"> + <dia:diagramdata> + <dia:attribute name="background"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="paper"> + <dia:composite type="paper"> + <dia:attribute name="name"> + <dia:string>#A4#</dia:string> + </dia:attribute> + <dia:attribute name="tmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="bmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="lmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="rmargin"> + <dia:real val="1.5"/> + </dia:attribute> + <dia:attribute name="is_portrait"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="scaling"> + <dia:real val="0.17"/> + </dia:attribute> + <dia:attribute name="scaling"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="grid"> + <dia:composite type="grid"> + <dia:attribute name="width_x"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="width_y"> + <dia:real val="1"/> + </dia:attribute> + <dia:attribute name="visible_x"> + <dia:int val="1"/> + </dia:attribute> + <dia:attribute name="visible_y"> + <dia:int val="1"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="guides"> + <dia:composite type="guides"> + <dia:attribute name="hguides"/> + <dia:attribute name="vguides"/> + </dia:composite> + </dia:attribute> + </dia:diagramdata> + <dia:layer name="Background" visible="true"> + <dia:object type="UML - Class" version="0" id="O40"> + <dia:attribute name="obj_pos"> + <dia:point val="139.0,50.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="139.0,50.5;159.15,52.7"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="139.0,50.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="20.15"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_get_component_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O46"> + <dia:attribute name="obj_pos"> + <dia:point val="88.5,9.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="88.5,9.5;103.7,11.7"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="88.5,9.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="15.2"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_is_a_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O51"> + <dia:attribute name="obj_pos"> + <dia:point val="60.0,69.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="60.0,69.0;79.6,71.2"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="60.0,69.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="19.6"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_non_existent_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O54"> + <dia:attribute name="obj_pos"> + <dia:point val="123.5,83.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="123.5,83.0;143.65,85.2"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="123.5,83.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="20.15"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#_repository_id_Put_Upcall_Command#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O71"> + <dia:attribute name="obj_pos"> + <dia:point val="88.5,91.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="88.5,91.0;97.1,93.2"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="88.5,91.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="8.6"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#allPorts_Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O79"> + <dia:attribute name="obj_pos"> + <dia:point val="110.5,159.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="110.5,159.0;143.657,165.958"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="110.5,159.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="33.157"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="6.958"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#benchmark_Put_i#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#cpx#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#CPX*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#ACE_THROW_SPEC#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::CORBA::SystemException#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::benchmark::invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#ACE_THROW_SPEC#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::CORBA::SystemException#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::benchmark::invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#ACE_THROW_SPEC#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::CORBA::SystemException#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#::benchmark::invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>##</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#benchmark_Put_i#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#~benchmark_Put_i#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O83"> + <dia:attribute name="obj_pos"> + <dia:point val="59.5,32.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="59.5,32.5;67.55,34.7"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="59.5,32.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="8.05"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#connect_Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O14"> + <dia:attribute name="obj_pos"> + <dia:point val="122.5,124.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="122.5,124.5;138.378,133.837"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="122.5,124.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="15.878"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="9.337"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#CPX#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#DIN#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#volatile u_char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#DOUT#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#volatile u_char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#mapped_in#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#unsigned char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#mapped_out#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#unsigned char\*#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlattribute"> + <dia:attribute name="name"> + <dia:string>#param#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#cpx_dio_set_signal_param#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#init#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#int#</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#CPX#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#get#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#port#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#set#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#port#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite type="umlparameter"> + <dia:attribute name="name"> + <dia:string>#value#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#short#</dia:string> + </dia:attribute> + <dia:attribute name="value"> + <dia:string/> + </dia:attribute> + <dia:attribute name="kind"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O89"> + <dia:attribute name="obj_pos"> + <dia:point val="149.785,1.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="149.785,1.0;159.485,3.2"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="149.785,1.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="9.7"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#invalidRequest#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O96"> + <dia:attribute name="obj_pos"> + <dia:point val="123.5,18.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="123.5,18.0;131.55,20.2"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="123.5,18.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="8.05"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#onePort_Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O23"> + <dia:attribute name="obj_pos"> + <dia:point val="234.0,182.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="234.0,182.0;237.65,184.2"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="234.0,182.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="3.65"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#Put#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Class" version="0" id="O27"> + <dia:attribute name="obj_pos"> + <dia:point val="246.0,147.5"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="246.0,147.5;251.85,149.7"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="246.0,147.5"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="5.85"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="2.2"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#Put_tie#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"/> + <dia:attribute name="template"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="templates"> + <dia:composite type="umlformalparameter"> + <dia:attribute name="name"> + <dia:string>#T#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string>#class#</dia:string> + </dia:attribute> + </dia:composite> + </dia:attribute> + </dia:object> + <dia:object type="UML - Class" version="0" id="O32"> + <dia:attribute name="obj_pos"> + <dia:point val="233.5,113.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="233.5,113.0;256.4,116.786"/> + </dia:attribute> + <dia:attribute name="elem_corner"> + <dia:point val="233.5,113.0"/> + </dia:attribute> + <dia:attribute name="elem_width"> + <dia:real val="22.9"/> + </dia:attribute> + <dia:attribute name="elem_height"> + <dia:real val="3.786"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string>#TAO_benchmark_Put_Perfect_Hash_OpTable#</dia:string> + </dia:attribute> + <dia:attribute name="stereotype"> + <dia:string/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_attributes"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="suppress_operations"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="visible_attributes"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="visible_operations"> + <dia:boolean val="true"/> + </dia:attribute> + <dia:attribute name="foreground_color"> + <dia:color val="#000000"/> + </dia:attribute> + <dia:attribute name="background_color"> + <dia:color val="#ffffff"/> + </dia:attribute> + <dia:attribute name="attributes"/> + <dia:attribute name="operations"> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#hash#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + <dia:composite type="umloperation"> + <dia:attribute name="name"> + <dia:string>#lookup#</dia:string> + </dia:attribute> + <dia:attribute name="type"> + <dia:string/> + </dia:attribute> + <dia:attribute name="visibility"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="abstract"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="class_scope"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="parameters"/> + </dia:composite> + </dia:attribute> + <dia:attribute name="template"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="templates"/> + </dia:object> + <dia:object type="UML - Generalization" version="0" id="O135"> + <dia:attribute name="obj_pos"> + <dia:point val="235.825,182.0"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="235.825,182.0;248.925,149.7"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="235.825,182.0"/> + <dia:point val="235.825,165.35"/> + <dia:point val="248.925,165.35"/> + <dia:point val="248.925,149.7"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + <dia:enum val="1"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string/> + </dia:attribute> + <dia:attribute name="name"> + <dia:stereotype val=""/> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O23" connection="1"/> + <dia:connection handle="1" to="O27" connection="6"/> + </dia:connections> + </dia:object> + <dia:object type="UML - Association" version="0" id="O125"> + <dia:attribute name="obj_pos"> + <dia:point val="130.439,133.837"/> + </dia:attribute> + <dia:attribute name="obj_bb"> + <dia:rectangle val="130.439,133.837;143.657,161.0"/> + </dia:attribute> + <dia:attribute name="orth_points"> + <dia:point val="130.439,133.837"/> + <dia:point val="130.439,161.0"/> + <dia:point val="143.657,161.0"/> + </dia:attribute> + <dia:attribute name="orth_orient"> + <dia:enum val="1"/> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="name"> + <dia:string/> + </dia:attribute> + <dia:attribute name="direction"> + <dia:enum val="0"/> + </dia:attribute> + <dia:attribute name="ends"> + <dia:composite> + <dia:attribute name="role"> + <dia:string/> + </dia:attribute> + <dia:attribute name="multiplicity"> + <dia:string/> + </dia:attribute> + <dia:attribute name="arrow"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="aggregate"> + <dia:enum val="0"/> + </dia:attribute> + </dia:composite> + <dia:composite> + <dia:attribute name="role"> + <dia:string/> + </dia:attribute> + <dia:attribute name="multiplicity"> + <dia:string/> + </dia:attribute> + <dia:attribute name="arrow"> + <dia:boolean val="false"/> + </dia:attribute> + <dia:attribute name="aggregate"> + <dia:enum val="1"/> + </dia:attribute> + </dia:composite> + </dia:attribute> + <dia:connections> + <dia:connection handle="0" to="O14" connection="6"/> + <dia:connection handle="1" to="O79" connection="9"/> + </dia:connections> + </dia:object> + </dia:layer> +</dia:diagram> + diff --git a/quellcode/versuch1/tags b/quellcode/versuch1/tags new file mode 100755 index 0000000..8f01469 --- /dev/null +++ b/quellcode/versuch1/tags @@ -0,0 +1,163 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.5.4 // +ACE_THROW_SPEC benchC.h 187;" p class:benchmark::Put access:public +ACE_THROW_SPEC benchC.h 199;" p class:benchmark::Put access:public +ACE_THROW_SPEC benchC.h 212;" p class:benchmark::Put access:public +ACE_THROW_SPEC benchI.h 55;" p class:benchmark_Put_i access:public +ACE_THROW_SPEC benchI.h 65;" p class:benchmark_Put_i access:public +ACE_THROW_SPEC benchI.h 76;" p class:benchmark_Put_i access:public +ACE_THROW_SPEC benchS.h 132;" p class:POA_benchmark::Put access:public +ACE_THROW_SPEC benchS.h 151;" p class:POA_benchmark::Put access:public +ACE_THROW_SPEC benchS.h 171;" p class:POA_benchmark::Put access:public +ACE_THROW_SPEC benchS_T.h 100;" p class:POA_benchmark::Put_tie access:public +ACE_THROW_SPEC benchS_T.h 113;" p class:POA_benchmark::Put_tie access:public +ACE_THROW_SPEC benchS_T.h 88;" p class:POA_benchmark::Put_tie access:public +CPX cpx.h 59;" c +CPX cpx.h 61;" p class:CPX access:public +DIN cpx.h 69;" m class:CPX access:private +DOUT cpx.h 68;" m class:CPX access:private +Objref_Traits benchC.h 298;" s namespace:TAO +Put benchC.h 151;" c namespace:benchmark inherits:::CORBA::Object +Put benchC.h 232;" p class:benchmark::Put access:protected +Put benchC.h 239;" p class:benchmark::Put access:protected +Put benchC.h 245;" p class:benchmark::Put access:protected +Put benchC.h 256;" p class:benchmark::Put access:private +Put benchS.h 58;" c namespace:POA_benchmark inherits:PortableServer::ServantBase +Put benchS.h 62;" p class:POA_benchmark::Put access:protected +Put benchS.h 70;" p class:POA_benchmark::Put access:public +Put_out benchC.h 141;" t namespace:benchmark +Put_ptr benchC.h 129;" t namespace:benchmark +Put_ptr benchS.h 56;" t namespace:POA_benchmark +Put_tie benchS_T.h 124;" p class:POA_benchmark::Put_tie access:private +Put_tie benchS_T.h 47;" c namespace:POA_benchmark inherits:Put +Put_tie benchS_T.h 50;" p class:POA_benchmark::Put_tie access:public +Put_tie benchS_T.h 52;" p class:POA_benchmark::Put_tie access:public +Put_tie benchS_T.h 54;" p class:POA_benchmark::Put_tie access:public +Put_tie benchS_T.h 56;" p class:POA_benchmark::Put_tie access:public +Put_var benchC.h 135;" t namespace:benchmark +TAO_benchmark_Put_Perfect_Hash_OpTable benchS.cpp 101;" c file: inherits:TAO_Perfect_Hash_OpTable +_alloc benchC.h 96;" p class:benchmark::invalidRequest access:public +_component_skel benchS.h 99;" p class:POA_benchmark::Put access:public +_default_POA benchS_T.h 78;" p class:POA_benchmark::Put_tie access:public +_dispatch benchS.h 113;" p class:POA_benchmark::Put access:public implementation:virtual +_downcast benchC.h 93;" p class:benchmark::invalidRequest access:public +_downcast benchC.h 94;" p class:benchmark::invalidRequest access:public +_duplicate benchC.h 160;" p class:benchmark::Put access:public +_get_component_Put_Upcall_Command benchS.cpp 853;" c namespace:POA_benchmark file: inherits:TAO::Upcall_Command +_interface_repository_id benchC.h 225;" p class:benchmark::Put access:public implementation:virtual +_interface_repository_id benchS.h 124;" p class:POA_benchmark::Put access:public implementation:virtual +_interface_skel benchS.h 92;" p class:POA_benchmark::Put access:public +_is_a benchC.h 220;" p class:benchmark::Put access:public implementation:virtual +_is_a benchS.h 73;" p class:POA_benchmark::Put access:public implementation:virtual +_is_a_Put_Upcall_Command benchS.cpp 551;" c namespace:POA_benchmark file: inherits:TAO::Upcall_Command +_is_a_skel benchS.h 78;" p class:POA_benchmark::Put access:public +_is_owner benchS_T.h 72;" p class:POA_benchmark::Put_tie access:public +_is_owner benchS_T.h 74;" p class:POA_benchmark::Put_tie access:public +_narrow benchC.h 164;" p class:benchmark::Put access:public +_non_existent_Put_Upcall_Command benchS.cpp 643;" c namespace:POA_benchmark file: inherits:TAO::Upcall_Command +_non_existent_skel benchS.h 85;" p class:POA_benchmark::Put access:public +_ptr_type benchC.h 156;" t class:benchmark::Put access:public +_raise benchC.h 100;" p class:benchmark::invalidRequest access:public implementation:virtual +_repository_id_Put_Upcall_Command benchS.cpp 726;" c namespace:POA_benchmark file: inherits:TAO::Upcall_Command +_repository_id_skel benchS.h 106;" p class:POA_benchmark::Put access:public +_stub_ptr_type benchS.h 67;" t class:POA_benchmark::Put access:public +_stub_type benchS.h 66;" t class:POA_benchmark::Put access:public +_stub_var_type benchS.h 68;" t class:POA_benchmark::Put access:public +_tao_any_destructor benchC.h 179;" p class:benchmark::Put access:public +_tao_any_destructor benchC.h 91;" p class:benchmark::invalidRequest access:public +_tao_decode benchC.h 107;" p class:benchmark::invalidRequest access:public implementation:virtual +_tao_duplicate benchC.h 98;" p class:benchmark::invalidRequest access:public implementation:virtual +_tao_encode benchC.h 102;" p class:benchmark::invalidRequest access:public implementation:virtual +_tao_fields_benchmark_invalidRequest benchC.cpp 176;" m class:TAO::TypeCode file: +_tao_release benchC.h 162;" p class:benchmark::Put access:public +_tao_tc_benchmark_Put benchC.cpp 540;" p file: +_tao_tc_benchmark_invalidRequest benchC.cpp 181;" p file: +_tao_type benchC.h 112;" p class:benchmark::invalidRequest access:public implementation:virtual +_tc_Put benchC.cpp 547;" m class:benchmark::CORBA file: +_tc_invalidRequest benchC.cpp 190;" m class:benchmark::CORBA file: +_this benchS.h 119;" p class:POA_benchmark::Put access:public +_tied_object benchS_T.h 66;" p class:POA_benchmark::Put_tie access:public +_tied_object benchS_T.h 68;" p class:POA_benchmark::Put_tie access:public +_tied_object benchS_T.h 70;" p class:POA_benchmark::Put_tie access:public +_unchecked_narrow benchC.h 169;" p class:benchmark::Put access:public +_var_type benchC.h 157;" t class:benchmark::Put access:public +allPorts_Put benchS.cpp 436;" c namespace:POA_benchmark file: inherits:TAO::Upcall_Command +allPorts_skel benchS.h 176;" p class:POA_benchmark::Put access:public +args_ benchS.cpp 373;" m class:POA_benchmark::onePort_Put::TAO file: access:private +args_ benchS.cpp 481;" m class:POA_benchmark::allPorts_Put::TAO file: access:private +args_ benchS.cpp 588;" m class:POA_benchmark::_is_a_Put_Upcall_Command::TAO file: access:private +args_ benchS.cpp 673;" m class:POA_benchmark::_non_existent_Put_Upcall_Command::TAO file: access:private +args_ benchS.cpp 756;" m class:POA_benchmark::_repository_id_Put_Upcall_Command::TAO file: access:private +args_ benchS.cpp 883;" m class:POA_benchmark::_get_component_Put_Upcall_Command::TAO file: access:private +benchmark_Put_i benchI.h 41;" c inherits:POA_benchmark::Put +benchmark_Put_i benchI.h 46;" p class:benchmark_Put_i access:public +benchmark_Put_setup_collocation benchC.h 236;" p class:benchmark::Put access:protected implementation:virtual +benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer benchC.cpp 234;" m class:TAO file: +benchmark__TAO_Put_Proxy_Broker_Stub_Factory_Initializer_Scarecrow benchS.cpp 231;" v file: +connect_Put benchS.cpp 260;" c namespace:POA_benchmark file: inherits:TAO::Upcall_Command +connect_skel benchS.h 137;" p class:POA_benchmark::Put access:public +cpx Supplier.cpp 20;" v +cpx benchI.h 81;" m class:benchmark_Put_i access:private +cpx_dio_set_signal_param cpx.h 54;" t +duplicate benchC.h 300;" p struct:TAO::Objref_Traits access:public +get cpx.h 63;" p class:CPX access:public +hash benchS.cpp 105;" p class:TAO_benchmark_Put_Perfect_Hash_OpTable file: access:private +init cpx.h 65;" p class:CPX access:private +invalidRequest benchC.h 81;" c namespace:benchmark inherits:::CORBA::UserException +invalidRequest benchC.h 85;" p class:benchmark::invalidRequest access:public +invalidRequest benchC.h 86;" p class:benchmark::invalidRequest access:public +lookup benchS.cpp 108;" p class:TAO_benchmark_Put_Perfect_Hash_OpTable file: access:public +mapped_in cpx.h 66;" m class:CPX access:private +mapped_out cpx.h 67;" m class:CPX access:private +marshal benchC.h 226;" p class:benchmark::Put access:public implementation:virtual +marshal benchC.h 307;" p struct:TAO::Objref_Traits access:public +nil benchC.h 306;" p struct:TAO::Objref_Traits access:public +onePort_Put benchS.cpp 335;" c namespace:POA_benchmark file: inherits:TAO::Upcall_Command +onePort_skel benchS.h 156;" p class:POA_benchmark::Put access:public +operation_details_ benchS.cpp 372;" m class:POA_benchmark::onePort_Put file: access:private +operation_details_ benchS.cpp 480;" m class:POA_benchmark::allPorts_Put file: access:private +operation_details_ benchS.cpp 587;" m class:POA_benchmark::_is_a_Put_Upcall_Command file: access:private +operation_details_ benchS.cpp 672;" m class:POA_benchmark::_non_existent_Put_Upcall_Command file: access:private +operation_details_ benchS.cpp 755;" m class:POA_benchmark::_repository_id_Put_Upcall_Command file: access:private +operation_details_ benchS.cpp 882;" m class:POA_benchmark::_get_component_Put_Upcall_Command file: access:private +operator << benchC.h 367;" p +operator << benchC.h 379;" p +operator <<= benchC.h 325;" p +operator <<= benchC.h 326;" p +operator <<= benchC.h 342;" p namespace:benchmark +operator <<= benchC.h 343;" p namespace:benchmark +operator = benchC.h 258;" p class:benchmark::Put access:private +operator = benchC.h 89;" p class:benchmark::invalidRequest access:public +operator = benchS_T.h 125;" p class:POA_benchmark::Put_tie access:private +operator >> benchC.h 368;" p +operator >> benchC.h 380;" p +operator >>= benchC.h 327;" p +operator >>= benchC.h 328;" p +operator >>= benchC.h 344;" p namespace:benchmark +param cpx.h 70;" m class:CPX access:private +pid cpx.h 53;" m access:public +poa_ benchS_T.h 120;" m class:POA_benchmark::Put_tie access:private +ptr_ benchS_T.h 119;" m class:POA_benchmark::Put_tie access:private +put Supplier.cpp 19;" v +rel_ benchS_T.h 121;" m class:POA_benchmark::Put_tie access:private +release benchC.h 303;" p struct:TAO::Objref_Traits access:public +servant_ benchS.cpp 278;" m class:POA_benchmark::connect_Put::POA_benchmark file: access:private +servant_ benchS.cpp 371;" m class:POA_benchmark::onePort_Put::POA_benchmark file: access:private +servant_ benchS.cpp 479;" m class:POA_benchmark::allPorts_Put::POA_benchmark file: access:private +servant_ benchS.cpp 586;" m class:POA_benchmark::_is_a_Put_Upcall_Command::POA_benchmark file: access:private +servant_ benchS.cpp 671;" m class:POA_benchmark::_non_existent_Put_Upcall_Command::POA_benchmark file: access:private +servant_ benchS.cpp 754;" m class:POA_benchmark::_repository_id_Put_Upcall_Command::POA_benchmark file: access:private +servant_ benchS.cpp 881;" m class:POA_benchmark::_get_component_Put_Upcall_Command::POA_benchmark file: access:private +set cpx.h 62;" p class:CPX access:public +signal cpx.h 52;" m access:public +tao_benchmark_Put_optable benchS.cpp 210;" v file: +the_TAO_Put_Proxy_Broker_ benchC.h 228;" m class:benchmark::Put access:private +~Put benchC.h 252;" p class:benchmark::Put access:protected implementation:virtual +~Put benchS.h 71;" p class:POA_benchmark::Put access:public implementation:virtual +~Put_tie benchS_T.h 62;" p class:POA_benchmark::Put_tie access:public +~benchmark_Put_i benchI.h 49;" p class:benchmark_Put_i access:public implementation:virtual +~invalidRequest benchC.h 87;" p class:benchmark::invalidRequest access:public diff --git a/quellcode/versuch2/CPXEventConsumer b/quellcode/versuch2/CPXEventConsumer Binary files differnew file mode 100755 index 0000000..f1de2b4 --- /dev/null +++ b/quellcode/versuch2/CPXEventConsumer diff --git a/quellcode/versuch2/CPXEventConsumer_i.cpp b/quellcode/versuch2/CPXEventConsumer_i.cpp new file mode 100755 index 0000000..3cd3f18 --- /dev/null +++ b/quellcode/versuch2/CPXEventConsumer_i.cpp @@ -0,0 +1,44 @@ +#include "CPXEventConsumer_i.h"
+
+#include <orbsvcs/RtecEventCommC.h> +#include <orbsvcs/Event_Utilities.h> +
+#include <tao/PortableServer/PS_CurrentC.h>
+#include <ace/OS_NS_stdio.h>
+
+#include <sstream>
+
+#include "cpx.h"
+ +const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1; +const RtecEventComm::EventType MY_EVENT_TYPE = ACE_ES_EVENT_UNDEFINED + 1;
+
+CPX cpx;
+
+CPXEventConsumer_i::CPXEventConsumer_i(CORBA::ORB_ptr orb/*, int event_limit*/) : orb_(CORBA::ORB::_duplicate(orb))/* , event_limit_(event_limit)*/ {
+ //nothing
+}
+
+void CPXEventConsumer_i::push(const RtecEventComm::EventSet& events) throw (CORBA::SystemException) {
+ // loop through events
+ int value;
+ for(u_int i = 0; i < events.length(); ++i){
+ if(events[i].header.type == MY_EVENT_TYPE){
+ // std::cout<<"my event\n";
+ events[i].data.any_value >>= value;
+ cpx.set(1, value);
+ } else {
+ // std::cout<<"your event\n";
+ cpx.set(1, value-2);
+ }
+ }
+// if(--event_limit_ <= 0) orb_->shutdown(0);
+}
+
+void CPXEventConsumer_i::disconnect_push_consumer() throw (CORBA::SystemException){
+ CORBA::Object_var obj = orb_->resolve_initial_references("POACurrent");
+ PortableServer::Current_var current = PortableServer::Current::_narrow(obj.in());
+ PortableServer::POA_var poa = current->get_POA();
+ PortableServer::ObjectId_var objectId = current->get_object_id();
+ poa->deactivate_object(objectId.in());
+}
diff --git a/quellcode/versuch2/CPXEventConsumer_i.h b/quellcode/versuch2/CPXEventConsumer_i.h new file mode 100755 index 0000000..7eacdea --- /dev/null +++ b/quellcode/versuch2/CPXEventConsumer_i.h @@ -0,0 +1,17 @@ +#ifndef CPXEVENTCONSUMER_H +#define CPXEVENTCONSUMER_H + +#include <orbsvcs/RtecEventCommS.h> +#include <iostream> + +class CPXEventConsumer_i : public virtual POA_RtecEventComm::PushConsumer +{ +public: + CPXEventConsumer_i(CORBA::ORB_ptr orb/*, int event_limit*/); + virtual void push(const RtecEventComm::EventSet& events) throw(CORBA::SystemException); + virtual void disconnect_push_consumer() throw(CORBA::SystemException); +private: + CORBA::ORB_var orb_; +}; + +#endif diff --git a/quellcode/versuch2/CPXEventSupplier b/quellcode/versuch2/CPXEventSupplier Binary files differnew file mode 100755 index 0000000..a97332d --- /dev/null +++ b/quellcode/versuch2/CPXEventSupplier diff --git a/quellcode/versuch2/CPXEventSupplier_i.cpp b/quellcode/versuch2/CPXEventSupplier_i.cpp new file mode 100755 index 0000000..4ceef8e --- /dev/null +++ b/quellcode/versuch2/CPXEventSupplier_i.cpp @@ -0,0 +1,14 @@ +#include "CPXEventSupplier_i.h" +#include <tao/PortableServer/PS_CurrentC.h> + +CPXEventSupplier_i::CPXEventSupplier_i(CORBA::ORB_ptr orb) : orb_(CORBA::ORB::_duplicate(orb)){ + //nothing +} + +void CPXEventSupplier_i::disconnect_push_supplier() throw(CORBA::SystemException){ + CORBA::Object_var obj = orb_->resolve_initial_references("POACurrent"); + PortableServer::Current_var current = PortableServer::Current::_narrow(obj.in()); + PortableServer::POA_var poa = current->get_POA(); + PortableServer::ObjectId_var objectId = current->get_object_id(); + poa->deactivate_object(objectId.in()); +} diff --git a/quellcode/versuch2/CPXEventSupplier_i.h b/quellcode/versuch2/CPXEventSupplier_i.h new file mode 100755 index 0000000..c116ea0 --- /dev/null +++ b/quellcode/versuch2/CPXEventSupplier_i.h @@ -0,0 +1,19 @@ +#ifndef _CPXEventSupplier_i_h_
+#define _CPXEventSupplier_i_h_
+
+#include <orbsvcs/RtecEventCommS.h> // for POA_CosEventComm::PushSupplier
+
+class CPXEventSupplier_i : public virtual POA_RtecEventComm::PushSupplier
+{
+ public:
+ // Constructor
+ CPXEventSupplier_i(CORBA::ORB_ptr orb);
+
+ virtual void disconnect_push_supplier()
+ throw(CORBA::SystemException);
+
+ private:
+ CORBA::ORB_var orb_;
+};
+
+#endif // _CPXEventSupplier_i_h_
diff --git a/quellcode/versuch2/ESConsumer.cpp b/quellcode/versuch2/ESConsumer.cpp new file mode 100755 index 0000000..6cc7515 --- /dev/null +++ b/quellcode/versuch2/ESConsumer.cpp @@ -0,0 +1,94 @@ +#include "CPXEventConsumer_i.h" + +#include <orbsvcs/RtecEventCommC.h> +#include <orbsvcs/RtecEventChannelAdminC.h> +#include <orbsvcs/Time_Utilities.h> +#include <orbsvcs/Event_Utilities.h> +#include <orbsvcs/CosNamingC.h> + +const int EVENT_LIMIT = 1000; + +int main (int argc, char* argv[]) +{ + + + struct sched_param schedparam; + schedparam.sched_priority = 99; + if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) { + fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try + { + // Initialize the ORB. + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + + // Find the Naming Service. + CORBA::Object_var obj = orb->resolve_initial_references("NameService"); + CosNaming::NamingContextExt_var root_context = CosNaming::NamingContextExt::_narrow(obj.in()); + + // Find the EchoEventChannel. + obj = root_context->resolve_str("EventService"); + + // Downcast the object reference to an EventChannel reference. + RtecEventChannelAdmin::EventChannel_var ec = + RtecEventChannelAdmin::EventChannel::_narrow(obj.in()); + if (CORBA::is_nil(ec.in())) { + std::cout << "Could not narrow EchoEventChannel." << std::endl; + return 1; + } + std::cout << "CPXEventConsumerMain.cpp: Found the EchoEventChannel." << std::endl; + + // Obtain a reference to the consumer administration object. + RtecEventChannelAdmin::ConsumerAdmin_var admin = ec->for_consumers(); + + // Obtain a reference to the push supplier proxy. + RtecEventChannelAdmin::ProxyPushSupplier_var supplier = + admin->obtain_push_supplier(); + + // Get the RootPOA. + obj = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in()); + + // Instantiate an CPXEventConsumer_i servant. + CPXEventConsumer_i servant(orb.in()/*, EVENT_LIMIT*/); + + // Register it with the RootPOA. + PortableServer::ObjectId_var oid = poa->activate_object(&servant); + CORBA::Object_var consumer_obj = poa->id_to_reference(oid.in()); + RtecEventComm::PushConsumer_var consumer = + RtecEventComm::PushConsumer::_narrow(consumer_obj.in()); + + // Connect as a consumer. + ACE_ConsumerQOS_Factory qos; + qos.start_disjunction_group (1); + qos.insert_type (ACE_ES_EVENT_ANY, 0); + supplier->connect_push_consumer (consumer.in (), qos.get_ConsumerQOS ()); + + // Activate the POA via its POAManager. + PortableServer::POAManager_var poa_manager = poa->the_POAManager(); + poa_manager->activate(); + + std::cout << "CPXEventConsumerMain.cpp: Ready to receive events..." << std::endl; + + // Enter the ORB event loop. + orb->run(); + + // If we have reached this, we must be shutting down... + // Disconnect the ProxyPushSupplier. + supplier->disconnect_push_supplier(); + supplier = RtecEventChannelAdmin::ProxyPushSupplier::_nil(); + admin = RtecEventChannelAdmin::ConsumerAdmin::_nil(); + + orb->destroy(); + + return 0; + } + catch (CORBA::Exception& ex) + { + std::cout << "Caught CORBA::Exception" << std::endl << ex << std::endl; + } + + return 1; +} + diff --git a/quellcode/versuch2/ESSupplier.cpp b/quellcode/versuch2/ESSupplier.cpp new file mode 100755 index 0000000..3099bac --- /dev/null +++ b/quellcode/versuch2/ESSupplier.cpp @@ -0,0 +1,106 @@ + + +#include <orbsvcs/RtecEventCommC.h> +#include <orbsvcs/RtecEventChannelAdminC.h> +#include <orbsvcs/Time_Utilities.h> +#include <orbsvcs/Event_Utilities.h> +#include <orbsvcs/CosNamingC.h> + +#include <iostream> + +#include <unistd.h> +#include "cpx.h" + +const RtecEventComm::EventSourceID MY_SOURCE_ID = ACE_ES_EVENT_SOURCE_ANY + 1; +const RtecEventComm::EventType MY_EVENT_TYPE = ACE_ES_EVENT_UNDEFINED + 1; + +CPX cpx; + +RtecEventChannelAdmin::ProxyPushConsumer_var consumer; + +#include "CPXEventSupplier_i.h" + +void sigproc(int signo){ + + signal(SIGRTMIN+29, sigproc); + int eventData = cpx.get(1); + + // Eventset initialisieren + RtecEventComm::EventSet events(1); + events.length(1); + + events[0].header.source = MY_SOURCE_ID; + events[0].header.type = MY_EVENT_TYPE; + + events[0].data.any_value <<= eventData; + consumer->push(events); + + /* + if(eventData>0) events[0].data.any_value <<= 1; + else events[0].data.any_value <<= 255; + + consumer->push(events); + + if(rand() < 1626276121){ + events[0].header.source = MY_SOURCE_ID; + events[0].header.type = MY_EVENT_TYPE+1; + if(eventData>0) events[0].data.any_value <<= 2; + else events[0].data.any_value <<= 255; + consumer->push(events); + } + */ + +} + +int main(int argc, char* argv[]){ + + struct sched_param schedparam; + schedparam.sched_priority = 99; + if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) { + fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + signal(SIGRTMIN+29, sigproc); + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContextExt_var namingContext = CosNaming::NamingContextExt::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + // Get EventService + CORBA::Object_var esObj = namingContext->resolve_str("EventService"); + RtecEventChannelAdmin::EventChannel_var ec = RtecEventChannelAdmin::EventChannel::_narrow(esObj.in()); + if(CORBA::is_nil(ec.in())){ + std::cout<<"couldn't connect to EventService\n"; + return 1; + } + RtecEventChannelAdmin::SupplierAdmin_var admin = ec->for_suppliers(); + consumer = admin->obtain_push_consumer(); + + // Instantiate and register servant + CPXEventSupplier_i servant(orb.in()); + + CORBA::Object_var poaObj = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var poa = PortableServer::POA::_narrow(poaObj.in()); + PortableServer::ObjectId_var oid = poa->activate_object(&servant); + CORBA::Object_var supplierObj = poa->id_to_reference(oid.in()); + RtecEventComm::PushSupplier_var supplier = RtecEventComm::PushSupplier::_narrow(supplierObj.in()); + + ACE_SupplierQOS_Factory qos; + qos.insert(MY_SOURCE_ID, MY_EVENT_TYPE, 0 /*rt_info structure*/, 1 /*number of calls*/); + + // connect as supplier + consumer->connect_push_supplier(supplier.in(), qos.get_SupplierQOS()); + + while(true) pause(); + + }catch(CORBA::Exception &any){ + // std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch2/GNUmakefile.RTEvent_Consumer b/quellcode/versuch2/GNUmakefile.RTEvent_Consumer new file mode 100755 index 0000000..3dd0a5d --- /dev/null +++ b/quellcode/versuch2/GNUmakefile.RTEvent_Consumer @@ -0,0 +1,177 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.RTEvent_Consumer +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.RTEvent_Consumer +DEPENDENCY_FILE = .depend.RTEvent_Consumer +BIN_UNCHECKED = CPXEventConsumer + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + cpx.cpp \ + ESConsumer.cpp \ + CPXEventConsumer_i.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_RTEvent_Skel -lTAO_RTEvent -lTAO_Svc_Utils -lTAO_Messaging -lTAO_PI -lTAO_CodecFactory -lTAO_PortableServer -lTAO_Valuetype -lTAO_CosNaming -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/RTEvent_Consumer +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_RTEvent_Skel TAO_RTEvent TAO_Svc_Utils TAO_Messaging TAO_PI TAO_CodecFactory TAO_PortableServer TAO_Valuetype TAO_CosNaming TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_RTEvent_Skel TAO_RTEvent TAO_Svc_Utils TAO_Messaging TAO_PI TAO_CodecFactory TAO_PortableServer TAO_Valuetype TAO_CosNaming TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(corba_messaging),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo corba_messaging exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_RTEvent_Skel TAO_RTEvent TAO_Svc_Utils TAO_Messaging TAO_PI TAO_CodecFactory TAO_PortableServer TAO_Valuetype TAO_CosNaming TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch2/GNUmakefile.RTEvent_Supplier b/quellcode/versuch2/GNUmakefile.RTEvent_Supplier new file mode 100755 index 0000000..18788bf --- /dev/null +++ b/quellcode/versuch2/GNUmakefile.RTEvent_Supplier @@ -0,0 +1,177 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.RTEvent_Supplier +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.RTEvent_Supplier +DEPENDENCY_FILE = .depend.RTEvent_Supplier +BIN_UNCHECKED = CPXEventSupplier + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + cpx.cpp \ + ESSupplier.cpp \ + CPXEventSupplier_i.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_RTEvent_Skel -lTAO_RTEvent -lTAO_Svc_Utils -lTAO_Messaging -lTAO_PI -lTAO_CodecFactory -lTAO_PortableServer -lTAO_Valuetype -lTAO_CosNaming -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/RTEvent_Supplier +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_RTEvent_Skel TAO_RTEvent TAO_Svc_Utils TAO_Messaging TAO_PI TAO_CodecFactory TAO_PortableServer TAO_Valuetype TAO_CosNaming TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_RTEvent_Skel TAO_RTEvent TAO_Svc_Utils TAO_Messaging TAO_PI TAO_CodecFactory TAO_PortableServer TAO_Valuetype TAO_CosNaming TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(corba_messaging),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo corba_messaging exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_RTEvent_Skel TAO_RTEvent TAO_Svc_Utils TAO_Messaging TAO_PI TAO_CodecFactory TAO_PortableServer TAO_Valuetype TAO_CosNaming TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch2/RTEvent.mpc b/quellcode/versuch2/RTEvent.mpc new file mode 100755 index 0000000..66bd0db --- /dev/null +++ b/quellcode/versuch2/RTEvent.mpc @@ -0,0 +1,22 @@ +project(*Supplier): namingexe, rteventexe, { + requires += exceptions + exename = CPXEventSupplier + + Source_Files { + cpx.cpp + ESSupplier.cpp + CPXEventSupplier_i.cpp + } +} + +project(*Consumer): namingexe, rteventexe, { + requires += exceptions + exename = CPXEventConsumer + + Source_Files { + cpx.cpp + ESConsumer.cpp + CPXEventConsumer_i.cpp + } +} + diff --git a/quellcode/versuch2/buildNcopy b/quellcode/versuch2/buildNcopy new file mode 100755 index 0000000..fe744ee --- /dev/null +++ b/quellcode/versuch2/buildNcopy @@ -0,0 +1,2 @@ +#!/bin/bash +make -f GNUmakefile.RTEvent_Consumer && make -f GNUmakefile.RTEvent_Supplier && scp CPXEventConsumer root@136.230.189.129:/opt/acetao/tests/ && scp CPXEventSupplier root@136.230.189.135:/opt/acetao/tests/ diff --git a/quellcode/versuch2/cpx.cpp b/quellcode/versuch2/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/versuch2/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + /* setup signal on interrupt */ + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cout<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cout<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } + + return (short) value; +} + +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/versuch2/cpx.h b/quellcode/versuch2/cpx.h new file mode 100755 index 0000000..7b4545a --- /dev/null +++ b/quellcode/versuch2/cpx.h @@ -0,0 +1,73 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00
+#define PORT2_IN 0x6c00
+#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch2/error.txt b/quellcode/versuch2/error.txt new file mode 100755 index 0000000..ff7c749 --- /dev/null +++ b/quellcode/versuch2/error.txt @@ -0,0 +1,13 @@ +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl: In member function 'bool ACE_OutputCDR::write_float(float)': +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl:237: warning: dereferencing type-punned pointer will break strict-aliasing rules +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl: In member function 'bool ACE_InputCDR::skip_double()': +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl:974: warning: dereferencing type-punned pointer will break strict-aliasing rules +ESSupplier.cpp: At global scope: +ESSupplier.cpp:21: warning: unused parameter 'signo' +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl: In member function 'bool ACE_OutputCDR::write_float(float)': +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl:237: warning: dereferencing type-punned pointer will break strict-aliasing rules +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl: In member function 'bool ACE_InputCDR::skip_double()': +/home/trautma/projects/ACE+TAO/trunk/ACE_wrappers/ace/CDR_Stream.inl:974: warning: dereferencing type-punned pointer will break strict-aliasing rules +CPXEventSupplier_i.cpp: In member function 'virtual void CPXEventSupplier_i::disconnect_push_supplier()': +CPXEventSupplier_i.cpp:9: error: 'orb' was not declared in this scope +make: *** [.obj/CPXEventSupplier_i.o] Fehler 1 diff --git a/quellcode/versuch3/GNUmakefile.Bench_Receiver b/quellcode/versuch3/GNUmakefile.Bench_Receiver new file mode 100755 index 0000000..e56907b --- /dev/null +++ b/quellcode/versuch3/GNUmakefile.Bench_Receiver @@ -0,0 +1,224 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Receiver +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Receiver +DEPENDENCY_FILE = .depend.Bench_Receiver +BIN_UNCHECKED = Receiver + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + cpx.cpp \ + bench_i.cpp \ + Receiver.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Receiver +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp cpx.cpp bench_i.cpp Receiver.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch3/GNUmakefile.Bench_Supplier b/quellcode/versuch3/GNUmakefile.Bench_Supplier new file mode 100755 index 0000000..f24931b --- /dev/null +++ b/quellcode/versuch3/GNUmakefile.Bench_Supplier @@ -0,0 +1,221 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Supplier +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Supplier +DEPENDENCY_FILE = .depend.Bench_Supplier +BIN_UNCHECKED = Supplier + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + cpx.cpp \ + benchC.cpp \ + Supplier.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTCORBA -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Supplier +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = cpx.cpp benchC.cpp Supplier.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch3/GNUmakefile.Benchmark_Receiver b/quellcode/versuch3/GNUmakefile.Benchmark_Receiver new file mode 100755 index 0000000..52c7abe --- /dev/null +++ b/quellcode/versuch3/GNUmakefile.Benchmark_Receiver @@ -0,0 +1,226 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Benchmark_Receiver +# +# $Id: gnu.mpd,v 1.1.1.2.2.23 2006/03/15 18:51:41 elliottc Exp $ +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Benchmark_Receiver +DEPENDENCY_FILE = .depend.Benchmark_Receiver +BIN_UNCHECKED = Receiver + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + cpx.cpp \ + bench_i.cpp \ + Receiver.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Sc -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +ifeq ($(versioned_so),1) +SOVERSION = .1.4a.10 +endif + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Benchmark_Receiver +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp cpx.cpp bench_i.cpp Receiver.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch3/GNUmakefile.Benchmark_Supplier b/quellcode/versuch3/GNUmakefile.Benchmark_Supplier new file mode 100755 index 0000000..2954847 --- /dev/null +++ b/quellcode/versuch3/GNUmakefile.Benchmark_Supplier @@ -0,0 +1,226 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Benchmark_Supplier +# +# $Id: gnu.mpd,v 1.1.1.2.2.23 2006/03/15 18:51:41 elliottc Exp $ +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Benchmark_Supplier +DEPENDENCY_FILE = .depend.Benchmark_Supplier +BIN_UNCHECKED = Supplier + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + cpx.cpp \ + bench_i.cpp \ + Supplier.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTCORBA -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Sc -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +ifeq ($(versioned_so),1) +SOVERSION = .1.4a.10 +endif + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Benchmark_Supplier +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTCORBA TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTCORBA TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp cpx.cpp bench_i.cpp Supplier.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTCORBA TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch3/Receiver b/quellcode/versuch3/Receiver Binary files differnew file mode 100755 index 0000000..c34b7af --- /dev/null +++ b/quellcode/versuch3/Receiver diff --git a/quellcode/versuch3/Receiver.cpp b/quellcode/versuch3/Receiver.cpp new file mode 100755 index 0000000..fd07e2f --- /dev/null +++ b/quellcode/versuch3/Receiver.cpp @@ -0,0 +1,96 @@ +#include <iostream> +#include <stdio.h> + + +//#include <asm/irq.h> + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create high Priority Policy + CORBA::PolicyList benchPolicy(2); + benchPolicy.length(2); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::maxPriority); + benchPolicy[1] = rtORB->create_server_protocol_policy(protocols); + + //// create low Priority Policy + CORBA::PolicyList benchLowPolicy(2); + benchLowPolicy.length(2); + benchLowPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::minPriority); + benchLowPolicy[1] = rtORB->create_server_protocol_policy(protocols); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create 2nd ObjectAdapter, assign low priority Policy + PortableServer::POA_var benchLowPOA = rootPOA->create_POA("benchLowPOA", poaManager.in(), benchLowPolicy); + + // create the servant + benchmark_PutHigh_i bench_i; + benchmark_PutLow_i lowBench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + + PortableServer::ObjectId_var objectLowID = benchLowPOA->activate_object(&lowBench_i); + CORBA::Object_var lowBenchObj = benchLowPOA->id_to_reference(objectLowID.in()); + CORBA::String_var ior2 = orb->object_to_string(lowBenchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("HighReceiver"); + namingContext->bind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + name[0].id = CORBA::string_dup("LowReceiver"); + namingContext->bind(name, lowBenchObj.in()); + std::cout<<"Bound LowReceiver to NameService"<<std::endl; + + // register servants at orbManager + orbManager->activate + + + orbManager.run(); + + std::cout<<"Server ready"<<std::endl; + + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch3/Supplier b/quellcode/versuch3/Supplier Binary files differnew file mode 100755 index 0000000..43e6a48 --- /dev/null +++ b/quellcode/versuch3/Supplier diff --git a/quellcode/versuch3/Supplier.cpp b/quellcode/versuch3/Supplier.cpp new file mode 100755 index 0000000..0476e69 --- /dev/null +++ b/quellcode/versuch3/Supplier.cpp @@ -0,0 +1,89 @@ +#include <iostream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "cpx.h" + +static benchmark::PutHigh_var highPut; +static benchmark::PutLow_var lowPut; +static bool high; +static CPX cpx; + +static CORBA::ORB_ptr orb; +static RTCORBA::RTORB_var rtORB; +extern CosNaming::NamingContext_ptr nameContext; + +template <class T> typename T::_ptr_type bindService (const char *n, int argc, char *argv[]) { + CORBA::Object_var obj; + if (CORBA::is_nil (nameContext)) { //first call + // get ORB + orb = CORBA::ORB_init (argc, argv, 0); + // get RTORB + obj = orb->resolve_initial_references("RTORB"); + rtORB = RTCORBA::RTORB::_narrow(obj.in()); + // get NamingService + obj = orb->resolve_initial_references ("NameService"); + nameContext = CosNaming::NamingContext::_narrow (obj); + if (CORBA::is_nil (name_context)) return 0; + } + CosNaming::Name svcName; + svcName.length (1); + svcName[0].id = n; + // retrieve reference + obj = nameContext->resolve(svcName); + // cast to T + return T::_narrow (obj); +} + + +void sigproc(int signo) { + signal(SIGRTMIN+29, sigproc); + if (high) highPut->onePort(1, cpx.get(1)); + else lowPut->onePort(3, cpx.get(1)); +} + +void argError(){ + std::cout<<"./Supplier high|low <corba-args>\n"; +} + +int main(int argc, char* argv[]){ + + if (argc < 1) { + argError(); + return 0; + } + if (argv[1] == "high") high = true; + else if (argv[1] == "low") high = false; + else { + argError(); + return 0; + } + + struct sched_param schedparam; + schedparam.sched_priority = 99; + + if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) { + fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + + // receive Objects + if (high) highPut = bindService<PutHigh>("HighReceiver", argc, argv); + else lowPut = bindService<PutLow>("LowReceiver", argc, argv); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true) pause(); + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch3/bench.idl b/quellcode/versuch3/bench.idl new file mode 100755 index 0000000..1001a55 --- /dev/null +++ b/quellcode/versuch3/bench.idl @@ -0,0 +1,10 @@ +module benchmark{ + exception invalidRequest{}; + interface Put{ + void connect() raises(invalidRequest); + void onePort(in short portNo, in short value) + raises(invalidRequest); + void allPorts( in short valPort1, in short valPort2, in short valPort3) + raises(invalidRequest); + }; +}; diff --git a/quellcode/versuch3/bench.mpc b/quellcode/versuch3/bench.mpc new file mode 100755 index 0000000..47ff6de --- /dev/null +++ b/quellcode/versuch3/bench.mpc @@ -0,0 +1,23 @@ +project(*Receiver): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + bench_i.cpp + Receiver.cpp + } + Header_Files { + cpx.h + } +} + +project(*Supplier): rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchC.cpp + Supplier.cpp + } + Header_Files { + cpx.h + } +} diff --git a/quellcode/versuch3/benchC.cpp b/quellcode/versuch3/benchC.cpp new file mode 100755 index 0000000..eb42459 --- /dev/null +++ b/quellcode/versuch3/benchC.cpp @@ -0,0 +1,768 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:292 + + +#include "benchC.h" +#include "tao/CDR.h" +#include "tao/Exception_Data.h" +#include "tao/Invocation_Adapter.h" +#include "tao/Object_T.h" +#include "tao/Typecode.h" +#include "tao/Any_Impl_T.h" +#include "tao/Any_Dual_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "ace/OS_NS_string.h" + +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig +#endif /* __BORLANDC__ */ + +#if !defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +// TAO_IDL - Generated from +// be/be_visitor_exception/exception_cs.cpp:63 + +benchmark::invalidRequest::invalidRequest (void) + : CORBA::UserException ( + "IDL:benchmark/invalidRequest:1.0", + "invalidRequest" + ) +{ +} + +benchmark::invalidRequest::~invalidRequest (void) +{ +} + +benchmark::invalidRequest::invalidRequest (const ::benchmark::invalidRequest &_tao_excp) + : CORBA::UserException ( + _tao_excp._rep_id (), + _tao_excp._name () + ) +{ +} + +benchmark::invalidRequest& +benchmark::invalidRequest::operator= (const ::benchmark::invalidRequest &_tao_excp) +{ + this->ACE_NESTED_CLASS (CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void benchmark::invalidRequest::_tao_any_destructor (void *_tao_void_pointer) +{ + invalidRequest *_tao_tmp_pointer = + static_cast<invalidRequest *> (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast (CORBA::Exception *_tao_excp) +{ + return dynamic_cast<invalidRequest *> (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast (CORBA::Exception const *_tao_excp) +{ + return dynamic_cast<const invalidRequest *> (_tao_excp); +} + +CORBA::Exception *benchmark::invalidRequest::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::benchmark::invalidRequest, 0); + return retval; +} + +CORBA::Exception * +benchmark::invalidRequest::_tao_duplicate (void) const +{ + CORBA::Exception *result = 0; + ACE_NEW_RETURN ( + result, + ::benchmark::invalidRequest (*this), + 0 + ); + return result; +} + +void benchmark::invalidRequest::_raise (void) const +{ + TAO_RAISE (*this); +} + +void benchmark::invalidRequest::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +void benchmark::invalidRequest::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +CORBA::TypeCode_ptr benchmark::invalidRequest::_type (void) const +{ + return ::benchmark::_tc_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/typecode_defn.cpp:295 + +static const CORBA::Long _oc_benchmark_invalidRequest[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 33, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x62656e63), + ACE_NTOHL (0x686d6172), + ACE_NTOHL (0x6b2f696e), + ACE_NTOHL (0x76616c69), + ACE_NTOHL (0x64526571), + ACE_NTOHL (0x75657374), + ACE_NTOHL (0x3a312e30), + ACE_NTOHL (0x0), // repository ID = IDL:benchmark/invalidRequest:1.0 + 15, + ACE_NTOHL (0x696e7661), + ACE_NTOHL (0x6c696452), + ACE_NTOHL (0x65717565), + ACE_NTOHL (0x73740000), // name = invalidRequest + 0, // member count + }; + +static CORBA::TypeCode _tc_TAO_tc_benchmark_invalidRequest ( + CORBA::tk_except, + sizeof (_oc_benchmark_invalidRequest), + (char *) &_oc_benchmark_invalidRequest, + 0, + 0 + ); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_invalidRequest = + &_tc_TAO_tc_benchmark_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for benchmark::Put. + +benchmark::Put_ptr +TAO::Objref_Traits<benchmark::Put>::duplicate ( + benchmark::Put_ptr p + ) +{ + return benchmark::Put::_duplicate (p); +} + +void +TAO::Objref_Traits<benchmark::Put>::release ( + benchmark::Put_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::Put_ptr +TAO::Objref_Traits<benchmark::Put>::nil (void) +{ + return benchmark::Put::_nil (); +} + +CORBA::Boolean +TAO::Objref_Traits<benchmark::Put>::marshal ( + benchmark::Put_ptr p, + TAO_OutputCDR & cdr + ) +{ + return CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_benchmark_Put_connect_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc, + benchmark::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo (portNo); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_value (value); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_portNo, + &_tao_value + }; + + static TAO::Exception_Data + _tao_benchmark_Put_onePort_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc, + benchmark::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 3, + "onePort", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_onePort_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS (CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + ACE_DECLARE_NEW_CORBA_ENV; + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static TAO::Exception_Data + _tao_benchmark_Put_allPorts_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc, + benchmark::_tc_invalidRequest + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "allPorts", + 8, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_allPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +benchmark::Put::Put (void) + : the_TAO_Put_Proxy_Broker_ (0) +{ + this->benchmark_Put_setup_collocation (); +} + +void +benchmark::Put::benchmark_Put_setup_collocation () +{ + if (::benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_Put_Proxy_Broker_ = + ::benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer (this); + } +} + +benchmark::Put::~Put (void) +{} + +void +benchmark::Put::_tao_any_destructor (void *_tao_void_pointer) +{ + Put *_tao_tmp_pointer = + static_cast<Put *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +benchmark::Put_ptr +benchmark::Put::_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::narrow ( + _tao_objref, + "IDL:benchmark/Put:1.0", + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::Put_ptr +benchmark::Put::_unchecked_narrow ( + CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::unchecked_narrow ( + _tao_objref, + "IDL:benchmark/Put:1.0", + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::Put_ptr +benchmark::Put::_duplicate (Put_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +benchmark::Put::_tao_release (Put_ptr obj) +{ + CORBA::release (obj); +} + +CORBA::Boolean +benchmark::Put::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS (CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* benchmark::Put::_interface_repository_id (void) const +{ + return "IDL:benchmark/Put:1.0"; +} + +CORBA::Boolean +benchmark::Put::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/typecode_defn.cpp:295 + +static const CORBA::Long _oc_benchmark_Put[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 22, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x62656e63), + ACE_NTOHL (0x686d6172), + ACE_NTOHL (0x6b2f5075), + ACE_NTOHL (0x743a312e), + ACE_NTOHL (0x30000000), // repository ID = IDL:benchmark/Put:1.0 + 4, + ACE_NTOHL (0x50757400), // name = Put + }; + +static CORBA::TypeCode _tc_TAO_tc_benchmark_Put ( + CORBA::tk_objref, + sizeof (_oc_benchmark_Put), + (char *) &_oc_benchmark_Put, + 0, + 0 + ); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_Put = + &_tc_TAO_tc_benchmark_Put; +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_cs.cpp:50 + +namespace TAO { +template<> +CORBA::Boolean +Any_Dual_Impl_T<benchmark::invalidRequest>::demarshal_value ( + TAO_InputCDR & cdr + ) +{ + CORBA::String_var id; + + if (!(cdr >> id.out ())) + { + return false; + } + + ACE_TRY_NEW_ENV + { + this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return false; + } + ACE_ENDTRY; + + return true; +} +} + +// Copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + const benchmark::invalidRequest &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert_copy ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + benchmark::invalidRequest *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + benchmark::invalidRequest *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const benchmark::invalidRequest *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const benchmark::invalidRequest *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::extract ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:50 + +namespace TAO { +template<> +CORBA::Boolean +Any_Impl_T<benchmark::Put>::to_object ( + CORBA::Object_ptr &_tao_elem + ) const +{ + _tao_elem = CORBA::Object::_duplicate (this->value_); + return true; +} +} + +// Copying insertion. +void +operator<<= ( + CORBA::Any &_tao_any, + benchmark::Put_ptr _tao_elem + ) +{ + benchmark::Put_ptr _tao_objptr = + benchmark::Put::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + CORBA::Any &_tao_any, + benchmark::Put_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<benchmark::Put>::insert ( + _tao_any, + benchmark::Put::_tao_any_destructor, + benchmark::_tc_Put, + *_tao_elem + ); +} + +CORBA::Boolean +operator>>= ( + const CORBA::Any &_tao_any, + benchmark::Put_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<benchmark::Put>::extract ( + _tao_any, + benchmark::Put::_tao_any_destructor, + benchmark::_tc_Put, + _tao_elem + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_cs.cpp:60 + +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::invalidRequest &_tao_aggregate + ) +{ + // Marshal the repository ID. + return (strm << _tao_aggregate._rep_id ()); +} + +CORBA::Boolean operator>> ( + TAO_InputCDR &, + benchmark::invalidRequest& + ) +{ + return true; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::Put_ptr _tao_objref + ) +{ + CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::Put_ptr &_tao_objref + ) +{ + CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::benchmark::Put RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} diff --git a/quellcode/versuch3/benchC.h b/quellcode/versuch3/benchC.h new file mode 100755 index 0000000..7002842 --- /dev/null +++ b/quellcode/versuch3/benchC.h @@ -0,0 +1,363 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:154 + +#ifndef _TAO_IDL_BENCHC_H_ +#define _TAO_IDL_BENCHC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Objref_VarOut_T.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 + +namespace TAO +{ + class Collocation_Proxy_Broker; + + template<typename T> class Narrow_Utils; + template<typename T> class AbstractBase_Narrow_Utils; +} + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:48 + +namespace benchmark +{ + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:51 + +#if !defined (_BENCHMARK_INVALIDREQUEST_CH_) +#define _BENCHMARK_INVALIDREQUEST_CH_ + + class invalidRequest : public CORBA::UserException + { + public: + + invalidRequest (void); + invalidRequest (const invalidRequest &); + ~invalidRequest (void); + + invalidRequest &operator= (const invalidRequest &); + + static void _tao_any_destructor (void *); + + static invalidRequest *_downcast (CORBA::Exception *); + static const invalidRequest *_downcast (CORBA::Exception const *); + + static CORBA::Exception *_alloc (void); + + virtual CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void) const; + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:127 + + virtual CORBA::TypeCode_ptr _type (void) const; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:44 + + TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr const _tc_invalidRequest; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_interface.cpp:599 + +#if !defined (_BENCHMARK_PUT__VAR_OUT_CH_) +#define _BENCHMARK_PUT__VAR_OUT_CH_ + + class Put; + typedef Put *Put_ptr; + + typedef + TAO_Objref_Var_T< + Put + > + Put_var; + + typedef + TAO_Objref_Out_T< + Put + > + Put_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_BENCHMARK_PUT_CH_) +#define _BENCHMARK_PUT_CH_ + + class Put + : public virtual CORBA::Object + { + public: + friend class TAO::Narrow_Utils<Put>; + typedef Put_ptr _ptr_type; + typedef Put_var _var_type; + + // The static operations. + static Put_ptr _duplicate (Put_ptr obj); + + static void _tao_release (Put_ptr obj); + + static Put_ptr _narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _unchecked_narrow ( + CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _nil (void) + { + return static_cast<Put_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_Put_Proxy_Broker_; + + protected: + // Concrete interface only. + Put (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void benchmark_Put_setup_collocation (void); + + // Concrete non-local interface only. + Put ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + Put ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~Put (void); + + private: + // Private and unimplemented for concrete interfaces. + Put (const Put &); + + void operator= (const Put &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:44 + + TAO_NAMESPACE_STORAGE_CLASS ::CORBA::TypeCode_ptr const _tc_Put; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:66 + +} // module benchmark + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:132 + +extern +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 + +// Traits specializations. +namespace TAO +{ + +#if !defined (_BENCHMARK_PUT__TRAITS_) +#define _BENCHMARK_PUT__TRAITS_ + + template<> + struct Objref_Traits< ::benchmark::Put> + { + static ::benchmark::Put_ptr duplicate ( + ::benchmark::Put_ptr + ); + static void release ( + ::benchmark::Put_ptr + ); + static ::benchmark::Put_ptr nil (void); + static CORBA::Boolean marshal ( + ::benchmark::Put_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, const benchmark::invalidRequest &); // copying version + void operator<<= (CORBA::Any &, benchmark::invalidRequest*); // noncopying version + CORBA::Boolean operator>>= (const CORBA::Any &, benchmark::invalidRequest *&); // deprecated + CORBA::Boolean operator>>= (const CORBA::Any &, const benchmark::invalidRequest *&); + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:52 + + void operator<<= (CORBA::Any &, benchmark::Put_ptr); // copying + void operator<<= (CORBA::Any &, benchmark::Put_ptr *); // non-copying + CORBA::Boolean operator>>= (const CORBA::Any &, benchmark::Put_ptr &); + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_ch.cpp:52 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::invalidRequest &); + CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::invalidRequest &); + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::Put_ptr ); + CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::Put_ptr &); + +// TAO_IDL - Generated from +// be/be_codegen.cpp:940 + +#if defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* defined INLINE */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#endif /* ifndef */ + + diff --git a/quellcode/versuch3/benchC.inl b/quellcode/versuch3/benchC.inl new file mode 100755 index 0000000..b196105 --- /dev/null +++ b/quellcode/versuch3/benchC.inl @@ -0,0 +1,63 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_BENCHMARK_PUT___CI_) +#define _BENCHMARK_PUT___CI_ + +ACE_INLINE +benchmark::Put::Put ( + TAO_Stub *objref, + CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_Put_Proxy_Broker_ (0) +{ + this->benchmark_Put_setup_collocation (); +} + +ACE_INLINE +benchmark::Put::Put ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) (ior, oc), + the_TAO_Put_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ diff --git a/quellcode/versuch3/benchI.cpp b/quellcode/versuch3/benchI.cpp new file mode 100755 index 0000000..3e0c6e0 --- /dev/null +++ b/quellcode/versuch3/benchI.cpp @@ -0,0 +1,79 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:910 + +#include "benchI.h" + +// Implementation skeleton constructor +benchmark_Put_i::benchmark_Put_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_Put_i::~benchmark_Put_i (void) +{ +} + +void benchmark_Put_i::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here +} + +void benchmark_Put_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here +} + +void benchmark_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here +} + + diff --git a/quellcode/versuch3/benchI.h b/quellcode/versuch3/benchI.h new file mode 100755 index 0000000..8651c61 --- /dev/null +++ b/quellcode/versuch3/benchI.h @@ -0,0 +1,82 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:844 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_Put_i : public virtual POA_benchmark::Put, public virtual PortableServer::RefCountServantBase +{ +public: + //Constructor + benchmark_Put_i (void); + + //Destructor + virtual ~benchmark_Put_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch3/benchS.cpp b/quellcode/versuch3/benchS.cpp new file mode 100755 index 0000000..0107e2c --- /dev/null +++ b/quellcode/versuch3/benchS.cpp @@ -0,0 +1,945 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:588 + +#ifndef _TAO_IDL_BENCHS_CPP_ +#define _TAO_IDL_BENCHS_CPP_ + + +#include "benchS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/Typecode.h" +#include "tao/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus +#endif /* __BORLANDC__ */ + +#if !defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:68 + +// Arg traits specializations. +namespace TAO +{ +} + + +// TAO_IDL - Generated from +// be/be_interface.cpp:1456 + +class TAO_benchmark_Put_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /opt/ACE_wrappers/1.4a/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_benchmark_Put_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_benchmark_Put_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 5, 16, 5, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 5, + 16, 5, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 0, 16, 16, 16, 0, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const struct TAO_operation_db_entry * +TAO_benchmark_Put_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 7, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 13, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 11, + DUPLICATES = 0, + WORDLIST_SIZE = 12 + }; + + static const struct TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_benchmark::Put::_is_a_skel, 0}, + {"",0,0}, + {"onePort", &POA_benchmark::Put::onePort_skel, 0}, + {"allPorts", &POA_benchmark::Put::allPorts_skel, 0}, + {"",0,0}, + {"_component", &POA_benchmark::Put::_component_skel, 0}, + {"",0,0}, + {"connect", &POA_benchmark::Put::connect_skel, 0}, + {"_non_existent", &POA_benchmark::Put::_non_existent_skel, 0}, + {"",0,0}, + {"_interface", &POA_benchmark::Put::_interface_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_benchmark_Put_Perfect_Hash_OpTable tao_benchmark_Put_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:853 + +TAO::Collocation_Proxy_Broker * +benchmark__TAO_Put_Proxy_Broker_Factory_function (CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +benchmark__TAO_Put_Proxy_Broker_Factory_Initializer (size_t) +{ + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer = + benchmark__TAO_Put_Proxy_Broker_Factory_function; + + return 0; +} + +static int +benchmark__TAO_Put_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + benchmark__TAO_Put_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (benchmark__TAO_Put_Proxy_Broker_Factory_Initializer) + ); + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_benchmark::Put::Put (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_benchmark_Put_optable; +} + +POA_benchmark::Put::Put (const Put& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_benchmark::Put::~Put (void) +{ +} +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_Put + : public TAO::Upcall_Command + { + public: + inline connect_Put ( + POA_benchmark::Put * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_benchmark::Put * const servant_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_benchmark::Put::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + connect_Put command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class onePort_Put + : public TAO::Upcall_Command + { + public: + inline onePort_Put ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + this->servant_->onePort ( + arg_1 + , arg_2 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_benchmark::Put::onePort_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_value; + + TAO::Argument * const args[] = + { + &retval, + &_tao_portNo, + &_tao_value + }; + + static size_t const nargs = 3; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + onePort_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class allPorts_Put + : public TAO::Upcall_Command + { + public: + inline allPorts_Put ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + this->servant_->allPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:192 + +void POA_benchmark::Put::allPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static size_t const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static size_t const nargs = 4; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + allPorts_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< CORBA::Char *, TAO::SArg_Traits< CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_benchmark::Put::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _is_a_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_benchmark::Put::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _non_existent_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:393 + + + +void POA_benchmark::Put::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW (CORBA::INTF_REPOS (CORBA::OMGVMCID | 1, + CORBA::COMPLETED_NO)); + } + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW (CORBA::MARSHAL ()); + } +} + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; + +} +void POA_benchmark::Put::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ + + +#if TAO_HAS_INTERCEPTORS == 1 + static CORBA::TypeCode_ptr const * const exceptions = 0; + static size_t const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _get_component_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + +} + +CORBA::Boolean POA_benchmark::Put::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_benchmark::Put::_interface_repository_id (void) const +{ + return "IDL:benchmark/Put:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:794 + +void POA_benchmark::Put::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:745 + +benchmark::Put * +POA_benchmark::Put::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::benchmark::Put STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/versuch3/benchS.h b/quellcode/versuch3/benchS.h new file mode 100755 index 0000000..54ebcfe --- /dev/null +++ b/quellcode/versuch3/benchS.h @@ -0,0 +1,209 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:380 + +#ifndef _TAO_IDL_BENCHS_H_ +#define _TAO_IDL_BENCHS_H_ + + +#include "benchC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class Put; + typedef Put *Put_ptr; + + + class Put + : public virtual PortableServer::ServantBase + { + protected: + Put (void); + + public: + // Useful for template programming. + typedef ::benchmark::Put _stub_type; + typedef ::benchmark::Put_ptr _stub_ptr_type; + typedef ::benchmark::Put_var _stub_var_type; + + Put (const Put& rhs); + virtual ~Put (void); + + virtual CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest &req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest &req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::benchmark::Put *_this ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void onePort_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void allPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:976 + +#include "benchS_T.h" + +#if defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* defined INLINE */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch3/benchS.inl b/quellcode/versuch3/benchS.inl new file mode 100755 index 0000000..c944d80 --- /dev/null +++ b/quellcode/versuch3/benchS.inl @@ -0,0 +1,27 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + diff --git a/quellcode/versuch3/benchS_T.cpp b/quellcode/versuch3/benchS_T.cpp new file mode 100755 index 0000000..7827f16 --- /dev/null +++ b/quellcode/versuch3/benchS_T.cpp @@ -0,0 +1,41 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:662 + +#ifndef _TAO_IDL_BENCHS_T_CPP_ +#define _TAO_IDL_BENCHS_T_CPP_ + +#include "benchS_T.h" + +#if !defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/versuch3/benchS_T.h b/quellcode/versuch3/benchS_T.h new file mode 100755 index 0000000..de15035 --- /dev/null +++ b/quellcode/versuch3/benchS_T.h @@ -0,0 +1,155 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:525 + +#ifndef _TAO_IDL_BENCHS_T_H_ +#define _TAO_IDL_BENCHS_T_H_ + + + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_benchmark +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class Put_tie : public Put + { + public: + Put_tie (T &t); + // the T& ctor + Put_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + Put_tie (T *tp, CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + Put_tie ( + T *tp, + PortableServer::POA_ptr poa, + CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~Put_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner (CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + CORBA::Boolean rel_; + + // copy and assignment are not allowed + Put_tie (const Put_tie &); + void operator= (const Put_tie &); + }; +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1073 + +#if defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "benchS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("benchS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch3/benchS_T.inl b/quellcode/versuch3/benchS_T.inl new file mode 100755 index 0000000..5ab6a94 --- /dev/null +++ b/quellcode/versuch3/benchS_T.inl @@ -0,0 +1,177 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T *tp, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_benchmark::Put_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_tied_object (T *obj, CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE CORBA::Boolean +POA_benchmark::Put_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_is_owner (CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_benchmark::Put_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (!CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->Put::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->onePort ( + portNo, + value + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->allPorts ( + valPort1, + valPort2, + valPort3 + ); +} + diff --git a/quellcode/versuch3/bench_i.cpp b/quellcode/versuch3/bench_i.cpp new file mode 100755 index 0000000..d21ff47 --- /dev/null +++ b/quellcode/versuch3/bench_i.cpp @@ -0,0 +1,84 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "bench_i.h" + +// Implementation skeleton constructor +benchmark_Put_i::benchmark_Put_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_Put_i::~benchmark_Put_i (void) +{ +} + +void benchmark_Put_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_Put_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(portNo, value); +} + +void benchmark_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); +} + + diff --git a/quellcode/versuch3/bench_i.h b/quellcode/versuch3/bench_i.h new file mode 100755 index 0000000..e89c864 --- /dev/null +++ b/quellcode/versuch3/bench_i.h @@ -0,0 +1,86 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" +#include "cpx.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_Put_i + : public virtual POA_benchmark::Put +{ +public: + // Constructor + benchmark_Put_i (void); + + // Destructor + virtual ~benchmark_Put_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +private: + CPX* cpx; +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch3/benchmark.mpc b/quellcode/versuch3/benchmark.mpc new file mode 100755 index 0000000..13eb950 --- /dev/null +++ b/quellcode/versuch3/benchmark.mpc @@ -0,0 +1,23 @@ +project(*Receiver): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + bench_i.cpp + Receiver.cpp + } + Header_Files { + cpx.h + } +} + +project(*Supplier): rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + bench_i.cpp + Supplier.cpp + } + Header_Files { + cpx.h + } +} diff --git a/quellcode/versuch3/buildNcopy b/quellcode/versuch3/buildNcopy new file mode 100755 index 0000000..6b29778 --- /dev/null +++ b/quellcode/versuch3/buildNcopy @@ -0,0 +1,2 @@ +#!/bin/bash +make static_libs=1 shared_libs_only=0 static_libs_only=1 -f GNUmakefile.Benchmark_Receiver && make static_libs=1 shared_libs_only=0 static_libs_only=1 -f GNUmakefile.Benchmark_Supplier && scp Receiver root@136.230.189.129:/opt/acetao/tests && scp Supplier root@136.230.189.135:/opt/acetao/tests diff --git a/quellcode/versuch3/burner b/quellcode/versuch3/burner Binary files differnew file mode 100755 index 0000000..7914765 --- /dev/null +++ b/quellcode/versuch3/burner diff --git a/quellcode/versuch3/cpx.cpp b/quellcode/versuch3/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/versuch3/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + /* setup signal on interrupt */ + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cout<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cout<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } + + return (short) value; +} + +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/versuch3/cpx.h b/quellcode/versuch3/cpx.h new file mode 100755 index 0000000..7b4545a --- /dev/null +++ b/quellcode/versuch3/cpx.h @@ -0,0 +1,73 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00
+#define PORT2_IN 0x6c00
+#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch3/howto b/quellcode/versuch3/howto new file mode 100755 index 0000000..74992c2 --- /dev/null +++ b/quellcode/versuch3/howto @@ -0,0 +1,230 @@ +Quick RTCORBA - Client - Server - HOWTO (ACE/TAO) +================================================= + +1.) define Interface (hosted Objects) + +create file interface.idl: + +----// interface.idl //---------------------------------------- + +module benchmark{ + + exception invalidRequest{}; + + struct dataStruct{ + string data; + short valPort1; + short valPort2; + short valPort3; + }; + + interface Put{ + void connect() raises(invalidRequest); + void onePort(in short portNo, in short value) raises(invalidRequest); + void allPorts( in short valPort1, + in short valPort2, + in short valPort3) raises(invalidRequest); + + void dataAndPorts( in dataStruct data) raises(invalidRequest); + }; +}; + +---------------------------------------------------------------------- + +2.) generate implementation files + +tao_idl -GI interface.idl + +3.) rename implementation files + +mv interfaceI.h interface_i.h +mv interfaceI.cpp interface_i.cpp + +4.) change interfaceI.h include in interface_i.cpp in interface_i.h + +5.) implement functionality of hosted objects into interface_i.cpp + +6.) write RTCORBA Server + +----// Server.cpp //---------------------------------------------------- + +include "interface_i.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +#include <iostream> + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create Policy + CORBA::PolicyList benchPolicy(1); + benchPolicy.length(1); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, 9879 /*Priority*/ ); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create the servant + benchmark_Put_i bench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + namingContext->bind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy ORB + rootPOA->destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + } + return 0; +} + +--------------------------------------------------------------------------- + +7.) write RTCORBA Client + +---// Client.cpp //-------------------------------------------------------- + +#include <iostream> +#include "interfaceC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +#include "cpx.h" + +benchmark::Put_var put; +CPX cpx; + +int main(int argc, char* argv[]){ + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + CosNaming::Name name(1); + name.length(1); + + name[0].id = CORBA::string_dup("Receiver"); + + // receive Object + CORBA::Object_var benchObj = namingContext->resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<<std::endl; + + // rtCurrent set priority + CORBA::Object_var rtCurrentObj = orb->resolve_initial_references("RTCurrent"); + RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + rtCurrent->the_priority(RTCORBA::maxPriority); + std::cout<<"PriorityChange ok"<<std::endl; + + // Input auf Interface schreiben (use Object hosted by Server) + put->connect(); + put->allPorts(0, 0, 0); + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} + +-------------------------------------------------------------------------- + +8.) define MakeProjectCreator file + +---// project.mpc //------------------------------------------------------ + +project(Server): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + interfaceI.cpp + Server.cpp + } + Header_Files { + cpx.h + } +} + +project(Client): rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + interfaceC.cpp + Client.cpp + } + Header_Files { + cpx.h + } +} + +---------------------------------------------------------------------------- + +9.) generate GNUMakefiles + +mpc.pl -type gnuace project.mpc + +10.) build Client & Server + +make -f GNUMakefile_Client && make -f GNUMakefile_Server + +11.) start NamingService + +$ACE_ROOT/TAO/orbsvcs/Naming_Service/Naming_Service -m1 orbendpoint localhost:1234 + +12.) start Server + +./Server + +13.) start Client + +./Client diff --git a/quellcode/versuch3/multithreading/ReceiverDual.cpp b/quellcode/versuch3/multithreading/ReceiverDual.cpp new file mode 100755 index 0000000..91f02f2 --- /dev/null +++ b/quellcode/versuch3/multithreading/ReceiverDual.cpp @@ -0,0 +1,123 @@ +#include <iostream> +#include <stdio.h> + + +//#include <asm/irq.h> + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +COBA::ULong static_threads = 2; +long nap_time = 1000; + +int registerServant(CORBA::Policy_ptr threadpoolPolicy, const char* poaName, PortableServer::POAManager_ptr poaManager, PortableServer::POA_ptr rootPOA, CORBA::ORB_ptr orb, RTCORBA::RTORB rtORB) { + return 0; +} + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // Network Settings + CORBA::Long sendBufferSize = 0; + CORBA::Long recvBufferSize = 0; + CORBA::Boolean keepAlive = 1; + CORBA::Boolean dontRoute = 1; + CORBA::Boolean noDelay = 1; + + RTCORBA::TCPProtocolProperties_var tcpProperties = rtORB->create_tcp_protocol_properties( + sendBufferSize, recvBufferSize, keepAlive, dontRoute, noDelay, 1 /*network priority*/); + + tcpProperties->enable_network_priority(1); + + RTCORBA::ProtocolList protocols; + protocols.length(1); + protocols[0].protocol_type = 0; //TAO_TAG_IIOP_PROFILE; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate(tcpProperties.in()); + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create high Priority Policy + CORBA::PolicyList benchPolicy(2); + benchPolicy.length(2); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::maxPriority); + benchPolicy[1] = rtORB->create_server_protocol_policy(protocols); + + //// create low Priority Policy + CORBA::PolicyList benchLowPolicy(2); + benchLowPolicy.length(2); + benchLowPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::minPriority); + benchLowPolicy[1] = rtORB->create_server_protocol_policy(protocols); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create 2nd ObjectAdapter, assign low priority Policy + PortableServer::POA_var benchLowPOA = rootPOA->create_POA("benchLowPOA", poaManager.in(), benchLowPolicy); + + // create the servant + benchmark_PutHigh_i bench_i; + benchmark_PutLow_i lowBench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + + PortableServer::ObjectId_var objectLowID = benchLowPOA->activate_object(&lowBench_i); + CORBA::Object_var lowBenchObj = benchLowPOA->id_to_reference(objectLowID.in()); + CORBA::String_var ior2 = orb->object_to_string(lowBenchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("HighReceiver"); + namingContext->bind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + name[0].id = CORBA::string_dup("LowReceiver"); + namingContext->bind(name, lowBenchObj.in()); + std::cout<<"Bound LowReceiver to NameService"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy + rootPOA->destroy(1,1); + orb->destroy(); + //enable_irq(18); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + //enable_irq(18); + } + return 0; +} + diff --git a/quellcode/versuch3/multithreading/SupplierHigh.cpp b/quellcode/versuch3/multithreading/SupplierHigh.cpp new file mode 100755 index 0000000..f159173 --- /dev/null +++ b/quellcode/versuch3/multithreading/SupplierHigh.cpp @@ -0,0 +1,126 @@ +#include <iostream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "cpx.h" + +//benchmark::Put_var put; +benchmark::PutHigh_var highPut; +CPX cpx; + +void sigproc(int signo) +{ signal(SIGRTMIN+29, sigproc); +// int i1 = cpx.get(1); +// int i2 /*= cpx.get(2)*/; +// int i3 /*= cpx.get(3)*/; +// put->allPorts(i1, i2, i3); + highPut->onePort(1, cpx.get(1)); +// put->allPorts(cpx.get(1), -1, -1); +// put->onePort(3, cpx.get(3)); +} + + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "Client2ORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // Network Settings + CORBA::Long sendBufferSize = 0; + CORBA::Long recvBufferSize = 0; + CORBA::Boolean keepAlive = 1; + CORBA::Boolean dontRoute = 1; + CORBA::Boolean noDelay = 1; + + RTCORBA::TCPProtocolProperties_var tcpProperties = rtORB->create_tcp_protocol_properties( + sendBufferSize, recvBufferSize, keepAlive, dontRoute, noDelay, RTCORBA::maxPriority /*network priority*/); + + tcpProperties->enable_network_priority(1); + + RTCORBA::ProtocolList protocols; + protocols.length(1); + protocols[0].protocol_type = 0; //TAO_TAG_IIOP_PROFILE; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate(tcpProperties.in()); + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + // receive Objects + CosNaming::Name name(1); + name.length(1); + +// name[0].id = CORBA::string_dup("Receiver"); +// CORBA::Object_var benchObj = namingContext->resolve(name); +// put = benchmark::Put::_narrow(benchObj.in()); + + name[0].id = CORBA::string_dup("HighReceiver"); + CORBA::Object_var lowBenchObj = namingContext->resolve(name); + highPut = benchmark::PutHigh::_narrow(lowBenchObj.in()); + + std::cout<<"TransferOjekt ok"<<std::endl; + + // Private Connection Policy + CORBA::PolicyList pcPolicy(2); + pcPolicy.length(2); + pcPolicy[0] = rtORB->create_private_connection_policy(); + pcPolicy[1] = rtORB->create_client_protocol_policy(protocols); + + CORBA::Object_var newTran = highPut->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + highPut = benchmark::PutHigh::_narrow(newTran.in()); + highPut = benchmark::PutHigh::_narrow(newTran.in()); + std::cout<<"PrivateConnection, RTProtocol ok"<<std::endl; + + // rtCurrent set priority + //CORBA::Object_var rtCurrentObj = orb->resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<<std::endl; + + // explicitly bind connection to server + //CORBA::PolicyList_var inconsistentPolicies; + //CORBA::Boolean status = transfer->_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<<std::endl; + + // Input auf Interface schreiben + // ... + highPut->connect(); + //lowPut->connect(); + highPut->allPorts(0, 0, 0); + sleep(1); + highPut->onePort(1, 255); + sleep(1); + highPut->allPorts(0, 0, 0); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true){ + pause(); + } + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch3/multithreading/SupplierLow.cpp b/quellcode/versuch3/multithreading/SupplierLow.cpp new file mode 100755 index 0000000..47ae343 --- /dev/null +++ b/quellcode/versuch3/multithreading/SupplierLow.cpp @@ -0,0 +1,126 @@ +#include <iostream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "cpx.h" + +//benchmark::Put_var put; +benchmark::PutLow_var lowPut; +CPX cpx; + +void sigproc(int signo) +{ signal(SIGRTMIN+29, sigproc); +// int i1 = cpx.get(1); +// int i2 /*= cpx.get(2)*/; +// int i3 /*= cpx.get(3)*/; +// put->allPorts(i1, i2, i3); + lowPut->onePort(3, cpx.get(1)); +// put->allPorts(cpx.get(1), -1, -1); +// put->onePort(3, cpx.get(3)); +} + + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // Network Settings + CORBA::Long sendBufferSize = 0; + CORBA::Long recvBufferSize = 0; + CORBA::Boolean keepAlive = 1; + CORBA::Boolean dontRoute = 1; + CORBA::Boolean noDelay = 1; + + RTCORBA::TCPProtocolProperties_var tcpProperties = rtORB->create_tcp_protocol_properties( + sendBufferSize, recvBufferSize, keepAlive, dontRoute, noDelay, RTCORBA::maxPriority /*network priority*/); + + tcpProperties->enable_network_priority(1); + + RTCORBA::ProtocolList protocols; + protocols.length(1); + protocols[0].protocol_type = 0; //TAO_TAG_IIOP_PROFILE; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate(tcpProperties.in()); + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + // receive Objects + CosNaming::Name name(1); + name.length(1); + +// name[0].id = CORBA::string_dup("Receiver"); +// CORBA::Object_var benchObj = namingContext->resolve(name); +// put = benchmark::Put::_narrow(benchObj.in()); + + name[0].id = CORBA::string_dup("LowReceiver"); + CORBA::Object_var lowBenchObj = namingContext->resolve(name); + lowPut = benchmark::PutLow::_narrow(lowBenchObj.in()); + + std::cout<<"TransferOjekt ok"<<std::endl; + + // Private Connection Policy + CORBA::PolicyList pcPolicy(2); + pcPolicy.length(2); + pcPolicy[0] = rtORB->create_private_connection_policy(); + pcPolicy[1] = rtORB->create_client_protocol_policy(protocols); + + CORBA::Object_var newTran = lowPut->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + lowPut = benchmark::PutLow::_narrow(newTran.in()); + lowPut = benchmark::PutLow::_narrow(newTran.in()); + std::cout<<"PrivateConnection, RTProtocol ok"<<std::endl; + + // rtCurrent set priority + //CORBA::Object_var rtCurrentObj = orb->resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<<std::endl; + + // explicitly bind connection to server + //CORBA::PolicyList_var inconsistentPolicies; + //CORBA::Boolean status = transfer->_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<<std::endl; + + // Input auf Interface schreiben + // ... + lowPut->connect(); + //lowPut->connect(); + lowPut->allPorts(0, 0, 0); + sleep(1); + lowPut->onePort(1, 255); + sleep(1); + lowPut->allPorts(0, 0, 0); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true){ + pause(); + } + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch3/multithreading/benchDual.mpc b/quellcode/versuch3/multithreading/benchDual.mpc new file mode 100755 index 0000000..44c2102 --- /dev/null +++ b/quellcode/versuch3/multithreading/benchDual.mpc @@ -0,0 +1,35 @@ +project(*ReceiverDual): strategies, rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchI.cpp + ReceiverDual.cpp + } + Header_Files { + cpx.h + } +} + +project(*SupplierLow): strategies, rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchC.cpp + SupplierLow.cpp + } + Header_Files { + cpx.h + } +} + +project(*SupplierHigh): strategies, rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchC.cpp + SupplierHigh.cpp + } + Header_Files { + cpx.h + } +}
\ No newline at end of file diff --git a/quellcode/versuch3/multithreading/benchI.cpp b/quellcode/versuch3/multithreading/benchI.cpp new file mode 100755 index 0000000..cd185c0 --- /dev/null +++ b/quellcode/versuch3/multithreading/benchI.cpp @@ -0,0 +1,137 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "benchI.h" + +// Implementation skeleton constructor +benchmark_PutLow_i::benchmark_PutLow_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_PutLow_i::~benchmark_PutLow_i (void) +{ +} + +void benchmark_PutLow_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_PutLow_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + std::string huhu = ""; + for(int i=0; i<65000; i++) for(int i=0; i<5000; i++) if(i%2) huhu += "a"; + cpx->set(portNo, value); +} + +void benchmark_PutLow_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + if(valPort1>=0) cpx->set(1, valPort1); + if(valPort2>=0) cpx->set(2, valPort2); + if(valPort3>=0) cpx->set(3, valPort3); +} + +// Implementation skeleton constructor +benchmark_PutHigh_i::benchmark_PutHigh_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_PutHigh_i::~benchmark_PutHigh_i (void) +{ +} + +void benchmark_PutHigh_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_PutHigh_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(portNo, value); +} + +void benchmark_PutHigh_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + if(valPort1>=0) cpx->set(1, valPort1); + if(valPort2>=0) cpx->set(2, valPort2); + if(valPort3>=0) cpx->set(3, valPort3); +} + + diff --git a/quellcode/versuch3/multithreading/benchI.h b/quellcode/versuch3/multithreading/benchI.h new file mode 100755 index 0000000..fb33928 --- /dev/null +++ b/quellcode/versuch3/multithreading/benchI.h @@ -0,0 +1,130 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" +#include "cpx.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_PutLow_i + : public virtual POA_benchmark::PutLow +{ +private: + CPX* cpx; +public: + // Constructor + benchmark_PutLow_i (void); + + // Destructor + virtual ~benchmark_PutLow_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + +class benchmark_PutHigh_i + : public virtual POA_benchmark::PutHigh +{ + +private: + CPX* cpx; +public: + // Constructor + benchmark_PutHigh_i (void); + + // Destructor + virtual ~benchmark_PutHigh_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch3/multithreading/cpx.cpp b/quellcode/versuch3/multithreading/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/versuch3/multithreading/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + /* setup signal on interrupt */ + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cout<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cout<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } + + return (short) value; +} + +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/versuch3/multithreading/cpx.h b/quellcode/versuch3/multithreading/cpx.h new file mode 100755 index 0000000..7b4545a --- /dev/null +++ b/quellcode/versuch3/multithreading/cpx.h @@ -0,0 +1,73 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00
+#define PORT2_IN 0x6c00
+#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch3/multithreading/svc.conf b/quellcode/versuch3/multithreading/svc.conf new file mode 100755 index 0000000..ab151ce --- /dev/null +++ b/quellcode/versuch3/multithreading/svc.conf @@ -0,0 +1,2 @@ +static Resource_Factory "-ORBResources global -ORBReactorType select_mt" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection" diff --git a/quellcode/versuch3/myBurner.cpp b/quellcode/versuch3/myBurner.cpp new file mode 100755 index 0000000..318b9c8 --- /dev/null +++ b/quellcode/versuch3/myBurner.cpp @@ -0,0 +1,13 @@ +#include <iostream> +#include <stdio.h> + +int foo(int what){ + if(what == 1) return 1; + int fac = what * foo(what-1); + return fac; +} + +int main(){ + while(1) foo(33); + return 0; +} diff --git a/quellcode/versuch3/readme b/quellcode/versuch3/readme new file mode 100755 index 0000000..e331092 --- /dev/null +++ b/quellcode/versuch3/readme @@ -0,0 +1,65 @@ +CPU Burn-in README +------------------ + +What is CPU Burn-in? +------------------- + +CPU Burn-in v1.0 by Michal Mienik is the ultimate stability testing tool for overclockers. +The program heats up any x86 CPU to the maximum possible operating temperature that is achievable +by using ordinary software. This allows the user to adjust the CPU speed up to the practical +maximum while still being sure that stability is achieved even under the most stressful conditions. +The program continuously monitors for erroneous calculations ensuring the CPU does not +generate errors during calculations. + + +Why use CPU Burn-in? +------------------- + +In the past overclocking stability was tested by running intensive software such as +Distributed.Net clients or SETI@home. Running either piece of software for 24 hours would generally +show up instability. A looping Quake3 timedemo was also a good choice. + +However, there are inherent limitations in these tests: + +Not every error caused by overclocking causes a program to crash or the system to hang. Some +errors may be more subtle, such as a slight miscalculation. If such an event occurs and causes a pixel +to render a slightly different colour in Quake3 for example, the user is unlikely to notice and overall +this is no big deal. However such small errors can have a potentially devastating on distributed projects +such as SETI@home, which rely on the reliable processing of data. + +CPU Burn-in consistently delivers a higher CPU operating temperature than the above mentioned +applications. This allows CPU Burn-in to be particularly effective at testing overclocking stability +and cooling effectiveness. + +How does it work? +---------------- + +CPU Burn-in constantly cycles FPU intensive functions for a user specified period of time. The +resultant calculations are constantly checked for data integrity. If the program detects erroneous +data the user is immediately informed. Applications such as SETI@home and Distributed.Net perform no +such data checking. The user must rely on those programs to crash or the system to hang before a +problem can be noticed. + +Instructions: +------------ + +Please Note: Overclocking can potentially be harmful to your CPU. It may fry or fail prematurely +in the long term. I cannot and will not be responsible for any damage you do to your hardware. +By it's very nature, CPU Burn-in pushes the CPU to the max. Increasing the voltage, Mhz, or PCI/AGP +above the recommended levels can cause damage. + +CPU Burn-in runs best as a high priority process on an otherwise idle system. + +Run the program with one command line value to specify the length of time to run the test: + +eg. + "./cpuburn-in 10" will run the test for ten minutes. + + +Contact: +------- + +If your system experiences instability during the burn-in test or you receive error messages it's likely +the system has been overclocked too far. + +If you believe a bug in the program has been found please email cluster2k@hotmail.com diff --git a/quellcode/versuch4/GNUmakefile.Bench_Receiver b/quellcode/versuch4/GNUmakefile.Bench_Receiver new file mode 100755 index 0000000..e56907b --- /dev/null +++ b/quellcode/versuch4/GNUmakefile.Bench_Receiver @@ -0,0 +1,224 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Receiver +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Receiver +DEPENDENCY_FILE = .depend.Bench_Receiver +BIN_UNCHECKED = Receiver + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + cpx.cpp \ + bench_i.cpp \ + Receiver.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Receiver +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp cpx.cpp bench_i.cpp Receiver.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch4/GNUmakefile.Bench_Supplier b/quellcode/versuch4/GNUmakefile.Bench_Supplier new file mode 100755 index 0000000..f24931b --- /dev/null +++ b/quellcode/versuch4/GNUmakefile.Bench_Supplier @@ -0,0 +1,221 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Supplier +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Supplier +DEPENDENCY_FILE = .depend.Bench_Supplier +BIN_UNCHECKED = Supplier + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + cpx.cpp \ + benchC.cpp \ + Supplier.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTCORBA -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Supplier +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = cpx.cpp benchC.cpp Supplier.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch4/GNUmakefile.Benchmark_Receiver b/quellcode/versuch4/GNUmakefile.Benchmark_Receiver new file mode 100755 index 0000000..52c7abe --- /dev/null +++ b/quellcode/versuch4/GNUmakefile.Benchmark_Receiver @@ -0,0 +1,226 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Benchmark_Receiver +# +# $Id: gnu.mpd,v 1.1.1.2.2.23 2006/03/15 18:51:41 elliottc Exp $ +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Benchmark_Receiver +DEPENDENCY_FILE = .depend.Benchmark_Receiver +BIN_UNCHECKED = Receiver + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + cpx.cpp \ + bench_i.cpp \ + Receiver.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Sc -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +ifeq ($(versioned_so),1) +SOVERSION = .1.4a.10 +endif + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Benchmark_Receiver +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp cpx.cpp bench_i.cpp Receiver.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch4/GNUmakefile.Benchmark_Supplier b/quellcode/versuch4/GNUmakefile.Benchmark_Supplier new file mode 100755 index 0000000..2954847 --- /dev/null +++ b/quellcode/versuch4/GNUmakefile.Benchmark_Supplier @@ -0,0 +1,226 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Benchmark_Supplier +# +# $Id: gnu.mpd,v 1.1.1.2.2.23 2006/03/15 18:51:41 elliottc Exp $ +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Benchmark_Supplier +DEPENDENCY_FILE = .depend.Benchmark_Supplier +BIN_UNCHECKED = Supplier + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + cpx.cpp \ + bench_i.cpp \ + Supplier.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTCORBA -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Sc -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +ifeq ($(versioned_so),1) +SOVERSION = .1.4a.10 +endif + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Benchmark_Supplier +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTCORBA TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTCORBA TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchC.inl benchS.inl benchC.h benchS.h benchC.cpp benchS.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp cpx.cpp bench_i.cpp Supplier.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTCORBA TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch4/Receiver b/quellcode/versuch4/Receiver Binary files differnew file mode 100755 index 0000000..c34b7af --- /dev/null +++ b/quellcode/versuch4/Receiver diff --git a/quellcode/versuch4/Receiver.cpp b/quellcode/versuch4/Receiver.cpp new file mode 100755 index 0000000..5a0b880 --- /dev/null +++ b/quellcode/versuch4/Receiver.cpp @@ -0,0 +1,67 @@ +#include <iostream> + +#include "bench_i.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create Policy + CORBA::PolicyList benchPolicy(1); + benchPolicy.length(1); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, 20); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create the servant + benchmark_Put_i bench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + namingContext->bind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy + rootPOA->destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + } + return 0; +} + diff --git a/quellcode/versuch4/Supplier b/quellcode/versuch4/Supplier Binary files differnew file mode 100755 index 0000000..43e6a48 --- /dev/null +++ b/quellcode/versuch4/Supplier diff --git a/quellcode/versuch4/Supplier.cpp b/quellcode/versuch4/Supplier.cpp new file mode 100755 index 0000000..833b80d --- /dev/null +++ b/quellcode/versuch4/Supplier.cpp @@ -0,0 +1,106 @@ +#include <iostream> +#include <fstream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "cpx.h" + +benchmark::Put_var put; +CPX cpx; +std::string strData; + +void sigproc(int signo) +{ signal(SIGRTMIN+29, sigproc); + benchmark::dataStruct_var data = new benchmark::dataStruct; + data->data = CORBA::string_alloc(sizeof(strData)); + data->data = CORBA::string_dup((const char*)strData.c_str()); + data->valPort1 = cpx.get(1); + data->valPort2 = cpx.get(2); + data->valPort3 = cpx.get(3); + put->dataAndPorts(data); +} + + +int main(int argc, char* argv[]){ + + if (argc < 2){ + std::cout<<"enter filename as param1\n"; + return 0; + } + + std::string line; + std::ifstream infile (argv[1], std::ios_base::in); + while (getline(infile, line, '\n')) + { + strData += line; + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + + // receive Object + CORBA::Object_var benchObj = namingContext->resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<<std::endl; + + // Private Connection Policy + CORBA::PolicyList pcPolicy(1); + pcPolicy.length(1); + pcPolicy[0] = rtORB->create_private_connection_policy(); + CORBA::Object_var newTran = put->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + put = benchmark::Put::_narrow(newTran.in()); + std::cout<<"PrivateConnection ok"<<std::endl; + + // rtCurrent set priority + CORBA::Object_var rtCurrentObj = orb->resolve_initial_references("RTCurrent"); + RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + rtCurrent->the_priority(0); + std::cout<<"PriorityChange ok"<<std::endl; + + // explicitly bind connection to server + //CORBA::PolicyList_var inconsistentPolicies; + //CORBA::Boolean status = transfer->_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<<std::endl; + + // Input auf Interface schreiben + // ... + // put->connect(); + // put->allPorts(0, 0, 0); + // sleep(1); + // put->onePort(1, 255); + // sleep(1); + // put->allPorts(0, 0, 0); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true){ + pause(); + } + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch4/bench.idl b/quellcode/versuch4/bench.idl new file mode 100755 index 0000000..d5808dd --- /dev/null +++ b/quellcode/versuch4/bench.idl @@ -0,0 +1,21 @@ +module benchmark{ + + exception invalidRequest{}; + + struct dataStruct{ + string data; + short valPort1; + short valPort2; + short valPort3; + }; + + interface Put{ + void connect() raises(invalidRequest); + void onePort(in short portNo, in short value) raises(invalidRequest); + void allPorts( in short valPort1, + in short valPort2, + in short valPort3) raises(invalidRequest); + + void dataAndPorts( in dataStruct data) raises(invalidRequest); + }; +}; diff --git a/quellcode/versuch4/bench.mpc b/quellcode/versuch4/bench.mpc new file mode 100755 index 0000000..47ff6de --- /dev/null +++ b/quellcode/versuch4/bench.mpc @@ -0,0 +1,23 @@ +project(*Receiver): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + bench_i.cpp + Receiver.cpp + } + Header_Files { + cpx.h + } +} + +project(*Supplier): rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchC.cpp + Supplier.cpp + } + Header_Files { + cpx.h + } +} diff --git a/quellcode/versuch4/benchC.cpp b/quellcode/versuch4/benchC.cpp new file mode 100755 index 0000000..2fe4ec9 --- /dev/null +++ b/quellcode/versuch4/benchC.cpp @@ -0,0 +1,1062 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:283 + + +#include "benchC.h" +#include "tao/AnyTypeCode/Null_RefCount_Policy.h" +#include "tao/AnyTypeCode/TypeCode_Constants.h" +#include "tao/AnyTypeCode/Alias_TypeCode_Static.h" +#include "tao/AnyTypeCode/Objref_TypeCode_Static.h" +#include "tao/AnyTypeCode/String_TypeCode_Static.h" +#include "tao/AnyTypeCode/Struct_TypeCode_Static.h" +#include "tao/AnyTypeCode/TypeCode_Struct_Field.h" +#include "tao/CDR.h" +#include "tao/Exception_Data.h" +#include "tao/Invocation_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/Any.h" +#include "tao/AnyTypeCode/Any_Impl_T.h" +#include "tao/AnyTypeCode/Any_Dual_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "tao/Var_Size_Argument_T.h" +#include "ace/OS_NS_string.h" + +#if !defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ + + // TAO_IDL - Generated from + // be/be_visitor_arg_traits.cpp:893 + +#if !defined (_BENCHMARK_DATASTRUCT__ARG_TRAITS_) +#define _BENCHMARK_DATASTRUCT__ARG_TRAITS_ + + template<> + class Arg_Traits<benchmark::dataStruct> + : public + Var_Size_Arg_Traits_T< + benchmark::dataStruct, + benchmark::dataStruct_var, + benchmark::dataStruct_out, + TAO::Any_Insert_Policy_Stream <benchmark::dataStruct> + > + { + }; + +#endif /* end #if !defined */ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/exception_cs.cpp:63 + +benchmark::invalidRequest::invalidRequest (void) + : ::CORBA::UserException ( + "IDL:benchmark/invalidRequest:1.0", + "invalidRequest" + ) +{ +} + +benchmark::invalidRequest::~invalidRequest (void) +{ +} + +benchmark::invalidRequest::invalidRequest (const ::benchmark::invalidRequest &_tao_excp) + : ::CORBA::UserException ( + _tao_excp._rep_id (), + _tao_excp._name () + ) +{ +} + +benchmark::invalidRequest& +benchmark::invalidRequest::operator= (const ::benchmark::invalidRequest &_tao_excp) +{ + this->ACE_NESTED_CLASS ( ::CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void benchmark::invalidRequest::_tao_any_destructor (void *_tao_void_pointer) +{ + invalidRequest *_tao_tmp_pointer = + static_cast<invalidRequest *> (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception *_tao_excp) +{ + return dynamic_cast<invalidRequest *> (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception const *_tao_excp) +{ + return dynamic_cast<const invalidRequest *> (_tao_excp); +} + +::CORBA::Exception *benchmark::invalidRequest::_alloc (void) +{ + ::CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::benchmark::invalidRequest, 0); + return retval; +} + +::CORBA::Exception * +benchmark::invalidRequest::_tao_duplicate (void) const +{ + ::CORBA::Exception *result = 0; + ACE_NEW_RETURN ( + result, + ::benchmark::invalidRequest (*this), + 0 + ); + return result; +} + +void benchmark::invalidRequest::_raise (void) const +{ + TAO_RAISE (*this); +} + +void benchmark::invalidRequest::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW ( ::CORBA::MARSHAL ()); +} + +void benchmark::invalidRequest::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW ( ::CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +::CORBA::TypeCode_ptr benchmark::invalidRequest::_tao_type (void) const +{ + return ::benchmark::_tc_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/struct_typecode.cpp:89 + +static TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const * const _tao_fields_benchmark_invalidRequest = 0; +static TAO::TypeCode::Struct<char const *, + ::CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_invalidRequest ( + ::CORBA::tk_except, + "IDL:benchmark/invalidRequest:1.0", + "invalidRequest", + _tao_fields_benchmark_invalidRequest, + 0); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_invalidRequest = + &_tao_tc_benchmark_invalidRequest; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_typecode/struct_typecode.cpp:89 + +static TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const _tao_fields_benchmark_dataStruct[] = + { + { "data", &CORBA::_tc_string }, + { "valPort1", &CORBA::_tc_short }, + { "valPort2", &CORBA::_tc_short }, + { "valPort3", &CORBA::_tc_short } + + }; +static TAO::TypeCode::Struct<char const *, + ::CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_dataStruct ( + ::CORBA::tk_struct, + "IDL:benchmark/dataStruct:1.0", + "dataStruct", + _tao_fields_benchmark_dataStruct, + 4); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_dataStruct = + &_tao_tc_benchmark_dataStruct; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/structure_cs.cpp:66 + +void +benchmark::dataStruct::_tao_any_destructor ( + void *_tao_void_pointer + ) +{ + dataStruct *_tao_tmp_pointer = + static_cast<dataStruct *> (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for benchmark::Put. + +benchmark::Put_ptr +TAO::Objref_Traits<benchmark::Put>::duplicate ( + benchmark::Put_ptr p + ) +{ + return benchmark::Put::_duplicate (p); +} + +void +TAO::Objref_Traits<benchmark::Put>::release ( + benchmark::Put_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::Put_ptr +TAO::Objref_Traits<benchmark::Put>::nil (void) +{ + return benchmark::Put::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<benchmark::Put>::marshal ( + const benchmark::Put_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_benchmark_Put_connect_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo (portNo); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_value (value); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_portNo, + &_tao_value + }; + + static TAO::Exception_Data + _tao_benchmark_Put_onePort_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 3, + "onePort", + 7, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_onePort_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static TAO::Exception_Data + _tao_benchmark_Put_allPorts_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "allPorts", + 8, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_allPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::Put::dataAndPorts ( + const ::benchmark::dataStruct & data + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_Put_Proxy_Broker_ == 0) + { + benchmark_Put_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::benchmark::dataStruct>::in_arg_val _tao_data (data); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_data + }; + + static TAO::Exception_Data + _tao_benchmark_Put_dataAndPorts_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 2, + "dataAndPorts", + 12, + this->the_TAO_Put_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_Put_dataAndPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +benchmark::Put::Put (void) + : the_TAO_Put_Proxy_Broker_ (0) +{ + this->benchmark_Put_setup_collocation (); +} + +void +benchmark::Put::benchmark_Put_setup_collocation () +{ + if (::benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_Put_Proxy_Broker_ = + ::benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer (this); + } +} + +benchmark::Put::~Put (void) +{} + +void +benchmark::Put::_tao_any_destructor (void *_tao_void_pointer) +{ + Put *_tao_tmp_pointer = + static_cast<Put *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +benchmark::Put_ptr +benchmark::Put::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::narrow ( + _tao_objref, + "IDL:benchmark/Put:1.0", + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::Put_ptr +benchmark::Put::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<Put>::unchecked_narrow ( + _tao_objref, + "IDL:benchmark/Put:1.0", + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::Put_ptr +benchmark::Put::_duplicate (Put_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +benchmark::Put::_tao_release (Put_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +benchmark::Put::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* benchmark::Put::_interface_repository_id (void) const +{ + return "IDL:benchmark/Put:1.0"; +} + +::CORBA::Boolean +benchmark::Put::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_Put ( + ::CORBA::tk_objref, + "IDL:benchmark/Put:1.0", + "Put"); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_Put = + &_tao_tc_benchmark_Put; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_cs.cpp:50 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Dual_Impl_T<benchmark::invalidRequest>::demarshal_value ( + TAO_InputCDR & cdr + ) + { + ::CORBA::String_var id; + + if (!(cdr >> id.out ())) + { + return false; + } + + ACE_TRY_NEW_ENV + { + this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return false; + } + ACE_ENDTRY; + + return true; + } +} + +// Copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + const benchmark::invalidRequest &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert_copy ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::invalidRequest *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::invalidRequest *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const benchmark::invalidRequest *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + const benchmark::invalidRequest *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::extract ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/any_op_cs.cpp:54 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +// Copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + const benchmark::dataStruct &_tao_elem + ) +{ + if (0 == &_tao_elem) // Trying to de-reference NULL object + _tao_any <<= static_cast<benchmark::dataStruct *>( 0 ); // Use non-copying insertion of a NULL + else + TAO::Any_Dual_Impl_T<benchmark::dataStruct>::insert_copy ( + _tao_any, + benchmark::dataStruct::_tao_any_destructor, + benchmark::_tc_dataStruct, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::dataStruct *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::dataStruct>::insert ( + _tao_any, + benchmark::dataStruct::_tao_any_destructor, + benchmark::_tc_dataStruct, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::dataStruct *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const benchmark::dataStruct *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + const benchmark::dataStruct *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<benchmark::dataStruct>::extract ( + _tao_any, + benchmark::dataStruct::_tao_any_destructor, + benchmark::_tc_dataStruct, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<benchmark::Put>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Put_ptr _tao_elem + ) + { + Put_ptr _tao_objptr = + Put::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + Put_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<Put>::insert ( + _tao_any, + Put::_tao_any_destructor, + _tc_Put, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + Put_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<Put>::extract ( + _tao_any, + Put::_tao_any_destructor, + _tc_Put, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::Put_ptr _tao_elem + ) +{ + benchmark::Put_ptr _tao_objptr = + benchmark::Put::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::Put_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<benchmark::Put>::insert ( + _tao_any, + benchmark::Put::_tao_any_destructor, + benchmark::_tc_Put, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::Put_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<benchmark::Put>::extract ( + _tao_any, + benchmark::Put::_tao_any_destructor, + benchmark::_tc_Put, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_cs.cpp:60 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::invalidRequest &_tao_aggregate + ) +{ + // Marshal the repository ID. + return (strm << _tao_aggregate._rep_id ()); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &, + benchmark::invalidRequest& + ) +{ + return true; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/cdr_op_cs.cpp:61 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::dataStruct &_tao_aggregate + ) +{ + return + (strm << _tao_aggregate.data.in ()) && + (strm << _tao_aggregate.valPort1) && + (strm << _tao_aggregate.valPort2) && + (strm << _tao_aggregate.valPort3); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::dataStruct &_tao_aggregate + ) +{ + return + (strm >> _tao_aggregate.data.out ()) && + (strm >> _tao_aggregate.valPort1) && + (strm >> _tao_aggregate.valPort2) && + (strm >> _tao_aggregate.valPort3); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::Put_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::Put_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::benchmark::Put RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + diff --git a/quellcode/versuch4/benchC.h b/quellcode/versuch4/benchC.h new file mode 100755 index 0000000..a212253 --- /dev/null +++ b/quellcode/versuch4/benchC.h @@ -0,0 +1,469 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:155 + +#ifndef _TAO_IDL_BENCHC_H_ +#define _TAO_IDL_BENCHC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/AnyTypeCode/AnyTypeCode_methods.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Managed_Types.h" +#include "tao/Objref_VarOut_T.h" +#include "tao/VarOut_T.h" +#include "tao/Versioned_Namespace.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + class Collocation_Proxy_Broker; + template<typename T> class Narrow_Utils; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:49 + +namespace benchmark +{ + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:53 + +#if !defined (_BENCHMARK_INVALIDREQUEST_CH_) +#define _BENCHMARK_INVALIDREQUEST_CH_ + + class invalidRequest : public ::CORBA::UserException + { + public: + + invalidRequest (void); + invalidRequest (const invalidRequest &); + ~invalidRequest (void); + + invalidRequest &operator= (const invalidRequest &); + + static void _tao_any_destructor (void *); + + static invalidRequest *_downcast ( ::CORBA::Exception *); + static const invalidRequest *_downcast ( ::CORBA::Exception const *); + + static ::CORBA::Exception *_alloc (void); + + virtual ::CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void) const; + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL + ); + + virtual ::CORBA::TypeCode_ptr _tao_type (void) const; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_invalidRequest; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_type.cpp:258 + + struct dataStruct; + + typedef + TAO_Var_Var_T< + dataStruct + > + dataStruct_var; + + typedef + TAO_Out_T< + dataStruct, + dataStruct_var + > + dataStruct_out; + + // TAO_IDL - Generated from + // be/be_visitor_structure/structure_ch.cpp:57 + + struct dataStruct + { + typedef dataStruct_var _var_type; + + static void _tao_any_destructor (void *); + TAO_String_Manager data; + ::CORBA::Short valPort1; + ::CORBA::Short valPort2; + ::CORBA::Short valPort3; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_dataStruct; + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_BENCHMARK_PUT__VAR_OUT_CH_) +#define _BENCHMARK_PUT__VAR_OUT_CH_ + + class Put; + typedef Put *Put_ptr; + + typedef + TAO_Objref_Var_T< + Put + > + Put_var; + + typedef + TAO_Objref_Out_T< + Put + > + Put_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_BENCHMARK_PUT_CH_) +#define _BENCHMARK_PUT_CH_ + + class Put + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<Put>; + typedef Put_ptr _ptr_type; + typedef Put_var _var_type; + + // The static operations. + static Put_ptr _duplicate (Put_ptr obj); + + static void _tao_release (Put_ptr obj); + + static Put_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static Put_ptr _nil (void) + { + return static_cast<Put_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void dataAndPorts ( + const ::benchmark::dataStruct & data + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_Put_Proxy_Broker_; + + protected: + // Concrete interface only. + Put (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void benchmark_Put_setup_collocation (void); + + // Concrete non-local interface only. + Put ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + Put ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~Put (void); + + private: + // Private and unimplemented for concrete interfaces. + Put (const Put &); + + void operator= (const Put &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_Put; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:78 + +} // module benchmark + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:139 + +extern +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Traits specializations. +namespace TAO +{ + +#if !defined (_BENCHMARK_PUT__TRAITS_) +#define _BENCHMARK_PUT__TRAITS_ + + template<> + struct Objref_Traits< ::benchmark::Put> + { + static ::benchmark::Put_ptr duplicate ( + ::benchmark::Put_ptr + ); + static void release ( + ::benchmark::Put_ptr + ); + static ::benchmark::Put_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::benchmark::Put_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_ch.cpp:53 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + + void operator<<= (::CORBA::Any &, const benchmark::invalidRequest &); // copying version + void operator<<= (::CORBA::Any &, benchmark::invalidRequest*); // noncopying version + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::invalidRequest *&); // deprecated + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const benchmark::invalidRequest *&); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/any_op_ch.cpp:53 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, const benchmark::dataStruct &); // copying version + void operator<<= (::CORBA::Any &, benchmark::dataStruct*); // noncopying version + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::dataStruct *&); // deprecated + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const benchmark::dataStruct *&); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + void operator<<= ( ::CORBA::Any &, Put_ptr); // copying + void operator<<= ( ::CORBA::Any &, Put_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, Put_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, benchmark::Put_ptr); // copying + void operator<<= (::CORBA::Any &, benchmark::Put_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::Put_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_ch.cpp:52 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::invalidRequest &); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::invalidRequest &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/cdr_op_ch.cpp:54 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::dataStruct &); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::dataStruct &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::Put_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::Put_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1093 +#if defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + + diff --git a/quellcode/versuch4/benchC.inl b/quellcode/versuch4/benchC.inl new file mode 100755 index 0000000..ff39241 --- /dev/null +++ b/quellcode/versuch4/benchC.inl @@ -0,0 +1,64 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_BENCHMARK_PUT___CI_) +#define _BENCHMARK_PUT___CI_ + +ACE_INLINE +benchmark::Put::Put ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_Put_Proxy_Broker_ (0) +{ + this->benchmark_Put_setup_collocation (); +} + +ACE_INLINE +benchmark::Put::Put ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_Put_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + diff --git a/quellcode/versuch4/benchI.cpp b/quellcode/versuch4/benchI.cpp new file mode 100755 index 0000000..3e0c6e0 --- /dev/null +++ b/quellcode/versuch4/benchI.cpp @@ -0,0 +1,79 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:910 + +#include "benchI.h" + +// Implementation skeleton constructor +benchmark_Put_i::benchmark_Put_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_Put_i::~benchmark_Put_i (void) +{ +} + +void benchmark_Put_i::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here +} + +void benchmark_Put_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here +} + +void benchmark_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here +} + + diff --git a/quellcode/versuch4/benchI.h b/quellcode/versuch4/benchI.h new file mode 100755 index 0000000..8651c61 --- /dev/null +++ b/quellcode/versuch4/benchI.h @@ -0,0 +1,82 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:844 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_Put_i : public virtual POA_benchmark::Put, public virtual PortableServer::RefCountServantBase +{ +public: + //Constructor + benchmark_Put_i (void); + + //Destructor + virtual ~benchmark_Put_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch4/benchS.cpp b/quellcode/versuch4/benchS.cpp new file mode 100755 index 0000000..566cd91 --- /dev/null +++ b/quellcode/versuch4/benchS.cpp @@ -0,0 +1,1138 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:577 + +#ifndef _TAO_IDL_BENCHS_CPP_ +#define _TAO_IDL_BENCHS_CPP_ + + +#include "benchS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/Var_Size_SArgument_T.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/TypeCode.h" +#include "tao/AnyTypeCode/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "tao/Var_Size_Argument_T.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if !defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ + + // TAO_IDL - Generated from + // be/be_visitor_arg_traits.cpp:893 + +#if !defined (_BENCHMARK_DATASTRUCT__SARG_TRAITS_) +#define _BENCHMARK_DATASTRUCT__SARG_TRAITS_ + + template<> + class SArg_Traits<benchmark::dataStruct> + : public + Var_Size_SArg_Traits_T< + benchmark::dataStruct, + benchmark::dataStruct_var, + benchmark::dataStruct_out, + TAO::Any_Insert_Policy_Stream <benchmark::dataStruct> + > + { + }; + +#endif /* end #if !defined */ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ + + // TAO_IDL - Generated from + // be/be_visitor_arg_traits.cpp:893 + +#if !defined (_BENCHMARK_DATASTRUCT__ARG_TRAITS_) +#define _BENCHMARK_DATASTRUCT__ARG_TRAITS_ + + template<> + class Arg_Traits<benchmark::dataStruct> + : public + Var_Size_Arg_Traits_T< + benchmark::dataStruct, + benchmark::dataStruct_var, + benchmark::dataStruct_out, + TAO::Any_Insert_Policy_Stream <benchmark::dataStruct> + > + { + }; + +#endif /* end #if !defined */ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_benchmark_Put_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /opt/ACE_wrappers/1.5/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_benchmark_Put_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_benchmark_Put_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, + 18, 10, 0, 5, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 0, 0, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, +#else + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 0, 18, 0, 18, 10, + 0, 5, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 0, 18, 18, 18, 0, 0, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_benchmark_Put_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 9, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 17, + HASH_VALUE_RANGE = 13, + DUPLICATES = 0, + WORDLIST_SIZE = 14 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_benchmark::Put::_is_a_skel, 0}, + {"",0,0}, + {"onePort", &POA_benchmark::Put::onePort_skel, 0}, + {"allPorts", &POA_benchmark::Put::allPorts_skel, 0}, + {"",0,0}, + {"_component", &POA_benchmark::Put::_component_skel, 0}, + {"",0,0}, + {"dataAndPorts", &POA_benchmark::Put::dataAndPorts_skel, 0}, + {"_non_existent", &POA_benchmark::Put::_non_existent_skel, 0}, + {"_repository_id", &POA_benchmark::Put::_repository_id_skel, 0}, + {"_interface", &POA_benchmark::Put::_interface_skel, 0}, + {"",0,0}, + {"connect", &POA_benchmark::Put::connect_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_benchmark_Put_Perfect_Hash_OpTable tao_benchmark_Put_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +benchmark__TAO_Put_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +benchmark__TAO_Put_Proxy_Broker_Factory_Initializer (size_t) +{ + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer = + benchmark__TAO_Put_Proxy_Broker_Factory_function; + + return 0; +} + +static int +benchmark__TAO_Put_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + benchmark__TAO_Put_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (benchmark__TAO_Put_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_benchmark::Put::Put (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_benchmark_Put_optable; +} + +POA_benchmark::Put::Put (const Put& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_benchmark::Put::~Put (void) +{ +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_Put + : public TAO::Upcall_Command + { + public: + inline connect_Put ( + POA_benchmark::Put * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::Put::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + connect_Put command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class onePort_Put + : public TAO::Upcall_Command + { + public: + inline onePort_Put ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + this->servant_->onePort ( + arg_1 + , arg_2 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::Put::onePort_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_portNo; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_value; + + TAO::Argument * const args[] = + { + &retval, + &_tao_portNo, + &_tao_value + }; + + static size_t const nargs = 3; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + onePort_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class allPorts_Put + : public TAO::Upcall_Command + { + public: + inline allPorts_Put ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + this->servant_->allPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::Put::allPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static size_t const nargs = 4; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + allPorts_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class dataAndPorts_Put + : public TAO::Upcall_Command + { + public: + inline dataAndPorts_Put ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::benchmark::dataStruct>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::benchmark::dataStruct, TAO::SArg_Traits< ::benchmark::dataStruct>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + this->servant_->dataAndPorts ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::Put::dataAndPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::benchmark::dataStruct>::in_arg_val _tao_data; + + TAO::Argument * const args[] = + { + &retval, + &_tao_data + }; + + static size_t const nargs = 2; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + dataAndPorts_Put command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _is_a_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _non_existent_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _repository_id_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_benchmark::Put::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_Put_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_Put_Upcall_Command ( + POA_benchmark::Put * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::Put * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::Put::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::Put * const impl = + static_cast<POA_benchmark::Put *> (servant); + + _get_component_Put_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_benchmark::Put::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/Put:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_benchmark::Put::_interface_repository_id (void) const +{ + return "IDL:benchmark/Put:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_benchmark::Put::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +benchmark::Put * +POA_benchmark::Put::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::benchmark::Put STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_Put_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/versuch4/benchS.h b/quellcode/versuch4/benchS.h new file mode 100755 index 0000000..3601619 --- /dev/null +++ b/quellcode/versuch4/benchS.h @@ -0,0 +1,217 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:387 + +#ifndef _TAO_IDL_BENCHS_H_ +#define _TAO_IDL_BENCHS_H_ + + +#include "benchC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class Put; + typedef Put *Put_ptr; + + class Put + : public virtual PortableServer::ServantBase + { + protected: + Put (void); + + public: + // Useful for template programming. + typedef ::benchmark::Put _stub_type; + typedef ::benchmark::Put_ptr _stub_ptr_type; + typedef ::benchmark::Put_var _stub_var_type; + + Put (const Put& rhs); + virtual ~Put (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::benchmark::Put *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void onePort_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void allPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void dataAndPorts ( + const ::benchmark::dataStruct & data + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void dataAndPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1148 + +#include "benchS_T.h" + +#if defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch4/benchS.inl b/quellcode/versuch4/benchS.inl new file mode 100755 index 0000000..38aa325 --- /dev/null +++ b/quellcode/versuch4/benchS.inl @@ -0,0 +1,28 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + diff --git a/quellcode/versuch4/benchS_T.cpp b/quellcode/versuch4/benchS_T.cpp new file mode 100755 index 0000000..e100665 --- /dev/null +++ b/quellcode/versuch4/benchS_T.cpp @@ -0,0 +1,41 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:656 + +#ifndef _TAO_IDL_BENCHS_T_CPP_ +#define _TAO_IDL_BENCHS_T_CPP_ + +#include "benchS_T.h" + +#if !defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/versuch4/benchS_T.h b/quellcode/versuch4/benchS_T.h new file mode 100755 index 0000000..6abb7ea --- /dev/null +++ b/quellcode/versuch4/benchS_T.h @@ -0,0 +1,155 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:520 + +#ifndef _TAO_IDL_BENCHS_T_H_ +#define _TAO_IDL_BENCHS_T_H_ + + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_benchmark +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class Put_tie : public Put + { + public: + Put_tie (T &t); + // the T& ctor + Put_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + Put_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + Put_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~Put_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void dataAndPorts ( + const ::benchmark::dataStruct & data + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + Put_tie (const Put_tie &); + void operator= (const Put_tie &); + }; +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1251 +#if defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "benchS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("benchS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch4/benchS_T.inl b/quellcode/versuch4/benchS_T.inl new file mode 100755 index 0000000..a606ef4 --- /dev/null +++ b/quellcode/versuch4/benchS_T.inl @@ -0,0 +1,193 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::Put_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::Put_tie<T>::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_benchmark::Put_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_benchmark::Put_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_benchmark::Put_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_benchmark::Put_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->Put::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->onePort ( + portNo, + value + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->allPorts ( + valPort1, + valPort2, + valPort3 + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::Put_tie<T>::dataAndPorts ( + const ::benchmark::dataStruct & data + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->dataAndPorts ( + data + ); +} diff --git a/quellcode/versuch4/bench_i.cpp b/quellcode/versuch4/bench_i.cpp new file mode 100755 index 0000000..44f00e0 --- /dev/null +++ b/quellcode/versuch4/bench_i.cpp @@ -0,0 +1,99 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "bench_i.h" + +// Implementation skeleton constructor +benchmark_Put_i::benchmark_Put_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_Put_i::~benchmark_Put_i (void) +{ +} + +void benchmark_Put_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_Put_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(portNo, value); +} + +void benchmark_Put_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); +} + +void benchmark_Put_i::dataAndPorts ( + const ::benchmark::dataStruct & data + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(1, data.valPort1); + cpx->set(2, data.valPort2); + cpx->set(3, data.valPort3); + lastString = data.data; +} + + diff --git a/quellcode/versuch4/bench_i.h b/quellcode/versuch4/bench_i.h new file mode 100755 index 0000000..954f3b8 --- /dev/null +++ b/quellcode/versuch4/bench_i.h @@ -0,0 +1,99 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" + +#include "cpx.h" +#include <string> + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_Put_i + : public virtual POA_benchmark::Put +{ +private: + CPX* cpx; + std::string lastString; + +public: + // Constructor + benchmark_Put_i (void); + + // Destructor + virtual ~benchmark_Put_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void dataAndPorts ( + const ::benchmark::dataStruct & data + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch4/benchmark.mpc b/quellcode/versuch4/benchmark.mpc new file mode 100755 index 0000000..13eb950 --- /dev/null +++ b/quellcode/versuch4/benchmark.mpc @@ -0,0 +1,23 @@ +project(*Receiver): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + bench_i.cpp + Receiver.cpp + } + Header_Files { + cpx.h + } +} + +project(*Supplier): rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + bench_i.cpp + Supplier.cpp + } + Header_Files { + cpx.h + } +} diff --git a/quellcode/versuch4/buildNcopy b/quellcode/versuch4/buildNcopy new file mode 100755 index 0000000..6b29778 --- /dev/null +++ b/quellcode/versuch4/buildNcopy @@ -0,0 +1,2 @@ +#!/bin/bash +make static_libs=1 shared_libs_only=0 static_libs_only=1 -f GNUmakefile.Benchmark_Receiver && make static_libs=1 shared_libs_only=0 static_libs_only=1 -f GNUmakefile.Benchmark_Supplier && scp Receiver root@136.230.189.129:/opt/acetao/tests && scp Supplier root@136.230.189.135:/opt/acetao/tests diff --git a/quellcode/versuch4/burner b/quellcode/versuch4/burner Binary files differnew file mode 100755 index 0000000..7914765 --- /dev/null +++ b/quellcode/versuch4/burner diff --git a/quellcode/versuch4/cpx.cpp b/quellcode/versuch4/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/versuch4/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + /* setup signal on interrupt */ + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cout<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cout<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } + + return (short) value; +} + +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/versuch4/cpx.h b/quellcode/versuch4/cpx.h new file mode 100755 index 0000000..7b4545a --- /dev/null +++ b/quellcode/versuch4/cpx.h @@ -0,0 +1,73 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00
+#define PORT2_IN 0x6c00
+#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch4/howto b/quellcode/versuch4/howto new file mode 100755 index 0000000..74992c2 --- /dev/null +++ b/quellcode/versuch4/howto @@ -0,0 +1,230 @@ +Quick RTCORBA - Client - Server - HOWTO (ACE/TAO) +================================================= + +1.) define Interface (hosted Objects) + +create file interface.idl: + +----// interface.idl //---------------------------------------- + +module benchmark{ + + exception invalidRequest{}; + + struct dataStruct{ + string data; + short valPort1; + short valPort2; + short valPort3; + }; + + interface Put{ + void connect() raises(invalidRequest); + void onePort(in short portNo, in short value) raises(invalidRequest); + void allPorts( in short valPort1, + in short valPort2, + in short valPort3) raises(invalidRequest); + + void dataAndPorts( in dataStruct data) raises(invalidRequest); + }; +}; + +---------------------------------------------------------------------- + +2.) generate implementation files + +tao_idl -GI interface.idl + +3.) rename implementation files + +mv interfaceI.h interface_i.h +mv interfaceI.cpp interface_i.cpp + +4.) change interfaceI.h include in interface_i.cpp in interface_i.h + +5.) implement functionality of hosted objects into interface_i.cpp + +6.) write RTCORBA Server + +----// Server.cpp //---------------------------------------------------- + +include "interface_i.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +#include <iostream> + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create Policy + CORBA::PolicyList benchPolicy(1); + benchPolicy.length(1); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, 9879 /*Priority*/ ); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create the servant + benchmark_Put_i bench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("Receiver"); + namingContext->bind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy ORB + rootPOA->destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + } + return 0; +} + +--------------------------------------------------------------------------- + +7.) write RTCORBA Client + +---// Client.cpp //-------------------------------------------------------- + +#include <iostream> +#include "interfaceC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +#include "cpx.h" + +benchmark::Put_var put; +CPX cpx; + +int main(int argc, char* argv[]){ + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + CosNaming::Name name(1); + name.length(1); + + name[0].id = CORBA::string_dup("Receiver"); + + // receive Object + CORBA::Object_var benchObj = namingContext->resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<<std::endl; + + // rtCurrent set priority + CORBA::Object_var rtCurrentObj = orb->resolve_initial_references("RTCurrent"); + RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + rtCurrent->the_priority(RTCORBA::maxPriority); + std::cout<<"PriorityChange ok"<<std::endl; + + // Input auf Interface schreiben (use Object hosted by Server) + put->connect(); + put->allPorts(0, 0, 0); + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} + +-------------------------------------------------------------------------- + +8.) define MakeProjectCreator file + +---// project.mpc //------------------------------------------------------ + +project(Server): rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + interfaceI.cpp + Server.cpp + } + Header_Files { + cpx.h + } +} + +project(Client): rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + interfaceC.cpp + Client.cpp + } + Header_Files { + cpx.h + } +} + +---------------------------------------------------------------------------- + +9.) generate GNUMakefiles + +mpc.pl -type gnuace project.mpc + +10.) build Client & Server + +make -f GNUMakefile_Client && make -f GNUMakefile_Server + +11.) start NamingService + +$ACE_ROOT/TAO/orbsvcs/Naming_Service/Naming_Service -m1 orbendpoint localhost:1234 + +12.) start Server + +./Server + +13.) start Client + +./Client diff --git a/quellcode/versuch4/multithreading/ReceiverDual.cpp b/quellcode/versuch4/multithreading/ReceiverDual.cpp new file mode 100755 index 0000000..91f02f2 --- /dev/null +++ b/quellcode/versuch4/multithreading/ReceiverDual.cpp @@ -0,0 +1,123 @@ +#include <iostream> +#include <stdio.h> + + +//#include <asm/irq.h> + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> + +COBA::ULong static_threads = 2; +long nap_time = 1000; + +int registerServant(CORBA::Policy_ptr threadpoolPolicy, const char* poaName, PortableServer::POAManager_ptr poaManager, PortableServer::POA_ptr rootPOA, CORBA::ORB_ptr orb, RTCORBA::RTORB rtORB) { + return 0; +} + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // Network Settings + CORBA::Long sendBufferSize = 0; + CORBA::Long recvBufferSize = 0; + CORBA::Boolean keepAlive = 1; + CORBA::Boolean dontRoute = 1; + CORBA::Boolean noDelay = 1; + + RTCORBA::TCPProtocolProperties_var tcpProperties = rtORB->create_tcp_protocol_properties( + sendBufferSize, recvBufferSize, keepAlive, dontRoute, noDelay, 1 /*network priority*/); + + tcpProperties->enable_network_priority(1); + + RTCORBA::ProtocolList protocols; + protocols.length(1); + protocols[0].protocol_type = 0; //TAO_TAG_IIOP_PROFILE; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate(tcpProperties.in()); + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create high Priority Policy + CORBA::PolicyList benchPolicy(2); + benchPolicy.length(2); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::maxPriority); + benchPolicy[1] = rtORB->create_server_protocol_policy(protocols); + + //// create low Priority Policy + CORBA::PolicyList benchLowPolicy(2); + benchLowPolicy.length(2); + benchLowPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, RTCORBA::minPriority); + benchLowPolicy[1] = rtORB->create_server_protocol_policy(protocols); + + // create ObjectAdapter, assign Policy + PortableServer::POA_var benchPOA = rootPOA->create_POA("benchPOA", poaManager.in(), benchPolicy); + std::cout<<"Policy assigned"<<std::endl; + + // create 2nd ObjectAdapter, assign low priority Policy + PortableServer::POA_var benchLowPOA = rootPOA->create_POA("benchLowPOA", poaManager.in(), benchLowPolicy); + + // create the servant + benchmark_PutHigh_i bench_i; + benchmark_PutLow_i lowBench_i; + + // activate servant + PortableServer::ObjectId_var objectID = benchPOA->activate_object(&bench_i); + CORBA::Object_var benchObj = benchPOA->id_to_reference(objectID.in()); + CORBA::String_var ior = orb->object_to_string(benchObj.in()); + + PortableServer::ObjectId_var objectLowID = benchLowPOA->activate_object(&lowBench_i); + CORBA::Object_var lowBenchObj = benchLowPOA->id_to_reference(objectLowID.in()); + CORBA::String_var ior2 = orb->object_to_string(lowBenchObj.in()); + std::cout<<"Servant activated"<<std::endl; + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + CosNaming::Name name(1); + name.length(1); + name[0].id = CORBA::string_dup("HighReceiver"); + namingContext->bind(name, benchObj.in()); + std::cout<<"Bound Receiver to NameService"<<std::endl; + name[0].id = CORBA::string_dup("LowReceiver"); + namingContext->bind(name, lowBenchObj.in()); + std::cout<<"Bound LowReceiver to NameService"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy + rootPOA->destroy(1,1); + orb->destroy(); + //enable_irq(18); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + //enable_irq(18); + } + return 0; +} + diff --git a/quellcode/versuch4/multithreading/SupplierHigh.cpp b/quellcode/versuch4/multithreading/SupplierHigh.cpp new file mode 100755 index 0000000..f159173 --- /dev/null +++ b/quellcode/versuch4/multithreading/SupplierHigh.cpp @@ -0,0 +1,126 @@ +#include <iostream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "cpx.h" + +//benchmark::Put_var put; +benchmark::PutHigh_var highPut; +CPX cpx; + +void sigproc(int signo) +{ signal(SIGRTMIN+29, sigproc); +// int i1 = cpx.get(1); +// int i2 /*= cpx.get(2)*/; +// int i3 /*= cpx.get(3)*/; +// put->allPorts(i1, i2, i3); + highPut->onePort(1, cpx.get(1)); +// put->allPorts(cpx.get(1), -1, -1); +// put->onePort(3, cpx.get(3)); +} + + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "Client2ORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // Network Settings + CORBA::Long sendBufferSize = 0; + CORBA::Long recvBufferSize = 0; + CORBA::Boolean keepAlive = 1; + CORBA::Boolean dontRoute = 1; + CORBA::Boolean noDelay = 1; + + RTCORBA::TCPProtocolProperties_var tcpProperties = rtORB->create_tcp_protocol_properties( + sendBufferSize, recvBufferSize, keepAlive, dontRoute, noDelay, RTCORBA::maxPriority /*network priority*/); + + tcpProperties->enable_network_priority(1); + + RTCORBA::ProtocolList protocols; + protocols.length(1); + protocols[0].protocol_type = 0; //TAO_TAG_IIOP_PROFILE; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate(tcpProperties.in()); + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + // receive Objects + CosNaming::Name name(1); + name.length(1); + +// name[0].id = CORBA::string_dup("Receiver"); +// CORBA::Object_var benchObj = namingContext->resolve(name); +// put = benchmark::Put::_narrow(benchObj.in()); + + name[0].id = CORBA::string_dup("HighReceiver"); + CORBA::Object_var lowBenchObj = namingContext->resolve(name); + highPut = benchmark::PutHigh::_narrow(lowBenchObj.in()); + + std::cout<<"TransferOjekt ok"<<std::endl; + + // Private Connection Policy + CORBA::PolicyList pcPolicy(2); + pcPolicy.length(2); + pcPolicy[0] = rtORB->create_private_connection_policy(); + pcPolicy[1] = rtORB->create_client_protocol_policy(protocols); + + CORBA::Object_var newTran = highPut->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + highPut = benchmark::PutHigh::_narrow(newTran.in()); + highPut = benchmark::PutHigh::_narrow(newTran.in()); + std::cout<<"PrivateConnection, RTProtocol ok"<<std::endl; + + // rtCurrent set priority + //CORBA::Object_var rtCurrentObj = orb->resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<<std::endl; + + // explicitly bind connection to server + //CORBA::PolicyList_var inconsistentPolicies; + //CORBA::Boolean status = transfer->_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<<std::endl; + + // Input auf Interface schreiben + // ... + highPut->connect(); + //lowPut->connect(); + highPut->allPorts(0, 0, 0); + sleep(1); + highPut->onePort(1, 255); + sleep(1); + highPut->allPorts(0, 0, 0); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true){ + pause(); + } + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch4/multithreading/SupplierLow.cpp b/quellcode/versuch4/multithreading/SupplierLow.cpp new file mode 100755 index 0000000..47ae343 --- /dev/null +++ b/quellcode/versuch4/multithreading/SupplierLow.cpp @@ -0,0 +1,126 @@ +#include <iostream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "cpx.h" + +//benchmark::Put_var put; +benchmark::PutLow_var lowPut; +CPX cpx; + +void sigproc(int signo) +{ signal(SIGRTMIN+29, sigproc); +// int i1 = cpx.get(1); +// int i2 /*= cpx.get(2)*/; +// int i3 /*= cpx.get(3)*/; +// put->allPorts(i1, i2, i3); + lowPut->onePort(3, cpx.get(1)); +// put->allPorts(cpx.get(1), -1, -1); +// put->onePort(3, cpx.get(3)); +} + + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // Network Settings + CORBA::Long sendBufferSize = 0; + CORBA::Long recvBufferSize = 0; + CORBA::Boolean keepAlive = 1; + CORBA::Boolean dontRoute = 1; + CORBA::Boolean noDelay = 1; + + RTCORBA::TCPProtocolProperties_var tcpProperties = rtORB->create_tcp_protocol_properties( + sendBufferSize, recvBufferSize, keepAlive, dontRoute, noDelay, RTCORBA::maxPriority /*network priority*/); + + tcpProperties->enable_network_priority(1); + + RTCORBA::ProtocolList protocols; + protocols.length(1); + protocols[0].protocol_type = 0; //TAO_TAG_IIOP_PROFILE; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate(tcpProperties.in()); + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + // receive Objects + CosNaming::Name name(1); + name.length(1); + +// name[0].id = CORBA::string_dup("Receiver"); +// CORBA::Object_var benchObj = namingContext->resolve(name); +// put = benchmark::Put::_narrow(benchObj.in()); + + name[0].id = CORBA::string_dup("LowReceiver"); + CORBA::Object_var lowBenchObj = namingContext->resolve(name); + lowPut = benchmark::PutLow::_narrow(lowBenchObj.in()); + + std::cout<<"TransferOjekt ok"<<std::endl; + + // Private Connection Policy + CORBA::PolicyList pcPolicy(2); + pcPolicy.length(2); + pcPolicy[0] = rtORB->create_private_connection_policy(); + pcPolicy[1] = rtORB->create_client_protocol_policy(protocols); + + CORBA::Object_var newTran = lowPut->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + lowPut = benchmark::PutLow::_narrow(newTran.in()); + lowPut = benchmark::PutLow::_narrow(newTran.in()); + std::cout<<"PrivateConnection, RTProtocol ok"<<std::endl; + + // rtCurrent set priority + //CORBA::Object_var rtCurrentObj = orb->resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<<std::endl; + + // explicitly bind connection to server + //CORBA::PolicyList_var inconsistentPolicies; + //CORBA::Boolean status = transfer->_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<<std::endl; + + // Input auf Interface schreiben + // ... + lowPut->connect(); + //lowPut->connect(); + lowPut->allPorts(0, 0, 0); + sleep(1); + lowPut->onePort(1, 255); + sleep(1); + lowPut->allPorts(0, 0, 0); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true){ + pause(); + } + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch4/multithreading/benchDual.mpc b/quellcode/versuch4/multithreading/benchDual.mpc new file mode 100755 index 0000000..44c2102 --- /dev/null +++ b/quellcode/versuch4/multithreading/benchDual.mpc @@ -0,0 +1,35 @@ +project(*ReceiverDual): strategies, rt_server, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchI.cpp + ReceiverDual.cpp + } + Header_Files { + cpx.h + } +} + +project(*SupplierLow): strategies, rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchC.cpp + SupplierLow.cpp + } + Header_Files { + cpx.h + } +} + +project(*SupplierHigh): strategies, rt_client, naming { + requires += exceptions + Source_Files { + cpx.cpp + benchC.cpp + SupplierHigh.cpp + } + Header_Files { + cpx.h + } +}
\ No newline at end of file diff --git a/quellcode/versuch4/multithreading/benchI.cpp b/quellcode/versuch4/multithreading/benchI.cpp new file mode 100755 index 0000000..cd185c0 --- /dev/null +++ b/quellcode/versuch4/multithreading/benchI.cpp @@ -0,0 +1,137 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "benchI.h" + +// Implementation skeleton constructor +benchmark_PutLow_i::benchmark_PutLow_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_PutLow_i::~benchmark_PutLow_i (void) +{ +} + +void benchmark_PutLow_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_PutLow_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + std::string huhu = ""; + for(int i=0; i<65000; i++) for(int i=0; i<5000; i++) if(i%2) huhu += "a"; + cpx->set(portNo, value); +} + +void benchmark_PutLow_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + if(valPort1>=0) cpx->set(1, valPort1); + if(valPort2>=0) cpx->set(2, valPort2); + if(valPort3>=0) cpx->set(3, valPort3); +} + +// Implementation skeleton constructor +benchmark_PutHigh_i::benchmark_PutHigh_i (void) +{ +} + +// Implementation skeleton destructor +benchmark_PutHigh_i::~benchmark_PutHigh_i (void) +{ +} + +void benchmark_PutHigh_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_PutHigh_i::onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(portNo, value); +} + +void benchmark_PutHigh_i::allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + if(valPort1>=0) cpx->set(1, valPort1); + if(valPort2>=0) cpx->set(2, valPort2); + if(valPort3>=0) cpx->set(3, valPort3); +} + + diff --git a/quellcode/versuch4/multithreading/benchI.h b/quellcode/versuch4/multithreading/benchI.h new file mode 100755 index 0000000..fb33928 --- /dev/null +++ b/quellcode/versuch4/multithreading/benchI.h @@ -0,0 +1,130 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" +#include "cpx.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_PutLow_i + : public virtual POA_benchmark::PutLow +{ +private: + CPX* cpx; +public: + // Constructor + benchmark_PutLow_i (void); + + // Destructor + virtual ~benchmark_PutLow_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + +class benchmark_PutHigh_i + : public virtual POA_benchmark::PutHigh +{ + +private: + CPX* cpx; +public: + // Constructor + benchmark_PutHigh_i (void); + + // Destructor + virtual ~benchmark_PutHigh_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void onePort ( + ::CORBA::Short portNo, + ::CORBA::Short value + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void allPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch4/multithreading/cpx.cpp b/quellcode/versuch4/multithreading/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/versuch4/multithreading/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + /* setup signal on interrupt */ + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cout<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cout<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } + + return (short) value; +} + +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/versuch4/multithreading/cpx.h b/quellcode/versuch4/multithreading/cpx.h new file mode 100755 index 0000000..7b4545a --- /dev/null +++ b/quellcode/versuch4/multithreading/cpx.h @@ -0,0 +1,73 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00
+#define PORT2_IN 0x6c00
+#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch4/myBurner.cpp b/quellcode/versuch4/myBurner.cpp new file mode 100755 index 0000000..318b9c8 --- /dev/null +++ b/quellcode/versuch4/myBurner.cpp @@ -0,0 +1,13 @@ +#include <iostream> +#include <stdio.h> + +int foo(int what){ + if(what == 1) return 1; + int fac = what * foo(what-1); + return fac; +} + +int main(){ + while(1) foo(33); + return 0; +} diff --git a/quellcode/versuch4/readme b/quellcode/versuch4/readme new file mode 100755 index 0000000..e331092 --- /dev/null +++ b/quellcode/versuch4/readme @@ -0,0 +1,65 @@ +CPU Burn-in README +------------------ + +What is CPU Burn-in? +------------------- + +CPU Burn-in v1.0 by Michal Mienik is the ultimate stability testing tool for overclockers. +The program heats up any x86 CPU to the maximum possible operating temperature that is achievable +by using ordinary software. This allows the user to adjust the CPU speed up to the practical +maximum while still being sure that stability is achieved even under the most stressful conditions. +The program continuously monitors for erroneous calculations ensuring the CPU does not +generate errors during calculations. + + +Why use CPU Burn-in? +------------------- + +In the past overclocking stability was tested by running intensive software such as +Distributed.Net clients or SETI@home. Running either piece of software for 24 hours would generally +show up instability. A looping Quake3 timedemo was also a good choice. + +However, there are inherent limitations in these tests: + +Not every error caused by overclocking causes a program to crash or the system to hang. Some +errors may be more subtle, such as a slight miscalculation. If such an event occurs and causes a pixel +to render a slightly different colour in Quake3 for example, the user is unlikely to notice and overall +this is no big deal. However such small errors can have a potentially devastating on distributed projects +such as SETI@home, which rely on the reliable processing of data. + +CPU Burn-in consistently delivers a higher CPU operating temperature than the above mentioned +applications. This allows CPU Burn-in to be particularly effective at testing overclocking stability +and cooling effectiveness. + +How does it work? +---------------- + +CPU Burn-in constantly cycles FPU intensive functions for a user specified period of time. The +resultant calculations are constantly checked for data integrity. If the program detects erroneous +data the user is immediately informed. Applications such as SETI@home and Distributed.Net perform no +such data checking. The user must rely on those programs to crash or the system to hang before a +problem can be noticed. + +Instructions: +------------ + +Please Note: Overclocking can potentially be harmful to your CPU. It may fry or fail prematurely +in the long term. I cannot and will not be responsible for any damage you do to your hardware. +By it's very nature, CPU Burn-in pushes the CPU to the max. Increasing the voltage, Mhz, or PCI/AGP +above the recommended levels can cause damage. + +CPU Burn-in runs best as a high priority process on an otherwise idle system. + +Run the program with one command line value to specify the length of time to run the test: + +eg. + "./cpuburn-in 10" will run the test for ten minutes. + + +Contact: +------- + +If your system experiences instability during the burn-in test or you receive error messages it's likely +the system has been overclocked too far. + +If you believe a bug in the program has been found please email cluster2k@hotmail.com diff --git a/quellcode/versuch5/Client b/quellcode/versuch5/Client Binary files differnew file mode 100755 index 0000000..b1f0883 --- /dev/null +++ b/quellcode/versuch5/Client diff --git a/quellcode/versuch5/Client.cpp b/quellcode/versuch5/Client.cpp new file mode 100755 index 0000000..e740be3 --- /dev/null +++ b/quellcode/versuch5/Client.cpp @@ -0,0 +1,248 @@ +#include <iostream> +#include <fstream> +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include <unistd.h> + +#include "Custom_Network_Priority_Mapping.h" +#include "cpx.h" + +CPX cpx; + +benchmark::msg_var message = new benchmark::msg; + +benchmark::msgAndPort1_var msgAndPort1; +benchmark::msgAndPort2_var msgAndPort2; +benchmark::msgOnly_var msgOnly; +benchmark::setPortsOnly_var portOnly; + +RTCORBA::Current_var current; + +int mode; +std::string strData; + +void sigproc(int signo) +{ + signal(SIGRTMIN+29, sigproc); + switch(mode){ + case 1: + current->the_priority( RTCORBA::maxPriority /* Priority Definition */ ); + msgAndPort1->setPorts(cpx.get(1), cpx.get(2), cpx.get(3)); + current->the_priority( RTCORBA::minPriority /* Priority Definition */ ); + msgAndPort1->sendMsg(message); + break; + case 2: + current->the_priority( RTCORBA::maxPriority /* Priority Definition */ ); + msgAndPort2->setPortsSendMsg(cpx.get(1), cpx.get(2), cpx.get(3), message); + break; + case 3: + current->the_priority( RTCORBA::minPriority /* Priority Definition */ ); + std::cout<<"msgOnly mode and DI signal? ..strange"<<std::endl; + break; + case 4: + current->the_priority( RTCORBA::maxPriority /* Priority Definition */ ); + portOnly->setPorts(cpx.get(1), cpx.get(2), cpx.get(3)); + current->the_priority( RTCORBA::minPriority /* Priority Definition */ ); + msgOnly->sendMsg(message); + break; + default: + std::cout<<"this is impossible :-)"<<std::endl; + } +} + + +int main(int argc, char* argv[]){ + + if (argc < 2){ + std::cout<<"enter filename as param1\n"; + return 0; + } + + mode = 0; + + // Mode selection + std::cout<<"Which Interface?\n\n1) msgAndPort1\n2) msgAndPort2\n3) msgOnly\n4) 2 Interfaces\n\nNumber: "; + std::cin>>mode; + + if ( (mode < 1) || (mode > 4) ) { + std::cout<<"Fehlerhafte Eingabe\nBenutze 4)"<<std::endl; + mode = 4; + } + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + std::string line; + std::ifstream infile (argv[1], std::ios_base::in); + while (getline(infile, line, '\n')) + { + strData += line; + } + + message->sender = CORBA::string_alloc(sizeof(argv[1])); + message->sender = CORBA::string_dup((const char*)argv[1]); + + message->message = CORBA::string_alloc(sizeof(strData)); + message->message = CORBA::string_dup((const char*)strData.c_str()); + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ClientORB"); + std::cout<<"ORB ok"<<std::endl; + + // get RTORB + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<<std::endl; + + // Set the tcp protocol protperties + RTCORBA::TCPProtocolProperties_var tcp_properties = rtORB->create_tcp_protocol_properties (ACE_DEFAULT_MAX_SOCKET_BUFSIZ, ACE_DEFAULT_MAX_SOCKET_BUFSIZ, 1, 0, 1, 1 /*enable netw. priority*/); + + RTCORBA::ProtocolList protocols; + protocols.length (1); + protocols[0].protocol_type = 0; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate (tcp_properties.in ()); + protocols[0].orb_protocol_properties = RTCORBA::ProtocolProperties::_nil (); + + + // NamingService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<<std::endl; + + CosNaming::Name name(1); + name.length(1); + + // Policies + CORBA::PolicyList pcPolicy(2); + pcPolicy.length(2); + pcPolicy[0] = rtORB->create_private_connection_policy(); + pcPolicy[1] = rtORB->create_client_protocol_policy(protocols); + + CORBA::Policy_var policy; + RTCORBA::PriorityModelPolicy_var rtpolicy; + RTCORBA::PriorityModel priomod; + + CORBA::Object_var curobj; + + CORBA::Object_var newTran; + CORBA::Object_var benchObj; + + curobj = orb->resolve_initial_references("RTCurrent"); + current = RTCORBA::Current::_narrow (curobj.in()); + + // Retrive apropriate objects + switch(mode) { + case 1: + name[0].id = CORBA::string_dup("msgAndPort1"); + benchObj = namingContext->resolve(name); + msgAndPort1 = benchmark::msgAndPort1::_narrow(benchObj.in()); + newTran = msgAndPort1->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + msgAndPort1 = benchmark::msgAndPort1::_narrow(newTran.in()); + + current->the_priority( 99 /* Priority Definition */ ); + + // network priority + benchObj = msgAndPort1->_set_policy_overrides (pcPolicy, CORBA::SET_OVERRIDE); + msgAndPort1 = benchmark::msgAndPort1::_narrow( benchObj.in() ); + + msgAndPort1->connect(); + msgAndPort1->setPorts(0,0,0); + sleep(1); + msgAndPort1->setPorts(255,255,255); + sleep(1); + msgAndPort1->setPorts(0,0,0); + + break; + case 2: + name[0].id = CORBA::string_dup("msgAndPort2"); + benchObj = namingContext->resolve(name); + msgAndPort2 = benchmark::msgAndPort2::_narrow(benchObj.in()); + newTran = msgAndPort2->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + msgAndPort2 = benchmark::msgAndPort2::_narrow(newTran.in()); + + current->the_priority( 99 /* Priority Definition */ ); + + benchObj = msgAndPort2->_set_policy_overrides (pcPolicy, CORBA::SET_OVERRIDE); + msgAndPort2 = benchmark::msgAndPort2::_narrow( benchObj.in() ); + + msgAndPort2->connect(); + msgAndPort2->setPortsSendMsg(0,0,0, message); + sleep(1); + msgAndPort2->setPortsSendMsg(255,255,255, message); + sleep(1); + msgAndPort2->setPortsSendMsg(0,0,0, message); + + break; + case 3: + name[0].id = CORBA::string_dup("msgOnly"); + benchObj = namingContext->resolve(name); + msgOnly = benchmark::msgOnly::_narrow(benchObj.in()); + newTran = msgOnly->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + msgOnly = benchmark::msgOnly::_narrow(newTran.in()); + + current->the_priority( RTCORBA::minPriority /* Priority Definition */ ); + + benchObj = msgOnly->_set_policy_overrides (pcPolicy, CORBA::SET_OVERRIDE); + msgOnly = benchmark::msgOnly::_narrow( benchObj.in() ); + + while(true){ + if(!msgOnly->sendMsg(message)){ + std::cout<<"error occured -> exit"<<std::endl; + return 0; + } + } + break; + + case 4: + name[0].id = CORBA::string_dup("portOnly"); + benchObj = namingContext->resolve(name); + portOnly = benchmark::setPortsOnly::_narrow(benchObj.in()); + newTran = portOnly->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + portOnly = benchmark::setPortsOnly::_narrow(newTran.in()); + + benchObj = portOnly->_set_policy_overrides (pcPolicy, CORBA::SET_OVERRIDE); + portOnly = benchmark::setPortsOnly::_narrow( benchObj.in() ); + + name[0].id = CORBA::string_dup("msgOnly"); + benchObj = namingContext->resolve(name); + msgOnly = benchmark::msgOnly::_narrow(benchObj.in()); + newTran = msgOnly->_set_policy_overrides(pcPolicy, CORBA::SET_OVERRIDE); + msgOnly = benchmark::msgOnly::_narrow(newTran.in()); + + current->the_priority( 99 /* Priority Definition */ ); + + benchObj = msgOnly->_set_policy_overrides (pcPolicy, CORBA::SET_OVERRIDE); + msgOnly = benchmark::msgOnly::_narrow( benchObj.in() ); + + portOnly->connect(); + portOnly->setPorts(0,0,0); + sleep(1); + portOnly->setPorts(255,255,255); + sleep(1); + portOnly->setPorts(0,0,0); + break; + default: + std::cout<<"this never happens ;-)"<<std::endl; + } + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true){ + pause(); + } + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<<any<<std::endl; + } + return 0; +} diff --git a/quellcode/versuch5/Custom_Network_Priority_Mapping.cpp b/quellcode/versuch5/Custom_Network_Priority_Mapping.cpp new file mode 100755 index 0000000..7185272 --- /dev/null +++ b/quellcode/versuch5/Custom_Network_Priority_Mapping.cpp @@ -0,0 +1,133 @@ +// Custom_Network_Priority_Mapping.cpp,v 1.7 2004/05/19 22:29:20 irfan Exp + +#include "Custom_Network_Priority_Mapping.h" +#include "tao/debug.h" +#include "ace/Log_Msg.h" + +ACE_RCSID (Strategies, + Custom_Network_Priority_Mapping, + "Custom_Network_Priority_Mapping.cpp,v 1.7 2004/05/19 22:29:20 irfan Exp") + +#define IPDSFIELD_DSCP_DEFAULT 0x00 +#define IPDSFIELD_DSCP_CS1 0x08 +#define IPDSFIELD_DSCP_CS2 0x10 +#define IPDSFIELD_DSCP_CS3 0x18 +#define IPDSFIELD_DSCP_CS4 0x20 +#define IPDSFIELD_DSCP_CS5 0x28 +#define IPDSFIELD_DSCP_CS6 0x30 +#define IPDSFIELD_DSCP_CS7 0x38 +#define IPDSFIELD_DSCP_AF11 0x0A +#define IPDSFIELD_DSCP_AF12 0x0C +#define IPDSFIELD_DSCP_AF13 0x0E +#define IPDSFIELD_DSCP_AF21 0x12 +#define IPDSFIELD_DSCP_AF22 0x14 +#define IPDSFIELD_DSCP_AF23 0x16 +#define IPDSFIELD_DSCP_AF31 0x1A +#define IPDSFIELD_DSCP_AF32 0x1C +#define IPDSFIELD_DSCP_AF33 0x1E +#define IPDSFIELD_DSCP_AF41 0x22 +#define IPDSFIELD_DSCP_AF42 0x24 +#define IPDSFIELD_DSCP_AF43 0x26 +#define IPDSFIELD_ECT_MASK 0x02 +#define IPDSFIELD_CE_MASK 0x01 +#define IPDSFIELD_DSCP_EF 0x2E + +static int dscp [] = +{ + IPDSFIELD_DSCP_DEFAULT , + IPDSFIELD_DSCP_CS1 , + IPDSFIELD_DSCP_CS2 , + IPDSFIELD_DSCP_CS3 , + IPDSFIELD_DSCP_CS4 , + IPDSFIELD_DSCP_CS5 , + IPDSFIELD_DSCP_CS6 , + IPDSFIELD_DSCP_CS7 , + IPDSFIELD_DSCP_AF11 , + IPDSFIELD_DSCP_AF12 , + IPDSFIELD_DSCP_AF13 , + IPDSFIELD_DSCP_AF21 , + IPDSFIELD_DSCP_AF22 , + IPDSFIELD_DSCP_AF23 , + IPDSFIELD_DSCP_AF31 , + IPDSFIELD_DSCP_AF32 , + IPDSFIELD_DSCP_AF33 , + IPDSFIELD_DSCP_AF41 , + IPDSFIELD_DSCP_AF42 , + IPDSFIELD_DSCP_AF43 , + IPDSFIELD_DSCP_EF +}; + +/* +static const char *dscp_char[]= +{ + "Normal", + "CS1", + "CS2", + "CS3", + "CS4", + "CS5", + "CS6", + "CS7", + "Assured Forwarding 11", + "Assured Forwarding 12", + "Assured Forwarding 13", + "Assured Forwarding 21", + "Assured Forwarding 22", + "Assured Forwarding 23", + "Assured Forwarding 31", + "Assured Forwarding 32", + "Assured Forwarding 33", + "Assured Forwarding 41", + "Assured Forwarding 42", + "Assured Forwarding 43", + "Expedited Forwarding" +}; +*/ + +Custom_Network_Priority_Mapping::Custom_Network_Priority_Mapping (void) + : corba_priority_ (RTCORBA::minPriority) +{ +} + +void +Custom_Network_Priority_Mapping::corba_priority (RTCORBA::Priority corba_priority) +{ + this->corba_priority_ = corba_priority; +} + +CORBA::Boolean +Custom_Network_Priority_Mapping::to_network (RTCORBA::Priority, + RTCORBA::NetworkPriority &network_priority) +{ + if (TAO_debug_level) + ACE_DEBUG ((LM_DEBUG, + "Custom_Network_Priority_Mapping::to_network corba_priority %d\n", + this->corba_priority_)); + + const int total_slots = sizeof (dscp) / sizeof (int); + + int array_slot = + static_cast<int> (((this->corba_priority_ - RTCORBA::minPriority) / double (RTCORBA::maxPriority - RTCORBA::minPriority)) * total_slots); + + if (array_slot == total_slots) + array_slot -= 1; + + network_priority = dscp[array_slot]; + + if (TAO_debug_level) + ACE_DEBUG ((LM_DEBUG, + "Custom_Network_Priority_Mapping::to_network = %x\n", + network_priority)); + + return 1; +} + +CORBA::Boolean +Custom_Network_Priority_Mapping::to_CORBA (RTCORBA::NetworkPriority, + RTCORBA::Priority &) +{ + // This method should not be called. + ACE_ASSERT (0); + + return 0; +} diff --git a/quellcode/versuch5/Custom_Network_Priority_Mapping.h b/quellcode/versuch5/Custom_Network_Priority_Mapping.h new file mode 100755 index 0000000..6b08336 --- /dev/null +++ b/quellcode/versuch5/Custom_Network_Priority_Mapping.h @@ -0,0 +1,58 @@ +// Custom_Network_Priority_Mapping.h,v 1.6 2004/05/19 22:29:20 irfan Exp + +// ============================================================================ +// +// = LIBRARY +// TAO +// +// = FILENAME +// Custom_Network_Priority_Mapping.h +// +// = DESCRIPTION +// Declares the Custom_Network_Priority_Mapping interface, +// +// = AUTHOR +// Yamuna Krishnamurthy (yamuna@oomworks.com) +// +// ============================================================================ + +#ifndef CUSTOM_NETWORK_PRIORITY_MAPPING_H +#define CUSTOM_NETWORK_PRIORITY_MAPPING_H + +#include /**/ "ace/pre.h" +#include "tao/RTCORBA/Network_Priority_Mapping.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class Custom_Network_Priority_Mapping : public TAO_Network_Priority_Mapping +{ + // + // = TITLE + // A simple implementation of the Network_Priority_Mapping interface + // + // = DESCRIPTION + // This implementation uses custom mapping between the range of + // priorities for a given scheduling class (ACE_SCHED_OTHER, + // ACE_SCHED_FIFO, ACE_SCHED_RR) and the valid range of CORBA + // priorities (0...32767) + // +public: + Custom_Network_Priority_Mapping (void); + + CORBA::Boolean to_network (RTCORBA::Priority corba_priority, + RTCORBA::NetworkPriority &network_priority); + + CORBA::Boolean to_CORBA (RTCORBA::NetworkPriority network_priority, + RTCORBA::Priority &corba_priority); + + void corba_priority (RTCORBA::Priority corba_priority); + + private: + RTCORBA::Priority corba_priority_; +}; + + +#include /**/ "ace/post.h" +#endif /* CUSTOM_NETWORK_PRIORITY_MAPPING_H */ diff --git a/quellcode/versuch5/GNUmakefile.Bench_Client b/quellcode/versuch5/GNUmakefile.Bench_Client new file mode 100755 index 0000000..926af82 --- /dev/null +++ b/quellcode/versuch5/GNUmakefile.Bench_Client @@ -0,0 +1,222 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Client +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Client +DEPENDENCY_FILE = .depend.Bench_Client +BIN_UNCHECKED = Client + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + Custom_Network_Priority_Mapping.cpp \ + cpx.cpp \ + benchC.cpp \ + Client.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTCORBA -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Client +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS_T.h benchC.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = Custom_Network_Priority_Mapping.cpp cpx.cpp benchC.cpp Client.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTCORBA TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch5/GNUmakefile.Bench_Server b/quellcode/versuch5/GNUmakefile.Bench_Server new file mode 100755 index 0000000..65ef41f --- /dev/null +++ b/quellcode/versuch5/GNUmakefile.Bench_Server @@ -0,0 +1,225 @@ +# -*- Makefile -*- +#---------------------------------------------------------------------------- +# GNU Makefile +# +# @file GNUmakefile.Bench_Server +# +# gnu.mpd,v 1.147 2006/02/21 19:25:26 jwillemsen Exp +# +# This file was automatically generated by MPC. Any changes made directly to +# this file will be lost the next time it is generated. +# +#---------------------------------------------------------------------------- +MAKEFILE = GNUmakefile.Bench_Server +DEPENDENCY_FILE = .depend.Bench_Server +BIN_UNCHECKED = Server + +TAO_ROOT ?= $(ACE_ROOT)/TAO + +FILES = \ + benchC.cpp \ + benchS.cpp \ + Custom_Network_Priority_Mapping.cpp \ + cpx.cpp \ + bench_i.cpp \ + Server.cpp + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- +LDLIBS = -lTAO_CosNaming -lTAO_RTPortableServer -lTAO_RTCORBA -lTAO_PortableServer -lTAO_PI -lTAO_CodecFactory -lTAO_AnyTypeCode -lTAO -lACE +TAO_IDL = $(ACE_ROOT)/bin/tao_idl +TAO_IDL_DEP = $(ACE_ROOT)/bin/tao_idl$(EXEEXT) +TAO_IDLFLAGS = -Ge 1 -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h -I$(TAO_ROOT) + +PRJ_TYPE = rtp + +ifeq ($(INSBIN),.) + ifeq ($(PWD),) + PWD=$(shell pwd) + endif + INSBIN = $(PWD) +endif +OUTPUT_DIRECTORY = $(INSBIN) + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +## We don't need the ACELIB setting from wrapper_macros.GNU +ACELIB = +tao_dont_use_idl_make_rule = 1 +include $(TAO_ROOT)/rules.tao.GNU + +# To build multiple targets in the same directory on AIX, it works +# best to have a template directory per project. +# The compiler/linker isn't too smart about instantiating templates... +ifdef TEMPINCDIR +TEMPINCDIR := $(TEMPINCDIR)/Bench_Server +all: $(TEMPINCDIR) +endif + +ifneq ($(OUTPUT_DIRECTORY),) +all: $(OUTPUT_DIRECTORY) +$(OUTPUT_DIRECTORY): + -@$(MKDIR) "$(OUTPUT_DIRECTORY)" +endif + +# turn off libcheck if doing a dry run +ifeq ($(findstring n, $(MAKEFLAGS)),n) + LIBCHECK = 1 +else + # turn off libcheck if keep going was passed too + ifeq ($(findstring k, $(MAKEFLAGS)),k) + LIBCHECK = 1 + else + LIBCHECK ?= $(filter-out $(foreach lib,TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE,$(findstring $(lib),$(foreach libpath,. $(ACE_ROOT)/lib /usr/lib $(INSLIB),$(wildcard $(libpath)/lib$(lib).* $(libpath)/$(lib).lib)))),TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE) + ifeq ($(LIBCHECK),) + LIBCHECK = 1 + endif + endif +endif +ifeq ($(rt_corba),1) +ifeq ($(exceptions),1) +ifeq ($(LIBCHECK), 1) +BIN = $(BIN_UNCHECKED)$(EXEEXT) +else + all: lib_warning +endif +else + all: require_warning +endif +else + all: require_warning +endif + +# If it contains ../ at all use notdir. +OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var))) +SRC = $(FILES) + +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU + +ifneq ($(OUTPUT_DIRECTORY),) +ifneq ($(OUTPUT_DIRECTORY),.) + INSTALL = $(VBIN:%=$(INSBIN)/%) + CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/%$(VAR)$(EXEEXT)) +endif +endif + +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +ifeq ($(VXWORKSLINK),true) +include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE) +endif + +ifeq ($(VXWORKSLINK),true) +LDLIBPATH = -L. -L$(ACE_ROOT)/lib +else +LDFLAGS += -L. -L$(ACE_ROOT)/lib +endif +CPPFLAGS += -I$(ACE_ROOT) -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs +ifeq ($(static_libs),1) + CPPFLAGS += -DACE_AS_STATIC_LIBS -DTAO_AS_STATIC_LIBS +endif + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- +lib_warning: + @echo This project will not be built due to the following missing library: + @echo $(LIBCHECK) + +require_warning: + @echo This project will not be built due to one of the following missing features: + @echo rt_corba exceptions + +## Some OS's have /bin/test others only have /usr/bin/test +ifeq ($(wildcard /bin/test), /bin/test) + TEST_EXE = /bin/test +else +ifeq ($(wildcard /usr/bin/test), /usr/bin/test) + TEST_EXE = /usr/bin/test +endif +endif + +DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(ACE_ROOT)/lib +LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(ACE_ROOT)/lib +SHLIB_PATH := $(SHLIB_PATH):$(ACE_ROOT)/lib +LIBPATH := $(LIBPATH):$(ACE_ROOT)/lib +PATH := $(PATH):$(ACE_ROOT)/lib + +GENERATED_DIRTY += benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp +OBJS_DEPEND_ON_GENERATED = 1 +## More than one file is generated by the command and therefore +## it can not be run in parallel. Unfortunately, there is no way to +## say that only this rule can't be run in parallel. However, we can +## determine if the generated files have already been generated. If that's +## the case, then we don't need this special rule. +ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY)) + ## If we can find /bin/test, then we will continue + ifneq ($(TEST_EXE),) + ## If all of the generated files are there, then we need to check + ## and make sure that the generated files are up-to-date. If they are not + ## then we need the special rule. + ifneq ($(shell $(TEST_EXE) bench.idl -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.inl 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.h 2> /dev/null && $(TEST_EXE) bench.idl -nt benchC.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS.cpp 2> /dev/null && $(TEST_EXE) bench.idl -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + else + ## By this point, all of the generated files are here and up-to-date + ## with respect to the source file. Now we need to make sure that + ## they are up-to-date with respect to the generation tool. If the tool + ## is newer than the generated files, then we need the special rule. + ifneq ($(shell $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.inl 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.h 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchC.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS.cpp 2> /dev/null && $(TEST_EXE) $(TAO_IDL_DEP) -nt benchS_T.cpp 2> /dev/null && echo 0),) + .NOTPARALLEL: + endif + endif + else + .NOTPARALLEL: + endif +else +.NOTPARALLEL: +endif +benchS_T.inl benchS.inl benchC.inl benchC.h benchS.h benchS_T.h benchC.cpp benchS.cpp benchS_T.cpp: bench.idl $(TAO_IDL_DEP) + $(TAO_IDL) $(TAO_IDLFLAGS) -I$(TAO_ROOT)/orbsvcs bench.idl + +ifneq ($(GENERATED_DIRTY),) +.PRECIOUS: $(GENERATED_DIRTY) +## If the generated files are anything but source files, we need to +## ensure that those files are generated before we attempt to build anything +## else. +ifeq ($(OBJS_DEPEND_ON_GENERATED),1) +$(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY) +$(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY) +endif +endif + +ADDITIONAL_IDL_TARGETS += bench$(IDL_CLIENT_HDR_EXT) +idl_stubs: $(ADDITIONAL_IDL_TARGETS) + +# This assignment forces make to run the idl_stubs +# target before building any of the source files. +FORCED_IDL_STUBS = benchC.cpp benchS.cpp Custom_Network_Priority_Mapping.cpp cpx.cpp bench_i.cpp Server.cpp +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchC.cpp=) +FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:benchS.cpp=) + +ifneq ($(FORCED_IDL_STUBS),) +$(FORCED_IDL_STUBS): idl_stubs +endif + +ifneq ($(VXWORKSLINK),true) +ifeq ($(static_libs_only), 1) + ifeq ($(use_dep_libs), 1) + DEPLIBS = $(foreach lib, TAO_CosNaming TAO_RTPortableServer TAO_RTCORBA TAO_PortableServer TAO_PI TAO_CodecFactory TAO_AnyTypeCode TAO ACE , $(foreach libpath, . $(ACE_ROOT)/lib, $(wildcard $(libpath)/lib$(lib).a))) + endif +endif + +$(BIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS) +ifndef kylix + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $^ $(VLDLIBS) $(POSTLINK) +else + $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $(VLDLIBS) $(BORINITEXEOBJ) $(POSTLINK) $^, $@,, +endif +endif + +realclean: clean +ifneq ($(GENERATED_DIRTY),) + -$(RM) -r $(GENERATED_DIRTY) +endif + diff --git a/quellcode/versuch5/Server b/quellcode/versuch5/Server Binary files differnew file mode 100755 index 0000000..c84aebb --- /dev/null +++ b/quellcode/versuch5/Server diff --git a/quellcode/versuch5/Server.cpp b/quellcode/versuch5/Server.cpp new file mode 100755 index 0000000..94afb5c --- /dev/null +++ b/quellcode/versuch5/Server.cpp @@ -0,0 +1,143 @@ +#include <iostream> + +#include "bench_i.h" + +#include "orbsvcs/CosNamingC.h" +#include <tao/RTCORBA/RTCORBA.h> +#include "tao/RTCORBA/Network_Priority_Mapping_Manager.h" +#include "tao/RTCORBA/Network_Priority_Mapping.h" +#include "Custom_Network_Priority_Mapping.h" + +RTCORBA::Priority corbaPriority = RTCORBA::minPriority; + +int main(int argc, char* argv[]){ + + struct sched_param schedparam;
+ schedparam.sched_priority = 99;
+
+ if (sched_setscheduler(0, SCHED_FIFO, &schedparam) != 0) {
+ fprintf(stderr, "%s: PID %d: sched_setscheduler() failed errno = %d\n", __FUNCTION__, getpid(), errno); + } + + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<<std::endl; + + // Network priority mapping + CORBA::Object_var netmapper = orb->resolve_initial_references("NetworkPriorityMappingManager"); + RTCORBA::NetworkPriorityMappingManager_var mappingManager = RTCORBA::NetworkPriorityMappingManager::_narrow( netmapper.in() ); + + Custom_Network_Priority_Mapping *cnpm; + cnpm = new Custom_Network_Priority_Mapping(); + + cnpm->corba_priority(corbaPriority); + mappingManager->mapping(cnpm); + + // access RT Extensions + CORBA::Object_var rtorb = orb->resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<<std::endl; + + // Set transport protocol properties + RTCORBA::TCPProtocolProperties_var tcpProperties = rtORB->create_tcp_protocol_properties (ACE_DEFAULT_MAX_SOCKET_BUFSIZ, ACE_DEFAULT_MAX_SOCKET_BUFSIZ, 1, 0, 1, 1 /*enable netw. priority*/); + + RTCORBA::ProtocolList protocols; + protocols.length (1); + protocols[0].protocol_type = 0; + protocols[0].transport_protocol_properties = RTCORBA::ProtocolProperties::_duplicate (tcpProperties.in ()); + protocols[0].orb_protocol_properties = RTCORBA::ProtocolProperties::_nil (); + + // obtain rootPOA + CORBA::Object_var poa = orb->resolve_initial_references("RootPOA"); + PortableServer::POA_var rootPOA = PortableServer::POA::_narrow(poa.in()); + + // NameService + CORBA::Object_var namingObject = orb->resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + + // activate POA Manager + PortableServer::POAManager_var poaManager = rootPOA->the_POAManager(); + poaManager->activate(); + std::cout<<"rootPOA OK"<<std::endl; + + // create 2 lanes (message and port) + CORBA::ULong TOTAL_LANES = 2; + RTCORBA::ThreadpoolLanes lanes(TOTAL_LANES); + lanes.length(TOTAL_LANES); + + // message lane + lanes[0].static_threads = 1; + lanes[0].dynamic_threads = 1; + lanes[0].lane_priority = 0; + + // port lane + lanes[1].static_threads = 1; + lanes[1].dynamic_threads = 1; + lanes[1].lane_priority = RTCORBA::maxPriority; + + // create threadpool + RTCORBA::ThreadpoolId threadpool_id = rtORB->create_threadpool_with_lanes(0 /*Stacksize*/, lanes, 0 /*borrowing*/, 0 /*buffering*/, 0 /*maxBuf*/, 0 /*maxBufSize*/); + + // create Policy + CORBA::PolicyList benchPolicy(3); + benchPolicy.length(3); + benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, 0 /*default priority*/); + benchPolicy[1] = rtORB->create_threadpool_policy(threadpool_id); + benchPolicy[2] = rtORB->create_server_protocol_policy (protocols); + + // create ObjectAdapters, assign Policy + PortableServer::POA_var msgAndPort1POA = rootPOA->create_POA("msgAndPort1POA", poaManager.in(), benchPolicy); + PortableServer::POA_var msgAndPort2POA = rootPOA->create_POA("msgAndPort2POA", poaManager.in(), benchPolicy); + PortableServer::POA_var msgOnlyPOA = rootPOA->create_POA("msgOnlyPOA", poaManager.in(), benchPolicy); + + // benchPolicy[0] = rtORB->create_priority_model_policy(RTCORBA::CLIENT_PROPAGATED, 0 /*default priority*/); + + PortableServer::POA_var portOnlyPOA = rootPOA->create_POA("portOnlyPOA", poaManager.in(), benchPolicy); + std::cout<<"POAs created, Policies assigned"<<std::endl; + + // create the servants + benchmark_msgAndPort1_i msgAndPort1_i(orb); + benchmark_msgAndPort2_i msgAndPort2_i(orb); + benchmark_msgOnly_i msgOnly_i(orb); + benchmark_setPortsOnly_i portOnly_i(orb); + + // activate servants + CosNaming::Name name(1); + name.length(1); + + PortableServer::ObjectId_var objectID = msgAndPort1POA->activate_object(&msgAndPort1_i); + CORBA::Object_var benchObj = msgAndPort1POA->id_to_reference(objectID.in()); + name[0].id = CORBA::string_dup("msgAndPort1"); + namingContext->bind(name, benchObj.in()); + + objectID = msgAndPort2POA->activate_object(&msgAndPort2_i); + benchObj = msgAndPort2POA->id_to_reference(objectID.in()); + name[0].id = CORBA::string_dup("msgAndPort2"); + namingContext->bind(name, benchObj.in()); + + objectID = msgOnlyPOA->activate_object(&msgOnly_i); + benchObj = msgOnlyPOA->id_to_reference(objectID.in()); + name[0].id = CORBA::string_dup("msgOnly"); + namingContext->bind(name, benchObj.in()); + + objectID = portOnlyPOA->activate_object(&portOnly_i); + benchObj = portOnlyPOA->id_to_reference(objectID.in()); + name[0].id = CORBA::string_dup("portOnly"); + namingContext->bind(name, benchObj.in()); + + std::cout<<"Servants activated"<<std::endl; + + // start ORB + orb->run(); + std::cout<<"ORB ready"<<std::endl; + + //destroy + rootPOA->destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<<any<<std::endl; + } + return 0; +} + diff --git a/quellcode/versuch5/bench.idl b/quellcode/versuch5/bench.idl new file mode 100755 index 0000000..40385f4 --- /dev/null +++ b/quellcode/versuch5/bench.idl @@ -0,0 +1,29 @@ +module benchmark{ + + struct msg{ + string sender; + string message; + }; + + exception invalidRequest{}; + + interface msgAndPort1{ + void connect() raises(invalidRequest); + void setPorts( in short valPort1, in short valPort2, in short valPort3) raises(invalidRequest); + boolean sendMsg( in msg message) raises(invalidRequest); + }; + + interface msgAndPort2{ + void connect() raises(invalidRequest); + void setPortsSendMsg( in short valPort1, in short valPort2, in short valPort3, in msg message) raises(invalidRequest); + }; + + interface msgOnly{ + boolean sendMsg( in msg message) raises(invalidRequest); + }; + + interface setPortsOnly{ + void connect() raises(invalidRequest); + void setPorts( in short valPort1, in short valPort2, in short valPort3) raises(invalidRequest); + }; +}; diff --git a/quellcode/versuch5/bench.mpc b/quellcode/versuch5/bench.mpc new file mode 100755 index 0000000..8a91cb3 --- /dev/null +++ b/quellcode/versuch5/bench.mpc @@ -0,0 +1,25 @@ +project(*Server): rt_server, naming { + requires += exceptions + Source_Files { + Custom_Network_Priority_Mapping.cpp + cpx.cpp + bench_i.cpp + Server.cpp + } + Header_Files { + cpx.h + } +} + +project(*Client): rt_client, naming { + requires += exceptions + Source_Files { + Custom_Network_Priority_Mapping.cpp + cpx.cpp + benchC.cpp + Client.cpp + } + Header_Files { + cpx.h + } +} diff --git a/quellcode/versuch5/benchC.cpp b/quellcode/versuch5/benchC.cpp new file mode 100755 index 0000000..78802ea --- /dev/null +++ b/quellcode/versuch5/benchC.cpp @@ -0,0 +1,2322 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:283 + + +#include "benchC.h" +#include "tao/AnyTypeCode/Null_RefCount_Policy.h" +#include "tao/AnyTypeCode/TypeCode_Constants.h" +#include "tao/AnyTypeCode/Alias_TypeCode_Static.h" +#include "tao/AnyTypeCode/Objref_TypeCode_Static.h" +#include "tao/AnyTypeCode/String_TypeCode_Static.h" +#include "tao/AnyTypeCode/Struct_TypeCode_Static.h" +#include "tao/AnyTypeCode/TypeCode_Struct_Field.h" +#include "tao/CDR.h" +#include "tao/Exception_Data.h" +#include "tao/Invocation_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/Any.h" +#include "tao/AnyTypeCode/Any_Impl_T.h" +#include "tao/AnyTypeCode/Any_Dual_Impl_T.h" +#include "tao/Basic_Arguments.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/Var_Size_Argument_T.h" +#include "ace/OS_NS_string.h" + +#if !defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ + + // TAO_IDL - Generated from + // be/be_visitor_arg_traits.cpp:893 + +#if !defined (_BENCHMARK_MSG__ARG_TRAITS_) +#define _BENCHMARK_MSG__ARG_TRAITS_ + + template<> + class Arg_Traits<benchmark::msg> + : public + Var_Size_Arg_Traits_T< + benchmark::msg, + benchmark::msg_var, + benchmark::msg_out, + TAO::Any_Insert_Policy_Stream <benchmark::msg> + > + { + }; + +#endif /* end #if !defined */ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_typecode/struct_typecode.cpp:89 + +static TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const _tao_fields_benchmark_msg[] = + { + { "sender", &CORBA::_tc_string }, + { "message", &CORBA::_tc_string } + + }; +static TAO::TypeCode::Struct<char const *, + ::CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_msg ( + ::CORBA::tk_struct, + "IDL:benchmark/msg:1.0", + "msg", + _tao_fields_benchmark_msg, + 2); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_msg = + &_tao_tc_benchmark_msg; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/structure_cs.cpp:66 + +void +benchmark::msg::_tao_any_destructor ( + void *_tao_void_pointer + ) +{ + msg *_tao_tmp_pointer = + static_cast<msg *> (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +// TAO_IDL - Generated from +// be/be_visitor_exception/exception_cs.cpp:63 + +benchmark::invalidRequest::invalidRequest (void) + : ::CORBA::UserException ( + "IDL:benchmark/invalidRequest:1.0", + "invalidRequest" + ) +{ +} + +benchmark::invalidRequest::~invalidRequest (void) +{ +} + +benchmark::invalidRequest::invalidRequest (const ::benchmark::invalidRequest &_tao_excp) + : ::CORBA::UserException ( + _tao_excp._rep_id (), + _tao_excp._name () + ) +{ +} + +benchmark::invalidRequest& +benchmark::invalidRequest::operator= (const ::benchmark::invalidRequest &_tao_excp) +{ + this->ACE_NESTED_CLASS ( ::CORBA, UserException)::operator= (_tao_excp); + return *this; +} + +void benchmark::invalidRequest::_tao_any_destructor (void *_tao_void_pointer) +{ + invalidRequest *_tao_tmp_pointer = + static_cast<invalidRequest *> (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception *_tao_excp) +{ + return dynamic_cast<invalidRequest *> (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception const *_tao_excp) +{ + return dynamic_cast<const invalidRequest *> (_tao_excp); +} + +::CORBA::Exception *benchmark::invalidRequest::_alloc (void) +{ + ::CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::benchmark::invalidRequest, 0); + return retval; +} + +::CORBA::Exception * +benchmark::invalidRequest::_tao_duplicate (void) const +{ + ::CORBA::Exception *result = 0; + ACE_NEW_RETURN ( + result, + ::benchmark::invalidRequest (*this), + 0 + ); + return result; +} + +void benchmark::invalidRequest::_raise (void) const +{ + TAO_RAISE (*this); +} + +void benchmark::invalidRequest::_tao_encode ( + TAO_OutputCDR &cdr + ACE_ENV_ARG_DECL + ) const +{ + if (cdr << *this) + { + return; + } + + ACE_THROW ( ::CORBA::MARSHAL ()); +} + +void benchmark::invalidRequest::_tao_decode ( + TAO_InputCDR &cdr + ACE_ENV_ARG_DECL + ) +{ + if (cdr >> *this) + { + return; + } + + ACE_THROW ( ::CORBA::MARSHAL ()); +} + +// TAO extension - the virtual _type method. +::CORBA::TypeCode_ptr benchmark::invalidRequest::_tao_type (void) const +{ + return ::benchmark::_tc_invalidRequest; +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/struct_typecode.cpp:89 + +static TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const * const _tao_fields_benchmark_invalidRequest = 0; +static TAO::TypeCode::Struct<char const *, + ::CORBA::TypeCode_ptr const *, + TAO::TypeCode::Struct_Field<char const *, ::CORBA::TypeCode_ptr const *> const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_invalidRequest ( + ::CORBA::tk_except, + "IDL:benchmark/invalidRequest:1.0", + "invalidRequest", + _tao_fields_benchmark_invalidRequest, + 0); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_invalidRequest = + &_tao_tc_benchmark_invalidRequest; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for benchmark::msgAndPort1. + +benchmark::msgAndPort1_ptr +TAO::Objref_Traits<benchmark::msgAndPort1>::duplicate ( + benchmark::msgAndPort1_ptr p + ) +{ + return benchmark::msgAndPort1::_duplicate (p); +} + +void +TAO::Objref_Traits<benchmark::msgAndPort1>::release ( + benchmark::msgAndPort1_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::msgAndPort1_ptr +TAO::Objref_Traits<benchmark::msgAndPort1>::nil (void) +{ + return benchmark::msgAndPort1::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<benchmark::msgAndPort1>::marshal ( + const benchmark::msgAndPort1_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::msgAndPort1::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_msgAndPort1_Proxy_Broker_ == 0) + { + benchmark_msgAndPort1_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_benchmark_msgAndPort1_connect_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_msgAndPort1_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_msgAndPort1_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::msgAndPort1::setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_msgAndPort1_Proxy_Broker_ == 0) + { + benchmark_msgAndPort1_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static TAO::Exception_Data + _tao_benchmark_msgAndPort1_setPorts_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "setPorts", + 8, + this->the_TAO_msgAndPort1_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_msgAndPort1_setPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +::CORBA::Boolean benchmark::msgAndPort1::sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_msgAndPort1_Proxy_Broker_ == 0) + { + benchmark_msgAndPort1_setup_collocation (); + } + + TAO::Arg_Traits< ::ACE_InputCDR::to_boolean>::ret_val _tao_retval; + TAO::Arg_Traits< ::benchmark::msg>::in_arg_val _tao_message (message); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_message + }; + + static TAO::Exception_Data + _tao_benchmark_msgAndPort1_sendMsg_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 2, + "sendMsg", + 7, + this->the_TAO_msgAndPort1_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_msgAndPort1_sendMsg_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (_tao_retval.excp ()); + + return _tao_retval.retn (); +} + +benchmark::msgAndPort1::msgAndPort1 (void) + : the_TAO_msgAndPort1_Proxy_Broker_ (0) +{ + this->benchmark_msgAndPort1_setup_collocation (); +} + +void +benchmark::msgAndPort1::benchmark_msgAndPort1_setup_collocation () +{ + if (::benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_msgAndPort1_Proxy_Broker_ = + ::benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer (this); + } +} + +benchmark::msgAndPort1::~msgAndPort1 (void) +{} + +void +benchmark::msgAndPort1::_tao_any_destructor (void *_tao_void_pointer) +{ + msgAndPort1 *_tao_tmp_pointer = + static_cast<msgAndPort1 *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +benchmark::msgAndPort1_ptr +benchmark::msgAndPort1::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<msgAndPort1>::narrow ( + _tao_objref, + "IDL:benchmark/msgAndPort1:1.0", + benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::msgAndPort1_ptr +benchmark::msgAndPort1::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<msgAndPort1>::unchecked_narrow ( + _tao_objref, + "IDL:benchmark/msgAndPort1:1.0", + benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::msgAndPort1_ptr +benchmark::msgAndPort1::_duplicate (msgAndPort1_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +benchmark::msgAndPort1::_tao_release (msgAndPort1_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +benchmark::msgAndPort1::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/msgAndPort1:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* benchmark::msgAndPort1::_interface_repository_id (void) const +{ + return "IDL:benchmark/msgAndPort1:1.0"; +} + +::CORBA::Boolean +benchmark::msgAndPort1::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_msgAndPort1 ( + ::CORBA::tk_objref, + "IDL:benchmark/msgAndPort1:1.0", + "msgAndPort1"); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_msgAndPort1 = + &_tao_tc_benchmark_msgAndPort1; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for benchmark::msgAndPort2. + +benchmark::msgAndPort2_ptr +TAO::Objref_Traits<benchmark::msgAndPort2>::duplicate ( + benchmark::msgAndPort2_ptr p + ) +{ + return benchmark::msgAndPort2::_duplicate (p); +} + +void +TAO::Objref_Traits<benchmark::msgAndPort2>::release ( + benchmark::msgAndPort2_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::msgAndPort2_ptr +TAO::Objref_Traits<benchmark::msgAndPort2>::nil (void) +{ + return benchmark::msgAndPort2::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<benchmark::msgAndPort2>::marshal ( + const benchmark::msgAndPort2_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::msgAndPort2::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_msgAndPort2_Proxy_Broker_ == 0) + { + benchmark_msgAndPort2_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_benchmark_msgAndPort2_connect_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_msgAndPort2_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_msgAndPort2_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::msgAndPort2::setPortsSendMsg ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3, + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_msgAndPort2_Proxy_Broker_ == 0) + { + benchmark_msgAndPort2_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + TAO::Arg_Traits< ::benchmark::msg>::in_arg_val _tao_message (message); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3, + &_tao_message + }; + + static TAO::Exception_Data + _tao_benchmark_msgAndPort2_setPortsSendMsg_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 5, + "setPortsSendMsg", + 15, + this->the_TAO_msgAndPort2_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_msgAndPort2_setPortsSendMsg_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +benchmark::msgAndPort2::msgAndPort2 (void) + : the_TAO_msgAndPort2_Proxy_Broker_ (0) +{ + this->benchmark_msgAndPort2_setup_collocation (); +} + +void +benchmark::msgAndPort2::benchmark_msgAndPort2_setup_collocation () +{ + if (::benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_msgAndPort2_Proxy_Broker_ = + ::benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer (this); + } +} + +benchmark::msgAndPort2::~msgAndPort2 (void) +{} + +void +benchmark::msgAndPort2::_tao_any_destructor (void *_tao_void_pointer) +{ + msgAndPort2 *_tao_tmp_pointer = + static_cast<msgAndPort2 *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +benchmark::msgAndPort2_ptr +benchmark::msgAndPort2::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<msgAndPort2>::narrow ( + _tao_objref, + "IDL:benchmark/msgAndPort2:1.0", + benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::msgAndPort2_ptr +benchmark::msgAndPort2::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<msgAndPort2>::unchecked_narrow ( + _tao_objref, + "IDL:benchmark/msgAndPort2:1.0", + benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::msgAndPort2_ptr +benchmark::msgAndPort2::_duplicate (msgAndPort2_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +benchmark::msgAndPort2::_tao_release (msgAndPort2_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +benchmark::msgAndPort2::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/msgAndPort2:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* benchmark::msgAndPort2::_interface_repository_id (void) const +{ + return "IDL:benchmark/msgAndPort2:1.0"; +} + +::CORBA::Boolean +benchmark::msgAndPort2::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_msgAndPort2 ( + ::CORBA::tk_objref, + "IDL:benchmark/msgAndPort2:1.0", + "msgAndPort2"); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_msgAndPort2 = + &_tao_tc_benchmark_msgAndPort2; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for benchmark::msgOnly. + +benchmark::msgOnly_ptr +TAO::Objref_Traits<benchmark::msgOnly>::duplicate ( + benchmark::msgOnly_ptr p + ) +{ + return benchmark::msgOnly::_duplicate (p); +} + +void +TAO::Objref_Traits<benchmark::msgOnly>::release ( + benchmark::msgOnly_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::msgOnly_ptr +TAO::Objref_Traits<benchmark::msgOnly>::nil (void) +{ + return benchmark::msgOnly::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<benchmark::msgOnly>::marshal ( + const benchmark::msgOnly_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +::CORBA::Boolean benchmark::msgOnly::sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_msgOnly_Proxy_Broker_ == 0) + { + benchmark_msgOnly_setup_collocation (); + } + + TAO::Arg_Traits< ::ACE_InputCDR::to_boolean>::ret_val _tao_retval; + TAO::Arg_Traits< ::benchmark::msg>::in_arg_val _tao_message (message); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_message + }; + + static TAO::Exception_Data + _tao_benchmark_msgOnly_sendMsg_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 2, + "sendMsg", + 7, + this->the_TAO_msgOnly_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_msgOnly_sendMsg_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK_RETURN (_tao_retval.excp ()); + + return _tao_retval.retn (); +} + +benchmark::msgOnly::msgOnly (void) + : the_TAO_msgOnly_Proxy_Broker_ (0) +{ + this->benchmark_msgOnly_setup_collocation (); +} + +void +benchmark::msgOnly::benchmark_msgOnly_setup_collocation () +{ + if (::benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_msgOnly_Proxy_Broker_ = + ::benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer (this); + } +} + +benchmark::msgOnly::~msgOnly (void) +{} + +void +benchmark::msgOnly::_tao_any_destructor (void *_tao_void_pointer) +{ + msgOnly *_tao_tmp_pointer = + static_cast<msgOnly *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +benchmark::msgOnly_ptr +benchmark::msgOnly::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<msgOnly>::narrow ( + _tao_objref, + "IDL:benchmark/msgOnly:1.0", + benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::msgOnly_ptr +benchmark::msgOnly::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<msgOnly>::unchecked_narrow ( + _tao_objref, + "IDL:benchmark/msgOnly:1.0", + benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::msgOnly_ptr +benchmark::msgOnly::_duplicate (msgOnly_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +benchmark::msgOnly::_tao_release (msgOnly_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +benchmark::msgOnly::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/msgOnly:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* benchmark::msgOnly::_interface_repository_id (void) const +{ + return "IDL:benchmark/msgOnly:1.0"; +} + +::CORBA::Boolean +benchmark::msgOnly::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_msgOnly ( + ::CORBA::tk_objref, + "IDL:benchmark/msgOnly:1.0", + "msgOnly"); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_msgOnly = + &_tao_tc_benchmark_msgOnly; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_cs.cpp:60 + +// Traits specializations for benchmark::setPortsOnly. + +benchmark::setPortsOnly_ptr +TAO::Objref_Traits<benchmark::setPortsOnly>::duplicate ( + benchmark::setPortsOnly_ptr p + ) +{ + return benchmark::setPortsOnly::_duplicate (p); +} + +void +TAO::Objref_Traits<benchmark::setPortsOnly>::release ( + benchmark::setPortsOnly_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::setPortsOnly_ptr +TAO::Objref_Traits<benchmark::setPortsOnly>::nil (void) +{ + return benchmark::setPortsOnly::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits<benchmark::setPortsOnly>::marshal ( + const benchmark::setPortsOnly_ptr p, + TAO_OutputCDR & cdr + ) +{ + return ::CORBA::Object::marshal (p, cdr); +} + +// Function pointer for collocation factory initialization. +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ) = 0; + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::setPortsOnly::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_setPortsOnly_Proxy_Broker_ == 0) + { + benchmark_setPortsOnly_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval + }; + + static TAO::Exception_Data + _tao_benchmark_setPortsOnly_connect_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 1, + "connect", + 7, + this->the_TAO_setPortsOnly_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_setPortsOnly_connect_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_cs.cpp:78 + +void benchmark::setPortsOnly::setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + if (!this->is_evaluated ()) + { + ACE_NESTED_CLASS ( ::CORBA, Object)::tao_object_initialize (this); + } + + if (this->the_TAO_setPortsOnly_Proxy_Broker_ == 0) + { + benchmark_setPortsOnly_setup_collocation (); + } + + TAO::Arg_Traits< void>::ret_val _tao_retval; + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1 (valPort1); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2 (valPort2); + TAO::Arg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3 (valPort3); + + TAO::Argument *_the_tao_operation_signature [] = + { + &_tao_retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static TAO::Exception_Data + _tao_benchmark_setPortsOnly_setPorts_exceptiondata [] = + { + { + "IDL:benchmark/invalidRequest:1.0", + benchmark::invalidRequest::_alloc +#if TAO_HAS_INTERCEPTORS == 1 + , benchmark::_tc_invalidRequest +#endif /* TAO_HAS_INTERCEPTORS */ + } + }; + + TAO::Invocation_Adapter _tao_call ( + this, + _the_tao_operation_signature, + 4, + "setPorts", + 8, + this->the_TAO_setPortsOnly_Proxy_Broker_ + ); + + _tao_call.invoke ( + _tao_benchmark_setPortsOnly_setPorts_exceptiondata, + 1 + ACE_ENV_ARG_PARAMETER + ); + ACE_CHECK; +} + +benchmark::setPortsOnly::setPortsOnly (void) + : the_TAO_setPortsOnly_Proxy_Broker_ (0) +{ + this->benchmark_setPortsOnly_setup_collocation (); +} + +void +benchmark::setPortsOnly::benchmark_setPortsOnly_setup_collocation () +{ + if (::benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer) + { + this->the_TAO_setPortsOnly_Proxy_Broker_ = + ::benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer (this); + } +} + +benchmark::setPortsOnly::~setPortsOnly (void) +{} + +void +benchmark::setPortsOnly::_tao_any_destructor (void *_tao_void_pointer) +{ + setPortsOnly *_tao_tmp_pointer = + static_cast<setPortsOnly *> (_tao_void_pointer); + CORBA::release (_tao_tmp_pointer); +} + +benchmark::setPortsOnly_ptr +benchmark::setPortsOnly::_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<setPortsOnly>::narrow ( + _tao_objref, + "IDL:benchmark/setPortsOnly:1.0", + benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::setPortsOnly_ptr +benchmark::setPortsOnly::_unchecked_narrow ( + ::CORBA::Object_ptr _tao_objref + ACE_ENV_ARG_DECL + ) +{ + return + TAO::Narrow_Utils<setPortsOnly>::unchecked_narrow ( + _tao_objref, + "IDL:benchmark/setPortsOnly:1.0", + benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer + ACE_ENV_ARG_PARAMETER + ); +} + +benchmark::setPortsOnly_ptr +benchmark::setPortsOnly::_duplicate (setPortsOnly_ptr obj) +{ + if (! CORBA::is_nil (obj)) + { + obj->_add_ref (); + } + + return obj; +} + +void +benchmark::setPortsOnly::_tao_release (setPortsOnly_ptr obj) +{ + CORBA::release (obj); +} + +::CORBA::Boolean +benchmark::setPortsOnly::_is_a ( + const char *value + ACE_ENV_ARG_DECL + ) +{ + if ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/setPortsOnly:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ) + { + return true; // success using local knowledge + } + else + { + return this->ACE_NESTED_CLASS ( ::CORBA, Object)::_is_a ( + value + ACE_ENV_ARG_PARAMETER + ); + } +} + +const char* benchmark::setPortsOnly::_interface_repository_id (void) const +{ + return "IDL:benchmark/setPortsOnly:1.0"; +} + +::CORBA::Boolean +benchmark::setPortsOnly::marshal (TAO_OutputCDR &cdr) +{ + return (cdr << this); +} + +// TAO_IDL - Generated from +// be/be_visitor_typecode/objref_typecode.cpp:76 + +static TAO::TypeCode::Objref<char const *, + TAO::Null_RefCount_Policy> + _tao_tc_benchmark_setPortsOnly ( + ::CORBA::tk_objref, + "IDL:benchmark/setPortsOnly:1.0", + "setPortsOnly"); + +namespace benchmark +{ + ::CORBA::TypeCode_ptr const _tc_setPortsOnly = + &_tao_tc_benchmark_setPortsOnly; +} + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/any_op_cs.cpp:54 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +// Copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + const benchmark::msg &_tao_elem + ) +{ + if (0 == &_tao_elem) // Trying to de-reference NULL object + _tao_any <<= static_cast<benchmark::msg *>( 0 ); // Use non-copying insertion of a NULL + else + TAO::Any_Dual_Impl_T<benchmark::msg>::insert_copy ( + _tao_any, + benchmark::msg::_tao_any_destructor, + benchmark::_tc_msg, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::msg *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::msg>::insert ( + _tao_any, + benchmark::msg::_tao_any_destructor, + benchmark::_tc_msg, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::msg *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const benchmark::msg *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + const benchmark::msg *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<benchmark::msg>::extract ( + _tao_any, + benchmark::msg::_tao_any_destructor, + benchmark::_tc_msg, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_cs.cpp:50 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Dual_Impl_T<benchmark::invalidRequest>::demarshal_value ( + TAO_InputCDR & cdr + ) + { + ::CORBA::String_var id; + + if (!(cdr >> id.out ())) + { + return false; + } + + ACE_TRY_NEW_ENV + { + this->value_->_tao_decode (cdr ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + return false; + } + ACE_ENDTRY; + + return true; + } +} + +// Copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + const benchmark::invalidRequest &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert_copy ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Non-copying insertion. +void operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::invalidRequest *_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::insert ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} + +// Extraction to non-const pointer (deprecated). +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::invalidRequest *&_tao_elem + ) +{ + return _tao_any >>= const_cast< + const benchmark::invalidRequest *&> ( + _tao_elem + ); +} + +// Extraction to const pointer. +::CORBA::Boolean operator>>= ( + const ::CORBA::Any &_tao_any, + const benchmark::invalidRequest *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<benchmark::invalidRequest>::extract ( + _tao_any, + benchmark::invalidRequest::_tao_any_destructor, + benchmark::_tc_invalidRequest, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<benchmark::msgAndPort1>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + msgAndPort1_ptr _tao_elem + ) + { + msgAndPort1_ptr _tao_objptr = + msgAndPort1::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + msgAndPort1_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<msgAndPort1>::insert ( + _tao_any, + msgAndPort1::_tao_any_destructor, + _tc_msgAndPort1, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + msgAndPort1_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<msgAndPort1>::extract ( + _tao_any, + msgAndPort1::_tao_any_destructor, + _tc_msgAndPort1, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::msgAndPort1_ptr _tao_elem + ) +{ + benchmark::msgAndPort1_ptr _tao_objptr = + benchmark::msgAndPort1::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::msgAndPort1_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<benchmark::msgAndPort1>::insert ( + _tao_any, + benchmark::msgAndPort1::_tao_any_destructor, + benchmark::_tc_msgAndPort1, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::msgAndPort1_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<benchmark::msgAndPort1>::extract ( + _tao_any, + benchmark::msgAndPort1::_tao_any_destructor, + benchmark::_tc_msgAndPort1, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<benchmark::msgAndPort2>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + msgAndPort2_ptr _tao_elem + ) + { + msgAndPort2_ptr _tao_objptr = + msgAndPort2::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + msgAndPort2_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<msgAndPort2>::insert ( + _tao_any, + msgAndPort2::_tao_any_destructor, + _tc_msgAndPort2, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + msgAndPort2_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<msgAndPort2>::extract ( + _tao_any, + msgAndPort2::_tao_any_destructor, + _tc_msgAndPort2, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::msgAndPort2_ptr _tao_elem + ) +{ + benchmark::msgAndPort2_ptr _tao_objptr = + benchmark::msgAndPort2::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::msgAndPort2_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<benchmark::msgAndPort2>::insert ( + _tao_any, + benchmark::msgAndPort2::_tao_any_destructor, + benchmark::_tc_msgAndPort2, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::msgAndPort2_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<benchmark::msgAndPort2>::extract ( + _tao_any, + benchmark::msgAndPort2::_tao_any_destructor, + benchmark::_tc_msgAndPort2, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<benchmark::msgOnly>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + msgOnly_ptr _tao_elem + ) + { + msgOnly_ptr _tao_objptr = + msgOnly::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + msgOnly_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<msgOnly>::insert ( + _tao_any, + msgOnly::_tao_any_destructor, + _tc_msgOnly, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + msgOnly_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<msgOnly>::extract ( + _tao_any, + msgOnly::_tao_any_destructor, + _tc_msgOnly, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::msgOnly_ptr _tao_elem + ) +{ + benchmark::msgOnly_ptr _tao_objptr = + benchmark::msgOnly::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::msgOnly_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<benchmark::msgOnly>::insert ( + _tao_any, + benchmark::msgOnly::_tao_any_destructor, + benchmark::_tc_msgOnly, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::msgOnly_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<benchmark::msgOnly>::extract ( + _tao_any, + benchmark::msgOnly::_tao_any_destructor, + benchmark::_tc_msgOnly, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_cs.cpp:51 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + template<> + ::CORBA::Boolean + Any_Impl_T<benchmark::setPortsOnly>::to_object ( + ::CORBA::Object_ptr &_tao_elem + ) const + { + _tao_elem = ::CORBA::Object::_duplicate (this->value_); + return true; + } +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + + + // Copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + setPortsOnly_ptr _tao_elem + ) + { + setPortsOnly_ptr _tao_objptr = + setPortsOnly::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; + } + + // Non-copying insertion. + void + operator<<= ( + ::CORBA::Any &_tao_any, + setPortsOnly_ptr *_tao_elem + ) + { + TAO::Any_Impl_T<setPortsOnly>::insert ( + _tao_any, + setPortsOnly::_tao_any_destructor, + _tc_setPortsOnly, + *_tao_elem + ); + } + + ::CORBA::Boolean + operator>>= ( + const ::CORBA::Any &_tao_any, + setPortsOnly_ptr &_tao_elem + ) + { + return + TAO::Any_Impl_T<setPortsOnly>::extract ( + _tao_any, + setPortsOnly::_tao_any_destructor, + _tc_setPortsOnly, + _tao_elem + ); + } +} + +#else + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::setPortsOnly_ptr _tao_elem + ) +{ + benchmark::setPortsOnly_ptr _tao_objptr = + benchmark::setPortsOnly::_duplicate (_tao_elem); + _tao_any <<= &_tao_objptr; +} + +// Non-copying insertion. +void +operator<<= ( + ::CORBA::Any &_tao_any, + benchmark::setPortsOnly_ptr *_tao_elem + ) +{ + TAO::Any_Impl_T<benchmark::setPortsOnly>::insert ( + _tao_any, + benchmark::setPortsOnly::_tao_any_destructor, + benchmark::_tc_setPortsOnly, + *_tao_elem + ); +} + +::CORBA::Boolean +operator>>= ( + const ::CORBA::Any &_tao_any, + benchmark::setPortsOnly_ptr &_tao_elem + ) +{ + return + TAO::Any_Impl_T<benchmark::setPortsOnly>::extract ( + _tao_any, + benchmark::setPortsOnly::_tao_any_destructor, + benchmark::_tc_setPortsOnly, + _tao_elem + ); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_structure/cdr_op_cs.cpp:61 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::msg &_tao_aggregate + ) +{ + return + (strm << _tao_aggregate.sender.in ()) && + (strm << _tao_aggregate.message.in ()); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::msg &_tao_aggregate + ) +{ + return + (strm >> _tao_aggregate.sender.out ()) && + (strm >> _tao_aggregate.message.out ()); +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_cs.cpp:60 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::invalidRequest &_tao_aggregate + ) +{ + // Marshal the repository ID. + return (strm << _tao_aggregate._rep_id ()); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &, + benchmark::invalidRequest& + ) +{ + return true; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::msgAndPort1_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::msgAndPort1_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::benchmark::msgAndPort1 RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::msgAndPort2_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::msgAndPort2_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::benchmark::msgAndPort2 RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::msgOnly_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::msgOnly_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::benchmark::msgOnly RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_cs.cpp:63 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +::CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const benchmark::setPortsOnly_ptr _tao_objref + ) +{ + ::CORBA::Object_ptr _tao_corba_obj = _tao_objref; + return (strm << _tao_corba_obj); +} + +::CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + benchmark::setPortsOnly_ptr &_tao_objref + ) +{ + ::CORBA::Object_var obj; + + if (!(strm >> obj.inout ())) + { + return false; + } + + typedef ::benchmark::setPortsOnly RHS_SCOPED_NAME; + + // Narrow to the right type. + _tao_objref = + TAO::Narrow_Utils<RHS_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer + ); + + return 1; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + diff --git a/quellcode/versuch5/benchC.h b/quellcode/versuch5/benchC.h new file mode 100755 index 0000000..655e0cb --- /dev/null +++ b/quellcode/versuch5/benchC.h @@ -0,0 +1,1046 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:155 + +#ifndef _TAO_IDL_BENCHC_H_ +#define _TAO_IDL_BENCHC_H_ + + +#include "ace/config-all.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/AnyTypeCode/AnyTypeCode_methods.h" +#include "tao/ORB.h" +#include "tao/SystemException.h" +#include "tao/Environment.h" +#include "tao/Object.h" +#include "tao/Managed_Types.h" +#include "tao/Objref_VarOut_T.h" +#include "tao/VarOut_T.h" +#include "tao/Versioned_Namespace.h" + +#if defined (TAO_EXPORT_MACRO) +#undef TAO_EXPORT_MACRO +#endif +#define TAO_EXPORT_MACRO + +// TAO_IDL - Generated from +// be/be_visitor_root/root_ch.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +namespace TAO +{ + class Collocation_Proxy_Broker; + template<typename T> class Narrow_Utils; +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:49 + +namespace benchmark +{ + + // TAO_IDL - Generated from + // be/be_type.cpp:258 + + struct msg; + + typedef + TAO_Var_Var_T< + msg + > + msg_var; + + typedef + TAO_Out_T< + msg, + msg_var + > + msg_out; + + // TAO_IDL - Generated from + // be/be_visitor_structure/structure_ch.cpp:57 + + struct msg + { + typedef msg_var _var_type; + + static void _tao_any_destructor (void *); + TAO_String_Manager sender; + TAO_String_Manager message; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_msg; + + // TAO_IDL - Generated from + // be/be_visitor_exception/exception_ch.cpp:53 + +#if !defined (_BENCHMARK_INVALIDREQUEST_CH_) +#define _BENCHMARK_INVALIDREQUEST_CH_ + + class invalidRequest : public ::CORBA::UserException + { + public: + + invalidRequest (void); + invalidRequest (const invalidRequest &); + ~invalidRequest (void); + + invalidRequest &operator= (const invalidRequest &); + + static void _tao_any_destructor (void *); + + static invalidRequest *_downcast ( ::CORBA::Exception *); + static const invalidRequest *_downcast ( ::CORBA::Exception const *); + + static ::CORBA::Exception *_alloc (void); + + virtual ::CORBA::Exception *_tao_duplicate (void) const; + + virtual void _raise (void) const; + + virtual void _tao_encode ( + TAO_OutputCDR & + ACE_ENV_ARG_DECL + ) const; + + virtual void _tao_decode ( + TAO_InputCDR & + ACE_ENV_ARG_DECL + ); + + virtual ::CORBA::TypeCode_ptr _tao_type (void) const; + }; + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_invalidRequest; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_BENCHMARK_MSGANDPORT1__VAR_OUT_CH_) +#define _BENCHMARK_MSGANDPORT1__VAR_OUT_CH_ + + class msgAndPort1; + typedef msgAndPort1 *msgAndPort1_ptr; + + typedef + TAO_Objref_Var_T< + msgAndPort1 + > + msgAndPort1_var; + + typedef + TAO_Objref_Out_T< + msgAndPort1 + > + msgAndPort1_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_BENCHMARK_MSGANDPORT1_CH_) +#define _BENCHMARK_MSGANDPORT1_CH_ + + class msgAndPort1 + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<msgAndPort1>; + typedef msgAndPort1_ptr _ptr_type; + typedef msgAndPort1_var _var_type; + + // The static operations. + static msgAndPort1_ptr _duplicate (msgAndPort1_ptr obj); + + static void _tao_release (msgAndPort1_ptr obj); + + static msgAndPort1_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static msgAndPort1_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static msgAndPort1_ptr _nil (void) + { + return static_cast<msgAndPort1_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_msgAndPort1_Proxy_Broker_; + + protected: + // Concrete interface only. + msgAndPort1 (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void benchmark_msgAndPort1_setup_collocation (void); + + // Concrete non-local interface only. + msgAndPort1 ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + msgAndPort1 ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~msgAndPort1 (void); + + private: + // Private and unimplemented for concrete interfaces. + msgAndPort1 (const msgAndPort1 &); + + void operator= (const msgAndPort1 &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_msgAndPort1; + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_BENCHMARK_MSGANDPORT2__VAR_OUT_CH_) +#define _BENCHMARK_MSGANDPORT2__VAR_OUT_CH_ + + class msgAndPort2; + typedef msgAndPort2 *msgAndPort2_ptr; + + typedef + TAO_Objref_Var_T< + msgAndPort2 + > + msgAndPort2_var; + + typedef + TAO_Objref_Out_T< + msgAndPort2 + > + msgAndPort2_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_BENCHMARK_MSGANDPORT2_CH_) +#define _BENCHMARK_MSGANDPORT2_CH_ + + class msgAndPort2 + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<msgAndPort2>; + typedef msgAndPort2_ptr _ptr_type; + typedef msgAndPort2_var _var_type; + + // The static operations. + static msgAndPort2_ptr _duplicate (msgAndPort2_ptr obj); + + static void _tao_release (msgAndPort2_ptr obj); + + static msgAndPort2_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static msgAndPort2_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static msgAndPort2_ptr _nil (void) + { + return static_cast<msgAndPort2_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void setPortsSendMsg ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3, + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_msgAndPort2_Proxy_Broker_; + + protected: + // Concrete interface only. + msgAndPort2 (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void benchmark_msgAndPort2_setup_collocation (void); + + // Concrete non-local interface only. + msgAndPort2 ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + msgAndPort2 ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~msgAndPort2 (void); + + private: + // Private and unimplemented for concrete interfaces. + msgAndPort2 (const msgAndPort2 &); + + void operator= (const msgAndPort2 &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_msgAndPort2; + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_BENCHMARK_MSGONLY__VAR_OUT_CH_) +#define _BENCHMARK_MSGONLY__VAR_OUT_CH_ + + class msgOnly; + typedef msgOnly *msgOnly_ptr; + + typedef + TAO_Objref_Var_T< + msgOnly + > + msgOnly_var; + + typedef + TAO_Objref_Out_T< + msgOnly + > + msgOnly_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_BENCHMARK_MSGONLY_CH_) +#define _BENCHMARK_MSGONLY_CH_ + + class msgOnly + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<msgOnly>; + typedef msgOnly_ptr _ptr_type; + typedef msgOnly_var _var_type; + + // The static operations. + static msgOnly_ptr _duplicate (msgOnly_ptr obj); + + static void _tao_release (msgOnly_ptr obj); + + static msgOnly_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static msgOnly_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static msgOnly_ptr _nil (void) + { + return static_cast<msgOnly_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_msgOnly_Proxy_Broker_; + + protected: + // Concrete interface only. + msgOnly (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void benchmark_msgOnly_setup_collocation (void); + + // Concrete non-local interface only. + msgOnly ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + msgOnly ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~msgOnly (void); + + private: + // Private and unimplemented for concrete interfaces. + msgOnly (const msgOnly &); + + void operator= (const msgOnly &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_msgOnly; + + // TAO_IDL - Generated from + // be/be_interface.cpp:646 + +#if !defined (_BENCHMARK_SETPORTSONLY__VAR_OUT_CH_) +#define _BENCHMARK_SETPORTSONLY__VAR_OUT_CH_ + + class setPortsOnly; + typedef setPortsOnly *setPortsOnly_ptr; + + typedef + TAO_Objref_Var_T< + setPortsOnly + > + setPortsOnly_var; + + typedef + TAO_Objref_Out_T< + setPortsOnly + > + setPortsOnly_out; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:54 + +#if !defined (_BENCHMARK_SETPORTSONLY_CH_) +#define _BENCHMARK_SETPORTSONLY_CH_ + + class setPortsOnly + : public virtual ::CORBA::Object + { + public: + friend class TAO::Narrow_Utils<setPortsOnly>; + typedef setPortsOnly_ptr _ptr_type; + typedef setPortsOnly_var _var_type; + + // The static operations. + static setPortsOnly_ptr _duplicate (setPortsOnly_ptr obj); + + static void _tao_release (setPortsOnly_ptr obj); + + static setPortsOnly_ptr _narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static setPortsOnly_ptr _unchecked_narrow ( + ::CORBA::Object_ptr obj + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static setPortsOnly_ptr _nil (void) + { + return static_cast<setPortsOnly_ptr> (0); + } + + static void _tao_any_destructor (void *); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_ch.cpp:46 + + virtual void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_ch.cpp:210 + + virtual ::CORBA::Boolean _is_a ( + const char *type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + virtual ::CORBA::Boolean marshal (TAO_OutputCDR &cdr); + private: + TAO::Collocation_Proxy_Broker *the_TAO_setPortsOnly_Proxy_Broker_; + + protected: + // Concrete interface only. + setPortsOnly (void); + + // These methods travese the inheritance tree and set the + // parents piece of the given class in the right mode. + virtual void benchmark_setPortsOnly_setup_collocation (void); + + // Concrete non-local interface only. + setPortsOnly ( + IOP::IOR *ior, + TAO_ORB_Core *orb_core = 0 + ); + + // Non-local interface only. + setPortsOnly ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated = 0, + TAO_Abstract_ServantBase *servant = 0, + TAO_ORB_Core *orb_core = 0 + ); + + virtual ~setPortsOnly (void); + + private: + // Private and unimplemented for concrete interfaces. + setPortsOnly (const setPortsOnly &); + + void operator= (const setPortsOnly &); + }; + +#endif /* end #if !defined */ + + // TAO_IDL - Generated from + // be/be_visitor_typecode/typecode_decl.cpp:49 + + extern ::CORBA::TypeCode_ptr const _tc_setPortsOnly; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_ch.cpp:78 + +} // module benchmark + +// Proxy Broker Factory function pointer declarations. + +// TAO_IDL - Generated from +// be/be_visitor_root/root.cpp:139 + +extern +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +extern +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +extern +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +extern +TAO::Collocation_Proxy_Broker * +(*benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer) ( + ::CORBA::Object_ptr obj + ); + +// TAO_IDL - Generated from +// be/be_visitor_traits.cpp:62 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Traits specializations. +namespace TAO +{ + +#if !defined (_BENCHMARK_MSGANDPORT1__TRAITS_) +#define _BENCHMARK_MSGANDPORT1__TRAITS_ + + template<> + struct Objref_Traits< ::benchmark::msgAndPort1> + { + static ::benchmark::msgAndPort1_ptr duplicate ( + ::benchmark::msgAndPort1_ptr + ); + static void release ( + ::benchmark::msgAndPort1_ptr + ); + static ::benchmark::msgAndPort1_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::benchmark::msgAndPort1_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + +#if !defined (_BENCHMARK_MSGANDPORT2__TRAITS_) +#define _BENCHMARK_MSGANDPORT2__TRAITS_ + + template<> + struct Objref_Traits< ::benchmark::msgAndPort2> + { + static ::benchmark::msgAndPort2_ptr duplicate ( + ::benchmark::msgAndPort2_ptr + ); + static void release ( + ::benchmark::msgAndPort2_ptr + ); + static ::benchmark::msgAndPort2_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::benchmark::msgAndPort2_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + +#if !defined (_BENCHMARK_MSGONLY__TRAITS_) +#define _BENCHMARK_MSGONLY__TRAITS_ + + template<> + struct Objref_Traits< ::benchmark::msgOnly> + { + static ::benchmark::msgOnly_ptr duplicate ( + ::benchmark::msgOnly_ptr + ); + static void release ( + ::benchmark::msgOnly_ptr + ); + static ::benchmark::msgOnly_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::benchmark::msgOnly_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ + +#if !defined (_BENCHMARK_SETPORTSONLY__TRAITS_) +#define _BENCHMARK_SETPORTSONLY__TRAITS_ + + template<> + struct Objref_Traits< ::benchmark::setPortsOnly> + { + static ::benchmark::setPortsOnly_ptr duplicate ( + ::benchmark::setPortsOnly_ptr + ); + static void release ( + ::benchmark::setPortsOnly_ptr + ); + static ::benchmark::setPortsOnly_ptr nil (void); + static ::CORBA::Boolean marshal ( + const ::benchmark::setPortsOnly_ptr p, + TAO_OutputCDR & cdr + ); + }; + +#endif /* end #if !defined */ +} +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_structure/any_op_ch.cpp:53 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, const benchmark::msg &); // copying version + void operator<<= (::CORBA::Any &, benchmark::msg*); // noncopying version + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::msg *&); // deprecated + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const benchmark::msg *&); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/any_op_ch.cpp:53 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + + void operator<<= (::CORBA::Any &, const benchmark::invalidRequest &); // copying version + void operator<<= (::CORBA::Any &, benchmark::invalidRequest*); // noncopying version + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::invalidRequest *&); // deprecated + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, const benchmark::invalidRequest *&); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + void operator<<= ( ::CORBA::Any &, msgAndPort1_ptr); // copying + void operator<<= ( ::CORBA::Any &, msgAndPort1_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, msgAndPort1_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, benchmark::msgAndPort1_ptr); // copying + void operator<<= (::CORBA::Any &, benchmark::msgAndPort1_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::msgAndPort1_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + void operator<<= ( ::CORBA::Any &, msgAndPort2_ptr); // copying + void operator<<= ( ::CORBA::Any &, msgAndPort2_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, msgAndPort2_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, benchmark::msgAndPort2_ptr); // copying + void operator<<= (::CORBA::Any &, benchmark::msgAndPort2_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::msgAndPort2_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + void operator<<= ( ::CORBA::Any &, msgOnly_ptr); // copying + void operator<<= ( ::CORBA::Any &, msgOnly_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, msgOnly_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, benchmark::msgOnly_ptr); // copying + void operator<<= (::CORBA::Any &, benchmark::msgOnly_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::msgOnly_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_interface/any_op_ch.cpp:54 + + + +#if defined (ACE_ANY_OPS_USE_NAMESPACE) + +namespace benchmark +{ + void operator<<= ( ::CORBA::Any &, setPortsOnly_ptr); // copying + void operator<<= ( ::CORBA::Any &, setPortsOnly_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, setPortsOnly_ptr &); +} + +#else + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + void operator<<= (::CORBA::Any &, benchmark::setPortsOnly_ptr); // copying + void operator<<= (::CORBA::Any &, benchmark::setPortsOnly_ptr *); // non-copying + ::CORBA::Boolean operator>>= (const ::CORBA::Any &, benchmark::setPortsOnly_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +#endif + +// TAO_IDL - Generated from +// be/be_visitor_structure/cdr_op_ch.cpp:54 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::msg &); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::msg &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_exception/cdr_op_ch.cpp:52 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::invalidRequest &); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::invalidRequest &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::msgAndPort1_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::msgAndPort1_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::msgAndPort2_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::msgAndPort2_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::msgOnly_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::msgOnly_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_interface/cdr_op_ch.cpp:55 + + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + ::CORBA::Boolean operator<< (TAO_OutputCDR &, const benchmark::setPortsOnly_ptr ); + ::CORBA::Boolean operator>> (TAO_InputCDR &, benchmark::setPortsOnly_ptr &); +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1093 +#if defined (__ACE_INLINE__) +#include "benchC.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + + diff --git a/quellcode/versuch5/benchC.inl b/quellcode/versuch5/benchC.inl new file mode 100755 index 0000000..a389f4a --- /dev/null +++ b/quellcode/versuch5/benchC.inl @@ -0,0 +1,172 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_BENCHMARK_MSGANDPORT1___CI_) +#define _BENCHMARK_MSGANDPORT1___CI_ + +ACE_INLINE +benchmark::msgAndPort1::msgAndPort1 ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_msgAndPort1_Proxy_Broker_ (0) +{ + this->benchmark_msgAndPort1_setup_collocation (); +} + +ACE_INLINE +benchmark::msgAndPort1::msgAndPort1 ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_msgAndPort1_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_BENCHMARK_MSGANDPORT2___CI_) +#define _BENCHMARK_MSGANDPORT2___CI_ + +ACE_INLINE +benchmark::msgAndPort2::msgAndPort2 ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_msgAndPort2_Proxy_Broker_ (0) +{ + this->benchmark_msgAndPort2_setup_collocation (); +} + +ACE_INLINE +benchmark::msgAndPort2::msgAndPort2 ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_msgAndPort2_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_BENCHMARK_MSGONLY___CI_) +#define _BENCHMARK_MSGONLY___CI_ + +ACE_INLINE +benchmark::msgOnly::msgOnly ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_msgOnly_Proxy_Broker_ (0) +{ + this->benchmark_msgOnly_setup_collocation (); +} + +ACE_INLINE +benchmark::msgOnly::msgOnly ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_msgOnly_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ci.cpp:70 + +#if !defined (_BENCHMARK_SETPORTSONLY___CI_) +#define _BENCHMARK_SETPORTSONLY___CI_ + +ACE_INLINE +benchmark::setPortsOnly::setPortsOnly ( + TAO_Stub *objref, + ::CORBA::Boolean _tao_collocated, + TAO_Abstract_ServantBase *servant, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS (CORBA, Object) ( + objref, + _tao_collocated, + servant, + oc + ), + the_TAO_setPortsOnly_Proxy_Broker_ (0) +{ + this->benchmark_setPortsOnly_setup_collocation (); +} + +ACE_INLINE +benchmark::setPortsOnly::setPortsOnly ( + IOP::IOR *ior, + TAO_ORB_Core *oc + ) + : ACE_NESTED_CLASS ( ::CORBA, Object) (ior, oc), + the_TAO_setPortsOnly_Proxy_Broker_ (0) +{ +} + +#endif /* end #if !defined */ + diff --git a/quellcode/versuch5/benchS.cpp b/quellcode/versuch5/benchS.cpp new file mode 100755 index 0000000..2028988 --- /dev/null +++ b/quellcode/versuch5/benchS.cpp @@ -0,0 +1,3366 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_codegen.cpp:577 + +#ifndef _TAO_IDL_BENCHS_CPP_ +#define _TAO_IDL_BENCHS_CPP_ + + +#include "benchS.h" +#include "tao/PortableServer/Operation_Table_Perfect_Hash.h" +#include "tao/PortableServer/Upcall_Command.h" +#include "tao/PortableServer/Upcall_Wrapper.h" +#include "tao/PortableServer/Basic_SArguments.h" +#include "tao/PortableServer/Object_SArgument_T.h" +#include "tao/PortableServer/Special_Basic_SArguments.h" +#include "tao/PortableServer/UB_String_SArguments.h" +#include "tao/PortableServer/Var_Size_SArgument_T.h" +#include "tao/PortableServer/TypeCode_SArg_Traits.h" +#include "tao/PortableServer/Object_SArg_Traits.h" +#include "tao/PortableServer/get_arg.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/UB_String_Arguments.h" +#include "tao/TAO_Server_Request.h" +#include "tao/ORB_Core.h" +#include "tao/Profile.h" +#include "tao/Stub.h" +#include "tao/IFR_Client_Adapter.h" +#include "tao/Object_T.h" +#include "tao/AnyTypeCode/TypeCode.h" +#include "tao/AnyTypeCode/DynamicC.h" +#include "tao/CDR.h" +#include "tao/operation_details.h" +#include "tao/PortableInterceptor.h" +#include "tao/Basic_Arguments.h" +#include "tao/Special_Basic_Arguments.h" +#include "tao/Var_Size_Argument_T.h" +#include "ace/Dynamic_Service.h" +#include "ace/Malloc_Allocator.h" + +#if !defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* !defined INLINE */ + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ + + // TAO_IDL - Generated from + // be/be_visitor_arg_traits.cpp:893 + +#if !defined (_BENCHMARK_MSG__SARG_TRAITS_) +#define _BENCHMARK_MSG__SARG_TRAITS_ + + template<> + class SArg_Traits<benchmark::msg> + : public + Var_Size_SArg_Traits_T< + benchmark::msg, + benchmark::msg_var, + benchmark::msg_out, + TAO::Any_Insert_Policy_Stream <benchmark::msg> + > + { + }; + +#endif /* end #if !defined */ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_visitor_arg_traits.cpp:71 +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + + + +// Arg traits specializations. +namespace TAO +{ + + // TAO_IDL - Generated from + // be/be_visitor_arg_traits.cpp:893 + +#if !defined (_BENCHMARK_MSG__ARG_TRAITS_) +#define _BENCHMARK_MSG__ARG_TRAITS_ + + template<> + class Arg_Traits<benchmark::msg> + : public + Var_Size_Arg_Traits_T< + benchmark::msg, + benchmark::msg_var, + benchmark::msg_out, + TAO::Any_Insert_Policy_Stream <benchmark::msg> + > + { + }; + +#endif /* end #if !defined */ +} + +TAO_END_VERSIONED_NAMESPACE_DECL + + + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_benchmark_msgAndPort1_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /home/trautma/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_benchmark_msgAndPort1_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_benchmark_msgAndPort1_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 5, 0, 5, 16, 0, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 5, + 0, 5, 16, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_benchmark_msgAndPort1_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 8, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 11, + DUPLICATES = 0, + WORDLIST_SIZE = 13 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_benchmark::msgAndPort1::_is_a_skel, 0}, + {"",0,0}, + {"sendMsg", &POA_benchmark::msgAndPort1::sendMsg_skel, 0}, + {"setPorts", &POA_benchmark::msgAndPort1::setPorts_skel, 0}, + {"",0,0}, + {"_component", &POA_benchmark::msgAndPort1::_component_skel, 0}, + {"",0,0}, + {"connect", &POA_benchmark::msgAndPort1::connect_skel, 0}, + {"_non_existent", &POA_benchmark::msgAndPort1::_non_existent_skel, 0}, + {"_repository_id", &POA_benchmark::msgAndPort1::_repository_id_skel, 0}, + {"_interface", &POA_benchmark::msgAndPort1::_interface_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_benchmark_msgAndPort1_Perfect_Hash_OpTable tao_benchmark_msgAndPort1_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_Initializer (size_t) +{ + benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer = + benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function; + + return 0; +} + +static int +benchmark__TAO_msgAndPort1_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_benchmark::msgAndPort1::msgAndPort1 (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_benchmark_msgAndPort1_optable; +} + +POA_benchmark::msgAndPort1::msgAndPort1 (const msgAndPort1& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_benchmark::msgAndPort1::~msgAndPort1 (void) +{ +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_msgAndPort1 + : public TAO::Upcall_Command + { + public: + inline connect_msgAndPort1 ( + POA_benchmark::msgAndPort1 * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort1 * const servant_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::msgAndPort1::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + + connect_msgAndPort1 command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class setPorts_msgAndPort1 + : public TAO::Upcall_Command + { + public: + inline setPorts_msgAndPort1 ( + POA_benchmark::msgAndPort1 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + this->servant_->setPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort1 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::msgAndPort1::setPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static size_t const nargs = 4; + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + + setPorts_msgAndPort1 command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class sendMsg_msgAndPort1 + : public TAO::Upcall_Command + { + public: + inline sendMsg_msgAndPort1 ( + POA_benchmark::msgAndPort1 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::benchmark::msg>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::benchmark::msg, TAO::SArg_Traits< ::benchmark::msg>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_->sendMsg ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort1 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::msgAndPort1::sendMsg_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::benchmark::msg>::in_arg_val _tao_message; + + TAO::Argument * const args[] = + { + &retval, + &_tao_message + }; + + static size_t const nargs = 2; + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + + sendMsg_msgAndPort1 command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_msgAndPort1_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_msgAndPort1_Upcall_Command ( + POA_benchmark::msgAndPort1 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort1 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort1::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + + _is_a_msgAndPort1_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_msgAndPort1_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_msgAndPort1_Upcall_Command ( + POA_benchmark::msgAndPort1 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort1 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort1::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + + _non_existent_msgAndPort1_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_msgAndPort1_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_msgAndPort1_Upcall_Command ( + POA_benchmark::msgAndPort1 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort1 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort1::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + + _repository_id_msgAndPort1_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_benchmark::msgAndPort1::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_msgAndPort1_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_msgAndPort1_Upcall_Command ( + POA_benchmark::msgAndPort1 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort1 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort1::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort1 * const impl = + static_cast<POA_benchmark::msgAndPort1 *> (servant); + + _get_component_msgAndPort1_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_benchmark::msgAndPort1::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/msgAndPort1:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_benchmark::msgAndPort1::_interface_repository_id (void) const +{ + return "IDL:benchmark/msgAndPort1:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_benchmark::msgAndPort1::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +benchmark::msgAndPort1 * +POA_benchmark::msgAndPort1::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::benchmark::msgAndPort1 STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_msgAndPort1_Proxy_Broker_Factory_function_pointer + ); +} + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_benchmark_msgAndPort2_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /home/trautma/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_benchmark_msgAndPort2_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_benchmark_msgAndPort2_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 0, 0, 2, 16, 0, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 0, + 0, 2, 16, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_benchmark_msgAndPort2_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 7, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 15, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 11, + DUPLICATES = 0, + WORDLIST_SIZE = 12 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_benchmark::msgAndPort2::_is_a_skel, 0}, + {"",0,0}, + {"connect", &POA_benchmark::msgAndPort2::connect_skel, 0}, + {"",0,0},{"",0,0}, + {"_component", &POA_benchmark::msgAndPort2::_component_skel, 0}, + {"",0,0}, + {"_interface", &POA_benchmark::msgAndPort2::_interface_skel, 0}, + {"_non_existent", &POA_benchmark::msgAndPort2::_non_existent_skel, 0}, + {"_repository_id", &POA_benchmark::msgAndPort2::_repository_id_skel, 0}, + {"setPortsSendMsg", &POA_benchmark::msgAndPort2::setPortsSendMsg_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_benchmark_msgAndPort2_Perfect_Hash_OpTable tao_benchmark_msgAndPort2_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_Initializer (size_t) +{ + benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer = + benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function; + + return 0; +} + +static int +benchmark__TAO_msgAndPort2_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_benchmark::msgAndPort2::msgAndPort2 (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_benchmark_msgAndPort2_optable; +} + +POA_benchmark::msgAndPort2::msgAndPort2 (const msgAndPort2& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_benchmark::msgAndPort2::~msgAndPort2 (void) +{ +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_msgAndPort2 + : public TAO::Upcall_Command + { + public: + inline connect_msgAndPort2 ( + POA_benchmark::msgAndPort2 * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort2 * const servant_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::msgAndPort2::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort2 * const impl = + static_cast<POA_benchmark::msgAndPort2 *> (servant); + + connect_msgAndPort2 command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class setPortsSendMsg_msgAndPort2 + : public TAO::Upcall_Command + { + public: + inline setPortsSendMsg_msgAndPort2 ( + POA_benchmark::msgAndPort2 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + TAO::SArg_Traits< ::benchmark::msg>::in_arg_type arg_4 = + TAO::Portable_Server::get_in_arg< ::benchmark::msg, TAO::SArg_Traits< ::benchmark::msg>::in_arg_type> ( + this->operation_details_, + this->args_, + 4); + + this->servant_->setPortsSendMsg ( + arg_1 + , arg_2 + , arg_3 + , arg_4 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort2 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::msgAndPort2::setPortsSendMsg_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + TAO::SArg_Traits< ::benchmark::msg>::in_arg_val _tao_message; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3, + &_tao_message + }; + + static size_t const nargs = 5; + + POA_benchmark::msgAndPort2 * const impl = + static_cast<POA_benchmark::msgAndPort2 *> (servant); + + setPortsSendMsg_msgAndPort2 command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_msgAndPort2_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_msgAndPort2_Upcall_Command ( + POA_benchmark::msgAndPort2 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort2 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort2::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_benchmark::msgAndPort2 * const impl = + static_cast<POA_benchmark::msgAndPort2 *> (servant); + + _is_a_msgAndPort2_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_msgAndPort2_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_msgAndPort2_Upcall_Command ( + POA_benchmark::msgAndPort2 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort2 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort2::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort2 * const impl = + static_cast<POA_benchmark::msgAndPort2 *> (servant); + + _non_existent_msgAndPort2_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_msgAndPort2_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_msgAndPort2_Upcall_Command ( + POA_benchmark::msgAndPort2 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort2 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort2::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort2 * const impl = + static_cast<POA_benchmark::msgAndPort2 *> (servant); + + _repository_id_msgAndPort2_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_benchmark::msgAndPort2::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_benchmark::msgAndPort2 * const impl = + static_cast<POA_benchmark::msgAndPort2 *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_msgAndPort2_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_msgAndPort2_Upcall_Command ( + POA_benchmark::msgAndPort2 * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgAndPort2 * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgAndPort2::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgAndPort2 * const impl = + static_cast<POA_benchmark::msgAndPort2 *> (servant); + + _get_component_msgAndPort2_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_benchmark::msgAndPort2::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/msgAndPort2:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_benchmark::msgAndPort2::_interface_repository_id (void) const +{ + return "IDL:benchmark/msgAndPort2:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_benchmark::msgAndPort2::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +benchmark::msgAndPort2 * +POA_benchmark::msgAndPort2::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::benchmark::msgAndPort2 STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_msgAndPort2_Proxy_Broker_Factory_function_pointer + ); +} + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_benchmark_msgOnly_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /home/trautma/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_benchmark_msgOnly_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_benchmark_msgOnly_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 0, 5, 16, 0, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 16, + 0, 5, 16, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_benchmark_msgOnly_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 6, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 11, + DUPLICATES = 0, + WORDLIST_SIZE = 11 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_benchmark::msgOnly::_is_a_skel, 0}, + {"",0,0}, + {"sendMsg", &POA_benchmark::msgOnly::sendMsg_skel, 0}, + {"",0,0},{"",0,0}, + {"_component", &POA_benchmark::msgOnly::_component_skel, 0}, + {"",0,0},{"",0,0}, + {"_non_existent", &POA_benchmark::msgOnly::_non_existent_skel, 0}, + {"_repository_id", &POA_benchmark::msgOnly::_repository_id_skel, 0}, + {"_interface", &POA_benchmark::msgOnly::_interface_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_benchmark_msgOnly_Perfect_Hash_OpTable tao_benchmark_msgOnly_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +benchmark__TAO_msgOnly_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +benchmark__TAO_msgOnly_Proxy_Broker_Factory_Initializer (size_t) +{ + benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer = + benchmark__TAO_msgOnly_Proxy_Broker_Factory_function; + + return 0; +} + +static int +benchmark__TAO_msgOnly_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + benchmark__TAO_msgOnly_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (benchmark__TAO_msgOnly_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_benchmark::msgOnly::msgOnly (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_benchmark_msgOnly_optable; +} + +POA_benchmark::msgOnly::msgOnly (const msgOnly& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_benchmark::msgOnly::~msgOnly (void) +{ +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class sendMsg_msgOnly + : public TAO::Upcall_Command + { + public: + inline sendMsg_msgOnly ( + POA_benchmark::msgOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::benchmark::msg>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::benchmark::msg, TAO::SArg_Traits< ::benchmark::msg>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_->sendMsg ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::msgOnly::sendMsg_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::benchmark::msg>::in_arg_val _tao_message; + + TAO::Argument * const args[] = + { + &retval, + &_tao_message + }; + + static size_t const nargs = 2; + + POA_benchmark::msgOnly * const impl = + static_cast<POA_benchmark::msgOnly *> (servant); + + sendMsg_msgOnly command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_msgOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_msgOnly_Upcall_Command ( + POA_benchmark::msgOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgOnly::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_benchmark::msgOnly * const impl = + static_cast<POA_benchmark::msgOnly *> (servant); + + _is_a_msgOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_msgOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_msgOnly_Upcall_Command ( + POA_benchmark::msgOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgOnly::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgOnly * const impl = + static_cast<POA_benchmark::msgOnly *> (servant); + + _non_existent_msgOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_msgOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_msgOnly_Upcall_Command ( + POA_benchmark::msgOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgOnly::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgOnly * const impl = + static_cast<POA_benchmark::msgOnly *> (servant); + + _repository_id_msgOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_benchmark::msgOnly::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_benchmark::msgOnly * const impl = + static_cast<POA_benchmark::msgOnly *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_msgOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_msgOnly_Upcall_Command ( + POA_benchmark::msgOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::msgOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::msgOnly::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::msgOnly * const impl = + static_cast<POA_benchmark::msgOnly *> (servant); + + _get_component_msgOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_benchmark::msgOnly::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/msgOnly:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_benchmark::msgOnly::_interface_repository_id (void) const +{ + return "IDL:benchmark/msgOnly:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_benchmark::msgOnly::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +benchmark::msgOnly * +POA_benchmark::msgOnly::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::benchmark::msgOnly STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_msgOnly_Proxy_Broker_Factory_function_pointer + ); +} + +// TAO_IDL - Generated from +// be/be_interface.cpp:1511 + +class TAO_benchmark_setPortsOnly_Perfect_Hash_OpTable + : public TAO_Perfect_Hash_OpTable +{ +private: + unsigned int hash (const char *str, unsigned int len); + +public: + const TAO_operation_db_entry * lookup (const char *str, unsigned int len); +}; + +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /home/trautma/ACE_wrappers/bin/gperf -m -M -J -c -C -D -E -T -f 0 -F 0,0 -a -o -t -p -K opname -L C++ -Z TAO_benchmark_setPortsOnly_Perfect_Hash_OpTable -N lookup */ +unsigned int +TAO_benchmark_setPortsOnly_Perfect_Hash_OpTable::hash (const char *str, unsigned int len) +{ + static const unsigned char asso_values[] = + { +#if defined (ACE_MVS) + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, + 16, 0, 0, 5, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 0, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, +#else + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 16, 0, 16, 0, + 0, 5, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 0, 0, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, +#endif /* ACE_MVS */ + }; + return len + asso_values[(int) str[len - 1]] + asso_values[(int) str[0]]; +} + +const TAO_operation_db_entry * +TAO_benchmark_setPortsOnly_Perfect_Hash_OpTable::lookup (const char *str, unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 7, + MIN_WORD_LENGTH = 5, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 5, + MAX_HASH_VALUE = 15, + HASH_VALUE_RANGE = 11, + DUPLICATES = 0, + WORDLIST_SIZE = 12 + }; + + static const TAO_operation_db_entry wordlist[] = + { + {"",0,0},{"",0,0},{"",0,0},{"",0,0},{"",0,0}, + {"_is_a", &POA_benchmark::setPortsOnly::_is_a_skel, 0}, + {"",0,0}, + {"connect", &POA_benchmark::setPortsOnly::connect_skel, 0}, + {"setPorts", &POA_benchmark::setPortsOnly::setPorts_skel, 0}, + {"",0,0}, + {"_component", &POA_benchmark::setPortsOnly::_component_skel, 0}, + {"",0,0},{"",0,0}, + {"_non_existent", &POA_benchmark::setPortsOnly::_non_existent_skel, 0}, + {"_repository_id", &POA_benchmark::setPortsOnly::_repository_id_skel, 0}, + {"_interface", &POA_benchmark::setPortsOnly::_interface_skel, 0}, + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + unsigned int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) + { + const char *s = wordlist[key].opname; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1)) + return &wordlist[key]; + } + } + return 0; +} + +static TAO_benchmark_setPortsOnly_Perfect_Hash_OpTable tao_benchmark_setPortsOnly_optable; + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:930 + +TAO::Collocation_Proxy_Broker * +benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function ( ::CORBA::Object_ptr) +{ + return reinterpret_cast<TAO::Collocation_Proxy_Broker *> (0xdead); // Dummy +} + +int +benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_Initializer (size_t) +{ + benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer = + benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function; + + return 0; +} + +static int +benchmark__TAO_setPortsOnly_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = + benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_Initializer ( + reinterpret_cast<size_t> (benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_Initializer) + ); + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:103 + +POA_benchmark::setPortsOnly::setPortsOnly (void) + : TAO_ServantBase () +{ + this->optable_ = &tao_benchmark_setPortsOnly_optable; +} + +POA_benchmark::setPortsOnly::setPortsOnly (const setPortsOnly& rhs) + : TAO_Abstract_ServantBase (rhs), + TAO_ServantBase (rhs) +{ +} + +POA_benchmark::setPortsOnly::~setPortsOnly (void) +{ +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class connect_setPortsOnly + : public TAO::Upcall_Command + { + public: + inline connect_setPortsOnly ( + POA_benchmark::setPortsOnly * servant) + : servant_ (servant) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + this->servant_->connect ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::setPortsOnly * const servant_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::setPortsOnly::connect_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::setPortsOnly * const impl = + static_cast<POA_benchmark::setPortsOnly *> (servant); + + connect_setPortsOnly command ( + impl); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class setPorts_setPortsOnly + : public TAO::Upcall_Command + { + public: + inline setPorts_setPortsOnly ( + POA_benchmark::setPortsOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_2 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 2); + + TAO::SArg_Traits< ::CORBA::Short>::in_arg_type arg_3 = + TAO::Portable_Server::get_in_arg< ::CORBA::Short, TAO::SArg_Traits< ::CORBA::Short>::in_arg_type> ( + this->operation_details_, + this->args_, + 3); + + this->servant_->setPorts ( + arg_1 + , arg_2 + , arg_3 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::setPortsOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +// TAO_IDL - Generated from +// be/be_visitor_operation/operation_ss.cpp:190 + +void POA_benchmark::setPortsOnly::setPorts_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const exceptions[] = + { + benchmark::_tc_invalidRequest + }; + static ::CORBA::ULong const nexceptions = 1; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< void>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort1; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort2; + TAO::SArg_Traits< ::CORBA::Short>::in_arg_val _tao_valPort3; + + TAO::Argument * const args[] = + { + &retval, + &_tao_valPort1, + &_tao_valPort2, + &_tao_valPort3 + }; + + static size_t const nargs = 4; + + POA_benchmark::setPortsOnly * const impl = + static_cast<POA_benchmark::setPortsOnly *> (servant); + + setPorts_setPortsOnly command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:169 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _is_a_setPortsOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _is_a_setPortsOnly_Upcall_Command ( + POA_benchmark::setPortsOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type arg_1 = + TAO::Portable_Server::get_in_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::in_arg_type> ( + this->operation_details_, + this->args_, + 1); + + retval = + this->servant_-> _is_a ( + arg_1 + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::setPortsOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::setPortsOnly::_is_a_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + TAO::SArg_Traits< ::CORBA::Char *>::in_arg_val _tao_repository_id; + + TAO::Argument * const args[] = + { + &retval, + &_tao_repository_id + }; + + static size_t const nargs = 2; + + POA_benchmark::setPortsOnly * const impl = + static_cast<POA_benchmark::setPortsOnly *> (servant); + + _is_a_setPortsOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _non_existent_setPortsOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _non_existent_setPortsOnly_Upcall_Command ( + POA_benchmark::setPortsOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::ACE_InputCDR::to_boolean, TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _non_existent ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::setPortsOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::setPortsOnly::_non_existent_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::ACE_InputCDR::to_boolean>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::setPortsOnly * const impl = + static_cast<POA_benchmark::setPortsOnly *> (servant); + + _non_existent_setPortsOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _repository_id_setPortsOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _repository_id_setPortsOnly_Upcall_Command ( + POA_benchmark::setPortsOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Char *, TAO::SArg_Traits< ::CORBA::Char *>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _repository_id ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::setPortsOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::setPortsOnly::_repository_id_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Char *>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::setPortsOnly * const impl = + static_cast<POA_benchmark::setPortsOnly *> (servant); + + _repository_id_setPortsOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:502 + +void POA_benchmark::setPortsOnly::_interface_skel ( + TAO_ServerRequest & server_request, + void * /* servant_upcall */, + void * servant + ACE_ENV_ARG_DECL + ) +{ + TAO_IFR_Client_Adapter *_tao_adapter = + ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance ( + TAO_ORB_Core::ifr_client_adapter_name () + ); + + if (_tao_adapter == 0) + { + ACE_THROW ( ::CORBA::INTF_REPOS ( ::CORBA::OMGVMCID | 1, + ::CORBA::COMPLETED_NO)); + } + + POA_benchmark::setPortsOnly * const impl = + static_cast<POA_benchmark::setPortsOnly *> (servant); + ::CORBA::InterfaceDef_ptr _tao_retval = + impl->_get_interface (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + + server_request.init_reply (); + TAO_OutputCDR &_tao_out = *server_request.outgoing (); + + ::CORBA::Boolean const _tao_result = + _tao_adapter->interfacedef_cdr_insert ( + _tao_out, + _tao_retval + ); + + _tao_adapter->dispose (_tao_retval); + + if (_tao_result == 0) + { + ACE_THROW ( ::CORBA::MARSHAL ()); + } +}namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_operation/upcall_command_ss.cpp:127 + + class _get_component_setPortsOnly_Upcall_Command + : public TAO::Upcall_Command + { + public: + inline _get_component_setPortsOnly_Upcall_Command ( + POA_benchmark::setPortsOnly * servant, + TAO_Operation_Details const * operation_details, + TAO::Argument * const args[]) + : servant_ (servant) + , operation_details_ (operation_details) + , args_ (args) + { + } + + virtual void execute (ACE_ENV_SINGLE_ARG_DECL) + { + TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type retval = + TAO::Portable_Server::get_ret_arg< ::CORBA::Object, TAO::SArg_Traits< ::CORBA::Object>::ret_arg_type> ( + this->operation_details_, + this->args_); + + retval = + this->servant_-> _get_component ( + ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + private: + POA_benchmark::setPortsOnly * const servant_; + TAO_Operation_Details const * const operation_details_; + TAO::Argument * const * const args_; + }; +} + + +void POA_benchmark::setPortsOnly::_component_skel ( + TAO_ServerRequest & server_request, + void * TAO_INTERCEPTOR (servant_upcall), + void * servant + ACE_ENV_ARG_DECL + ) +{ +#if TAO_HAS_INTERCEPTORS == 1 + static ::CORBA::TypeCode_ptr const * const exceptions = 0; + static ::CORBA::ULong const nexceptions = 0; +#endif /* TAO_HAS_INTERCEPTORS */ + + TAO::SArg_Traits< ::CORBA::Object>::ret_val retval; + + TAO::Argument * const args[] = + { + &retval + }; + + static size_t const nargs = 1; + + POA_benchmark::setPortsOnly * const impl = + static_cast<POA_benchmark::setPortsOnly *> (servant); + + _get_component_setPortsOnly_Upcall_Command command ( + impl, + server_request.operation_details (), + args); + + TAO::Upcall_Wrapper upcall_wrapper; + upcall_wrapper.upcall (server_request + , args + , nargs + , command +#if TAO_HAS_INTERCEPTORS == 1 + , servant_upcall + , exceptions + , nexceptions +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + ACE_ENV_ARG_PARAMETER); + ACE_CHECK; +} + +::CORBA::Boolean POA_benchmark::setPortsOnly::_is_a ( + const char* value + ACE_ENV_ARG_DECL_NOT_USED + ) +{ + return + ( + !ACE_OS::strcmp ( + value, + "IDL:benchmark/setPortsOnly:1.0" + ) || + !ACE_OS::strcmp ( + value, + "IDL:omg.org/CORBA/Object:1.0" + ) + ); +} + +const char* POA_benchmark::setPortsOnly::_interface_repository_id (void) const +{ + return "IDL:benchmark/setPortsOnly:1.0"; +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:867 + +void POA_benchmark::setPortsOnly::_dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ) +{ + this->synchronous_upcall_dispatch (req, + servant_upcall, + this + ACE_ENV_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/interface_ss.cpp:815 + +benchmark::setPortsOnly * +POA_benchmark::setPortsOnly::_this (ACE_ENV_SINGLE_ARG_DECL) +{ + TAO_Stub *stub = this->_create_stub (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + + TAO_Stub_Auto_Ptr safe_stub (stub); + ::CORBA::Object_ptr tmp = CORBA::Object::_nil (); + + ::CORBA::Boolean _tao_opt_colloc = + stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects (); + + ACE_NEW_RETURN ( + tmp, + ::CORBA::Object (stub, _tao_opt_colloc, this), + 0 + ); + + ::CORBA::Object_var obj = tmp; + (void) safe_stub.release (); + + typedef ::benchmark::setPortsOnly STUB_SCOPED_NAME; + return + TAO::Narrow_Utils<STUB_SCOPED_NAME>::unchecked_narrow ( + obj.in (), + benchmark__TAO_setPortsOnly_Proxy_Broker_Factory_function_pointer + ); +} + +#endif /* ifndef */ + diff --git a/quellcode/versuch5/benchS.h b/quellcode/versuch5/benchS.h new file mode 100755 index 0000000..f47741c --- /dev/null +++ b/quellcode/versuch5/benchS.h @@ -0,0 +1,518 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:387 + +#ifndef _TAO_IDL_BENCHS_H_ +#define _TAO_IDL_BENCHS_H_ + + +#include "benchC.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/Collocation_Proxy_Broker.h" +#include "tao/PortableServer/PortableServer.h" +#include "tao/PortableServer/Servant_Base.h" + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:49 + +namespace POA_benchmark +{ + + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class msgAndPort1; + typedef msgAndPort1 *msgAndPort1_ptr; + + class msgAndPort1 + : public virtual PortableServer::ServantBase + { + protected: + msgAndPort1 (void); + + public: + // Useful for template programming. + typedef ::benchmark::msgAndPort1 _stub_type; + typedef ::benchmark::msgAndPort1_ptr _stub_ptr_type; + typedef ::benchmark::msgAndPort1_var _stub_var_type; + + msgAndPort1 (const msgAndPort1& rhs); + virtual ~msgAndPort1 (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::benchmark::msgAndPort1 *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void setPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void sendMsg_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class msgAndPort2; + typedef msgAndPort2 *msgAndPort2_ptr; + + class msgAndPort2 + : public virtual PortableServer::ServantBase + { + protected: + msgAndPort2 (void); + + public: + // Useful for template programming. + typedef ::benchmark::msgAndPort2 _stub_type; + typedef ::benchmark::msgAndPort2_ptr _stub_ptr_type; + typedef ::benchmark::msgAndPort2_var _stub_var_type; + + msgAndPort2 (const msgAndPort2& rhs); + virtual ~msgAndPort2 (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::benchmark::msgAndPort2 *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void setPortsSendMsg ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3, + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void setPortsSendMsg_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class msgOnly; + typedef msgOnly *msgOnly_ptr; + + class msgOnly + : public virtual PortableServer::ServantBase + { + protected: + msgOnly (void); + + public: + // Useful for template programming. + typedef ::benchmark::msgOnly _stub_type; + typedef ::benchmark::msgOnly_ptr _stub_ptr_type; + typedef ::benchmark::msgOnly_var _stub_var_type; + + msgOnly (const msgOnly& rhs); + virtual ~msgOnly (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::benchmark::msgOnly *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void sendMsg_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + + // TAO_IDL - Generated from + // be/be_visitor_interface/interface_sh.cpp:87 + + class setPortsOnly; + typedef setPortsOnly *setPortsOnly_ptr; + + class setPortsOnly + : public virtual PortableServer::ServantBase + { + protected: + setPortsOnly (void); + + public: + // Useful for template programming. + typedef ::benchmark::setPortsOnly _stub_type; + typedef ::benchmark::setPortsOnly_ptr _stub_ptr_type; + typedef ::benchmark::setPortsOnly_var _stub_var_type; + + setPortsOnly (const setPortsOnly& rhs); + virtual ~setPortsOnly (void); + + virtual ::CORBA::Boolean _is_a ( + const char* logical_type_id + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + static void _is_a_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _non_existent_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _interface_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _component_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + static void _repository_id_skel ( + TAO_ServerRequest & req, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + virtual void _dispatch ( + TAO_ServerRequest & req, + void * servant_upcall + ACE_ENV_ARG_DECL + ); + + ::benchmark::setPortsOnly *_this ( + + ACE_ENV_ARG_DECL_WITH_DEFAULTS + ); + + virtual const char* _interface_repository_id (void) const; + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void connect_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/operation_sh.cpp:45 + + virtual void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) = 0; + + static void setPorts_skel ( + TAO_ServerRequest & server_request, + void * servant_upcall, + void * servant + ACE_ENV_ARG_DECL + ); + }; + +// TAO_IDL - Generated from +// be/be_visitor_module/module_sh.cpp:80 + +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1148 + +#include "benchS_T.h" + +#if defined (__ACE_INLINE__) +#include "benchS.inl" +#endif /* defined INLINE */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch5/benchS.inl b/quellcode/versuch5/benchS.inl new file mode 100755 index 0000000..38aa325 --- /dev/null +++ b/quellcode/versuch5/benchS.inl @@ -0,0 +1,28 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + diff --git a/quellcode/versuch5/benchS_T.cpp b/quellcode/versuch5/benchS_T.cpp new file mode 100755 index 0000000..e100665 --- /dev/null +++ b/quellcode/versuch5/benchS_T.cpp @@ -0,0 +1,41 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:656 + +#ifndef _TAO_IDL_BENCHS_T_CPP_ +#define _TAO_IDL_BENCHS_T_CPP_ + +#include "benchS_T.h" + +#if !defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* !defined INLINE */ + + +#endif /* ifndef */ diff --git a/quellcode/versuch5/benchS_T.h b/quellcode/versuch5/benchS_T.h new file mode 100755 index 0000000..6a447cb --- /dev/null +++ b/quellcode/versuch5/benchS_T.h @@ -0,0 +1,353 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:520 + +#ifndef _TAO_IDL_BENCHS_T_H_ +#define _TAO_IDL_BENCHS_T_H_ + + + +// TAO_IDL - Generated from +// be/be_visitor_root/root_sth.cpp:116 + +namespace POA_benchmark +{ + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class msgAndPort1_tie : public msgAndPort1 + { + public: + msgAndPort1_tie (T &t); + // the T& ctor + msgAndPort1_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + msgAndPort1_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + msgAndPort1_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~msgAndPort1_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + msgAndPort1_tie (const msgAndPort1_tie &); + void operator= (const msgAndPort1_tie &); + }; + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class msgAndPort2_tie : public msgAndPort2 + { + public: + msgAndPort2_tie (T &t); + // the T& ctor + msgAndPort2_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + msgAndPort2_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + msgAndPort2_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~msgAndPort2_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void setPortsSendMsg ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3, + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + msgAndPort2_tie (const msgAndPort2_tie &); + void operator= (const msgAndPort2_tie &); + }; + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class msgOnly_tie : public msgOnly + { + public: + msgOnly_tie (T &t); + // the T& ctor + msgOnly_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + msgOnly_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + msgOnly_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~msgOnly_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + msgOnly_tie (const msgOnly_tie &); + void operator= (const msgOnly_tie &); + }; + + // TAO_IDL - Generated from + // be/be_visitor_interface/tie_sh.cpp:87 + + // TIE class: Refer to CORBA v2.2, Section 20.34.4 + template <class T> + class setPortsOnly_tie : public setPortsOnly + { + public: + setPortsOnly_tie (T &t); + // the T& ctor + setPortsOnly_tie (T &t, PortableServer::POA_ptr poa); + // ctor taking a POA + setPortsOnly_tie (T *tp, ::CORBA::Boolean release = 1); + // ctor taking pointer and an ownership flag + setPortsOnly_tie ( + T *tp, + PortableServer::POA_ptr poa, + ::CORBA::Boolean release = 1 + ); + // ctor with T*, ownership flag and a POA + ~setPortsOnly_tie (void); + // dtor + + // TIE specific functions + T *_tied_object (void); + // return the underlying object + void _tied_object (T &obj); + // set the underlying object + void _tied_object (T *obj, ::CORBA::Boolean release = 1); + // set the underlying object and the ownership flag + ::CORBA::Boolean _is_owner (void); + // do we own it + void _is_owner ( ::CORBA::Boolean b); + // set the ownership + + // overridden ServantBase operations + PortableServer::POA_ptr _default_POA ( + ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + // TAO_IDL - Generated from + // be/be_visitor_operation/tie_sh.cpp:60 + + void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + private: + T *ptr_; + PortableServer::POA_var poa_; + ::CORBA::Boolean rel_; + + // copy and assignment are not allowed + setPortsOnly_tie (const setPortsOnly_tie &); + void operator= (const setPortsOnly_tie &); + }; +} // module benchmark + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1251 +#if defined (__ACE_INLINE__) +#include "benchS_T.inl" +#endif /* defined INLINE */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "benchS_T.cpp" +#endif /* defined REQUIRED SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("benchS_T.cpp") +#endif /* defined REQUIRED PRAGMA */ + +#endif /* ifndef */ + diff --git a/quellcode/versuch5/benchS_T.inl b/quellcode/versuch5/benchS_T.inl new file mode 100755 index 0000000..e9f7c6e --- /dev/null +++ b/quellcode/versuch5/benchS_T.inl @@ -0,0 +1,546 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort1_tie<T>::msgAndPort1_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort1_tie<T>::msgAndPort1_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort1_tie<T>::msgAndPort1_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort1_tie<T>::msgAndPort1_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort1_tie<T>::~msgAndPort1_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_benchmark::msgAndPort1_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgAndPort1_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgAndPort1_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_benchmark::msgAndPort1_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgAndPort1_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_benchmark::msgAndPort1_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->msgAndPort1::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::msgAndPort1_tie<T>::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::msgAndPort1_tie<T>::setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->setPorts ( + valPort1, + valPort2, + valPort3 + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +::CORBA::Boolean POA_benchmark::msgAndPort1_tie<T>::sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + return this->ptr_->sendMsg ( + message + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort2_tie<T>::msgAndPort2_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort2_tie<T>::msgAndPort2_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort2_tie<T>::msgAndPort2_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort2_tie<T>::msgAndPort2_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgAndPort2_tie<T>::~msgAndPort2_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_benchmark::msgAndPort2_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgAndPort2_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgAndPort2_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_benchmark::msgAndPort2_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgAndPort2_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_benchmark::msgAndPort2_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->msgAndPort2::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::msgAndPort2_tie<T>::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::msgAndPort2_tie<T>::setPortsSendMsg ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3, + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->setPortsSendMsg ( + valPort1, + valPort2, + valPort3, + message + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_benchmark::msgOnly_tie<T>::msgOnly_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgOnly_tie<T>::msgOnly_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgOnly_tie<T>::msgOnly_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgOnly_tie<T>::msgOnly_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::msgOnly_tie<T>::~msgOnly_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_benchmark::msgOnly_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgOnly_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgOnly_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_benchmark::msgOnly_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_benchmark::msgOnly_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_benchmark::msgOnly_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->msgOnly::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +::CORBA::Boolean POA_benchmark::msgOnly_tie<T>::sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + return this->ptr_->sendMsg ( + message + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_interface/tie_si.cpp:96 + +template <class T> ACE_INLINE +POA_benchmark::setPortsOnly_tie<T>::setPortsOnly_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::setPortsOnly_tie<T>::setPortsOnly_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template <class T> ACE_INLINE +POA_benchmark::setPortsOnly_tie<T>::setPortsOnly_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::setPortsOnly_tie<T>::setPortsOnly_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template <class T> ACE_INLINE +POA_benchmark::setPortsOnly_tie<T>::~setPortsOnly_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template <class T> ACE_INLINE T * +POA_benchmark::setPortsOnly_tie<T>::_tied_object (void) +{ + return this->ptr_; +} + +template <class T> ACE_INLINE void +POA_benchmark::setPortsOnly_tie<T>::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template <class T> ACE_INLINE void +POA_benchmark::setPortsOnly_tie<T>::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template <class T> ACE_INLINE ::CORBA::Boolean +POA_benchmark::setPortsOnly_tie<T>::_is_owner (void) +{ + return this->rel_; +} + +template <class T> ACE_INLINE void +POA_benchmark::setPortsOnly_tie<T>::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template <class T> ACE_INLINE PortableServer::POA_ptr +POA_benchmark::setPortsOnly_tie<T>::_default_POA (ACE_ENV_SINGLE_ARG_DECL) +{ + if (! CORBA::is_nil (this->poa_.in ())) + { + return PortableServer::POA::_duplicate (this->poa_.in ()); + } + + return this->setPortsOnly::_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::setPortsOnly_tie<T>::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template <class T> ACE_INLINE +void POA_benchmark::setPortsOnly_tie<T>::setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->setPorts ( + valPort1, + valPort2, + valPort3 + ); +} diff --git a/quellcode/versuch5/bench_i.cpp b/quellcode/versuch5/bench_i.cpp new file mode 100755 index 0000000..92c544e --- /dev/null +++ b/quellcode/versuch5/bench_i.cpp @@ -0,0 +1,224 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1063 + +#include "bench_i.h" +#include <ace/Thread.h> + +// Implementation skeleton constructor +benchmark_msgAndPort1_i::benchmark_msgAndPort1_i (CORBA::ORB_ptr orb) +{ + CORBA::Object_var obj = orb->resolve_initial_references("RTCurrent");
+ rt_current_ = RTCORBA::Current::_narrow(obj.in()); +} + +// Implementation skeleton destructor +benchmark_msgAndPort1_i::~benchmark_msgAndPort1_i (void) +{ +} + +void benchmark_msgAndPort1_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_msgAndPort1_i::setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + + CORBA::Short priority = rt_current_->the_priority();
+
+ ACE_hthread_t current;
+ ACE_Thread::self (current);
+ int native_priority; + + cpx->set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); + + if (ACE_Thread::getprio (current, native_priority) != -1) {
+ std::cout << "Port: Native Priority: " << ACE_Thread::getprio (current, native_priority) << std::endl;
+ }
+ +} + +::CORBA::Boolean benchmark_msgAndPort1_i::sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + + CORBA::Short priority = rt_current_->the_priority();
+
+ ACE_hthread_t current;
+ ACE_Thread::self (current);
+ int native_priority; + + lastString = message.sender; + lastString += ": "; + lastString += message.message; + + if (ACE_Thread::getprio (current, native_priority) != -1) {
+ std::cout << "Message: Native Priority: " << ACE_Thread::getprio (current, native_priority) << std::endl; + } + + return true; +} + +// Implementation skeleton constructor +benchmark_msgAndPort2_i::benchmark_msgAndPort2_i (CORBA::ORB_ptr orb) +{ + CORBA::Object_var obj = orb->resolve_initial_references("RTCurrent");
+ rt_current_ = RTCORBA::Current::_narrow(obj.in()); +} + +// Implementation skeleton destructor +benchmark_msgAndPort2_i::~benchmark_msgAndPort2_i (void) +{ +} + +void benchmark_msgAndPort2_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_msgAndPort2_i::setPortsSendMsg ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3, + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); + lastString = message.sender; + lastString += ": "; + lastString += message.message; +} + +// Implementation skeleton constructor +benchmark_msgOnly_i::benchmark_msgOnly_i (CORBA::ORB_ptr orb) +{ +} + +// Implementation skeleton destructor +benchmark_msgOnly_i::~benchmark_msgOnly_i (void) +{ +} + +::CORBA::Boolean benchmark_msgOnly_i::sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + lastString = message.sender; + lastString += ": "; + lastString += message.message; + + return true; +} + +// Implementation skeleton constructor +benchmark_setPortsOnly_i::benchmark_setPortsOnly_i (CORBA::ORB_ptr orb) +{ + CORBA::Object_var obj = orb->resolve_initial_references("RTCurrent");
+ rt_current_ = RTCORBA::Current::_narrow(obj.in()); +} + +// Implementation skeleton destructor +benchmark_setPortsOnly_i::~benchmark_setPortsOnly_i (void) +{ +} + +void benchmark_setPortsOnly_i::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx = new CPX(); +} + +void benchmark_setPortsOnly_i::setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + // Add your implementation here + cpx->set(1, valPort1); + cpx->set(2, valPort2); + cpx->set(3, valPort3); + +} + + diff --git a/quellcode/versuch5/bench_i.h b/quellcode/versuch5/bench_i.h new file mode 100755 index 0000000..d7943c0 --- /dev/null +++ b/quellcode/versuch5/bench_i.h @@ -0,0 +1,193 @@ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// and +// Institute for Software Integrated Systems +// Vanderbilt University +// Nashville, TN +// USA +// http://www.isis.vanderbilt.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// be/be_codegen.cpp:1001 + +#ifndef BENCHI_H_ +#define BENCHI_H_ + +#include "benchS.h" + +#include "cpx.h" +#include <string.h> +#include <tao/RTCORBA/RTCORBA.h> + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class benchmark_msgAndPort1_i + : public virtual POA_benchmark::msgAndPort1 +{ + +private: + CPX* cpx; + std::string lastString; + RTCORBA::Current_var rt_current_; + +public: + // Constructor + benchmark_msgAndPort1_i (CORBA::ORB_ptr orb); + + // Destructor + virtual ~benchmark_msgAndPort1_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + +class benchmark_msgAndPort2_i + : public virtual POA_benchmark::msgAndPort2 +{ + +private: + CPX* cpx; + std::string lastString; + RTCORBA::Current_var rt_current_; + +public: + // Constructor + benchmark_msgAndPort2_i (CORBA::ORB_ptr orb); + + // Destructor + virtual ~benchmark_msgAndPort2_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void setPortsSendMsg ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3, + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + +class benchmark_msgOnly_i + : public virtual POA_benchmark::msgOnly +{ + +private: + CPX* cpx; + std::string lastString; + RTCORBA::Current_var rt_current_; + +public: + // Constructor + benchmark_msgOnly_i (CORBA::ORB_ptr orb); + + // Destructor + virtual ~benchmark_msgOnly_i (void); + + virtual + ::CORBA::Boolean sendMsg ( + const ::benchmark::msg & message + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + +class benchmark_setPortsOnly_i + : public virtual POA_benchmark::setPortsOnly +{ + +private: + CPX* cpx; + std::string lastString; + RTCORBA::Current_var rt_current_; + +public: + // Constructor + benchmark_setPortsOnly_i (CORBA::ORB_ptr orb); + + // Destructor + virtual ~benchmark_setPortsOnly_i (void); + + virtual + void connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); + + virtual + void setPorts ( + ::CORBA::Short valPort1, + ::CORBA::Short valPort2, + ::CORBA::Short valPort3 + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )); +}; + + +#endif /* BENCHI_H_ */ + diff --git a/quellcode/versuch5/cpx.cpp b/quellcode/versuch5/cpx.cpp new file mode 100755 index 0000000..eebdc65 --- /dev/null +++ b/quellcode/versuch5/cpx.cpp @@ -0,0 +1,85 @@ +/** + * + * \file cpx.cpp + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#include "cpx.h" + +CPX::CPX(){ + init(); + std::cout<<"\n\n init ok\n\n"; +} + +int CPX::init(){ + + int fd_out = open(CPX_Input, O_RDWR | O_SYNC); + if (fd_out == -1){ + std::cout<<"PBCIO: open failed"<<std::endl; + return(-1); + } + std::cout<<"CPX_Output_1 opened\n"; + + /* setup signal on interrupt */ + param.signal = 1001; + param.pid = getpid(); + + if (ioctl(fd_out, CPX_DIO_IOCTL_ADD_SIG, (void *) ¶m) == -1) { + std::cout<<"signal map failed\n"; + close(fd_out); + return(-1); + } else std::cout<<"signal map ok\n"; + + mapped_out = (u_char*) mmap (NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd_out, 0); + if (mapped_out == MAP_FAILED) { + std::cout<<"PBCIO: mmap failed\n"; + close (fd_out); + return(-2); + } + std::cout<<"mmap ok\n"; + + DOUT = (u_char *) mapped_out; + DIN = (u_char *) mapped_out; + + return 0; +} + +short CPX::get(short port){ + unsigned char value = 0; + + switch(port){ + case 1: + value = DIN[PORT1_IN]; + break; + case 2: + value = DIN[PORT1_IN]; + break; + case 3: + value = DIN[PORT1_IN]; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } + + return (short) value; +} + +void CPX::set(short port, short value){ + switch(port){ + case 1: + DOUT[PORT1_OUT] = value; + break; + case 2: + DOUT[PORT2_OUT] = value; + break; + case 3: + DOUT[PORT3_OUT] = value; + break; + default: + std::cout<<"portNo: "<<port<<" incorrect\n"; + } +} diff --git a/quellcode/versuch5/cpx.h b/quellcode/versuch5/cpx.h new file mode 100755 index 0000000..7b4545a --- /dev/null +++ b/quellcode/versuch5/cpx.h @@ -0,0 +1,73 @@ +/** + * + * \file cpx.h + * \brief read and write DIO + * + * \author Manuel Traut + * \version 2006-10-06 + * + */ + +#ifndef CPX_H +#define CPX_H + +#include <iostream> + +#include <sys/mman.h> +#include <sys/ioctl.h> +#include <fcntl.h> +#include <unistd.h> + +#define CPX_Input "/dev/iio2" +#define CPX_Input_1 "/dev/iio2_in" +#define CPX_Output_1 "/dev/iio2_out" + +#define PORT1_OUT 0x2c00 +#define PORT2_OUT 0x3c00 +#define PORT3_OUT 0x4c00 + +#define PORT1_IN 0x5c00
+#define PORT2_IN 0x6c00
+#define PORT3_IN 0x7c00 + +# ifndef PROT_READ +# define PROT_READ 0x01 +# endif +# ifndef PROT_WRITE +# define PROT_WRITE 0x02 +# endif +# ifndef MAP_SHARED +# define MAP_SHARED 0x01 +# endif +# ifndef MAP_PRIVATE +# define MAP_PRIVATE 0x02 +# endif + +// ioctl (file descriptor, CPX_DIO_IOCTL_SET_SIGNAL, irq_send_signal_param*) +// enable sending signal on interrupt +// cpx_dio_set_signal_param.signal = signal to be sent to process +#define CPX_DIO_IOCTL_BASE 0xCD + +typedef struct{ + int signal; /* IN parameter: LINUX signal to be sent */ + int pid; /* IN parameter: process id where signal should be sent to */ +}cpx_dio_set_signal_param; + +#define CPX_DIO_IOCTL_ADD_SIG _IOW(CPX_DIO_IOCTL_BASE, 3, cpx_dio_set_signal_param) +#define CPX_DIO_IOCTL_DEL_SIG _IOW(CPX_DIO_IOCTL_BASE, 4, cpx_dio_set_signal_param) + +class CPX{ + public: + CPX(); + void set(short port, short value); + short get(short port); + private: + int init(); + unsigned char *mapped_in; + unsigned char *mapped_out; + volatile u_char *DOUT; + volatile u_char *DIN; + cpx_dio_set_signal_param param; +}; + +#endif diff --git a/quellcode/versuch5/svc.conf b/quellcode/versuch5/svc.conf new file mode 100755 index 0000000..4f1cfb2 --- /dev/null +++ b/quellcode/versuch5/svc.conf @@ -0,0 +1 @@ +static RT_ORB_Loader "-ORBPriorityMapping linear -ORBSchedPolicy SCHED_RR -ORBScopePolicy SYSTEM" |
