From 1adba473e6917b227e1b0a1118148101dca202e7 Mon Sep 17 00:00:00 2001 From: Manuel Traut Date: Mon, 31 Mar 2014 16:53:55 +0200 Subject: add quellcode Signed-off-by: Manuel Traut --- quellcode/demo1/Controller/AssemblyInfo.cs | 32 + quellcode/demo1/Controller/Controller.idl | 6 + quellcode/demo1/Controller/Controller.mdp | 42 + quellcode/demo1/Controller/Controller.mds | 16 + quellcode/demo1/Controller/Controller.pidb | Bin 0 -> 8313 bytes quellcode/demo1/Controller/Controller.userprefs | 43 + quellcode/demo1/Controller/ControllerC.cpp | 447 +++ quellcode/demo1/Controller/ControllerC.h | 294 ++ quellcode/demo1/Controller/ControllerC.inl | 64 + quellcode/demo1/Controller/ControllerS.cpp | 803 +++++ quellcode/demo1/Controller/ControllerS.h | 159 + quellcode/demo1/Controller/ControllerS.inl | 28 + quellcode/demo1/Controller/ControllerS_T.cpp | 41 + quellcode/demo1/Controller/ControllerS_T.h | 118 + quellcode/demo1/Controller/ControllerS_T.inl | 136 + quellcode/demo1/Controller/CorbaHandler.cs | 84 + quellcode/demo1/Controller/Display.cs | 15 + quellcode/demo1/Controller/Display.dll | Bin 0 -> 2048 bytes quellcode/demo1/Controller/Executor.dll | Bin 0 -> 2048 bytes quellcode/demo1/Controller/Main.cs | 17 + quellcode/demo1/Controller/MainWindow.cs | 56 + .../demo1/Controller/bin/Debug/Controller.exe | Bin 0 -> 24064 bytes .../demo1/Controller/bin/Debug/Controller.exe.mdb | Bin 0 -> 5925 bytes quellcode/demo1/Controller/bin/Debug/Display.dll | Bin 0 -> 2048 bytes quellcode/demo1/Controller/bin/Debug/Executor.dll | Bin 0 -> 2048 bytes .../demo1/Controller/bin/Debug/IIOPChannel.dll | Bin 0 -> 325632 bytes .../demo1/Controller/bin/Release/Controller.exe | Bin 0 -> 23552 bytes quellcode/demo1/Controller/bin/Release/Display.dll | Bin 0 -> 2048 bytes .../demo1/Controller/bin/Release/Executor.dll | Bin 0 -> 2048 bytes .../demo1/Controller/bin/Release/IIOPChannel.dll | Bin 0 -> 325632 bytes quellcode/demo1/Controller/gtk-gui/generated.cs | 257 ++ quellcode/demo1/Controller/gtk-gui/gui.stetic | 244 ++ quellcode/demo1/Executor/.depend.Executor | 0 quellcode/demo1/Executor/.depend.Executor_Executor | 0 quellcode/demo1/Executor/.depend.Executor_Receiver | 0 quellcode/demo1/Executor/Executor | Bin 0 -> 745856 bytes quellcode/demo1/Executor/Executor.cpp | 53 + quellcode/demo1/Executor/Executor.idl | 7 + quellcode/demo1/Executor/Executor.mpc | 9 + quellcode/demo1/Executor/ExecutorC.cpp | 500 +++ quellcode/demo1/Executor/ExecutorC.h | 312 ++ quellcode/demo1/Executor/ExecutorC.inl | 64 + quellcode/demo1/Executor/ExecutorS.cpp | 925 ++++++ quellcode/demo1/Executor/ExecutorS.h | 182 ++ quellcode/demo1/Executor/ExecutorS.inl | 28 + quellcode/demo1/Executor/ExecutorS_T.cpp | 41 + quellcode/demo1/Executor/ExecutorS_T.h | 133 + quellcode/demo1/Executor/ExecutorS_T.inl | 160 + quellcode/demo1/Executor/Executor_i.cpp | 146 + quellcode/demo1/Executor/Executor_i.h | 77 + quellcode/demo1/Executor/GNUmakefile.Executor | 227 ++ quellcode/demo1/Receiver/.depend.Receiver_Receiver | 0 quellcode/demo1/Receiver/GNUmakefile.Receiver | 226 ++ quellcode/demo1/Receiver/Receiver | Bin 0 -> 545814 bytes quellcode/demo1/Receiver/Receiver.cpp | 67 + quellcode/demo1/Receiver/Receiver.idl | 10 + quellcode/demo1/Receiver/Receiver.mpc | 8 + quellcode/demo1/Receiver/ReceiverC.cpp | 767 +++++ quellcode/demo1/Receiver/ReceiverC.h | 363 +++ quellcode/demo1/Receiver/ReceiverC.inl | 63 + quellcode/demo1/Receiver/ReceiverS.cpp | 852 +++++ quellcode/demo1/Receiver/ReceiverS.h | 209 ++ quellcode/demo1/Receiver/ReceiverS.inl | 27 + quellcode/demo1/Receiver/ReceiverS_T.cpp | 41 + quellcode/demo1/Receiver/ReceiverS_T.h | 155 + quellcode/demo1/Receiver/ReceiverS_T.inl | 177 + quellcode/demo1/Receiver/Receiver_i.cpp | 92 + quellcode/demo1/Receiver/Receiver_i.h | 89 + quellcode/demo1/Receiver/cpx.cpp | 85 + quellcode/demo1/Receiver/cpx.h | 73 + quellcode/versuch1/GNUmakefile.Bench_Receiver | 224 ++ quellcode/versuch1/GNUmakefile.Bench_Supplier | 221 ++ quellcode/versuch1/Receiver | Bin 0 -> 536715 bytes quellcode/versuch1/Receiver.cpp | 76 + quellcode/versuch1/Supplier | Bin 0 -> 331097 bytes quellcode/versuch1/Supplier.cpp | 81 + quellcode/versuch1/bench.idl | 20 + quellcode/versuch1/bench.mpc | 23 + quellcode/versuch1/benchC.cpp | 838 +++++ quellcode/versuch1/benchC.h | 393 +++ quellcode/versuch1/benchC.inl | 64 + quellcode/versuch1/benchI.cpp | 84 + quellcode/versuch1/benchI.h | 86 + quellcode/versuch1/benchS.cpp | 1002 ++++++ quellcode/versuch1/benchS.h | 199 ++ quellcode/versuch1/benchS.inl | 28 + quellcode/versuch1/benchS_T.cpp | 41 + quellcode/versuch1/benchS_T.h | 144 + quellcode/versuch1/benchS_T.inl | 176 + quellcode/versuch1/bench_I.cpp | 73 + quellcode/versuch1/cpx.cpp | 92 + quellcode/versuch1/cpx.h | 67 + quellcode/versuch1/dot.dot | 15 + quellcode/versuch1/dotout.dot | 32 + quellcode/versuch1/output.dia | 2201 +++++++++++++ quellcode/versuch1/output.dia~ | 1260 ++++++++ quellcode/versuch1/tags | 163 + quellcode/versuch2/CPXEventConsumer | Bin 0 -> 226538 bytes quellcode/versuch2/CPXEventConsumer_i.cpp | 44 + quellcode/versuch2/CPXEventConsumer_i.h | 17 + quellcode/versuch2/CPXEventSupplier | Bin 0 -> 204981 bytes quellcode/versuch2/CPXEventSupplier_i.cpp | 14 + quellcode/versuch2/CPXEventSupplier_i.h | 19 + quellcode/versuch2/ESConsumer.cpp | 94 + quellcode/versuch2/ESSupplier.cpp | 106 + quellcode/versuch2/GNUmakefile.RTEvent_Consumer | 177 + quellcode/versuch2/GNUmakefile.RTEvent_Supplier | 177 + quellcode/versuch2/RTEvent.mpc | 22 + quellcode/versuch2/buildNcopy | 2 + quellcode/versuch2/cpx.cpp | 85 + quellcode/versuch2/cpx.h | 73 + quellcode/versuch2/error.txt | 13 + quellcode/versuch3/GNUmakefile.Bench_Receiver | 224 ++ quellcode/versuch3/GNUmakefile.Bench_Supplier | 221 ++ quellcode/versuch3/GNUmakefile.Benchmark_Receiver | 226 ++ quellcode/versuch3/GNUmakefile.Benchmark_Supplier | 226 ++ quellcode/versuch3/Receiver | Bin 0 -> 573339 bytes quellcode/versuch3/Receiver.cpp | 96 + quellcode/versuch3/Supplier | Bin 0 -> 363690 bytes quellcode/versuch3/Supplier.cpp | 89 + quellcode/versuch3/bench.idl | 10 + quellcode/versuch3/bench.mpc | 23 + quellcode/versuch3/benchC.cpp | 768 +++++ quellcode/versuch3/benchC.h | 363 +++ quellcode/versuch3/benchC.inl | 63 + quellcode/versuch3/benchI.cpp | 79 + quellcode/versuch3/benchI.h | 82 + quellcode/versuch3/benchS.cpp | 945 ++++++ quellcode/versuch3/benchS.h | 209 ++ quellcode/versuch3/benchS.inl | 27 + quellcode/versuch3/benchS_T.cpp | 41 + quellcode/versuch3/benchS_T.h | 155 + quellcode/versuch3/benchS_T.inl | 177 + quellcode/versuch3/bench_i.cpp | 84 + quellcode/versuch3/bench_i.h | 86 + quellcode/versuch3/benchmark.mpc | 23 + quellcode/versuch3/buildNcopy | 2 + quellcode/versuch3/burner | Bin 0 -> 8386 bytes quellcode/versuch3/cpx.cpp | 85 + quellcode/versuch3/cpx.h | 73 + quellcode/versuch3/howto | 230 ++ quellcode/versuch3/multithreading/ReceiverDual.cpp | 123 + quellcode/versuch3/multithreading/SupplierHigh.cpp | 126 + quellcode/versuch3/multithreading/SupplierLow.cpp | 126 + quellcode/versuch3/multithreading/benchDual.mpc | 35 + quellcode/versuch3/multithreading/benchI.cpp | 137 + quellcode/versuch3/multithreading/benchI.h | 130 + quellcode/versuch3/multithreading/cpx.cpp | 85 + quellcode/versuch3/multithreading/cpx.h | 73 + quellcode/versuch3/multithreading/svc.conf | 2 + quellcode/versuch3/myBurner.cpp | 13 + quellcode/versuch3/readme | 65 + quellcode/versuch4/GNUmakefile.Bench_Receiver | 224 ++ quellcode/versuch4/GNUmakefile.Bench_Supplier | 221 ++ quellcode/versuch4/GNUmakefile.Benchmark_Receiver | 226 ++ quellcode/versuch4/GNUmakefile.Benchmark_Supplier | 226 ++ quellcode/versuch4/Receiver | Bin 0 -> 573339 bytes quellcode/versuch4/Receiver.cpp | 67 + quellcode/versuch4/Supplier | Bin 0 -> 363690 bytes quellcode/versuch4/Supplier.cpp | 106 + quellcode/versuch4/bench.idl | 21 + quellcode/versuch4/bench.mpc | 23 + quellcode/versuch4/benchC.cpp | 1062 ++++++ quellcode/versuch4/benchC.h | 469 +++ quellcode/versuch4/benchC.inl | 64 + quellcode/versuch4/benchI.cpp | 79 + quellcode/versuch4/benchI.h | 82 + quellcode/versuch4/benchS.cpp | 1138 +++++++ quellcode/versuch4/benchS.h | 217 ++ quellcode/versuch4/benchS.inl | 28 + quellcode/versuch4/benchS_T.cpp | 41 + quellcode/versuch4/benchS_T.h | 155 + quellcode/versuch4/benchS_T.inl | 193 ++ quellcode/versuch4/bench_i.cpp | 99 + quellcode/versuch4/bench_i.h | 99 + quellcode/versuch4/benchmark.mpc | 23 + quellcode/versuch4/buildNcopy | 2 + quellcode/versuch4/burner | Bin 0 -> 8386 bytes quellcode/versuch4/cpx.cpp | 85 + quellcode/versuch4/cpx.h | 73 + quellcode/versuch4/howto | 230 ++ quellcode/versuch4/multithreading/ReceiverDual.cpp | 123 + quellcode/versuch4/multithreading/SupplierHigh.cpp | 126 + quellcode/versuch4/multithreading/SupplierLow.cpp | 126 + quellcode/versuch4/multithreading/benchDual.mpc | 35 + quellcode/versuch4/multithreading/benchI.cpp | 137 + quellcode/versuch4/multithreading/benchI.h | 130 + quellcode/versuch4/multithreading/cpx.cpp | 85 + quellcode/versuch4/multithreading/cpx.h | 73 + quellcode/versuch4/myBurner.cpp | 13 + quellcode/versuch4/readme | 65 + quellcode/versuch5/Client | Bin 0 -> 526159 bytes quellcode/versuch5/Client.cpp | 248 ++ .../versuch5/Custom_Network_Priority_Mapping.cpp | 133 + .../versuch5/Custom_Network_Priority_Mapping.h | 58 + quellcode/versuch5/GNUmakefile.Bench_Client | 222 ++ quellcode/versuch5/GNUmakefile.Bench_Server | 225 ++ quellcode/versuch5/Server | Bin 0 -> 876069 bytes quellcode/versuch5/Server.cpp | 143 + quellcode/versuch5/bench.idl | 29 + quellcode/versuch5/bench.mpc | 25 + quellcode/versuch5/benchC.cpp | 2322 ++++++++++++++ quellcode/versuch5/benchC.h | 1046 ++++++ quellcode/versuch5/benchC.inl | 172 + quellcode/versuch5/benchS.cpp | 3366 ++++++++++++++++++++ quellcode/versuch5/benchS.h | 518 +++ quellcode/versuch5/benchS.inl | 28 + quellcode/versuch5/benchS_T.cpp | 41 + quellcode/versuch5/benchS_T.h | 353 ++ quellcode/versuch5/benchS_T.inl | 546 ++++ quellcode/versuch5/bench_i.cpp | 224 ++ quellcode/versuch5/bench_i.h | 193 ++ quellcode/versuch5/cpx.cpp | 85 + quellcode/versuch5/cpx.h | 73 + quellcode/versuch5/svc.conf | 1 + 215 files changed, 39255 insertions(+) create mode 100755 quellcode/demo1/Controller/AssemblyInfo.cs create mode 100755 quellcode/demo1/Controller/Controller.idl create mode 100755 quellcode/demo1/Controller/Controller.mdp create mode 100755 quellcode/demo1/Controller/Controller.mds create mode 100755 quellcode/demo1/Controller/Controller.pidb create mode 100755 quellcode/demo1/Controller/Controller.userprefs create mode 100755 quellcode/demo1/Controller/ControllerC.cpp create mode 100755 quellcode/demo1/Controller/ControllerC.h create mode 100755 quellcode/demo1/Controller/ControllerC.inl create mode 100755 quellcode/demo1/Controller/ControllerS.cpp create mode 100755 quellcode/demo1/Controller/ControllerS.h create mode 100755 quellcode/demo1/Controller/ControllerS.inl create mode 100755 quellcode/demo1/Controller/ControllerS_T.cpp create mode 100755 quellcode/demo1/Controller/ControllerS_T.h create mode 100755 quellcode/demo1/Controller/ControllerS_T.inl create mode 100755 quellcode/demo1/Controller/CorbaHandler.cs create mode 100755 quellcode/demo1/Controller/Display.cs create mode 100755 quellcode/demo1/Controller/Display.dll create mode 100755 quellcode/demo1/Controller/Executor.dll create mode 100755 quellcode/demo1/Controller/Main.cs create mode 100755 quellcode/demo1/Controller/MainWindow.cs create mode 100755 quellcode/demo1/Controller/bin/Debug/Controller.exe create mode 100755 quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb create mode 100755 quellcode/demo1/Controller/bin/Debug/Display.dll create mode 100755 quellcode/demo1/Controller/bin/Debug/Executor.dll create mode 100755 quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll create mode 100755 quellcode/demo1/Controller/bin/Release/Controller.exe create mode 100755 quellcode/demo1/Controller/bin/Release/Display.dll create mode 100755 quellcode/demo1/Controller/bin/Release/Executor.dll create mode 100755 quellcode/demo1/Controller/bin/Release/IIOPChannel.dll create mode 100755 quellcode/demo1/Controller/gtk-gui/generated.cs create mode 100755 quellcode/demo1/Controller/gtk-gui/gui.stetic create mode 100755 quellcode/demo1/Executor/.depend.Executor create mode 100755 quellcode/demo1/Executor/.depend.Executor_Executor create mode 100755 quellcode/demo1/Executor/.depend.Executor_Receiver create mode 100755 quellcode/demo1/Executor/Executor create mode 100755 quellcode/demo1/Executor/Executor.cpp create mode 100755 quellcode/demo1/Executor/Executor.idl create mode 100755 quellcode/demo1/Executor/Executor.mpc create mode 100755 quellcode/demo1/Executor/ExecutorC.cpp create mode 100755 quellcode/demo1/Executor/ExecutorC.h create mode 100755 quellcode/demo1/Executor/ExecutorC.inl create mode 100755 quellcode/demo1/Executor/ExecutorS.cpp create mode 100755 quellcode/demo1/Executor/ExecutorS.h create mode 100755 quellcode/demo1/Executor/ExecutorS.inl create mode 100755 quellcode/demo1/Executor/ExecutorS_T.cpp create mode 100755 quellcode/demo1/Executor/ExecutorS_T.h create mode 100755 quellcode/demo1/Executor/ExecutorS_T.inl create mode 100755 quellcode/demo1/Executor/Executor_i.cpp create mode 100755 quellcode/demo1/Executor/Executor_i.h create mode 100755 quellcode/demo1/Executor/GNUmakefile.Executor create mode 100755 quellcode/demo1/Receiver/.depend.Receiver_Receiver create mode 100755 quellcode/demo1/Receiver/GNUmakefile.Receiver create mode 100755 quellcode/demo1/Receiver/Receiver create mode 100755 quellcode/demo1/Receiver/Receiver.cpp create mode 100755 quellcode/demo1/Receiver/Receiver.idl create mode 100755 quellcode/demo1/Receiver/Receiver.mpc create mode 100755 quellcode/demo1/Receiver/ReceiverC.cpp create mode 100755 quellcode/demo1/Receiver/ReceiverC.h create mode 100755 quellcode/demo1/Receiver/ReceiverC.inl create mode 100755 quellcode/demo1/Receiver/ReceiverS.cpp create mode 100755 quellcode/demo1/Receiver/ReceiverS.h create mode 100755 quellcode/demo1/Receiver/ReceiverS.inl create mode 100755 quellcode/demo1/Receiver/ReceiverS_T.cpp create mode 100755 quellcode/demo1/Receiver/ReceiverS_T.h create mode 100755 quellcode/demo1/Receiver/ReceiverS_T.inl create mode 100755 quellcode/demo1/Receiver/Receiver_i.cpp create mode 100755 quellcode/demo1/Receiver/Receiver_i.h create mode 100755 quellcode/demo1/Receiver/cpx.cpp create mode 100755 quellcode/demo1/Receiver/cpx.h create mode 100755 quellcode/versuch1/GNUmakefile.Bench_Receiver create mode 100755 quellcode/versuch1/GNUmakefile.Bench_Supplier create mode 100755 quellcode/versuch1/Receiver create mode 100755 quellcode/versuch1/Receiver.cpp create mode 100755 quellcode/versuch1/Supplier create mode 100755 quellcode/versuch1/Supplier.cpp create mode 100755 quellcode/versuch1/bench.idl create mode 100755 quellcode/versuch1/bench.mpc create mode 100755 quellcode/versuch1/benchC.cpp create mode 100755 quellcode/versuch1/benchC.h create mode 100755 quellcode/versuch1/benchC.inl create mode 100755 quellcode/versuch1/benchI.cpp create mode 100755 quellcode/versuch1/benchI.h create mode 100755 quellcode/versuch1/benchS.cpp create mode 100755 quellcode/versuch1/benchS.h create mode 100755 quellcode/versuch1/benchS.inl create mode 100755 quellcode/versuch1/benchS_T.cpp create mode 100755 quellcode/versuch1/benchS_T.h create mode 100755 quellcode/versuch1/benchS_T.inl create mode 100755 quellcode/versuch1/bench_I.cpp create mode 100755 quellcode/versuch1/cpx.cpp create mode 100755 quellcode/versuch1/cpx.h create mode 100755 quellcode/versuch1/dot.dot create mode 100755 quellcode/versuch1/dotout.dot create mode 100755 quellcode/versuch1/output.dia create mode 100755 quellcode/versuch1/output.dia~ create mode 100755 quellcode/versuch1/tags create mode 100755 quellcode/versuch2/CPXEventConsumer create mode 100755 quellcode/versuch2/CPXEventConsumer_i.cpp create mode 100755 quellcode/versuch2/CPXEventConsumer_i.h create mode 100755 quellcode/versuch2/CPXEventSupplier create mode 100755 quellcode/versuch2/CPXEventSupplier_i.cpp create mode 100755 quellcode/versuch2/CPXEventSupplier_i.h create mode 100755 quellcode/versuch2/ESConsumer.cpp create mode 100755 quellcode/versuch2/ESSupplier.cpp create mode 100755 quellcode/versuch2/GNUmakefile.RTEvent_Consumer create mode 100755 quellcode/versuch2/GNUmakefile.RTEvent_Supplier create mode 100755 quellcode/versuch2/RTEvent.mpc create mode 100755 quellcode/versuch2/buildNcopy create mode 100755 quellcode/versuch2/cpx.cpp create mode 100755 quellcode/versuch2/cpx.h create mode 100755 quellcode/versuch2/error.txt create mode 100755 quellcode/versuch3/GNUmakefile.Bench_Receiver create mode 100755 quellcode/versuch3/GNUmakefile.Bench_Supplier create mode 100755 quellcode/versuch3/GNUmakefile.Benchmark_Receiver create mode 100755 quellcode/versuch3/GNUmakefile.Benchmark_Supplier create mode 100755 quellcode/versuch3/Receiver create mode 100755 quellcode/versuch3/Receiver.cpp create mode 100755 quellcode/versuch3/Supplier create mode 100755 quellcode/versuch3/Supplier.cpp create mode 100755 quellcode/versuch3/bench.idl create mode 100755 quellcode/versuch3/bench.mpc create mode 100755 quellcode/versuch3/benchC.cpp create mode 100755 quellcode/versuch3/benchC.h create mode 100755 quellcode/versuch3/benchC.inl create mode 100755 quellcode/versuch3/benchI.cpp create mode 100755 quellcode/versuch3/benchI.h create mode 100755 quellcode/versuch3/benchS.cpp create mode 100755 quellcode/versuch3/benchS.h create mode 100755 quellcode/versuch3/benchS.inl create mode 100755 quellcode/versuch3/benchS_T.cpp create mode 100755 quellcode/versuch3/benchS_T.h create mode 100755 quellcode/versuch3/benchS_T.inl create mode 100755 quellcode/versuch3/bench_i.cpp create mode 100755 quellcode/versuch3/bench_i.h create mode 100755 quellcode/versuch3/benchmark.mpc create mode 100755 quellcode/versuch3/buildNcopy create mode 100755 quellcode/versuch3/burner create mode 100755 quellcode/versuch3/cpx.cpp create mode 100755 quellcode/versuch3/cpx.h create mode 100755 quellcode/versuch3/howto create mode 100755 quellcode/versuch3/multithreading/ReceiverDual.cpp create mode 100755 quellcode/versuch3/multithreading/SupplierHigh.cpp create mode 100755 quellcode/versuch3/multithreading/SupplierLow.cpp create mode 100755 quellcode/versuch3/multithreading/benchDual.mpc create mode 100755 quellcode/versuch3/multithreading/benchI.cpp create mode 100755 quellcode/versuch3/multithreading/benchI.h create mode 100755 quellcode/versuch3/multithreading/cpx.cpp create mode 100755 quellcode/versuch3/multithreading/cpx.h create mode 100755 quellcode/versuch3/multithreading/svc.conf create mode 100755 quellcode/versuch3/myBurner.cpp create mode 100755 quellcode/versuch3/readme create mode 100755 quellcode/versuch4/GNUmakefile.Bench_Receiver create mode 100755 quellcode/versuch4/GNUmakefile.Bench_Supplier create mode 100755 quellcode/versuch4/GNUmakefile.Benchmark_Receiver create mode 100755 quellcode/versuch4/GNUmakefile.Benchmark_Supplier create mode 100755 quellcode/versuch4/Receiver create mode 100755 quellcode/versuch4/Receiver.cpp create mode 100755 quellcode/versuch4/Supplier create mode 100755 quellcode/versuch4/Supplier.cpp create mode 100755 quellcode/versuch4/bench.idl create mode 100755 quellcode/versuch4/bench.mpc create mode 100755 quellcode/versuch4/benchC.cpp create mode 100755 quellcode/versuch4/benchC.h create mode 100755 quellcode/versuch4/benchC.inl create mode 100755 quellcode/versuch4/benchI.cpp create mode 100755 quellcode/versuch4/benchI.h create mode 100755 quellcode/versuch4/benchS.cpp create mode 100755 quellcode/versuch4/benchS.h create mode 100755 quellcode/versuch4/benchS.inl create mode 100755 quellcode/versuch4/benchS_T.cpp create mode 100755 quellcode/versuch4/benchS_T.h create mode 100755 quellcode/versuch4/benchS_T.inl create mode 100755 quellcode/versuch4/bench_i.cpp create mode 100755 quellcode/versuch4/bench_i.h create mode 100755 quellcode/versuch4/benchmark.mpc create mode 100755 quellcode/versuch4/buildNcopy create mode 100755 quellcode/versuch4/burner create mode 100755 quellcode/versuch4/cpx.cpp create mode 100755 quellcode/versuch4/cpx.h create mode 100755 quellcode/versuch4/howto create mode 100755 quellcode/versuch4/multithreading/ReceiverDual.cpp create mode 100755 quellcode/versuch4/multithreading/SupplierHigh.cpp create mode 100755 quellcode/versuch4/multithreading/SupplierLow.cpp create mode 100755 quellcode/versuch4/multithreading/benchDual.mpc create mode 100755 quellcode/versuch4/multithreading/benchI.cpp create mode 100755 quellcode/versuch4/multithreading/benchI.h create mode 100755 quellcode/versuch4/multithreading/cpx.cpp create mode 100755 quellcode/versuch4/multithreading/cpx.h create mode 100755 quellcode/versuch4/myBurner.cpp create mode 100755 quellcode/versuch4/readme create mode 100755 quellcode/versuch5/Client create mode 100755 quellcode/versuch5/Client.cpp create mode 100755 quellcode/versuch5/Custom_Network_Priority_Mapping.cpp create mode 100755 quellcode/versuch5/Custom_Network_Priority_Mapping.h create mode 100755 quellcode/versuch5/GNUmakefile.Bench_Client create mode 100755 quellcode/versuch5/GNUmakefile.Bench_Server create mode 100755 quellcode/versuch5/Server create mode 100755 quellcode/versuch5/Server.cpp create mode 100755 quellcode/versuch5/bench.idl create mode 100755 quellcode/versuch5/bench.mpc create mode 100755 quellcode/versuch5/benchC.cpp create mode 100755 quellcode/versuch5/benchC.h create mode 100755 quellcode/versuch5/benchC.inl create mode 100755 quellcode/versuch5/benchS.cpp create mode 100755 quellcode/versuch5/benchS.h create mode 100755 quellcode/versuch5/benchS.inl create mode 100755 quellcode/versuch5/benchS_T.cpp create mode 100755 quellcode/versuch5/benchS_T.h create mode 100755 quellcode/versuch5/benchS_T.inl create mode 100755 quellcode/versuch5/bench_i.cpp create mode 100755 quellcode/versuch5/bench_i.h create mode 100755 quellcode/versuch5/cpx.cpp create mode 100755 quellcode/versuch5/cpx.h create mode 100755 quellcode/versuch5/svc.conf (limited to 'quellcode') 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quellcode/demo1/Controller/Controller.pidb b/quellcode/demo1/Controller/Controller.pidb new file mode 100755 index 0000000..5beb119 Binary files /dev/null and b/quellcode/demo1/Controller/Controller.pidb differ 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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::duplicate ( + Controller::Display_ptr p + ) +{ + return Controller::Display::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + Controller::Display_ptr p + ) +{ + CORBA::release (p); +} + +Controller::Display_ptr +TAO::Objref_Traits::nil (void) +{ + return Controller::Display::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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::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::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::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::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::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::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 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; + 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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 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 ACE_INLINE +POA_Controller::Display_tie::Display_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_Controller::Display_tie::Display_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_Controller::Display_tie::Display_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_Controller::Display_tie::Display_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_Controller::Display_tie::~Display_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_Controller::Display_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_Controller::Display_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_Controller::Display_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_Controller::Display_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_Controller::Display_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_Controller::Display_tie::_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 ACE_INLINE +void POA_Controller::Display_tie::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 new file mode 100755 index 0000000..cd4fc7f Binary files /dev/null and b/quellcode/demo1/Controller/Display.dll differ diff --git a/quellcode/demo1/Controller/Executor.dll b/quellcode/demo1/Controller/Executor.dll new file mode 100755 index 0000000..23c2865 Binary files /dev/null and b/quellcode/demo1/Controller/Executor.dll differ 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 ..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 new file mode 100755 index 0000000..5aad293 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Controller.exe differ diff --git a/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb b/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb new file mode 100755 index 0000000..07beef0 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Controller.exe.mdb differ diff --git a/quellcode/demo1/Controller/bin/Debug/Display.dll b/quellcode/demo1/Controller/bin/Debug/Display.dll new file mode 100755 index 0000000..cd4fc7f Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Display.dll differ diff --git a/quellcode/demo1/Controller/bin/Debug/Executor.dll b/quellcode/demo1/Controller/bin/Debug/Executor.dll new file mode 100755 index 0000000..23c2865 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/Executor.dll differ diff --git a/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll b/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll new file mode 100755 index 0000000..0420e23 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Debug/IIOPChannel.dll differ diff --git a/quellcode/demo1/Controller/bin/Release/Controller.exe b/quellcode/demo1/Controller/bin/Release/Controller.exe new file mode 100755 index 0000000..aaf65ff Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/Controller.exe differ diff --git a/quellcode/demo1/Controller/bin/Release/Display.dll b/quellcode/demo1/Controller/bin/Release/Display.dll new file mode 100755 index 0000000..efdfd74 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/Display.dll differ diff --git a/quellcode/demo1/Controller/bin/Release/Executor.dll b/quellcode/demo1/Controller/bin/Release/Executor.dll new file mode 100755 index 0000000..c380706 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/Executor.dll differ diff --git a/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll b/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll new file mode 100755 index 0000000..0420e23 Binary files /dev/null and b/quellcode/demo1/Controller/bin/Release/IIOPChannel.dll differ 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 @@ +// ------------------------------------------------------------------------------ +// +// 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. +// +// ------------------------------------------------------------------------------ + +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 = "Connection"; + 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 = "Select"; + 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 = "Status"; + 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 @@ + + + + Controller + CenterOnParent + True + 0 + + + + True + 0 + + + None + 0 + True + 0 + + + 0 + 0 + 12 + True + 0 + + + True + 0 + + + Host: + 0 + True + 0 + + + 0 + False + False + False + 5 + + + + + True + • + True + True + 0 + + + + 1 + False + + + + + TextOnly + Connect + False + True + True + 0 + + + + 2 + True + False + False + 3 + + + + + + + + + <b>Connection</b> + True + True + ButtonPressMask + + + label_item + + + + + 0 + True + False + False + + + + + None + 0 + True + 0 + + + 0 + 0 + 12 + True + 0 + + + True + 0 + + + Mode: + 0 + True + 0 + + + 0 + False + False + False + 5 + + + + + Move +Blink +Flash + True + 0 + + + + 1 + False + 2 + + + + + TextOnly + Submit + False + True + True + 0 + + + + 2 + True + False + False + 3 + + + + + + + + + <b>Select</b> + True + True + ButtonPressMask + + + label_item + + + + + 1 + True + False + False + + + + + None + 0 + True + 0 + + + 0 + 0 + 12 + True + 0 + + + True + 0 + + + |disconnected + True + 0 + + + 0 + True + False + False + + + + + + + + + <b>Status</b> + True + True + ButtonPressMask + + + label_item + + + + + 2 + True + False + False + + + + + + \ 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 diff --git a/quellcode/demo1/Executor/.depend.Executor_Executor b/quellcode/demo1/Executor/.depend.Executor_Executor new file mode 100755 index 0000000..e69de29 diff --git a/quellcode/demo1/Executor/.depend.Executor_Receiver b/quellcode/demo1/Executor/.depend.Executor_Receiver new file mode 100755 index 0000000..e69de29 diff --git a/quellcode/demo1/Executor/Executor b/quellcode/demo1/Executor/Executor new file mode 100755 index 0000000..692bc9b Binary files /dev/null and b/quellcode/demo1/Executor/Executor differ 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 +#include "Executor_i.h" +#include "orbsvcs/CosNamingC.h" +#include +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ExecutorORB"); + std::cout<<"ORB ok"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<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"<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"<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"<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"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<::duplicate ( + Executor::ExecCmd_ptr p + ) +{ + return Executor::ExecCmd::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + Executor::ExecCmd_ptr p + ) +{ + CORBA::release (p); +} + +Executor::ExecCmd_ptr +TAO::Objref_Traits::nil (void) +{ + return Executor::ExecCmd::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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::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::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::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::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::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::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 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; + 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 (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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 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 ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::ExecCmd_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_Executor::ExecCmd_tie::~ExecCmd_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_Executor::ExecCmd_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_Executor::ExecCmd_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_Executor::ExecCmd_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_Executor::ExecCmd_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_Executor::ExecCmd_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_Executor::ExecCmd_tie::_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 ACE_INLINE +::CORBA::Boolean POA_Executor::ExecCmd_tie::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 ACE_INLINE +::CORBA::Boolean POA_Executor::ExecCmd_tie::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 + +#include + +// 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"<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"<resolve(name); + display = Controller::Display::_narrow(benchObj.in()); + std::cout<<"DisplayObjekt ok"<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<show("moving..."); + for(int i = 0; i<255; i++){ + put->allPorts(i,i,i); + } + break; + + case 2: + display->show("blinking..."); + std::cout<<"blink"<allPorts(255,255,255); + else put->allPorts(0,0,0); + } + break; + + case 3: + display->show("flashing..."); + std::cout<<"flash"<allPorts(255,255,255); + else put->allPorts(0,0,0); + } + break; + default: + std::cout<<"Mode not implemented"<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 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 new file mode 100755 index 0000000..0edce79 Binary files /dev/null and b/quellcode/demo1/Receiver/Receiver differ 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 + +#include "Receiver_i.h" + +#include "orbsvcs/CosNamingC.h" +#include + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<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"<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"<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"<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"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "<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 (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +Receiver::invalidRequest * +Receiver::invalidRequest::_downcast (CORBA::Exception *_tao_excp) +{ + return dynamic_cast (_tao_excp); +} + +const Receiver::invalidRequest * +Receiver::invalidRequest::_downcast (CORBA::Exception const *_tao_excp) +{ + return dynamic_cast (_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::duplicate ( + Receiver::Put_ptr p + ) +{ + return Receiver::Put::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + Receiver::Put_ptr p + ) +{ + CORBA::release (p); +} + +Receiver::Put_ptr +TAO::Objref_Traits::nil (void) +{ + return Receiver::Put::_nil (); +} + +CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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::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::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::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::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::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::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::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::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 class Narrow_Utils; + template 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; + 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 (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) * (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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 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 ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T *tp, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::Put_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_Receiver::Put_tie::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_Receiver::Put_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_Receiver::Put_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_Receiver::Put_tie::_tied_object (T *obj, CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE CORBA::Boolean +POA_Receiver::Put_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_Receiver::Put_tie::_is_owner (CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_Receiver::Put_tie::_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 ACE_INLINE +void POA_Receiver::Put_tie::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::Receiver::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template ACE_INLINE +void POA_Receiver::Put_tie::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 ACE_INLINE +void POA_Receiver::Put_tie::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"<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: "<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"< + +#include +#include +#include +#include + +#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 new file mode 100755 index 0000000..0162cbd Binary files /dev/null and b/quellcode/versuch1/Receiver differ 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 + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<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"<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"<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"<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"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "< +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<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"<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: "<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 (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception *_tao_excp) +{ + return dynamic_cast (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception const *_tao_excp) +{ + return dynamic_cast (_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 const * const _tao_fields_benchmark_invalidRequest = 0; +static TAO::TypeCode::Struct 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::duplicate ( + benchmark::Put_ptr p + ) +{ + return benchmark::Put::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + benchmark::Put_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::Put_ptr +TAO::Objref_Traits::nil (void) +{ + return benchmark::Put::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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::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::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::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::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::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::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::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::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::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::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 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; + 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 (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 (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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 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 ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_benchmark::Put_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_benchmark::Put_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_benchmark::Put_tie::_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 ACE_INLINE +void POA_benchmark::Put_tie::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +void POA_benchmark::Put_tie::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 ACE_INLINE +void POA_benchmark::Put_tie::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"< + +#include +#include +#include +#include + +// 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 @@ + + + + + + + + + + + + + #A4# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_get_component_Put_Upcall_Command# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_is_a_Put_Upcall_Command# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_non_existent_Put_Upcall_Command# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_repository_id_Put_Upcall_Command# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #allPorts_Put# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #benchmark_Put_i# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #cpx# + + + #CPX*# + + + ## + + + ## + + + + + + + + + + + + + + + + #ACE_THROW_SPEC# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #::CORBA::SystemException# + + + ## + + + ## + + + ## + + + + + + + + #::benchmark::invalidRequest# + + + ## + + + ## + + + ## + + + + + + + + + + #ACE_THROW_SPEC# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #::CORBA::SystemException# + + + ## + + + ## + + + ## + + + + + + + + #::benchmark::invalidRequest# + + + ## + + + ## + + + ## + + + + + + + + + + #ACE_THROW_SPEC# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #::CORBA::SystemException# + + + ## + + + ## + + + ## + + + + + + + + #::benchmark::invalidRequest# + + + ## + + + ## + + + ## + + + + + + + + + + #benchmark_Put_i# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #~benchmark_Put_i# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #connect_Put# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #CPX# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #DIN# + + + #volatile u_char\*# + + + ## + + + ## + + + + + + + + + + + + + + #DOUT# + + + #volatile u_char\*# + + + ## + + + ## + + + + + + + + + + + + + + #mapped_in# + + + #unsigned char\*# + + + ## + + + ## + + + + + + + + + + + + + + #mapped_out# + + + #unsigned char\*# + + + ## + + + ## + + + + + + + + + + + + + + #param# + + + #cpx_dio_set_signal_param# + + + ## + + + ## + + + + + + + + + + + + + + + + #init# + + + ## + + + #int# + + + + + + ## + + + + + + + + + + + + + + + + + + #CPX# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #get# + + + ## + + + #short# + + + + + + ## + + + + + + + + + + + + + + + + + #port# + + + #short# + + + ## + + + ## + + + + + + + + + + #set# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + #port# + + + #short# + + + ## + + + ## + + + + + + + + #value# + + + #short# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #invalidRequest# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #onePort_Put# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Put# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Put_tie# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #T# + + + #class# + + + + + + + + + + + + + + + + + + + + + + #TAO_benchmark_Put_Perfect_Hash_OpTable# + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #hash# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + #lookup# + + + ## + + + ## + + + + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + + + + + + + + ## + + + + + + + + ## + + + ## + + + + + + + + + + + + + + ## + + + ## + + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + #A4# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_get_component_Put_Upcall_Command# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_is_a_Put_Upcall_Command# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_non_existent_Put_Upcall_Command# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #_repository_id_Put_Upcall_Command# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #allPorts_Put# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #benchmark_Put_i# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #cpx# + + + #CPX*# + + + + + + + + + + + + + + + + + + + #ACE_THROW_SPEC# + + + + + + + + + + + + + + + + + #::CORBA::SystemException# + + + ## + + + + + + + + + + + #::benchmark::invalidRequest# + + + ## + + + + + + + + + + + + + #ACE_THROW_SPEC# + + + + + + + + + + + + + + + + + #::CORBA::SystemException# + + + ## + + + + + + + + + + + #::benchmark::invalidRequest# + + + ## + + + + + + + + + + + + + #ACE_THROW_SPEC# + + + + + + + + + + + + + + + + + #::CORBA::SystemException# + + + ## + + + + + + + + + + + #::benchmark::invalidRequest# + + + ## + + + + + + + + + + + + + #benchmark_Put_i# + + + + + + + + + + + + + + + + + + #~benchmark_Put_i# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #connect_Put# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #CPX# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #DIN# + + + #volatile u_char\*# + + + + + + + + + + + + + + + + + #DOUT# + + + #volatile u_char\*# + + + + + + + + + + + + + + + + + #mapped_in# + + + #unsigned char\*# + + + + + + + + + + + + + + + + + #mapped_out# + + + #unsigned char\*# + + + + + + + + + + + + + + + + + #param# + + + #cpx_dio_set_signal_param# + + + + + + + + + + + + + + + + + + + #init# + + + #int# + + + + + + + + + + + + + + + #CPX# + + + + + + + + + + + + + + + + + + #get# + + + #short# + + + + + + + + + + + + + + #port# + + + #short# + + + + + + + + + + + + + #set# + + + + + + + + + + + + + + + + + #port# + + + #short# + + + + + + + + + + + #value# + + + #short# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #invalidRequest# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #onePort_Put# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Put# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #Put_tie# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #T# + + + #class# + + + + + + + + + + + + + + + + + + + + + + #TAO_benchmark_Put_Perfect_Hash_OpTable# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #hash# + + + + + + + + + + + + + + + + + + #lookup# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100755 index 0000000..f1de2b4 Binary files /dev/null and b/quellcode/versuch2/CPXEventConsumer differ 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 +#include + +#include +#include + +#include + +#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 +#include + +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 new file mode 100755 index 0000000..a97332d Binary files /dev/null and b/quellcode/versuch2/CPXEventSupplier differ 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 + +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 // 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 +#include +#include +#include +#include + +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 +#include +#include +#include +#include + +#include + +#include +#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"<resolve_initial_references("NameService"); + CosNaming::NamingContextExt_var namingContext = CosNaming::NamingContextExt::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<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: "< + +#include +#include +#include +#include + +#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 new file mode 100755 index 0000000..c34b7af Binary files /dev/null and b/quellcode/versuch3/Receiver differ 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 +#include + + +//#include + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include + +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"<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"<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"<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"<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"<bind(name, lowBenchObj.in()); + std::cout<<"Bound LowReceiver to NameService"<activate + + + orbManager.run(); + + std::cout<<"Server ready"< +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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 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 \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("HighReceiver", argc, argv); + else lowPut = bindService("LowReceiver", argc, argv); + + // signal handling + signal(SIGRTMIN+29, sigproc); + + while(true) pause(); + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<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 (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast (CORBA::Exception *_tao_excp) +{ + return dynamic_cast (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast (CORBA::Exception const *_tao_excp) +{ + return dynamic_cast (_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::duplicate ( + benchmark::Put_ptr p + ) +{ + return benchmark::Put::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + benchmark::Put_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::Put_ptr +TAO::Objref_Traits::nil (void) +{ + return benchmark::Put::_nil (); +} + +CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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::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::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::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::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::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::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::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::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 class Narrow_Utils; + template 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; + 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 (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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 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 ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T *tp, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T *tp, PortableServer::POA_ptr poa, CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_benchmark::Put_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_tied_object (T *obj, CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE CORBA::Boolean +POA_benchmark::Put_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_is_owner (CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_benchmark::Put_tie::_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 ACE_INLINE +void POA_benchmark::Put_tie::connect ( + + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:68 + +template ACE_INLINE +void POA_benchmark::Put_tie::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 ACE_INLINE +void POA_benchmark::Put_tie::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 new file mode 100755 index 0000000..7914765 Binary files /dev/null and b/quellcode/versuch3/burner differ 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"< + +#include +#include +#include +#include + +#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 + +#include + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<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"<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"<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"<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"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "< +#include "interfaceC.h" +#include "orbsvcs/CosNamingC.h" +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<resolve_initial_references("RTCurrent"); + RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + rtCurrent->the_priority(RTCORBA::maxPriority); + std::cout<<"PriorityChange ok"<connect(); + put->allPorts(0, 0, 0); + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "< +#include + + +//#include + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include + +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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<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"<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"<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"<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"<bind(name, lowBenchObj.in()); + std::cout<<"Bound LowReceiver to NameService"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + //enable_irq(18); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "< +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<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"<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"<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"<resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<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: "< +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<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"<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"<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"<resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<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: "<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"< + +#include +#include +#include +#include + +#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 +#include + +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 new file mode 100755 index 0000000..c34b7af Binary files /dev/null and b/quellcode/versuch4/Receiver differ 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 + +#include "bench_i.h" + +#include "orbsvcs/CosNamingC.h" +#include + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<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"<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"<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"<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"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "< +#include +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<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"<resolve_initial_references("RTCurrent"); + RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + rtCurrent->the_priority(0); + std::cout<<"PriorityChange ok"<_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<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: "< + class Arg_Traits + : public + Var_Size_Arg_Traits_T< + benchmark::dataStruct, + benchmark::dataStruct_var, + benchmark::dataStruct_out, + TAO::Any_Insert_Policy_Stream + > + { + }; + +#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 (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception *_tao_excp) +{ + return dynamic_cast (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception const *_tao_excp) +{ + return dynamic_cast (_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 const * const _tao_fields_benchmark_invalidRequest = 0; +static TAO::TypeCode::Struct 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 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 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 (_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::duplicate ( + benchmark::Put_ptr p + ) +{ + return benchmark::Put::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + benchmark::Put_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::Put_ptr +TAO::Objref_Traits::nil (void) +{ + return benchmark::Put::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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::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::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::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::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( 0 ); // Use non-copying insertion of a NULL + else + TAO::Any_Dual_Impl_T::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::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::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::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::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::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::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::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::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 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; + 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 (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 + : public + Var_Size_SArg_Traits_T< + benchmark::dataStruct, + benchmark::dataStruct_var, + benchmark::dataStruct_out, + TAO::Any_Insert_Policy_Stream + > + { + }; + +#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 + : public + Var_Size_Arg_Traits_T< + benchmark::dataStruct, + benchmark::dataStruct_var, + benchmark::dataStruct_out, + TAO::Any_Insert_Policy_Stream + > + { + }; + +#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 (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 (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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 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 ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::Put_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::Put_tie::~Put_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_benchmark::Put_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_benchmark::Put_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_benchmark::Put_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_benchmark::Put_tie::_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 ACE_INLINE +void POA_benchmark::Put_tie::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +void POA_benchmark::Put_tie::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 ACE_INLINE +void POA_benchmark::Put_tie::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 ACE_INLINE +void POA_benchmark::Put_tie::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 + +#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 new file mode 100755 index 0000000..7914765 Binary files /dev/null and b/quellcode/versuch4/burner differ 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"< + +#include +#include +#include +#include + +#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 + +#include + +int main(int argc, char* argv[]){ + try{ + // initialize ORB + CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "ServerORB"); + std::cout<<"ORB initialized"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<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"<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"<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"<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"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "< +#include "interfaceC.h" +#include "orbsvcs/CosNamingC.h" +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<resolve_initial_references("NameService"); + CosNaming::NamingContext_var namingContext = CosNaming::NamingContext::_narrow(namingObject.in()); + std::cout<<"NamingService ok"<resolve(name); + put = benchmark::Put::_narrow(benchObj.in()); + std::cout<<"TransferOjekt ok"<resolve_initial_references("RTCurrent"); + RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + rtCurrent->the_priority(RTCORBA::maxPriority); + std::cout<<"PriorityChange ok"<connect(); + put->allPorts(0, 0, 0); + + // destroy ORB + orb->destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "< +#include + + +//#include + +#include "benchI.h" + +#include "orbsvcs/CosNamingC.h" +#include + +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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb); + std::cout<<"RT Extensions OK"<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"<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"<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"<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"<bind(name, lowBenchObj.in()); + std::cout<<"Bound LowReceiver to NameService"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + //enable_irq(18); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "< +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<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"<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"<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"<resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<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: "< +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<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"<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"<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"<resolve_initial_references("RTCurrent"); + //RTCORBA::Current_var rtCurrent = RTCORBA::Current::_narrow(rtCurrentObj.in()); + //rtCurrent->the_priority(RTCORBA::maxPriority); + //std::cout<<"PriorityChange ok"<_validate_connection(inconsistentPolicies.out()); + //std::cout<<"explicit bind ok"<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: "<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"< + +#include +#include +#include +#include + +#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 +#include + +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 new file mode 100755 index 0000000..b1f0883 Binary files /dev/null and b/quellcode/versuch5/Client differ 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 +#include +#include "benchC.h" +#include "orbsvcs/CosNamingC.h" +#include +#include + +#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"<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 :-)"<>mode; + + if ( (mode < 1) || (mode > 4) ) { + std::cout<<"Fehlerhafte Eingabe\nBenutze 4)"<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"<resolve_initial_references("RTORB"); + RTCORBA::RTORB_var rtORB = RTCORBA::RTORB::_narrow(rtorb.in()); + std::cout<<"RTORB ok"<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"<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"<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 ;-)"<destroy(); + + }catch(CORBA::Exception &any){ + std::cout<<"Exception occured: "<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 (((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 new file mode 100755 index 0000000..c84aebb Binary files /dev/null and b/quellcode/versuch5/Server differ 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 + +#include "bench_i.h" + +#include "orbsvcs/CosNamingC.h" +#include +#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"<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"<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"<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"<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"<run(); + std::cout<<"ORB ready"<destroy(1,1); + orb->destroy(); + }catch(CORBA::Exception &any){ + std::cout<<"Exception: "< + class Arg_Traits + : public + Var_Size_Arg_Traits_T< + benchmark::msg, + benchmark::msg_var, + benchmark::msg_out, + TAO::Any_Insert_Policy_Stream + > + { + }; + +#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 const _tao_fields_benchmark_msg[] = + { + { "sender", &CORBA::_tc_string }, + { "message", &CORBA::_tc_string } + + }; +static TAO::TypeCode::Struct 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 (_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 (_tao_void_pointer); + delete _tao_tmp_pointer; +} + +benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception *_tao_excp) +{ + return dynamic_cast (_tao_excp); +} + +const benchmark::invalidRequest * +benchmark::invalidRequest::_downcast ( ::CORBA::Exception const *_tao_excp) +{ + return dynamic_cast (_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 const * const _tao_fields_benchmark_invalidRequest = 0; +static TAO::TypeCode::Struct 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::duplicate ( + benchmark::msgAndPort1_ptr p + ) +{ + return benchmark::msgAndPort1::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + benchmark::msgAndPort1_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::msgAndPort1_ptr +TAO::Objref_Traits::nil (void) +{ + return benchmark::msgAndPort1::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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::duplicate ( + benchmark::msgAndPort2_ptr p + ) +{ + return benchmark::msgAndPort2::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + benchmark::msgAndPort2_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::msgAndPort2_ptr +TAO::Objref_Traits::nil (void) +{ + return benchmark::msgAndPort2::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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::duplicate ( + benchmark::msgOnly_ptr p + ) +{ + return benchmark::msgOnly::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + benchmark::msgOnly_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::msgOnly_ptr +TAO::Objref_Traits::nil (void) +{ + return benchmark::msgOnly::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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::duplicate ( + benchmark::setPortsOnly_ptr p + ) +{ + return benchmark::setPortsOnly::_duplicate (p); +} + +void +TAO::Objref_Traits::release ( + benchmark::setPortsOnly_ptr p + ) +{ + CORBA::release (p); +} + +benchmark::setPortsOnly_ptr +TAO::Objref_Traits::nil (void) +{ + return benchmark::setPortsOnly::_nil (); +} + +::CORBA::Boolean +TAO::Objref_Traits::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 (_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::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::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 + _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( 0 ); // Use non-copying insertion of a NULL + else + TAO::Any_Dual_Impl_T::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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 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; + 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 (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; + 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 (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; + 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 (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; + 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 (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 + : public + Var_Size_SArg_Traits_T< + benchmark::msg, + benchmark::msg_var, + benchmark::msg_out, + TAO::Any_Insert_Policy_Stream + > + { + }; + +#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 + : public + Var_Size_Arg_Traits_T< + benchmark::msg, + benchmark::msg_var, + benchmark::msg_out, + TAO::Any_Insert_Policy_Stream + > + { + }; + +#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 (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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 (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 (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 (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 (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 (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 (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 (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::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 (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 (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::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 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 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 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 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 ACE_INLINE +POA_benchmark::msgAndPort1_tie::msgAndPort1_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort1_tie::msgAndPort1_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort1_tie::msgAndPort1_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort1_tie::msgAndPort1_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort1_tie::~msgAndPort1_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_benchmark::msgAndPort1_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_benchmark::msgAndPort1_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_benchmark::msgAndPort1_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_benchmark::msgAndPort1_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_benchmark::msgAndPort1_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_benchmark::msgAndPort1_tie::_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 ACE_INLINE +void POA_benchmark::msgAndPort1_tie::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +void POA_benchmark::msgAndPort1_tie::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 ACE_INLINE +::CORBA::Boolean POA_benchmark::msgAndPort1_tie::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 ACE_INLINE +POA_benchmark::msgAndPort2_tie::msgAndPort2_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort2_tie::msgAndPort2_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort2_tie::msgAndPort2_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort2_tie::msgAndPort2_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::msgAndPort2_tie::~msgAndPort2_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_benchmark::msgAndPort2_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_benchmark::msgAndPort2_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_benchmark::msgAndPort2_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_benchmark::msgAndPort2_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_benchmark::msgAndPort2_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_benchmark::msgAndPort2_tie::_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 ACE_INLINE +void POA_benchmark::msgAndPort2_tie::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +void POA_benchmark::msgAndPort2_tie::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 ACE_INLINE +POA_benchmark::msgOnly_tie::msgOnly_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::msgOnly_tie::msgOnly_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::msgOnly_tie::msgOnly_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::msgOnly_tie::msgOnly_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::msgOnly_tie::~msgOnly_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_benchmark::msgOnly_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_benchmark::msgOnly_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_benchmark::msgOnly_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_benchmark::msgOnly_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_benchmark::msgOnly_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_benchmark::msgOnly_tie::_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 ACE_INLINE +::CORBA::Boolean POA_benchmark::msgOnly_tie::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 ACE_INLINE +POA_benchmark::setPortsOnly_tie::setPortsOnly_tie (T &t) + : ptr_ (&t), + poa_ (PortableServer::POA::_nil ()), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::setPortsOnly_tie::setPortsOnly_tie (T &t, PortableServer::POA_ptr poa) + : ptr_ (&t), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (0) +{} + +template ACE_INLINE +POA_benchmark::setPortsOnly_tie::setPortsOnly_tie (T *tp, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_nil ()), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::setPortsOnly_tie::setPortsOnly_tie (T *tp, PortableServer::POA_ptr poa, ::CORBA::Boolean release) + : ptr_ (tp), + poa_ (PortableServer::POA::_duplicate (poa)), + rel_ (release) +{} + +template ACE_INLINE +POA_benchmark::setPortsOnly_tie::~setPortsOnly_tie (void) +{ + if (this->rel_) + { + delete this->ptr_; + } +} + +template ACE_INLINE T * +POA_benchmark::setPortsOnly_tie::_tied_object (void) +{ + return this->ptr_; +} + +template ACE_INLINE void +POA_benchmark::setPortsOnly_tie::_tied_object (T &obj) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = &obj; + this->rel_ = 0; +} + +template ACE_INLINE void +POA_benchmark::setPortsOnly_tie::_tied_object (T *obj, ::CORBA::Boolean release) +{ + if (this->rel_) + { + delete this->ptr_; + } + + this->ptr_ = obj; + this->rel_ = release; +} + +template ACE_INLINE ::CORBA::Boolean +POA_benchmark::setPortsOnly_tie::_is_owner (void) +{ + return this->rel_; +} + +template ACE_INLINE void +POA_benchmark::setPortsOnly_tie::_is_owner ( ::CORBA::Boolean b) +{ + this->rel_ = b; +} + +template ACE_INLINE PortableServer::POA_ptr +POA_benchmark::setPortsOnly_tie::_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 ACE_INLINE +void POA_benchmark::setPortsOnly_tie::connect ( + + ) + ACE_THROW_SPEC (( + ::CORBA::SystemException, + ::benchmark::invalidRequest + )) +{ + this->ptr_->connect ( + ); +} + +// TAO_IDL - Generated from +// be/be_visitor_operation/tie_si.cpp:101 + +template ACE_INLINE +void POA_benchmark::setPortsOnly_tie::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 + +// 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 +#include + +#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"< + +#include +#include +#include +#include + +#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" -- cgit v1.2.3